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

Re-write KKT module #101

Merged
merged 16 commits into from
Jul 10, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,9 @@
*.jl.*.cov
*.jl.mem
Manifest.toml

/app
/dat
/exp
/.vscode
/*.jl
4 changes: 3 additions & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
name = "Tulip"
uuid = "6dd1b50a-3aae-11e9-10b5-ef983d2400fa"
authors = ["Mathieu Tanneau <mathieu.tanneau@gmail.com>"]
version = "0.7.5"
version = "0.8.0"

[deps]
CodecBzip2 = "523fee87-0ab8-5b00-afb7-3ecf72e48cfd"
CodecZlib = "944b1d66-785c-5afd-91f1-9de20f533193"
Krylov = "ba0b0d4f-ebba-5204-a429-3ac8c609bfb7"
LDLFactorizations = "40e66cde-538c-5869-a4ad-c39174c6795b"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
LinearOperators = "5c8ed15e-5a4c-59e4-a42b-c7e8811fb125"
Expand All @@ -21,6 +22,7 @@ TimerOutputs = "a759f4b9-e2f1-59dc-863e-4aeb61b1ea8f"
[compat]
CodecBzip2 = "0.7.2"
CodecZlib = "0.7.0"
Krylov = "0.7.3"
LDLFactorizations = "0.6, 0.7, 0.8"
LinearOperators = "2.0"
MathOptInterface = "0.9.5"
Expand Down
14 changes: 11 additions & 3 deletions docs/make.jl
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
using Documenter, Tulip

const _FAST = findfirst(isequal("--fast"), ARGS) !== nothing

makedocs(
sitename = "Tulip.jl",
authors = "Mathieu Tanneau",
format = Documenter.HTML(prettyurls = get(ENV, "CI", nothing) == "true"),
doctest = !_FAST,
pages = [
"Home" => "index.md",
"Tutorials" => Any[
"tutorials/lp_example.md",
],
"User manual" => Any[
"Problem formulation" => "manual/formulation.md",
"Solving linear systems" => "manual/linear_systems.md",
"Algorithms" => Any[
"Homogeneous Self-Dual" => "manual/IPM/HSD.md",
"Predictor-Corrector" => "manual/IPM/MPC.md"
Expand All @@ -20,7 +22,13 @@ makedocs(
],
"Reference" => Any[
"Presolve" => "reference/Presolve/presolve.md",
"KKT solvers" => "reference/KKT/kkt_solvers.md",
"KKT" => [
"reference/KKT/kkt.md",
"reference/KKT/tlp_cholmod.md",
"reference/KKT/tlp_dense.md",
"reference/KKT/tlp_krylov.md",
"reference/KKT/tlp_ldlfact.md",
],
"Julia API" => "reference/API.md",
"Attributes" => "reference/attributes.md",
"Options" => "reference/options.md"
Expand All @@ -30,4 +38,4 @@ makedocs(

deploydocs(
repo = "github.com/ds4dm/Tulip.jl.git"
)
)
62 changes: 0 additions & 62 deletions docs/src/manual/linear_systems.md

This file was deleted.

77 changes: 77 additions & 0 deletions docs/src/reference/KKT/kkt.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
```@meta
CurrentModule = Tulip.KKT
```

# Overview

The `KKT` module provides a modular, customizable interface for developing and selecting various approaches to solve the KKT systems.

## KKT backends

```@docs
AbstractKKTBackend
```

```@docs
DefaultKKTBackend
```

## KKT systems

All formulations below refer to a linear program in primal-dual standard form
```math
\begin{array}{rl}
(P) \ \ \
\displaystyle \min_{x}
& c^{\top} x\\
s.t.
& A x = b\\
& l \leq x \leq u
\end{array}
\quad \quad \quad
\begin{array}{rl}
(D) \ \ \
\displaystyle \max_{y, z}
& b^{\top} y + l^{\top}z^{l} - u^{\top}z^{u}\\
s.t.
& A^{\top}y + z^{l} - z^{u} = c\\
& z^{l}, z^{u} \geq 0
\end{array}
```

```@docs
AbstractKKTSystem
```

```@docs
DefaultKKTSystem
```

```@docs
K2
```

```@docs
K1
```

## KKT solvers

```@docs
AbstractKKTSolver
```

Custom linear solvers should (preferably) inherit from the `AbstractKKTSolver` class,
and extend the following functions:

```@docs
setup
```

```@docs
update!
```

```@docs
solve!
```
75 changes: 0 additions & 75 deletions docs/src/reference/KKT/kkt_solvers.md

This file was deleted.

13 changes: 13 additions & 0 deletions docs/src/reference/KKT/tlp_cholmod.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
```@meta
CurrentModule = Tulip.KKT
```

# TlpCholmod

```@docs
TlpCholmod.Backend
```

```@docs
TlpCholmod.CholmodSolver
```
13 changes: 13 additions & 0 deletions docs/src/reference/KKT/tlp_dense.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
```@meta
CurrentModule = Tulip.KKT.TlpDense
```

# TlpDense

```@docs
TlpDense.Backend
```

```@docs
TlpDense.DenseSolver
```
30 changes: 30 additions & 0 deletions docs/src/reference/KKT/tlp_krylov.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
```@meta
CurrentModule = Tulip.KKT.TlpKrylov
```

# TlpKrylov

!!! warning
Iterative methods are still an experimental feature.
Some numerical and performance issues should be expected.


```@docs
TlpKrylov.Backend
```

```@docs
TlpKrylov.AbstractKrylovSolver
```

```@docs
TlpKrylov.SPDSolver
```

```@docs
TlpKrylov.SIDSolver
```

```@docs
TlpKrylov.SQDSolver
```
13 changes: 13 additions & 0 deletions docs/src/reference/KKT/tlp_ldlfact.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
```@meta
CurrentModule = Tulip.KKT.TlpLDLFactorizations
```

# TlpLDLFactorizations

```@docs
TlpLDLFactorizations.Backend
```

```@docs
TlpLDLFactorizations.LDLFactSolver
```
Loading