Skip to content

Add guideline in doc #320

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Apr 21, 2018
Merged

Add guideline in doc #320

merged 3 commits into from
Apr 21, 2018

Conversation

blegat
Copy link
Member

@blegat blegat commented Apr 18, 2018

No description provided.

@codecov-io
Copy link

codecov-io commented Apr 18, 2018

Codecov Report

Merging #320 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #320   +/-   ##
=======================================
  Coverage   96.45%   96.45%           
=======================================
  Files          30       30           
  Lines        4514     4514           
=======================================
  Hits         4354     4354           
  Misses        160      160

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b634ecd...200b539. Read the comment docs.

const MOIB = MOI.Bridges

# Include here the functions/sets supported by the solver wrapper (not those that are supported through bridges)
MOIU.@model FooBarModelData () (EqualTo, GreaterThan, LessThan) (Zeros, Nonnegatives, Nonpositives) () (SingleVariable,) (ScalarAffineFunction,) (VectorOfVariables,) (VectorAffineFunction,)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could the UniversalFallback work here? There's no performance concerns for testing.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Universal Fallback still requires an internal model so we need to create a model anyway. Doing MOIU.@model FooBarModelData () () () () () () () () and then using UniversalFallback would be a bit obscure. Besides, UniversalFallback only do attribute fallback for now :)

# Include here the functions/sets supported by the solver wrapper (not those that are supported through bridges)
MOIU.@model FooBarModelData () (EqualTo, GreaterThan, LessThan) (Zeros, Nonnegatives, Nonpositives) () (SingleVariable,) (ScalarAffineFunction,) (VectorOfVariables,) (VectorAffineFunction,)

MOIB.@bridge SplitInterval MOIB.SplitIntervalBridge () (Interval,) () () () (ScalarAffineFunction,) () ()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do users need to see this macro call? Can't MOIB just export a SplitInterval type? The macros calls in this code snippet are enough to scare potential solver authors away. (Only partially kidding.)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could define all bridges in MOIB by default yes, I initially thought that it wasn't necessary and would increase the loading time of MOIB but it could be reconsidered

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done :)

const config = MOIT.TestConfig(atol=1e-6, rtol=1e-6)

@testset "MOI Continuous Linear" begin
MOIT.contlineartest(MOIB.SplitInterval{Float64}(optimizer), config)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This would be a good place to explain why SplitInterval is used.

@blegat blegat merged commit 4b54de3 into master Apr 21, 2018
@blegat blegat deleted the bl/guideline branch April 21, 2018 15:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants