Numerical Integrators With Problem-Based Optimization

4 ビュー (過去 30 日間)
Nick
Nick 2025 年 10 月 29 日
コメント済み: Nick 2025 年 10 月 30 日
I have an optimization problem where I will have to integrate some differential equations over a time horizon that is dependent on the optimization variables (it is a two-body astrodynamics problem so alternatively I could use root-finding to solve Kepler's equation). I tried setting up the problem using the problem-based approach but quickly realized that the class of variables used in the problem-based approach will not work with ode45 (or any root-finding problems). I was just curious if there happened to be any workaround to this, or if it can be confirmed that I have to resort to the solver-based approach when I have such an optimization problem.

採用された回答

Matt J
Matt J 2025 年 10 月 29 日
編集済み: Matt J 2025 年 10 月 29 日
but quickly realized that the class of variables used in the problem-based approach will not work with ode45 (or any root-finding problems)
We don't know what brought you to that conclusion, but objective functions involving ODEs should be possible in the problem-based framework using fcn2optimexpr. You should be able to do anything in the problem-based approach that you can with the solver-based approach, except when you want to use the SpecifyObjectiveGradient and SpecifyConstraintGradient options of the nonlinear optimization solvers.
There are, however, other pitfalls in optimization problems involving ODEs, which are discussed here,
  1 件のコメント
Nick
Nick 2025 年 10 月 30 日
Ok good to know. I came to that conclusion because I got an error when inputting the optimization class of variables into various functions. I was not aware of that function you linked or lots of other documentation I came across when looking at it. I am not well versed in the problem based approach yet. The only downside (as far as I have come to understand) is that you can't use the automatic differentiation when using fcn2optimexpr.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeSurrogate Optimization についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by