Skip to content

Commit abf49bb

Browse files
Merge pull request #3742 from vyudu/doc_up
fix some dynamic opt docstrings/API page
2 parents 70a00c5 + 4004dcb commit abf49bb

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

docs/src/API/dynamic_opt.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
### Solvers
1+
# [Dynamic Optimization Solvers](@id dynamic_opt_api)
22

33
Currently 4 backends are exposed for solving dynamic optimization problems using collocation: JuMP, InfiniteOpt, CasADi, and Pyomo.
44

src/systems/optimal_control_interface.jl

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ function Base.show(io::IO, sol::DynamicOptSolution)
1919
end
2020

2121
"""
22-
JuMPDynamicOptProblem(sys::System, u0, tspan, p; dt, steps, guesses, kwargs...)
22+
JuMPDynamicOptProblem(sys::System, op, tspan; dt, steps, guesses, kwargs...)
2323
2424
Convert an System representing an optimal control system into a JuMP model
2525
for solving using optimization. Must provide either `dt`, the timestep between collocation
@@ -43,7 +43,7 @@ To construct the problem, please load InfiniteOpt along with ModelingToolkit.
4343
"""
4444
function InfiniteOptDynamicOptProblem end
4545
"""
46-
CasADiDynamicOptProblem(sys::System, u0, tspan, p; dt, steps, guesses, kwargs...)
46+
CasADiDynamicOptProblem(sys::System, op, tspan; dt, steps, guesses, kwargs...)
4747
4848
Convert an System representing an optimal control system into a CasADi model
4949
for solving using optimization. Must provide either `dt`, the timestep between collocation
@@ -54,7 +54,7 @@ To construct the problem, please load CasADi along with ModelingToolkit.
5454
"""
5555
function CasADiDynamicOptProblem end
5656
"""
57-
PyomoDynamicOptProblem(sys::System, u0, tspan, p; dt, steps)
57+
PyomoDynamicOptProblem(sys::System, op, tspan; dt, steps)
5858
5959
Convert an System representing an optimal control system into a Pyomo model
6060
for solving using optimization. Must provide either `dt`, the timestep between collocation
@@ -67,27 +67,27 @@ function PyomoDynamicOptProblem end
6767

6868
### Collocations
6969
"""
70-
JuMP Collocation solver.
71-
- solver: a optimization solver such as Ipopt
72-
- tableau: An ODE RK tableau. Load a tableau by calling a function like `constructRK4` and may be found at https://docs.sciml.ai/DiffEqDevDocs/stable/internals/tableaus/. If this argument is not passed in, the solver will default to Radau second order.
70+
JuMP Collocation solver. Takes two arguments:
71+
- `solver`: a optimization solver such as Ipopt
72+
- `tableau`: An ODE RK tableau. Load a tableau by calling a function like `constructRK4` and may be found at https://docs.sciml.ai/DiffEqDevDocs/stable/internals/tableaus/. If this argument is not passed in, the solver will default to Radau second order.
7373
"""
7474
function JuMPCollocation end
7575
"""
7676
InfiniteOpt Collocation solver.
77-
- solver: an optimization solver such as Ipopt
77+
- `solver`: an optimization solver such as Ipopt
7878
- `derivative_method`: the method used by InfiniteOpt to compute derivatives. The list of possible options can be found at https://infiniteopt.github.io/InfiniteOpt.jl/stable/guide/derivative/. Defaults to FiniteDifference(Backward()).
7979
"""
8080
function InfiniteOptCollocation end
8181
"""
8282
CasADi Collocation solver.
83-
- solver: an optimization solver such as Ipopt. Should be given as a string or symbol in all lowercase, e.g. "ipopt"
84-
- tableau: An ODE RK tableau. Load a tableau by calling a function like `constructRK4` and may be found at https://docs.sciml.ai/DiffEqDevDocs/stable/internals/tableaus/. If this argument is not passed in, the solver will default to Radau second order.
83+
- `solver`: an optimization solver such as Ipopt. Should be given as a string or symbol in all lowercase, e.g. "ipopt"
84+
- `tableau`: An ODE RK tableau. Load a tableau by calling a function like `constructRK4` and may be found at https://docs.sciml.ai/DiffEqDevDocs/stable/internals/tableaus/. If this argument is not passed in, the solver will default to Radau second order.
8585
"""
8686
function CasADiCollocation end
8787
"""
8888
Pyomo Collocation solver.
89-
- solver: an optimization solver such as Ipopt. Should be given as a string or symbol in all lowercase, e.g. "ipopt"
90-
- derivative_method: a derivative method from Pyomo. The choices here are ForwardEuler, BackwardEuler, MidpointEuler, LagrangeRadau, or LagrangeLegendre. The last two should additionally have a number indicating the number of collocation points per timestep, e.g. PyomoCollocation("ipopt", LagrangeRadau(3)). Defaults to LagrangeRadau(5).
89+
- `solver`: an optimization solver such as Ipopt. Should be given as a string or symbol in all lowercase, e.g. "ipopt"
90+
- `derivative_method`: a derivative method from Pyomo. The choices here are ForwardEuler, BackwardEuler, MidpointEuler, LagrangeRadau, or LagrangeLegendre. The last two should additionally have a number indicating the number of collocation points per timestep, e.g. PyomoCollocation("ipopt", LagrangeRadau(3)). Defaults to LagrangeRadau(5).
9191
"""
9292
function PyomoCollocation end
9393

0 commit comments

Comments
 (0)