Skip to content

Commit 0926739

Browse files
committed
Docstring.
1 parent d1dd066 commit 0926739

File tree

2 files changed

+15
-5
lines changed

2 files changed

+15
-5
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,16 +27,16 @@ julia> function construct_model(f, name::String)
2727
set_silent(model)
2828
@variable(model, x[1:m])
2929
@objective(model, Min, c' * x)
30-
@constraint(model, con1, Symmetric(-Matrix(F[1]) + sum(Matrix(F[k + 1]) .* x[k] for k in 1:m)) in JuMP.PSDCone())
31-
return model
30+
@constraint(model, con, Symmetric(-Matrix(F[1]) + sum(Matrix(F[k + 1]) .* x[k] for k in 1:m)) in JuMP.PSDCone())
31+
return model, con
3232
end
3333
construct_model (generic function with 1 method)
3434
```
3535

3636
Solve the problem using the [Mosek.jl](https://github.com/MOSEK/Mosek.jl) optimizer.
3737

3838
```julia-repl
39-
julia> model = construct_model(Mosek.Optimizer, "mcp124-1");
39+
julia> model, con = construct_model(Mosek.Optimizer, "mcp124-1");
4040
4141
julia> @time JuMP.optimize!(model)
4242
6.005076 seconds (2.53 k allocations: 515.859 KiB)
@@ -48,7 +48,7 @@ julia> objective_value(model)
4848
Solve the problem using [Mosek.jl](https://github.com/MOSEK/Mosek.jl) and MathOptChordalDecomposition.jl.
4949

5050
```julia-repl
51-
julia> model = construct_model(() -> MOCD.Optimizer(Mosek.Optimizer), "mcp124-1");
51+
julia> model, con = construct_model(() -> MOCD.Optimizer(Mosek.Optimizer), "mcp124-1");
5252
5353
julia> @time JuMP.optimize!(model)
5454
0.041175 seconds (230.72 k allocations: 11.800 MiB)

src/MathOptChordalDecomposition.jl

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,17 @@ struct Decomposition
1717
end
1818

1919
"""
20-
Optimizer(inner; alg::EliminationAlgorithm=MF())
20+
Optimizer <: MOI.AbstractOptimizer
21+
22+
Optimizer(inner::MOI.AbstractOptimizer; alg::CliqueTrees.EliminationAlgorithm=MF())
23+
24+
An optimizer that computes a chordal decomposition of each semidefinite constraint.
25+
The elimination algorithm `alg` is used to compute the decomposition, and the optimizer
26+
`inner` is used to solve the decomposed problem.
27+
28+
### Parameters
29+
- `inner`: inner optimizer
30+
- `alg`: elimination algorithm
2131
"""
2232
mutable struct Optimizer{A <: EliminationAlgorithm} <: MOI.AbstractOptimizer
2333
inner::MOI.AbstractOptimizer

0 commit comments

Comments
 (0)