Constraint on some of the design variables

1 次查看(过去 30 天)
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

采纳的回答

Walter Roberson
Walter Roberson 2018-3-6
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 个评论
Walter Roberson
Walter Roberson 2018-3-8
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 2018-3-10
Sure. It seems like I have to revisit some math.

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Solver Outputs and Iterative Display 的更多信息

产品

Community Treasure Hunt

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

Start Hunting!

Translated by