Optimization function based on different domain of optimized variables
Show older comments
Hello,
I have an linear objective function f(x1,x2,x3.. ) which is defined for a fixed domain of x1 say x1< (constant k). Also the objective function changes to g(x1,x2,x3 ... ) if x1> (constant k). The objective function in both the cases is linear. x1,x2,x3 are the optimization variables. There are set of other equality and inquality constraints on the other variables.
I was trying to solve this optimization problem using linprog .
How can I switch the optimization function based on the domain of x1? Can I iterate over the current value of x1 and check if it is less than that constant in 'linprog' solver and accordingly select the optimization function f or g?
Accepted Answer
More Answers (0)
Categories
Find more on Nonlinear Optimization 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!