-
Notifications
You must be signed in to change notification settings - Fork 92
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
Add guideline in doc #320
Conversation
Codecov Report
@@ 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.
|
docs/src/apimanual.md
Outdated
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,) |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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 :)
docs/src/apimanual.md
Outdated
# 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,) () () |
There was a problem hiding this comment.
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.)
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done :)
docs/src/apimanual.md
Outdated
const config = MOIT.TestConfig(atol=1e-6, rtol=1e-6) | ||
|
||
@testset "MOI Continuous Linear" begin | ||
MOIT.contlineartest(MOIB.SplitInterval{Float64}(optimizer), config) |
There was a problem hiding this comment.
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.
No description provided.