summaryrefslogtreecommitdiff
path: root/code/fminimax/NL_MiniMax_Problem.sce
diff options
context:
space:
mode:
authorRemyaDebasis2018-07-24 10:19:25 +0530
committerRemyaDebasis2018-07-24 10:19:25 +0530
commit75947a7aa5a3955fe5a72e09f55bbdc05e3b8751 (patch)
tree23573b967e8324d44226379d70559b8f0ea34905 /code/fminimax/NL_MiniMax_Problem.sce
parent392bc1326ebccd63e40cb55a82116208a54f2478 (diff)
downloadFOT_Examples-75947a7aa5a3955fe5a72e09f55bbdc05e3b8751.tar.gz
FOT_Examples-75947a7aa5a3955fe5a72e09f55bbdc05e3b8751.tar.bz2
FOT_Examples-75947a7aa5a3955fe5a72e09f55bbdc05e3b8751.zip
Diffstat (limited to 'code/fminimax/NL_MiniMax_Problem.sce')
-rw-r--r--code/fminimax/NL_MiniMax_Problem.sce13
1 files changed, 2 insertions, 11 deletions
diff --git a/code/fminimax/NL_MiniMax_Problem.sce b/code/fminimax/NL_MiniMax_Problem.sce
index 759f56b..b58881c 100644
--- a/code/fminimax/NL_MiniMax_Problem.sce
+++ b/code/fminimax/NL_MiniMax_Problem.sce
@@ -25,22 +25,13 @@ function f = ObjectiveFunction(X)
end
f1(2:5) = f(1) + 10*g(2:5);
endfunction
-// Non linear inequality constraints
-function [C, Ceq] = NLConstraints(X)
- C(1) = -(-2*X(1)^2 - 3*X(2)^4 - X(3) - 4*X(4)^2 - 5*X(5) + 127);
- C(2) = -(-7*X(1) - 3*X(2) - 10*X(3)^2 - X(4) + X(5) + 282);
- C(3) = -(-23*X(1) - X(2)^2 - 6*X(6)^2 + 8*X(7) + 196);
- C(4) = -(-4*X(1)^2 - X(2)^2 + 3*X(1)*X(2) - 2*X(3)^2 - 5*X(6) + 11*X(7));
- C = C';
- Ceq = [];
-endfunction
A =[]; b = []; Aeq = []; beq = [];lb = [];ub = [];
// Initial guess given to the solver
-x0 = [2.33050, 1.95137, -0.47754, 4.36573, -0.62449, 1.03813, 1.59423];
+x0 = [2, 1, 0, 4, 0, 1, 1];
// Solving the solvers
options = list("maxiter", 4000, "cputime", [6000]);
-[x,fval,maxfval,exitflag,output,lambda] = fminimax(ObjectiveFunction,x0,A,b,Aeq,beq,lb,ub,NLConstraints,options);
+[x,fval,maxfval,exitflag,output,lambda] = fminimax(ObjectiveFunction,x0,A,b,Aeq,beq,lb,ub,[],options);
// Result representation
clc