You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/src/optimization_packages/ode.md
+12-4Lines changed: 12 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -28,8 +28,8 @@ p = []
28
28
f_manual =OptimizationFunction(f, SciMLBase.NoAD(); grad = g!)
29
29
prob_manual =OptimizationProblem(f_manual, x0)
30
30
31
-
opt =ODEGradientDescent(dt=0.01)
32
-
sol =solve(prob_manual, opt; maxiters=50_000)
31
+
opt =ODEGradientDescent()
32
+
sol =solve(prob_manual, opt; dt=0.01, maxiters=50_000)
33
33
34
34
@show sol.u
35
35
@show sol.objective
@@ -39,15 +39,23 @@ sol = solve(prob_manual, opt; maxiters=50_000)
39
39
40
40
All provided optimizers are **gradient-based local optimizers** that solve optimization problems by integrating gradient-based ODEs to convergence:
41
41
42
-
*`ODEGradientDescent(dt=...)` — performs basic gradient descent using the explicit Euler method. This is a simple and efficient method suitable for small-scale or well-conditioned problems.
42
+
*`ODEGradientDescent()` — performs basic gradient descent using the explicit Euler method. This is a simple and efficient method suitable for small-scale or well-conditioned problems.
43
43
44
44
*`RKChebyshevDescent()` — uses the ROCK2 solver, a stabilized explicit Runge-Kutta method suitable for stiff problems. It allows larger step sizes while maintaining stability.
45
45
46
46
*`RKAccelerated()` — leverages the Tsit5 method, a 5th-order Runge-Kutta solver that achieves faster convergence for smooth problems by improving integration accuracy.
47
47
48
48
*`HighOrderDescent()` — applies Vern7, a high-order (7th-order) explicit Runge-Kutta method for even more accurate integration. This can be beneficial for problems requiring high precision.
49
49
50
-
You can also define a custom optimizer using the generic `ODEOptimizer(solver; dt=nothing)` constructor by supplying any ODE solver supported by [OrdinaryDiffEq.jl](https://docs.sciml.ai/DiffEqDocs/stable/solvers/ode_solve/).
50
+
## DAE-based Optimizers
51
+
52
+
In addition to ODE-based optimizers, OptimizationODE.jl provides optimizers for differential-algebraic equation (DAE) constrained problems:
53
+
54
+
*`DAEMassMatrix()` — uses the Rodas5 solver (from OrdinaryDiffEq.jl) for DAE problems with a mass matrix formulation.
55
+
56
+
*`DAEIndexing()` — uses the IDA solver (from Sundials.jl) for DAE problems with index variable support.
57
+
58
+
You can also define a custom optimizer using the generic `ODEOptimizer(solver)` or `DAEOptimizer(solver)` constructor by supplying any ODE or DAE solver supported by [OrdinaryDiffEq.jl](https://docs.sciml.ai/DiffEqDocs/stable/solvers/ode_solve/) or [Sundials.jl](https://github.com/SciML/Sundials.jl).
0 commit comments