summaryrefslogtreecommitdiff
path: root/tests/general_tests/intfmincon/intfmincon_options1.sce
diff options
context:
space:
mode:
authorGeorgey2017-07-05 11:42:11 +0530
committerGeorgey2017-07-05 11:42:11 +0530
commit536bbd0cd8e4ca5b29d07e472e682bbb5db63a97 (patch)
tree7b7c9ee9b99de05aa95db57063a3ca2f84a846eb /tests/general_tests/intfmincon/intfmincon_options1.sce
parent938fef4a37a7b7c61b4b6ff74cb4cfd2f100c427 (diff)
downloadFOSSEE-Optimization-toolbox-536bbd0cd8e4ca5b29d07e472e682bbb5db63a97.tar.gz
FOSSEE-Optimization-toolbox-536bbd0cd8e4ca5b29d07e472e682bbb5db63a97.tar.bz2
FOSSEE-Optimization-toolbox-536bbd0cd8e4ca5b29d07e472e682bbb5db63a97.zip
Updated tests for int and ecos functions
Diffstat (limited to 'tests/general_tests/intfmincon/intfmincon_options1.sce')
-rw-r--r--tests/general_tests/intfmincon/intfmincon_options1.sce32
1 files changed, 32 insertions, 0 deletions
diff --git a/tests/general_tests/intfmincon/intfmincon_options1.sce b/tests/general_tests/intfmincon/intfmincon_options1.sce
new file mode 100644
index 0000000..29261e5
--- /dev/null
+++ b/tests/general_tests/intfmincon/intfmincon_options1.sce
@@ -0,0 +1,32 @@
+
+//Unknown option
+
+function y=f(x)
+ y=x(1)*x(2)+x(2)*x(3);
+endfunction
+
+x0=[1,1,1];
+A=[];
+b=[];
+Aeq=[];
+beq=[];
+lb=[0 0.2,-%inf];
+ub=[0.6 %inf,1];
+intcon=[1,2]
+// !--error 999
+// Unknown string argument passed.
+// at line 380 of function intfmincon called by :
+// [x,fval,exitflag,grad,hessian] =intfmincon(f,x0,intcon,A,b,Aeq,beq,lb,ub,nlc,options)
+// at line 31 of exec file called by :
+// exec intfmincon_options1.sce
+
+
+function [c,ceq]=nlc(x)
+ c=[x(1)^2-1,x(1)^2+x(2)^2-1,x(3)^2-1];
+ ceq=[x(1)^3-0.5,x(2)^2+x(3)^2-0.75];
+endfunction
+
+
+options=list("Maximum", [1500], "CpuTime", [500]);
+
+[x,fval,exitflag,grad,hessian] =intfmincon(f,x0,intcon,A,b,Aeq,beq,lb,ub,nlc,options)