Minimize variables and objective function with constraints in fmincon

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.

Answers (0)

Categories

Tags

Asked:

on 2 Nov 2020

Community Treasure Hunt

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

Start Hunting!