Minimize variables and objective function with constraints in fmincon

1 回表示 (過去 30 日間)
Martin Levy
Martin Levy 2020 年 11 月 2 日
I'm trying to minimize the function
fun = @(t)abs(Volume-(t(1)*Volprhour(1)+t(2)*Volprhour(2)+t(3)*Volprhour(3));
It is a total volume processed by three filters, where the necessary time on each filter should be determined t(1), t(2), t(3).
Contraints of the times are
t(1)>=t(2)>=t(3)
Running the function with fmincon, is working, but I would like to minimize t(1), which is not currently working.
I tried minimizing t(1), by changing the setup of the function to
fun = @(t)abs((Volume-t(2)*Volprhour(2)-t(3)*Volprhour(3))/Volprhour(1));
so it minimizes t(1), but then the constraints are not satisfied.

回答 (0 件)

カテゴリ

Help Center および File ExchangeRisk Management Toolbox についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by