File tree Expand file tree Collapse file tree 2 files changed +15
-5
lines changed
Expand file tree Collapse file tree 2 files changed +15
-5
lines changed Original file line number Diff line number Diff 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
3333construct_model (generic function with 1 method)
3434```
3535
3636Solve 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
4141julia> @time JuMP.optimize!(model)
4242 6.005076 seconds (2.53 k allocations: 515.859 KiB)
@@ -48,7 +48,7 @@ julia> objective_value(model)
4848Solve 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
5353julia> @time JuMP.optimize!(model)
5454 0.041175 seconds (230.72 k allocations: 11.800 MiB)
Original file line number Diff line number Diff line change @@ -17,7 +17,17 @@ struct Decomposition
1717end
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"""
2232mutable struct Optimizer{A <: EliminationAlgorithm } <: MOI.AbstractOptimizer
2333 inner:: MOI.AbstractOptimizer
You can’t perform that action at this time.
0 commit comments