summaryrefslogtreecommitdiff
path: root/code
diff options
context:
space:
mode:
authorRemyaDebasis2018-07-24 10:19:25 +0530
committerRemyaDebasis2018-07-24 10:19:25 +0530
commit75947a7aa5a3955fe5a72e09f55bbdc05e3b8751 (patch)
tree23573b967e8324d44226379d70559b8f0ea34905 /code
parent392bc1326ebccd63e40cb55a82116208a54f2478 (diff)
downloadFOT_Examples-75947a7aa5a3955fe5a72e09f55bbdc05e3b8751.tar.gz
FOT_Examples-75947a7aa5a3955fe5a72e09f55bbdc05e3b8751.tar.bz2
FOT_Examples-75947a7aa5a3955fe5a72e09f55bbdc05e3b8751.zip
Diffstat (limited to 'code')
-rw-r--r--code/fminimax/Davidson2Problem.sce2
-rw-r--r--code/fminimax/NL_MiniMax_Problem.sce13
2 files changed, 3 insertions, 12 deletions
diff --git a/code/fminimax/Davidson2Problem.sce b/code/fminimax/Davidson2Problem.sce
index e00bdc2..ea7b786 100644
--- a/code/fminimax/Davidson2Problem.sce
+++ b/code/fminimax/Davidson2Problem.sce
@@ -1,4 +1,4 @@
-// J.Hald, K Madsen, Reference:Combined LP and quasi-Newton methos for minimax optimization, Mathematical Programming, Springer, 1981
+// J.Hald, K Madsen, Combined LP and quasi-Newton methods for minimax optimization, Mathematical Programming, Springer, 1981
// Min F = max|fi(x)|
// fi(X) = (X1 + X2*ti - exp(ti))^2 + (X3 + X4*sin(ti) - cos(ti))^2 where i varies from 1 to 20
// ti = 0.2i
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