Tricky restriction in an optimization problem
古いコメントを表示
I will keep the question as general as possible.
I am solving a system of differential-algebraic equations with ode15s and I have an optimization problem, for which I employ the fmincon function. Consider that some parameters of the DAE's will maximize an objective function. This one happens to be the integral of one of the integrated variables across time, say y(17). Thus, we can use the trapz function to calculate the objective function
obj_function = trapz(t, y(:, 17)) % Output of the function given to fmincon
Now comes the tricky part. fmincon can place some restrictions but I want the following one. I would like that, after solving the DAE's, an integral of, consider for example the 4th output variable of the solver y(4) across time is bounded. So we would write
restriction = trapz(t, y(:, 4)); % Restriction that can be calculated only after ode15s is done
And I would like that restriction was bounded, e.g., that it was between 1 and 2.
Is it possible to add this type of restriction so that the parameters to be optimized within fmincon, move as to (1) minimize the objective function, but also (2) keep restriction between said bounds?
Thanks in advance.
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Get Started with Optimization Toolbox についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
