Minimize variables and objective function with constraints in fmincon
1 view (last 30 days)
Show older comments
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 Comments
Answers (0)
See Also
Categories
Find more on Risk Management Toolbox in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!