How to speed up fmincon?
7 次查看(过去 30 天)
显示 更早的评论
Hello, I'm trying to get optimized two parameters in the differential equations. I've already gotten very helpful answers when I asked here using a simple example. So now I know how to make my code, but my actual system is consisted of 64 differential equations. In other words, my goal is to find out two parameters that are in all differential equations, while solving 64 differential equations to make one objective function to minimum. But when I run the code, it was running for several hours. And it's still 'busy'. Does that mean my code has a problem? I'm attaching my code. Please help me. Thank you.
0 个评论
采纳的回答
Matt J
2014-6-19
Your tolerances 'TolX',1e-100,'TolCon',1e-100 are extremely small. That can protract the optimization.
7 个评论
Marc
2014-6-23
First off it should not surprise you that two different ODE integrators give you different results.
Second, when optimizing odes like this, you should first off try to "optimize" which ode integrator to use by timing the solution to the ode equation. If it takes ode15s 0.1s to solve your system, expect the optimization to take awhile. Since you are only looking at two parameters, a quick sensitivity analysis of time vs ode integrator, along with "accuracy" should be easy.
Now back to your problem... Try fminsearch. I have found that the nelder mead simplex routines which do not rely on jacobians or hessians to be more robust to these kinds of systems.
Be careful how you are defining your objective function. Scaling this could be of help.
更多回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!