Skip to content

Commit

Permalink
Fix docs (#17)
Browse files Browse the repository at this point in the history
* Fix docs

* Adapt compat bounds

* Update Project.toml

Tighter bounds to keep useable
  • Loading branch information
AlCap23 authored Feb 5, 2024
1 parent af4ee68 commit 01506a5
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ Aqua = "0.7"
CommonSolve = "0.2"
ComponentArrays = "0.15"
DocStringExtensions = "0.9"
ModelingToolkit = "8"
Optimization = "3"
ModelingToolkit = "<8.73.0"
Optimization = "<3.20.0"
OrdinaryDiffEq = "6"
Reexport = "1.2"
SciMLBase = "2"
SciMLBase = "<2.8.0"
SciMLSensitivity = "7"
julia = "1.6"

Expand Down
6 changes: 3 additions & 3 deletions docs/src/examples/1D.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,17 +59,17 @@ optimization_variables = states(oed_problem)
```

!!! note
The `optimization_states` contain several groups of variables, namely `measurements`, `controls`, `initial_conditions`, and `regularization`. `measurements` represent the decision to observe at a specific time point at the grid. We currently work with the naming convention `w_i` for the i-th observed equation.
The `optimization_variables` contain several groups of variables, namely `measurements`, `controls`, `initial_conditions`, and `regularization`. `measurements` represent the decision to observe at a specific time point at the grid. We currently work with the naming convention `w_i` for the i-th observed equation. Currently we need to `collect` the states before passing them into the `ConstraintsSystem`!

Now we have access to all optimization variables as a `ComponentArray`. We are interested in choosing at most 3 measurements, so we add a `ConstraintSystem` from ModelingToolkit.
Now we have access to all optimization variables as a `ComponentArray`. We are interested in choosing at most 3 measurements, so we add a `ConstraintsSystem` from ModelingToolkit.

```@example 1D
constraint_equations = [
sum(optimization_variables.measurements.w₁) ≲ 3,
]
@named constraint_system = ConstraintsSystem(
constraint_equations, optimization_variables, []
constraint_equations, collect(optimization_variables), []
)
nothing # hide
```
Expand Down
4 changes: 2 additions & 2 deletions docs/src/examples/lotka.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,12 @@ constraint_equations = [
]
@named constraint_system = ConstraintsSystem(
constraint_equations, optimization_variables, []
constraint_equations, collect(optimization_variables), []
)
nothing # hide
```
!!! note
The `optimization_states` contain several groups of variables, namely `measurements`, `controls`, `initial_conditions`, and `regularization`. `measurements` represent the decision to observe at a specific time point at the grid. We currently work with the naming convention `w_i` for the i-th observed equation.
The `optimization_variables` contain several groups of variables, namely `measurements`, `controls`, `initial_conditions`, and `regularization`. `measurements` represent the decision to observe at a specific time point at the grid. We currently work with the naming convention `w_i` for the i-th observed equation. Currently we need to `collect` the states before passing them into the `ConstraintsSystem`!


Finally, we are now able to convert our [`OEDProblem`](@ref) into an `OptimizationProblem` and `solve` it.
Expand Down

0 comments on commit 01506a5

Please sign in to comment.