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

2 Ansichten (letzte 30 Tage)
Dear All,
How can I solve the attached optimization problem for different values ​​of.
  2 Kommentare
Rajkumar Verma
Rajkumar Verma am 27 Jul. 2020
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

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Kategorien

Mehr zu Nonlinear Optimization finden Sie in Help Center und File Exchange

Produkte


Version

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by