Skip to content

Commit

Permalink
update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
frapac committed Mar 10, 2024
1 parent 8588897 commit 38f5c20
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 30 deletions.
7 changes: 3 additions & 4 deletions .ci/setup.jl
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@

using Pkg
Pkg.instantiate()

using CUDA

argos_path = joinpath(@__DIR__, "..")
Pkg.develop(path=argos_path)

Pkg.instantiate()

using CUDA
CUDA.set_runtime_version!(v"11.8")
3 changes: 1 addition & 2 deletions docs/src/lib/kkt.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,9 @@ CurrentModule = Argos

# KKT systems

Argos implements two KKT systems [`MadNLP.AbstractKKTSystem`](https://madnlp.github.io/MadNLP.jl/dev/lib/kkt/#MadNLP.AbstractKKTSystem)
Argos implements a MadNLP's KKT system [`MadNLP.AbstractKKTSystem`](https://madnlp.github.io/MadNLP.jl/dev/lib/kkt/#MadNLP.AbstractKKTSystem)
whose operations can be deported on NVIDIA GPU.

```@docs
BieglerKKTSystem
MixedAuglagKKTSystem
```
16 changes: 10 additions & 6 deletions docs/src/optim/biegler.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,17 @@ KKT = Argos.BieglerKKTSystem{Float64, Vector{Int}, Vector{Float64}, Matrix{Float
and we instantiate MadNLP with:
```@example bieglermadnlp
using MadNLP
# This syntax is a bit too involved and should be improved in the future.
madnlp_options = Dict{Symbol, Any}()
madnlp_options[:linear_solver] = MadNLP.LapackCPUSolver
opt_ipm, opt_linear, logger = MadNLP.load_options(; madnlp_options...)
KKT = Argos.BieglerKKTSystem{Float64, Vector{Int}, Vector{Float64}, Matrix{Float64}}
solver = MadNLP.MadNLPSolver{Float64, KKT}(model, opt_ipm, opt_linear; logger=logger)
T = Float64
VI = Vector{Int}
VT = Vector{T}
MT = Matrix{T}
solver = MadNLP.MadNLPSolver(
model;
kkt_system=Argos.BieglerKKTSystem{T, VI, VT, MT},
linear_solver=LapackCPUSolver,
callback=MadNLP.SparseCallback,
)
```
Note that we are again using Lapack as linear solver: indeed the resulting Biegler's KKT
system is dense (we use the same condensification procedure as in the
Expand Down
6 changes: 3 additions & 3 deletions docs/src/optim/reducedspace.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ a dense linear solver (as Lapack):
```@example reducedmadnlp
solver = MadNLP.MadNLPSolver(
model;
kkt_system=MadNLP.DENSE_KKT_SYSTEM,
kkt_system=MadNLP.DenseKKTSystem,
linear_solver=LapackCPUSolver,
)
MadNLP.get_kkt(solver.kkt)
Expand All @@ -72,7 +72,7 @@ only proportional to the number of variables (here, `5`):
```@example reducedmadnlp
solver = MadNLP.MadNLPSolver(
model;
kkt_system=MadNLP.DENSE_CONDENSED_KKT_SYSTEM,
kkt_system=MadNLP.DenseCondensedKKTSystem,
linear_solver=LapackCPUSolver,
)
MadNLP.get_kkt(solver.kkt)
Expand Down Expand Up @@ -105,7 +105,7 @@ We recommend changing the default tolerance to be above the tolerance
using MadNLPGPU
solver = MadNLP.MadNLPSolver(
model;
kkt_system=MadNLP.DENSE_CONDENSED_KKT_SYSTEM,
kkt_system=MadNLP.DenseCondensedKKTSystem,
linear_solver=LapackGPUSolver,
tol=1e=5,
)
Expand Down
15 changes: 0 additions & 15 deletions docs/src/quickstart/cpu.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,21 +36,6 @@ datafile = joinpath(INSTANCES_DIR, "case118.m")
```

## Full-space method

!!! tip
At each iteration of the algorithm,
`FullSpace` solves the KKT system with a sparse linear solver.
By default, MadNLP is using Umfpack, but we recommend installing
[MadNLPHSL](https://madnlp.github.io/MadNLP.jl/dev/installation/#HSL-linear-solver)
and uses ma27 (`linear_solver=Ma27Solver`) or ma57 (`linear_solver=Ma57Solver`).


```@repl quickstart_cpu
Argos.run_opf(datafile, Argos.FullSpace());
```

## Biegler's method (linearize-then-reduce)

!!! tip
Expand Down

0 comments on commit 38f5c20

Please sign in to comment.