Document how to use MOI.VectorAffineFunction#171
Document how to use MOI.VectorAffineFunction#171oyamad wants to merge 1 commit intoJuliaPolyhedra:masterfrom
MOI.VectorAffineFunction#171Conversation
Codecov Report
@@ Coverage Diff @@
## master #171 +/- ##
=======================================
Coverage 83.37% 83.37%
=======================================
Files 32 32
Lines 1720 1720
=======================================
Hits 1434 1434
Misses 286 286Continue to review full report at Codecov.
|
1 similar comment
Codecov Report
@@ Coverage Diff @@
## master #171 +/- ##
=======================================
Coverage 83.37% 83.37%
=======================================
Files 32 32
Lines 1720 1720
=======================================
Hits 1434 1434
Misses 286 286Continue to review full report at Codecov.
|
Codecov Report
@@ Coverage Diff @@
## master #171 +/- ##
=======================================
Coverage 83.37% 83.37%
=======================================
Files 32 32
Lines 1720 1720
=======================================
Hits 1434 1434
Misses 286 286Continue to review full report at Codecov.
|
|
@blegat Thanks. Fixed the typo and removed the empty lines as pointed out, and also modified the example (and made a force push). |
|
|
||
| ## Using a Polyhedra Optimizer with MathOptInterface | ||
|
|
||
| Polyhedra Optimizers by dafault support only a few constraint types in MathOptInterface (MOI). |
|
|
||
| Let us solve this program with `CDDLib.Optimizer` in exact arithmetic. | ||
| To set up: | ||
|
|
| ``` | ||
|
|
||
| To solve: | ||
|
|
| ```julia | ||
| MOI.optimize!(optimizer) | ||
| MOI.get(optimizer, MOI.VariablePrimal(), x) | ||
| ``` |
There was a problem hiding this comment.
The standard way is to add the output in the same code block after an #output comment like https://juliadocs.github.io/Documenter.jl/stable/man/doctests/#%22Script%22-Examples-1
We could turn it into a doctest later by using a MOIU.MockOptimizer so that we don't require CDDLib (that's what we do for JuMP's doctests).
| ``` | ||
|
|
||
| ## Using a Polyhedra Optimizer with MathOptInterface | ||
|
|
There was a problem hiding this comment.
Explain why one would use MOI directly instead of with JuMP (which is recommended) which is simply Model(with_optimizer(CDDLib.Optimizer)). The reason could be that JuMP only does Float64 arithmetic while CDD allows rational arithmetic.
4dda979 to
687831d
Compare
Close #170