Skip to content

Commit

Permalink
Merge pull request #315 from dionysos-dev/vd/Documentation
Browse files Browse the repository at this point in the history
Vd/documentation
  • Loading branch information
adrienbanse authored Oct 23, 2023
2 parents f8347ad + 92b38b2 commit 6eac99b
Show file tree
Hide file tree
Showing 29 changed files with 136 additions and 1,592 deletions.

This file was deleted.

1,512 changes: 0 additions & 1,512 deletions BipedRobot/ZMPBipedRobot/docs/2. Optimisation Process/solutions_Fs50.txt

This file was deleted.

2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name = "Dionysos"
uuid = "d92c97cf-b87d-42c1-a9c0-25df00b4d958"
authors = ["Raphael Jungers <raphael.jungers@uclouvain.be>", "Antoine Aspeel <antoine.aspeel@uclouvain.be>", "Guillaume Berger <guillaume.berger@uclouvain.be>", "Julien Calbert <julien.calbert@uclouvain.be>", "Mahsa Farjadnia <mahsa.farjadnia@uclouvain.be>", "Benoît Legat <benoit.legat@uclouvain.be>", "Zheming Wang <zheming.wang@uclouvain.be>", "Lucas N. Egidio <lucas.egidio@uclouvain.be>", "Adrien Banse <adrien.banse@uclouvain.be>", "Somya Singh <somya.singh@uclouvain.be>"]
authors = ["Raphael Jungers <raphael.jungers@uclouvain.be>", "Antoine Aspeel <antoine.aspeel@uclouvain.be>", "Guillaume Berger <guillaume.berger@uclouvain.be>", "Julien Calbert <julien.calbert@uclouvain.be>", "Virginie Debauche <virginie.debauche@uclouvain.be>", "Mahsa Farjadnia <mahsa.farjadnia@uclouvain.be>", "Benoît Legat <benoit.legat@uclouvain.be>", "Zheming Wang <zheming.wang@uclouvain.be>", "Lucas N. Egidio <lucas.egidio@uclouvain.be>", "Adrien Banse <adrien.banse@uclouvain.be>", "Somya Singh <somya.singh@uclouvain.be>"]
version = "0.0.1"

[deps]
Expand Down
6 changes: 3 additions & 3 deletions docs/src/reference/Optim.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# Optim

