Performance improvements #255
Replies: 2 comments 4 replies
-
Having the solution time increase with increased supports is not too surprising. The InfiniteOpt side of things (i.e., setting up the problem) should be pretty fast, but the solver will take increasingly more time to converge with larger problem sizes. In general, we can seek more performant solutions by:
Orthogonal collocation should be able to achieve improved accuracy with less supports in certain configurations. The one main caveat here is that we do not currently implement piece-wise controls (#216), but this is on the todo list to be resolved relatively soon. Beyond these tweaks, infinite-dimensional optimization problems fundamentally become increasing complex to solve with more supports. Hence, decomposition approaches become attractive to solve these problems. We hope/plan to implement an interface to Plasmo.jl to facilitate an automatic decomposition solution approach. |
Beta Was this translation helpful? Give feedback.
-
The following tutorial shows how to solve a 2048 ODE system in 87ms. https://diffeq.sciml.ai/stable/tutorials/advanced_ode_example/ The core is really about using adaptive implicit methods with preconditioned Newton-Krylov, using an iLU preconditioner tends to do really well. Then the parameter estimation follows by just using adjoints, like in https://diffeqflux.sciml.ai/dev/examples/pde_constrained/ |
Beta Was this translation helpful? Give feedback.
-
Hello,
Sorry to bother you again. I was hoping you'd have some advice on how to improve model performance.
Currently, I use InfiniteOpt to solve a problem. The solution is then used to integrate a set of ODEs which give me the final output I need (which I then compare to experimental data).
Briefly, the ODEs describe the dynamics of a "bicycle" model with controls (steering angle and acceleration). The controls are what the InfiniteOpt problem outputs. So given the right controls I need to integrate the bicycle's dynamics to get how the bike moves.
The problem though is that unless I use a ton of supports (~2000) I can't find a way to accurately integrate the ODEs. And with as I'm moving towrds more complicated versions of my problem with 2000 supports it takes minutes to solve the problem. With just 200 supports it takes seconds.
Since I can't find a way to make do with few supports, is there a way to improve the performance of InfiniteOpt to deal with the large number of supports? Is there anything I can try to do to improve performance in general?
Beta Was this translation helpful? Give feedback.
All reactions