Skip to content

Commit 5d1b1b2

Browse files
authored
Refactor standard form docs (jump-dev#1274)
* Refactor standard form docs * Large refactoring of basic usage
1 parent 6b0b2af commit 5d1b1b2

File tree

10 files changed

+768
-526
lines changed

10 files changed

+768
-526
lines changed

docs/make.jl

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,16 @@ makedocs(
1919
doctest = _FIX ? :fix : true,
2020
pages = [
2121
"Introduction" => "index.md",
22+
"Background" => [
23+
"background/motivation.md",
24+
"background/duality.md",
25+
],
2226
"Manual" => [
27+
"manual/standard_form.md",
28+
"manual/constraints.md",
29+
"manual/status.md",
30+
"manual/modification.md",
2331
"manual/basic_usage.md",
24-
"manual/advanced_usage.md",
2532
"manual/implementing.md",
2633
],
2734
"API Reference" => "reference/reference.md",
Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,7 @@ end
77
DocTestFilters = [r"MathOptInterface|MOI"]
88
```
99

10-
# Advanced usage
11-
12-
## Duality
10+
# Duality
1311

1412
Conic duality is the starting point for MOI's duality conventions. When all
1513
functions are affine (or coordinate projections), and all constraint sets are
@@ -109,11 +107,11 @@ and similarly, the dual is:
109107
\end{align}
110108
```
111109

112-
!!! warn
110+
!!! warning
113111
For the LP case is that the signs of the feasible duals depend only on the
114112
sense of the inequality and not on the objective sense.
115113

116-
### Duality and scalar product
114+
## Duality and scalar product
117115

118116
The scalar product is different from the canonical one for the sets
119117
[`PositiveSemidefiniteConeTriangle`](@ref), [`LogDetConeTriangle`](@ref),
@@ -125,7 +123,7 @@ twice the value of the `coefficients` field in the [`VectorAffineFunction`](@ref
125123
for the corresponding rows. See [`PositiveSemidefiniteConeTriangle`](@ref) for
126124
details.
127125

128-
### Dual for problems with quadratic functions
126+
## Dual for problems with quadratic functions
129127

130128
Given a problem with quadratic functions:
131129
```math

docs/src/background/motivation.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Motivation
2+
3+
MOI has been designed to replace [MathProgBase](https://github.com/JuliaOpt/MathProgBase.jl),
4+
which was been used by modeling packages such as [JuMP](https://github.com/jump-dev/JuMP.jl)
5+
and [Convex.jl](https://github.com/jump-dev/Convex.jl).
6+
7+
This second-generation abstraction layer addresses a number of limitations of
8+
MathProgBase.
9+
10+
MOI is designed to:
11+
- Be simple and extensible, unifying linear, quadratic, and conic optimization,
12+
and seamlessly facilitate extensions to essentially arbitrary constraints and
13+
functions (e.g., indicator constraints, complementarity constraints, and
14+
piecewise-linear functions)
15+
- Be fast by allowing access to a solver's in-memory representation of a problem
16+
without writing intermediate files (when possible) and by using multiple
17+
dispatch and avoiding requiring containers of nonconcrete types
18+
- Allow a solver to return multiple results (e.g., a pool of solutions)
19+
- Allow a solver to return extra arbitrary information via attributes (e.g.,
20+
variable- and constraint-wise membership in an irreducible inconsistent subset
21+
for infeasibility analysis)
22+
- Provide a greatly expanded set of status codes explaining what happened during
23+
the optimization procedure
24+
- Enable a solver to more precisely specify which problem classes it supports
25+
- Enable both primal and dual warm starts
26+
- Enable adding and removing both variables and constraints by indices that are
27+
not required to be consecutive
28+
- Enable any modification that the solver supports to an existing model
29+
- Avoid requiring the solver wrapper to store an additional copy of the problem
30+
data

docs/src/index.md

Lines changed: 9 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,21 @@ optimization solvers so that users do not need to understand multiple
1212
solver-specific APIs.
1313

1414
!!! tip
15-
While MOI can be used directly, we encourage you instead to use MOI through
16-
a higher-level modeling interface like [JuMP](https://github.com/jump-dev/JuMP.jl)
17-
or [Convex.jl](https://github.com/jump-dev/Convex.jl).
15+
This documentation is aimed at developers writing software interfaces to
16+
solvers and modeling languages using the MathOptInterface API. If you are a
17+
user interested in solving optimization problems, we encourage you instead
18+
to use MOI through a higher-level modeling interface like
19+
[JuMP](https://github.com/jump-dev/JuMP.jl) or
20+
[Convex.jl](https://github.com/jump-dev/Convex.jl).
1821

1922
## How the documentation is structured
2023

2124
Having a high-level overview of how this documentation is structured will help
2225
you know where to look for certain things.
2326

27+
* The **Background** section contains articles on the motivation and theory
28+
behind MathOptInterface. Look here if you want to understand _why_, rather
29+
than _how_.
2430
* The **Manual** contains short code-snippets that explain how to use the MOI
2531
API. Look here if you want to write a model in MOI.
2632
* The **API Reference** contains a complete list of functions and types that
@@ -30,35 +36,6 @@ you know where to look for certain things.
3036
submodules within MOI. These submodules are not required to interface a solver
3137
with MOI, but they make the job much easier.
3238

33-
## Background
34-
35-
MOI has been designed to replace [MathProgBase](https://github.com/JuliaOpt/MathProgBase.jl),
36-
which was been used by modeling packages such as [JuMP](https://github.com/jump-dev/JuMP.jl)
37-
and [Convex.jl](https://github.com/jump-dev/Convex.jl).
38-
39-
This second-generation abstraction layer addresses a number of limitations of
40-
MathProgBase. MOI is designed to:
41-
- Be simple and extensible, unifying linear, quadratic, and conic optimization,
42-
and seamlessly facilitate extensions to essentially arbitrary constraints and
43-
functions (e.g., indicator constraints, complementarity constraints, and
44-
piecewise-linear functions)
45-
- Be fast by allowing access to a solver's in-memory representation of a problem
46-
without writing intermediate files (when possible) and by using multiple
47-
dispatch and avoiding requiring containers of nonconcrete types
48-
- Allow a solver to return multiple results (e.g., a pool of solutions)
49-
- Allow a solver to return extra arbitrary information via attributes (e.g.,
50-
variable- and constraint-wise membership in an irreducible inconsistent subset
51-
for infeasibility analysis)
52-
- Provide a greatly expanded set of status codes explaining what happened during
53-
the optimization procedure
54-
- Enable a solver to more precisely specify which problem classes it supports
55-
- Enable both primal and dual warm starts
56-
- Enable adding and removing both variables and constraints by indices that are
57-
not required to be consecutive
58-
- Enable any modification that the solver supports to an existing model
59-
- Avoid requiring the solver wrapper to store an additional copy of the problem
60-
data
61-
6239
## Citing JuMP
6340

6441
A [paper describing the design and features of MathOptInterface](https://arxiv.org/abs/2002.03447)

0 commit comments

Comments
 (0)