This folder contains all the different solvers that can be used.
This folder contains all the different (abstraction-based or not) solvers that can be used. Note that all the solvers are defined using the MathOptInterface framework: for each solver, we define a subtype of [`AbstractOptimizer`](https://jump.dev/MathOptInterface.jl/stable/reference/models/#MathOptInterface.AbstractOptimizer) and implement the [`Optimize!`](https://jump.dev/MathOptInterface.jl/stable/reference/models/#MathOptInterface.optimize!) function.

## Abstraction-based solvers
```@docs
Dionysos.Optim.Abstraction.LazyAbstraction.Optimizer
Dionysos.Optim.Abstraction.NaiveAbstraction.Optimizer
Dionysos.Optim.Abstraction.EllipsoidsAbstraction.Optimizer
Dionysos.Optim.Abstraction.HierarchicalAbstraction.Optimizer
Dionysos.Optim.Abstraction.LazyAbstraction.Optimizer
Dionysos.Optim.Abstraction.LazyEllipsoidsAbstraction.Optimizer
Dionysos.Optim.Abstraction.NaiveAbstraction.Optimizer
```

## Other solvers
Expand Down
7 changes: 6 additions & 1 deletion docs/src/reference/Problem.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
# Problem

This folder contains structures that are used to encode which kind of problem you want to solve.
This folder contains structures that are used to encode which kind of problem you want to solve. Each problem is encoded as a ProblemType.

```@docs
Dionysos.Problem.ProblemType
```

So far, two types of problems have been considered: the reach-avoid optimal control problems and the safety control problems.

```@docs
Dionysos.Problem.OptimalControlProblem
Dionysos.Problem.SafetyProblem
```
6 changes: 5 additions & 1 deletion docs/src/reference/Symbolic.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# Symbolic

This folder contains different methods to build an abstraction.
This folder contains the data structures needed to encode the different abstractions.

```@docs
Dionysos.Symbolic.SymbolicModel
```

```@docs
Dionysos.Symbolic.SymbolicModelList
Expand Down
21 changes: 17 additions & 4 deletions docs/src/reference/System.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,36 @@
This folder contains different ways to define systems, for instance to encode a controller.

## Control system

Each control system should be implemented as a ControlSystem.

```@docs
Dionysos.System.ControlSystem
```

So far, we have implemented a few examples of control systems:

```@docs
Dionysos.System.SimpleSystem
Dionysos.System.ControlSystemGrowth
Dionysos.System.ControlSystemLinearized
Dionysos.System.SimpleSystem
Dionysos.System.EllipsoidalAffineApproximatedSystem
Dionysos.System.AffineApproximationDiscreteSystem
Dionysos.System.SymbolicSystem
```

## Controller
So far, the abstraction-based methods that we use define either piecewise-constant or piecewise-affine controllers.

```@docs
Dionysos.System.ConstantController
Dionysos.System.AffineController
```

## SHOULD BE REMOVED
## Trajectories
```@docs
Dionysos.System.DiscreteTrajectory
Dionysos.System.ContinuousTrajectory
Dionysos.System.HybridTrajectory
Dionysos.System.Trajectory
Dionysos.System.Control_trajectory
Dionysos.System.Cost_control_trajectory
```
5 changes: 0 additions & 5 deletions docs/src/reference/Utils.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,6 @@

This folder contains all the auxiliary functions needed.

## Ellipsoids

```@docs
```

## Functions

```@docs
Expand Down
6 changes: 3 additions & 3 deletions src/domain/continuous_domain.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ abstract type ContinuousDomain{N, T} <: DomainType{N, T} end
"""
ContinuousUnboundedDomain{N,T}
Struct for a basic unbounded continuous domain
Struct for a basic unbounded continuous domain.
"""
struct ContinuousUnboundedDomain{N, T} <: ContinuousDomain{N, T}
orig::SVector{N, T}
Expand All @@ -12,7 +12,7 @@ end
"""
ContinuousBoundedDomain{N,T,B}
Struct for a basic bounded continuous domain
Struct for a basic bounded continuous domain.
"""
struct ContinuousBoundedDomain{N, T, B} <: ContinuousDomain{N, T}
orig::SVector{N, T}
Expand All @@ -22,7 +22,7 @@ end
"""
ContinuousBoundedEllipsoidDomain{N,T,S<:Grid{N,T}}
Struct for a basic bounded continuous domain formed by a finite number of ellipsoids
Struct for a basic bounded continuous domain formed by a finite number of ellipsoids.
"""
struct ContinuousBoundedEllipsoidDomain{N, T, B, E} <: ContinuousDomain{N, T}
orig::SVector{N, T}
Expand Down
2 changes: 1 addition & 1 deletion src/domain/custom_domain.jl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""
CustomList{N,T} <: DomainType{N,T}
Struct for a custom generic domain
Struct for a custom generic domain.
"""

struct CustomList{N, T} <: DomainType{N, T}
Expand Down
4 changes: 2 additions & 2 deletions src/domain/domain_list.jl
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ end
"""
DomainList{N,T,S<:Grid{N,T}}
Struct for a basic domain based on a `Grid`
Struct for a basic domain based on a `Grid`.
"""
struct DomainList{N, T, S <: Grid{N, T}} <: DomainType{N, T}
grid::S
Expand All @@ -17,7 +17,7 @@ end
"""
DomainList(grid::S) where {N,S<:Grid{N}}
Return a new DomainList
Return a new `DomainList`.
"""
function DomainList(grid::S) where {N, S <: Grid{N}}
return DomainList(grid, Set{NTuple{N, Int}}())
Expand Down
4 changes: 2 additions & 2 deletions src/domain/general_domain.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ using StaticArrays, Plots
"""
RectangularObstacles{VT} <: AbstractSet{VT}
Struct for a rectangular domain with rectangular obstacles
Struct for a rectangular domain with rectangular obstacles.
"""
struct RectangularObstacles{VT} <: AbstractSet{VT}
X::UT.HyperRectangle{VT}
Expand Down Expand Up @@ -36,7 +36,7 @@ _fit_grid(elems::Set, grid, nx, fit) = elems
"""
GeneralDomainList{N,E<:AbstractSet{NTuple{N,Int}},T,S<:Grid{N,T},F} <: DomainType{N,T}
Struct for a rectangular domain with rectangular obstacles
Struct for a rectangular domain with rectangular obstacles.
"""
struct GeneralDomainList{N, E <: AbstractSet{NTuple{N, Int}}, T, S <: Grid{N, T}, F} <:
DomainType{N, T}
Expand Down
2 changes: 1 addition & 1 deletion src/domain/grid.jl
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ end
GridEllipsoidalRectangular{N,T} <: Grid{N,T}
Uniform grid on rectangular space `rect`, centered at `orig` and with steps set by the vector `h`.
Cells are (possibly overlapping) ellipsoids defined at each grid point `c` as `(x-c)'P(x-c) ≤ 1`
Cells are (possibly overlapping) ellipsoids defined at each grid point `c` as `(x-c)'P(x-c) ≤ 1`.
"""
struct GridEllipsoidalRectangular{N, T} <: Grid{N, T}
orig::SVector{N, T}
Expand Down
2 changes: 1 addition & 1 deletion src/optim/abstraction/ellipsoids_abstraction.jl
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const PR = DI.Problem
"""
Optimizer{T} <: MOI.AbstractOptimizer
Ellispoids abtraction solver
Abstraction-based solver for which the domain is covered with ellipsoidal cells, independently of the control task.
"""
mutable struct Optimizer{T} <: MOI.AbstractOptimizer
concrete_problem::Union{Nothing, PR.OptimalControlProblem}
Expand Down
2 changes: 1 addition & 1 deletion src/optim/abstraction/hierarchical_abstraction.jl
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ using ..LazyAbstraction
"""
Optimizer{T} <: MOI.AbstractOptimizer
Hierarchical abstraction solver
Abstraction-based solver for which the domain is initially partioned into coarse hyper-rectangular cells, which are iteratively locally smartly refined with respect to the control task.
"""
mutable struct Optimizer{T} <: MOI.AbstractOptimizer
concrete_system::Union{Nothing, Any}
Expand Down
2 changes: 1 addition & 1 deletion src/optim/abstraction/lazy_abstraction.jl
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const PR = DI.Problem
"""
Optimizer{T} <: MOI.AbstractOptimizer
Solver from Lazy Abstraction
Abstraction-based solver for which the hyper-rectangular abstraction and the controller are co-designed to reduce the computation cost of the abstraction.
"""
mutable struct Optimizer{T} <: MOI.AbstractOptimizer
concrete_system::Union{Nothing, Any}
Expand Down
2 changes: 1 addition & 1 deletion src/optim/abstraction/lazy_ellipsoids_abstraction.jl
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ global NI = nothing
"""
Optimizer{T} <: MOI.AbstractOptimizer
Lazy ellipsoids abstraction solver
Abstraction-based solver using the lazy abstraction method with ellipsoidal cells.
"""
mutable struct Optimizer{T} <: MOI.AbstractOptimizer
concrete_problem::Union{Nothing, PR.OptimalControlProblem}
Expand Down
2 changes: 1 addition & 1 deletion src/optim/abstraction/naive_abstraction.jl
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ using JuMP
"""
Optimizer{T} <: MOI.AbstractOptimizer
Naive abstraction solver
Solver based on the classical abstraction method (used for instance in SCOTS) for which the whole domain is partioned into hyper-rectangular cells, independently of the control task.
"""
mutable struct Optimizer{T} <: MOI.AbstractOptimizer
concrete_problem::Union{Nothing, PR.ProblemType}
Expand Down
2 changes: 1 addition & 1 deletion src/optim/bemporad_morari.jl
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ using FillArrays, MathematicalSystems, HybridSystems, JuMP, SemialgebraicSets, P
"""
Optimizer{T} <: MOI.AbstractOptimizer
Bemporad Morari solver
Bemporad Morari solver: Optimal control of hybrid systems via a predictive control scheme using mixed integer quadratic programming (MIQP) online optimization procedures.
"""
mutable struct Optimizer{T} <: MOI.AbstractOptimizer
continuous_solver::Any
Expand Down
2 changes: 1 addition & 1 deletion src/optim/branch_and_bound.jl
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ using HybridSystems
"""
Optimizer{T} <: MOI.AbstractOptimizer
Branch and bound solver
Branch and bound solver: Optimal control of hybrid systems via a predictive control scheme combining a branch and bound algorithm that can refine Q-functions using Lagrangian duality.
"""
mutable struct Optimizer{T} <: MOI.AbstractOptimizer
continuous_solver::Any
Expand Down
20 changes: 10 additions & 10 deletions src/problem/problems.jl
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ The structure
OptimalControlProblem{S, XI, XT, XC, TC, T}
encodes an optimal control problem where
`S` is the system,
`XI` is the initial set,
`XT` is the target set,
`XC` is the state cost,
`TC` is transistion cost and
`T` is the number of allowed time steps
- `S` is the system,
- `XI` is the initial set,
- `XT` is the target set,
- `XC` is the state cost,
- `TC` is transistion cost and
- `T` is the number of allowed time steps
"""
struct OptimalControlProblem{S, XI, XT, XC, TC, T <: Real} <: ProblemType
system::S
Expand All @@ -35,10 +35,10 @@ The structure
SafetyProblem{S, XI, XS, T}
encodes a safety problem where
`S` is the system,
`XI` is the initial set,
`XS` is the safe set and
`T` is the number of allowed time steps
- `S` is the system,
- `XI` is the initial set,
- `XS` is the safe set and
- `T` is the number of allowed time steps
"""
struct SafetyProblem{S, XI, XS, T <: Real} <: ProblemType
system::S
Expand Down
2 changes: 1 addition & 1 deletion src/symbolic/lazy_symbolic.jl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""
LazySymbolicModel{N, M, S1 <: DO.DomainType{N}, S2 <: DO.DomainType{M}, A} <: SymbolicModel{N, M}
TO ADD
is one implementation of the `SymbolicModel` type for the lazy abstraction-based methods, i.e. when a subset of the domain is partitioned/covered.
"""
mutable struct LazySymbolicModel{N, M, S1 <: DO.DomainType{N}, S2 <: DO.DomainType{M}, A} <:
SymbolicModel{N, M}
Expand Down
7 changes: 6 additions & 1 deletion src/symbolic/symbolicmodel.jl
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
using Plots, Colors

"""
SymbolicModel{N, M}
is the abtract type which defines a symbolic model.
"""
abstract type SymbolicModel{N, M} end

"""
SymbolicModelList{N, M, S1 <: DO.DomainType{N}, S2 <: DO.DomainType{M}, A} <: SymbolicModel{N, M}
TO ADD
is one implementation of the `SymbolicModel` type for classical abstraction-based methods, i.e. when the whole domain is partitioned/covered.
"""
mutable struct SymbolicModelList{N, M, S1 <: DO.DomainType{N}, S2 <: DO.DomainType{M}, A} <:
SymbolicModel{N, M}
Expand Down
4 changes: 2 additions & 2 deletions src/system/controller.jl
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ end
"""
ConstantController{T, VT}
encodes a constant state-dependent controller of the κ(x) = c
encodes a constant state-dependent controller of the κ(x) = c.
"""
struct ConstantController{T <: Real, VT <: AbstractVector{T}} <: Controller
c::VT
Expand All @@ -24,7 +24,7 @@ end
"""
AffineController{T, MT, VT1, VT2}
encodes an affine state-dependent controller of the κ(x) = K*(x-c)+ℓ
encodes an affine state-dependent controller of the κ(x) = K*(x-c)+ℓ.
"""
struct AffineController{
T <: Real,
Expand Down
Loading

0 comments on commit 6eac99b

Please sign in to comment.