Skip to content
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

WIP: break everything, new docs #173

Closed
wants to merge 99 commits into from
Closed
Show file tree
Hide file tree
Changes from 71 commits
Commits
Show all changes
99 commits
Select commit Hold shift + click to select a range
869d850
begin rewrite of docs, big changes to SolverInterface
mlubin Jun 14, 2017
7cce014
more work
mlubin Jun 14, 2017
c7234e7
beginning of sets
mlubin Jun 14, 2017
8f0662b
argument naming
mlubin Jun 14, 2017
514810c
more coherent interface
mlubin Jun 14, 2017
32c68f0
tidy notation
mlubin Jun 14, 2017
855cd86
variable bounds and variable constraints
mlubin Jun 14, 2017
dbf2b42
Added draft documentation with documenter
tazz0416 Jun 14, 2017
9e72b7f
Added draft documentation with documenter
tazz0416 Jun 14, 2017
cbf0d04
variable and constraint references
mlubin Jun 14, 2017
5bfd73f
Minor fix for latex support
tazz0416 Jun 14, 2017
1e5a9b2
isactive -> isvalid
mlubin Jun 14, 2017
9c005e4
typo
mlubin Jun 14, 2017
6063807
todo is done
mlubin Jun 14, 2017
d607a86
Resolve conflicts with SolverInterFace.md
tazz0416 Jun 14, 2017
dd6eebe
Merge branch 'break_everything' into break_everything
Jun 14, 2017
3ab0181
replace sense symbol with enum
mlubin Jun 14, 2017
5e3b472
Merge pull request #175 from jac0320/break_everything
mlubin Jun 14, 2017
ff15c3d
dimension of interval
mlubin Jun 14, 2017
8c08031
discussion of duals
mlubin Jun 14, 2017
4f33981
constructor for VariablePrimal
mlubin Jun 15, 2017
efad7db
document result status
mlubin Jun 15, 2017
2f3320b
Constructors for VariableLower/UpperBoundDual
joehuchette Jun 15, 2017
fab357e
[ci skip] tidy
mlubin Jun 15, 2017
37424f1
Merge branch 'break_everything' of https://github.com/JuliaOpt/MathPr…
mlubin Jun 15, 2017
0e69f4a
[ci skip] fix reference in docs, add todo
mlubin Jun 15, 2017
b77bfd7
[ci skip] constraint attributes
mlubin Jun 15, 2017
b814ac7
Add SOS constraints
joehuchette Jun 15, 2017
ba299f2
Merge branch 'break_everything' of https://github.com/JuliaOpt/MathPr…
joehuchette Jun 15, 2017
3b32653
Fallback methods for attribute getters/setters
joehuchette Jun 15, 2017
8454821
Move SOS to sets
joehuchette Jun 15, 2017
a79e635
Add the option for deleting multiple variables and constraints
joaquimg Jun 15, 2017
2de174f
[ci skip] counts and supported sets
mlubin Jun 15, 2017
af22102
Merge branch 'break_everything' of https://github.com/JuliaOpt/MathPr…
mlubin Jun 15, 2017
9ce67c1
Add writeproblem, getbasis
joehuchette Jun 15, 2017
b997edd
Merge branch 'break_everything' of https://github.com/JuliaOpt/MathPr…
joehuchette Jun 15, 2017
56b873a
Merge pull request #176 from joaquimg/break_everything
mlubin Jun 15, 2017
bc20db9
Add LinearConstraintCount
joehuchette Jun 15, 2017
c987600
Merge branch 'break_everything' of https://github.com/JuliaOpt/MathPr…
joehuchette Jun 15, 2017
c772b0d
[ci skip] generalize variable references
mlubin Jun 15, 2017
6661fb8
Remove LinearConstraintCount; change basis getters
joehuchette Jun 15, 2017
c835a03
Merge branch 'break_everything' of https://github.com/JuliaOpt/MathPr…
joehuchette Jun 15, 2017
c44a0ff
Tweak docs for basis attributes
joehuchette Jun 15, 2017
8c6da94
Modify constraints
odow Jun 15, 2017
e0d4042
Merge pull request #177 from odow/break_everything
mlubin Jun 15, 2017
90fb1e0
Begin objectives
odow Jun 15, 2017
d4a9e82
modify and get objective
odow Jun 15, 2017
86f9377
Multi-objective attributes
odow Jun 15, 2017
a0e44d3
Same basis return statuses for both variables and constraints
joehuchette Jun 15, 2017
4a62e4b
Revert objective attributes
odow Jun 15, 2017
e127590
Merge pull request #178 from odow/break_everything
mlubin Jun 15, 2017
a6dfeff
include file and fix typo
odow Jun 15, 2017
f17e27c
Merge pull request #179 from odow/break_everything
mlubin Jun 15, 2017
9cdad13
fix constructor for ObjectiveValue
mlubin Jun 15, 2017
838db37
making latest docs build from break_everything branch
ccoffrin Jun 15, 2017
8868c85
collapse high-level interface docs into one file
mlubin Jun 15, 2017
e9075b4
restructure docs into separate files
mlubin Jun 15, 2017
8022f6f
Merge pull request #180 from ccoffrin/break_everything
mlubin Jun 15, 2017
102906c
comment out interface tests, to be rewritten
mlubin Jun 15, 2017
cd91815
Models (#181)
odow Jun 15, 2017
402839f
split variable references, specialized affine-in-set constraint
mlubin Jun 15, 2017
1d6ef9e
document objectives
mlubin Jun 15, 2017
8402970
Modify sets
odow Jun 15, 2017
0e67cb3
Merge pull request #184 from odow/break_everything
mlubin Jun 16, 2017
2427d59
Proposed NLP Interface (#183)
ccoffrin Jun 16, 2017
446c8db
temporarily disable tests
mlubin Jun 16, 2017
6677152
Merge branch 'break_everything' of https://github.com/JuliaOpt/MathPr…
mlubin Jun 16, 2017
f85eba9
remove AbstractNonlinearModel
mlubin Jun 16, 2017
0cbe981
Fix typos and color syntaxing (#185)
blegat Jun 16, 2017
6393409
fix addvariable
mlubin Jun 16, 2017
9513474
update intro
mlubin Jun 16, 2017
d8cc314
rename attributes for constraint support
mlubin Jun 16, 2017
4909aef
spellcheck
mlubin Jun 16, 2017
b7e35bf
warn on high-level docs
mlubin Jun 16, 2017
cd71439
define SOC
mlubin Jun 16, 2017
48c5736
lighten load on travis
mlubin Jun 16, 2017
ac06eba
clarify variable references, not indices
mlubin Jun 16, 2017
87e61f2
move attributes out of status code list
mlubin Jun 16, 2017
0e1a103
column generation (#189)
odow Jun 16, 2017
3308af5
preliminary migration of nlp tests (#187)
ccoffrin Jun 16, 2017
b509ca6
restructure docs
mlubin Jun 16, 2017
b4dfb06
Merge branch 'break_everything' of https://github.com/JuliaOpt/MathPr…
mlubin Jun 16, 2017
57c1480
missing file
mlubin Jun 16, 2017
2f685d0
getters for constraint and objective data
mlubin Jun 16, 2017
f795d13
WIP: Migrated First Conic Model (#191)
ccoffrin Jun 16, 2017
dfa8cd8
WIP: redo tests (#182)
odow Jun 16, 2017
0c92ff4
another pass on attributes
mlubin Jun 19, 2017
7643636
More tests (#192)
joaquimg Jun 19, 2017
c6f3838
Add the PSD cone (#194)
blegat Jun 24, 2017
5a7e00f
added exp and pow sets, tidied definitions
chriscoey Jun 26, 2017
92e3da9
address comments
chriscoey Jun 27, 2017
a58ab57
tidy PSD definitions
chriscoey Jun 27, 2017
73d3303
empty manual
mlubin Jun 27, 2017
9980f87
missing file
mlubin Jun 27, 2017
564d645
potential math definition of set problem
chriscoey Jun 27, 2017
b9b8e54
another pass on sets
mlubin Jun 28, 2017
699698f
tidy
mlubin Jun 28, 2017
81ce4cd
remove variable bound attributes and add basic discussion of duals
mlubin Jun 29, 2017
d9a1074
1-d variablewise constraints
mlubin Jun 29, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ addons:
script:
- if [[ -a .git/shallow ]]; then git fetch --unshallow; fi
- julia -e 'Pkg.clone(pwd())'
- julia -e 'Pkg.test("MathProgBase")'
#- julia -e 'Pkg.test("MathProgBase")'
after_success:
- julia -e 'Pkg.add("Documenter")'
- julia -e 'cd(Pkg.dir("MathProgBase")); include(joinpath("docs", "make.jl"))'
17 changes: 15 additions & 2 deletions docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,19 @@ makedocs(
format = :html,
sitename = "MathProgBase",
pages = [
"index.md",
"Introduction" => "index.md",
"High-level Interfaces" => "highlevel.md",
"Solver Interface" => [
"Basics" => "basics.md",
"Variables" => "variables.md",
"Objectives" => "objectives.md",
"Constraints" => "constraints.md",
"Sets" => "sets.md",
"Attributes" => "attributes.md",
"Status Codes" => "statuscodes.md",
"Duals" => "duals.md",
"NLP" => "nlp.md"],
"Choosing Solver" => "choosingsolver.md"
]
)

Expand All @@ -14,5 +26,6 @@ deploydocs(
osname = "linux",
julia = "0.6",
deps = nothing,
make = nothing
make = nothing,
latest = "break_everything"
)
61 changes: 61 additions & 0 deletions docs/src/attributes.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
```@meta
CurrentModule = MathProgBase
```

These are used to get and set properties of the model.

```@docs
AbstractAttribute
cangetattribute
getattribute
cansetattribute
setattribute!
```

## Scalar Attributes

```@docs
ObjectiveValue
ObjectiveBound
RelativeGap
SolveTime
Sense
SimplexIterations
BarrierIterations
NodeCount
RawSolver
ResultCount
VariableCount
ConstraintCount
SupportsVariablesInSet
SupportsAffineInSet
SupportsQuadraticInSet
```

## Variable Attributes

These attributes are associated with variables. Calls to `getattribute` and `setattribute!` should include as an argument a single `VariableReference` or a vector of `VariableReference` objects.

```@docs
VariablePrimalStart
VariableLowerBoundDualStart
VariableUpperBoundDualStart
VariableLowerBound
VariableUpperBound
VariablePrimal
VariableLowerBoundDual
VariableUpperBoundDual
```

## Constraint Attributes

These attributes are associated with constraints. Calls to `getattribute` and `setattribute!` should include as an argument a single `ConstraintReference` or a vector of `ConstriaintReference{T}` objects.

```@docs
ConstraintPrimalStart
ConstraintDualStart
ConstraintPrimal
ConstraintDual
```


20 changes: 20 additions & 0 deletions docs/src/basics.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@

```@meta
CurrentModule = MathProgBase
```

Some introduction to MPB API. List basic standalone methods.

```@docs
AbstractModel
AbstractNLPModel
AbstractMathProgSolver
```


```@docs
Model
NLPModel
optimize!
freemodel!
```
10 changes: 10 additions & 0 deletions docs/src/choosingsolver.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Choosing Solvers

Solvers and solver-specific parameters are specified by [`AbstractMathProgSolver`](@ref) objects, which are provided by particular solver packages. For example, the `Clp` package exports a `ClpSolver` object, which can be passed to [`linprog`](@ref) as follows::

```julia
using Clp
linprog([-1,0],[2 1],'<',1.5, ClpSolver())
```

Options are passed as keyword arguments, for example, `ClpSolver(LogLevel=1)`. See the [Clp](https://github.com/mlubin/Clp.jl), [Cbc](https://github.com/mlubin/Cbc.jl), [GLPKMathProgInterface](https://github.com/JuliaOpt/GLPKMathProgInterface.jl), and [Gurobi](https://github.com/JuliaOpt/Gurobi.jl) packages for more information.
15 changes: 15 additions & 0 deletions docs/src/constraints.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
```@meta
CurrentModule = MathProgBase
```

How to add and modify constraints.
```@docs
VariablewiseConstraintReference
AffineConstraintReference
QuadraticConstraintReference
candelete(::AbstractMathProgModel,::ConstraintReference)
isvalid(::AbstractMathProgModel,::ConstraintReference)
delete!(::AbstractMathProgModel,::ConstraintReference)
addconstraint!
modifyconstraint!
```
7 changes: 7 additions & 0 deletions docs/src/duals.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
```@meta
CurrentModule = MathProgBase
```


We take the convention that duals on variable lower bounds should be nonnegative, duals on variable upper bounds should be nonpositive, and duals on closed convex cones should belong to the dual cone.

23 changes: 23 additions & 0 deletions docs/src/highlevel.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
```@meta
CurrentModule = MathProgBase
```

## Linear Programming

```@docs
linprog
buildlp
solvelp
```

## Mixed-integer Programming

```@docs
mixintprog
```

## Quadratic Programming

```@docs
quadprog
```
4 changes: 3 additions & 1 deletion docs/src/index.md
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
# MathProgBase documentation
# MathProgBase

[MathProgBase.jl](https://github.com/JuliaOpt/MathProgBase.jl) is a standarized API for Mathematical Optimization solvers. [JuMP](https://github.com/JuliaOpt/JuMP.jl) uses MathProgBase as a solver-independent low-level backend, but MathProgBase may be used freely without JuMP. In addition to the low-level API, MathProgBase provides one-shot functions for linear, mixed-integer, and quadratic optimiztion problems.
Copy link
Member

Choose a reason for hiding this comment

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

s/standarized/standardized
s/optimiztion/optimization

35 changes: 35 additions & 0 deletions docs/src/nlp.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
```@meta
CurrentModule = MathProgBase
```

# NonLinear Programming Interface (NLP)


## NLP Methods

```@docs
loadnlp!
initialize
features_available
eval_f
eval_grad_f
jac_structure
hesslag_structure
eval_jac_g
eval_jac_prod
eval_jac_prod_t
eval_hesslag_prod
eval_hesslag
isobjlinear(::AbstractNLPEvaluator)
isobjquadratic(::AbstractNLPEvaluator)
isconstrlinear(::AbstractNLPEvaluator, i::Integer)
obj_expr
constr_expr
```

## NLP Attributes

```@docs
ConstraintNLPDual
ConstraintNLPDualStart
```
10 changes: 10 additions & 0 deletions docs/src/objectives.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
```@meta
CurrentModule = MathProgBase
```

How to add and set objectives.
```@docs
setobjective!
modifyobjective!
getobjective
```
14 changes: 14 additions & 0 deletions docs/src/sets.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
```@meta
CurrentModule = MathProgBase
```


List of sets.
```@docs
NonNegative
NonPositive
Zero
Interval
Integers
Binaries
```
28 changes: 28 additions & 0 deletions docs/src/statuscodes.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
```@meta
CurrentModule = MathProgBase
```


## Termination Status

The `TerminationStatus` attribute is meant to explain the reason why the solver stopped executing. The value of the attribute is of type `TerminationStatusCode`.

```@docs
TerminationStatus
TerminationStatusCode
```

## Result Status

The `PrimalStatus` and `DualStatus` attributes are meant to explain how to interpret the result returned by the solver. The value of the attributes are of type `ResultStatusCode`.

```@docs
PrimalStatus
DualStatus
ResultStatusCode
```

## Basis Status

TODO: attributes and status codes for LP basis status

14 changes: 14 additions & 0 deletions docs/src/variables.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@

```@meta
CurrentModule = MathProgBase
```

```@docs
VariableReference
candelete(::AbstractMathProgModel,::VariableReference)
isvalid(::AbstractMathProgModel,::VariableReference)
delete!(::AbstractMathProgModel,::VariableReference)
addvariables!
addvariable!
```

7 changes: 0 additions & 7 deletions src/HighLevelInterface/HighLevelInterface.jl
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
module HighLevelInterface

using ..SolverInterface
using ..MathProgBase

function warn_no_inf(T)
if !(isinf(typemin(T)) && isinf(typemax(T)))
Base.warn_once("Element type $T does not have an infinite value. Note that this may artifically introduce ranged (two-sided) constraints. To avoid this, consider casting the problem data to Float64.")
Expand All @@ -12,5 +7,3 @@ end
include("linprog.jl")
include("mixintprog.jl")
include("quadprog.jl")

end
Loading