Effacer les filtres
Effacer les filtres

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

1 vue (au cours des 30 derniers jours)
Rajkumar Verma
Rajkumar Verma le 27 Juil 2020
Commenté : Rajkumar Verma le 27 Juil 2020
Dear All,
How can I solve the attached optimization problem for different values ​​of.
  2 commentaires
John D'Errico
John D'Errico le 27 Juil 2020
Use fmincon. Why not try it?
Rajkumar Verma
Rajkumar Verma le 27 Juil 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

Connectez-vous pour commenter.

Réponses (0)

Catégories

En savoir plus sur Nonlinear Optimization dans Help Center et File Exchange

Produits


Version

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by