-
-
Notifications
You must be signed in to change notification settings - Fork 6
Auto optimize when some functions depend on data? #14
Comments
I don't think it'll know what to do with that function in |
I found it refuses to optimize in my case (KeplerSolve is a numerical Float64 function, solved by iterating) : prob_1opt,alg_ = auto_optimize(prob_1) Stacktrace: |
I'd need to see code. |
I think this reproduces it using AutoOptimize
using DifferentialEquations
function odefunc1(du,u,p,t)
du[:] .= u
end
prob = ODEProblem(odefunc1,[0.1,0.2],(0.0,10.0))
prob,_ = auto_optimize(prob)
sol = solve(prob)
numfunc(t) = sol(t)[end]
function odefunc2(du,u,p,t)
du[:] .= numfunc(t).*u
end
prob = ODEProblem(odefunc2,[0.1,0.2],(0.0,10.0))
prob,_ = auto_optimize(prob)
sol = solve(prob) The second |
My code can be reduced, but so far:
|
I managed to express solution for eccentric anomaly as DAE. auto_optimize works if solution is expressed in form of mass matrix problem, but does not work for DAEProblem yet. Impressive piece of software though, it will hopefully get even better. |
Yes, right now it's just on ODEProblem, but when I get a second I'll extend it to some others. |
This is probably a dumb question, but is something like this
auto_optimize
-able?I only know the function
Eh(t)
numerically (from a previous ODE solve).The text was updated successfully, but these errors were encountered: