Minimize variables and objective function with constraints in fmincon
1 次查看(过去 30 天)
显示 更早的评论
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 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Risk Management Toolbox 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!