フィルターのクリア

How to solve this optimization problems for different values of lambda>0?

1 回表示 (過去 30 日間)
Rajkumar Verma
Rajkumar Verma 2020 年 7 月 27 日
コメント済み: Rajkumar Verma 2020 年 7 月 27 日
Dear All,
How can I solve the attached optimization problem for different values ​​of.
  2 件のコメント
John D'Errico
John D'Errico 2020 年 7 月 27 日
Use fmincon. Why not try it?
Rajkumar Verma
Rajkumar Verma 2020 年 7 月 27 日
I have tried with this code by taking lambda=2. But system is showing error (Unable to perform assignment because dot indexing is not supported for variables of this type.)
lb = [0 0 0 0];
Aeq = [1 1 1 0];
beq = 1;
x0 = [1 1 1 4] / 3;
fun = @ObjectiveFunction;
Nonlcon = @NLcon;
A = [];
b = [];
ub = [];
[X, FVAL] = fmincon (fun, x0, A, b, t, Aeq, beq, lb, ub, Nonlcon)
function f = ObjectiveFunction (x)
f =-(x(4));
end
function [C, Ceq] = NLcon (x)
C(1)= -(((((4)^2)*x(1)+((4)^2)*x(2)+((3.4)^2)*x(3))^(1/2))-x(4));
C(2)= -(((((4)^2)*x(1)+((2.6)^2)*x(2)+((6)^2)*x(3))^(1/2))-x(4));
C(3)= -(((((3)^2)*x(1)+((5.9)^2)*x(2)+((4)^2)*x(3))^(1/2))-x(4));
C(4)= -(((((3)^2)*x(1)+((4)^2)*x(2)+((4)^2)*x(3))^(1/2))-x(4));
C(5)= -(((((4.3)^2)*x(1)+((0)^2)*x(2)+((4)^2)*x(3))^(1/2))-x(4));
Ceq= [];
end

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

回答 (0 件)

カテゴリ

Help Center および File ExchangeNonlinear Optimization についてさらに検索

製品


リリース

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by