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!
