Skip to content
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
2 changes: 2 additions & 0 deletions docs/Project.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
[deps]
ADTypes = "47edcb42-4c32-4615-8424-f2b9edc5f35b"
ComponentArrays = "b0b7db55-cfe3-40fc-9ded-d10e2dbeff66"
ControlSystemIdentification = "3abffc1c-5106-53b7-b354-a47bfc086282"
ControlSystems = "a6e380b2-a6ca-5380-bf3e-84a91bcd477e"
Expand All @@ -15,5 +16,6 @@ MonteCarloMeasurements = "0987c9cc-fe09-11e8-30f0-b96dd679fdca"
OptimizationGCMAES = "6f0a0517-dbc2-4a7a-8a20-99ae7f27e911"
OptimizationIpopt = "43fad042-7963-4b32-ab19-e2a4f9a67124"
Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80"
SciMLBase = "0bca4576-84f4-4d90-8ffe-ffa030f20462"
StaticArrays = "90137ffa-7385-5640-81b9-e52037218182"
TrajectoryLimiters = "9792e600-fe43-4e4e-833b-462f466b8006"
4 changes: 3 additions & 1 deletion docs/src/examples/automatic_differentiation.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,8 @@ The constraint function `constraints` enforces the peak of the sensitivity funct
```@example autodiff
using Statistics, LinearAlgebra
using OptimizationIpopt
using SciMLBase: OptimizationFunction, OptimizationProblem, solve
using ADTypes: AutoForwardDiff

function plot_optimized(P, params, res, systems)
fig = plot(layout=(1,3), size=(1200,400), bottommargin=2Plots.mm)
Expand Down Expand Up @@ -181,7 +183,7 @@ solver = IpoptOptimizer(;
),
)

fopt = OptimizationFunction(cost, OptimizationIpopt.AutoForwardDiff(); cons=constraints)
fopt = OptimizationFunction(cost, AutoForwardDiff(); cons=constraints)

prob = OptimizationProblem(fopt, params, (P, systemspid);
lb = fill(-10.0, length(params)),
Expand Down
Loading