Constraint on some of the design variables

5 views (last 30 days)
Hi all,
If I have an objective function as
obj(x,y,z) with lower bounds [x_l,y_l,z_l] and upper bounds [x_u,y_u,z_u]
and a non-linear constraint applied only to y & z: nlincon(y,z) , which is a scalar valued function.
How do I implement this optimization problem in matlab?
Thanks

Accepted Answer

Walter Roberson
Walter Roberson on 6 Mar 2018
Sounds like a standard fmincon(). Your input variables would be the vector [x, y, z] and inside your nonlinear constraint function you would just ignore the portion of the input that corresponds to x.
  5 Comments
Walter Roberson
Walter Roberson on 8 Mar 2018
Nonlinear constraints often involve the relationship between multiple variables. If you had a constraint such as
x(1)^2 + x(2)^2 <= 25
then is that a constraint on x(1) or is it a constraint on x(2) ??
Suppose that you had a series of constraints,
x(1)^2 - 2*x(1) <= 5
x(2)^2 - 2*x(2) <= 5
and so on for each variable, and you also had a constraint
x(1)*x(2) >= 1/2
If the requirement was to emit one c entry for each x entry so that fmincon could somehow know which variable the constraint was being applied to, then how would you emit more constraints than there were variables?
Aneesh Vasudev
Aneesh Vasudev on 10 Mar 2018
Sure. It seems like I have to revisit some math.

Sign in to comment.

More Answers (0)

Products

Community Treasure Hunt

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

Start Hunting!