What's the differences between bounds and linear equality constraints?

7 ビュー (過去 30 日間)
Meng Ye
Meng Ye 2016 年 2 月 15 日
コメント済み: Meng Ye 2016 年 2 月 15 日
I'm trying to minimize an objective function f(x) with constraints, say, x(a:b) always equal to 0. I'm using fmincon() and thus can set the upper bound('ub') and lower bound('lb') of x(a:b) to be both 0, or in another way I can create a proper linear equality constraint ('Aeq' and 'beq') to set those elements of vector x to be 0. Will there be differences between these two ways? thanks. btw I'm using MATLAB R2015a.

回答 (1 件)

Matt J
Matt J 2016 年 2 月 15 日
編集済み: Matt J 2016 年 2 月 15 日
If you use lb, ub then fmincon will know that they are simple bounds and can give them special and more efficient handling.
However, I think it is bad to use bounds to force variables to be a constant. Why treat x(a:b) as unknowns when you already know that they are zero? It just makes unnecessary extra work.
  1 件のコメント
Meng Ye
Meng Ye 2016 年 2 月 15 日
Thank you for your answer. Yes you are right, I think it will be better treating them as constant values. However the model is actually more complicated, and these constraints do not suit for all the situations. I want to deal with different problems by simply turn 'on' and 'off' the constraints.

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeSystems of Nonlinear Equations についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by