summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHarpreet2015-12-29 00:38:48 +0530
committerHarpreet2015-12-29 00:38:48 +0530
commiteb9ca1191c94059cd7adcf69805906c809fe9712 (patch)
treef98e728341812b8a0eb46aa4159b062a22225f05
parent0eee95dfb1edec6ce52ec3065a3adb1bf169c9f9 (diff)
downloadFOSSEE-Optimization-toolbox-eb9ca1191c94059cd7adcf69805906c809fe9712.tar.gz
FOSSEE-Optimization-toolbox-eb9ca1191c94059cd7adcf69805906c809fe9712.tar.bz2
FOSSEE-Optimization-toolbox-eb9ca1191c94059cd7adcf69805906c809fe9712.zip
Bugs fixed 4
-rw-r--r--DevDoc.md37
-rw-r--r--README.md6
-rw-r--r--demos/lsqlin.dem.sce2
-rw-r--r--demos/qpipopt.dem.sce16
-rw-r--r--demos/symphony.dem.sce22
-rw-r--r--demos/symphonymat.dem.sce8
-rw-r--r--help/en_US/lsqlin.xml24
-rw-r--r--help/en_US/lsqnonneg.xml18
-rw-r--r--help/en_US/qpipopt.xml42
-rw-r--r--help/en_US/qpipoptmat.xml16
-rw-r--r--help/en_US/scilab_en_US_help/JavaHelpSearch/DOCSbin7491 -> 7534 bytes
-rw-r--r--help/en_US/scilab_en_US_help/JavaHelpSearch/DOCS.TABbin867 -> 872 bytes
-rw-r--r--help/en_US/scilab_en_US_help/JavaHelpSearch/OFFSETSbin270 -> 270 bytes
-rw-r--r--help/en_US/scilab_en_US_help/JavaHelpSearch/POSITIONSbin36132 -> 36377 bytes
-rw-r--r--help/en_US/scilab_en_US_help/JavaHelpSearch/SCHEMA2
-rw-r--r--help/en_US/scilab_en_US_help/JavaHelpSearch/TMAPbin16384 -> 16384 bytes
-rw-r--r--help/en_US/scilab_en_US_help/_LaTeX_lsqlin.xml_1.pngbin3129 -> 3046 bytes
-rw-r--r--help/en_US/scilab_en_US_help/_LaTeX_lsqnonneg.xml_1.pngbin1508 -> 1456 bytes
-rw-r--r--help/en_US/scilab_en_US_help/_LaTeX_qpipopt.xml_1.pngbin3527 -> 3304 bytes
-rw-r--r--help/en_US/scilab_en_US_help/_LaTeX_qpipoptmat.xml_1.pngbin3180 -> 3148 bytes
-rw-r--r--help/en_US/scilab_en_US_help/_LaTeX_symphony.xml_1.pngbin3468 -> 3383 bytes
-rw-r--r--help/en_US/scilab_en_US_help/_LaTeX_symphonymat.xml_1.pngbin3187 -> 3140 bytes
-rw-r--r--help/en_US/scilab_en_US_help/lsqlin.html20
-rw-r--r--help/en_US/scilab_en_US_help/lsqnonneg.html18
-rw-r--r--help/en_US/scilab_en_US_help/qpipopt.html40
-rw-r--r--help/en_US/scilab_en_US_help/qpipoptmat.html12
-rw-r--r--help/en_US/scilab_en_US_help/symphony.html46
-rw-r--r--help/en_US/scilab_en_US_help/symphony.html~318
-rw-r--r--help/en_US/scilab_en_US_help/symphonymat.html38
-rw-r--r--help/en_US/symphony.xml48
-rw-r--r--help/en_US/symphonymat.xml42
-rw-r--r--jar/scilab_en_US_help.jarbin215075 -> 215257 bytes
-rw-r--r--macros/lsqlin.binbin52024 -> 53548 bytes
-rw-r--r--macros/lsqlin.sci108
-rw-r--r--macros/lsqnonneg.binbin23608 -> 23840 bytes
-rw-r--r--macros/lsqnonneg.sci42
-rw-r--r--macros/qpipopt.binbin49616 -> 50496 bytes
-rw-r--r--macros/qpipopt.sci170
-rw-r--r--macros/qpipoptmat.binbin51240 -> 52464 bytes
-rw-r--r--macros/qpipoptmat.sci75
-rw-r--r--macros/symphony.binbin54820 -> 54340 bytes
-rw-r--r--macros/symphony.sci195
-rw-r--r--macros/symphonymat.binbin60724 -> 60108 bytes
-rw-r--r--macros/symphonymat.sci215
-rw-r--r--tests/general_tests/lsqlin/lsqlin_A1.sce25
-rw-r--r--tests/general_tests/lsqlin/lsqlin_Aeq1.sce25
-rw-r--r--tests/general_tests/lsqlin/lsqlin_C1.sce26
-rw-r--r--tests/general_tests/lsqlin/lsqlin_b1.sce23
-rw-r--r--tests/general_tests/lsqlin/lsqlin_beq1.sce23
-rw-r--r--tests/general_tests/lsqlin/lsqlin_infeasible1.sce43
-rw-r--r--tests/general_tests/lsqlin/lsqlin_input1.sce25
-rw-r--r--tests/general_tests/lsqlin/lsqlin_input2.sce25
-rw-r--r--tests/general_tests/lsqlin/lsqlin_logical1.sce52
-rw-r--r--tests/general_tests/lsqlin/lsqlin_param1.sce26
-rw-r--r--tests/general_tests/lsqlin/lsqlin_param2.sce26
-rw-r--r--tests/general_tests/lsqlin/lsqlin_param3.sce26
-rw-r--r--tests/general_tests/lsqlin/lsqlin_x01.sce54
-rw-r--r--tests/general_tests/lsqnonneg/lsqnonneg_C.sce20
-rw-r--r--tests/general_tests/lsqnonneg/lsqnonneg_input1.sce19
-rw-r--r--tests/general_tests/lsqnonneg/lsqnonneg_input2.sce22
-rw-r--r--tests/general_tests/lsqnonneg/lsqnonneg_logical.sce40
-rw-r--r--tests/general_tests/lsqnonneg/lsqnonneg_param1.sce21
-rw-r--r--tests/general_tests/lsqnonneg/lsqnonneg_param2.sce21
-rw-r--r--tests/general_tests/qpipopt/qpipopt_A1.sce (renamed from tests/general_tests/qpipopt/qpipopt_conMatrix1.sce)10
-rw-r--r--tests/general_tests/qpipopt/qpipopt_A2.sce (renamed from tests/general_tests/qpipopt/qpipopt_conMatrix2.sce)10
-rw-r--r--tests/general_tests/qpipopt/qpipopt_LB1.sce14
-rw-r--r--tests/general_tests/qpipopt/qpipopt_LB2.sce23
-rw-r--r--tests/general_tests/qpipopt/qpipopt_Q1.sce20
-rw-r--r--tests/general_tests/qpipopt/qpipopt_Q2.sce17
-rw-r--r--tests/general_tests/qpipopt/qpipopt_UB1.sce16
-rw-r--r--tests/general_tests/qpipopt/qpipopt_UB2.sce23
-rw-r--r--tests/general_tests/qpipopt/qpipopt_conLB1.sce15
-rw-r--r--tests/general_tests/qpipopt/qpipopt_conLB2.sce23
-rw-r--r--tests/general_tests/qpipopt/qpipopt_conUB1.sce10
-rw-r--r--tests/general_tests/qpipopt/qpipopt_conUB2.sce13
-rw-r--r--tests/general_tests/qpipopt/qpipopt_infeasible.sci33
-rw-r--r--tests/general_tests/qpipopt/qpipopt_input.sce11
-rw-r--r--tests/general_tests/qpipopt/qpipopt_input2.sce11
-rw-r--r--tests/general_tests/qpipopt/qpipopt_logical_1.sce15
-rw-r--r--tests/general_tests/qpipopt/qpipopt_logical_2.sce13
-rw-r--r--tests/general_tests/qpipopt/qpipopt_options1.sce14
-rw-r--r--tests/general_tests/qpipopt/qpipopt_options2.sce15
-rw-r--r--tests/general_tests/qpipopt/qpipopt_options3.sce14
-rw-r--r--tests/general_tests/qpipopt/qpipopt_p1.sce13
-rw-r--r--tests/general_tests/qpipopt/qpipopt_p2.sce19
-rw-r--r--tests/general_tests/qpipopt/qpipopt_x0.sce23
-rw-r--r--tests/general_tests/qpipopt/qpipopt_x01.sce4
-rw-r--r--tests/general_tests/qpipopt/qpipopt_x02.sce23
-rw-r--r--tests/general_tests/qpipoptmat/qpipoptmat_A1.sce5
-rw-r--r--tests/general_tests/qpipoptmat/qpipoptmat_Aeq1.sce3
-rw-r--r--tests/general_tests/qpipoptmat/qpipoptmat_H1.sce4
-rw-r--r--tests/general_tests/qpipoptmat/qpipoptmat_H2.sce3
-rw-r--r--tests/general_tests/qpipoptmat/qpipoptmat_b1.sce3
-rw-r--r--tests/general_tests/qpipoptmat/qpipoptmat_beq1.sce4
-rw-r--r--tests/general_tests/qpipoptmat/qpipoptmat_f1.sce4
-rw-r--r--tests/general_tests/qpipoptmat/qpipoptmat_infeasible.sci30
-rw-r--r--tests/general_tests/qpipoptmat/qpipoptmat_lb1.sce3
-rw-r--r--tests/general_tests/qpipoptmat/qpipoptmat_logical1.sce9
-rw-r--r--tests/general_tests/qpipoptmat/qpipoptmat_logical2.sce9
-rw-r--r--tests/general_tests/qpipoptmat/qpipoptmat_param1.sce5
-rw-r--r--tests/general_tests/qpipoptmat/qpipoptmat_param2.sce5
-rw-r--r--tests/general_tests/qpipoptmat/qpipoptmat_param3.sce5
-rw-r--r--tests/general_tests/qpipoptmat/qpipoptmat_ub1.sce4
-rw-r--r--tests/general_tests/qpipoptmat/qpipoptmat_x01.sce5
-rw-r--r--tests/general_tests/symphony/symphony_A1.sce (renamed from tests/general_tests/symphony/symphony_conmatrix1.sce)14
-rw-r--r--tests/general_tests/symphony/symphony_A2.sce (renamed from tests/general_tests/symphony/symphony_conmatrix2.sce)14
-rw-r--r--tests/general_tests/symphony/symphony_c1.sce12
-rw-r--r--tests/general_tests/symphony/symphony_c2.sce14
-rw-r--r--tests/general_tests/symphony/symphony_conlb1.sce14
-rw-r--r--tests/general_tests/symphony/symphony_conub1.sce (renamed from tests/general_tests/symphony/symphony_conlb2.sce)14
-rw-r--r--tests/general_tests/symphony/symphony_infeasible.sce (renamed from tests/general_tests/symphony/symphony_infeasible.sci)8
-rw-r--r--tests/general_tests/symphony/symphony_input1.sce12
-rw-r--r--tests/general_tests/symphony/symphony_input2.sce8
-rw-r--r--tests/general_tests/symphony/symphony_isInt1.sce14
-rw-r--r--tests/general_tests/symphony/symphony_lb1.sce18
-rw-r--r--tests/general_tests/symphony/symphony_logical1.sce11
-rw-r--r--tests/general_tests/symphony/symphony_logical2.sce10
-rw-r--r--tests/general_tests/symphony/symphony_ub1.sce20
-rw-r--r--tests/general_tests/symphonymat/symphonymat_b1.sce10
-rw-r--r--tests/general_tests/symphonymat/symphonymat_c1.sce7
-rw-r--r--tests/general_tests/symphonymat/symphonymat_infeasible.sce8
-rw-r--r--tests/general_tests/symphonymat/symphonymat_input1.sce7
-rw-r--r--tests/general_tests/symphonymat/symphonymat_input2.sce8
-rw-r--r--tests/general_tests/symphonymat/symphonymat_intcon1.sce12
-rw-r--r--tests/general_tests/symphonymat/symphonymat_intcon2.sce10
-rw-r--r--tests/general_tests/symphonymat/symphonymat_intcon3.sce8
-rw-r--r--tests/general_tests/symphonymat/symphonymat_lb1.sce8
-rw-r--r--tests/general_tests/symphonymat/symphonymat_logical1.sce10
-rw-r--r--tests/general_tests/symphonymat/symphonymat_logical2.sce11
-rw-r--r--tests/general_tests/symphonymat/symphonymat_options1.sce8
-rw-r--r--tests/general_tests/symphonymat/symphonymat_options2.sce7
-rw-r--r--tests/general_tests/symphonymat/symphonymat_ub1.sce8
-rw-r--r--tests/unit_tests/lsqnonneg.dia.ref72
-rw-r--r--tests/unit_tests/lsqnonneg.tst72
-rw-r--r--tests/unit_tests/symphony_base.dia.ref4
-rw-r--r--tests/unit_tests/symphony_base.tst2
-rw-r--r--tests/unit_tests/symphonymat_base.dia.ref4
-rw-r--r--tests/unit_tests/symphonymat_base.tst2
138 files changed, 1814 insertions, 1272 deletions
diff --git a/DevDoc.md b/DevDoc.md
new file mode 100644
index 0000000..94f6ab8
--- /dev/null
+++ b/DevDoc.md
@@ -0,0 +1,37 @@
+# Symphony Toolbox for Scilab
+
+A toolbox that provides mixed integer linear programming, quadratic programming and non linear programming tools in Scilab through the Symphony and Ipopt libraries.
+
+Tested with Symphony 5.6.10, Ipopt 3.12.4 and Scilab 5.5.2
+
+## Folders inside directory
+
+### Demos
+It consists of examples of all of the functions present in the toolbox i.e. lsqnonneg, lsqlin, qpipopt, qpipoptmat, symphony, symphonymat etc.
+
+### etc
+It consists of symphony.start and symphony.quit. Symphony.start will run loader files present in other directories. It will also link to the dynamic thirdparty libraries.
+
+### help
+In the folder en_US xml files are stored which are automatically generated by the help of help_from_sci function present in scilab. And this help file is then converted to the html by the build_help.sce. It consists of a folder called 'Symphony Native Function' which have xml files of native functions provided by symphony.
+
+### jar
+It consists of a jar file which is automatically generated by scilab. It is basically taken from "scilab_en_US_help".
+
+### macros
+It consists of all of the .sci files which are basically functions provided by the toolbox. It is converted into .bin by the help of buildmacros.sce. These files check the dimension and type of vectors, matrices and lists and send it to solver. The output is taken back and converted into a structured format. For further information please open the file in any editor as it is self explanatory.
+
+### sci_gateway
+In sci_gateway the cpp folder contains the gateway files. These files are written in CPP. They take the input from scilab and call the functions present in the libraries and then again send back the output to the scilab memory. It is using Ipopt and Symphony libraries present in thirdparty folder.
+
+### tests
+It contains the unit_tests and general_tests. General_tests folder have folders with the name of functions, it consists of tests which will result in specific error or output. Unit_tests folder consists of unit tests on each function.
+
+### thirdparty
+It consists the thirdparty libraries required for the toolbox, in this version we are using Ipopt and Symphony. The current version is only for linux libraries.
+
+### builder.sce
+It is used for building the toolbox, if someone change the definition of any macro or a gateway file, then the developer needs to build it again by executing this file. This file calls another builder files present in folders.
+
+### loader.sce
+It will redirect to symphony.start file present in the etc folder
diff --git a/README.md b/README.md
index ba0cf2a..933d76d 100644
--- a/README.md
+++ b/README.md
@@ -1,12 +1,12 @@
# Symphony Toolbox for Scilab
-A toolbox that provides mixed integer linear programming tools in Scilab through the Symphony library
+A toolbox that provides mixed integer linear programming, quadratic programming and non linear programming tools in Scilab through the Symphony and Ipopt libraries.
-Tested with Symphony 5.6.10 and scilab 5.5.2
+Tested with Symphony 5.6.10, Ipopt 3.12.4 and Scilab 5.5.2
## To use:
1. In Scilab, change the working directory to the root directory of the repository
2. Run `exec loader.sce`
-3. The library is now ready for use.
+3. The Toolbox is now ready.
## Note: This library is only for linux.
diff --git a/demos/lsqlin.dem.sce b/demos/lsqlin.dem.sce
index fb4bad9..0b81630 100644
--- a/demos/lsqlin.dem.sce
+++ b/demos/lsqlin.dem.sce
@@ -24,7 +24,7 @@ b = [0.5251
// Press ENTER to continue
halt() // Press return to continue
-//A basic example for equality, inequality and bounds
+//A basic example for equality, inequality constraints and variable bounds
C = [0.9501 0.7620 0.6153 0.4057
0.2311 0.4564 0.7919 0.9354
0.6068 0.0185 0.9218 0.9169
diff --git a/demos/qpipopt.dem.sce b/demos/qpipopt.dem.sce
index 41b8314..8e405e1 100644
--- a/demos/qpipopt.dem.sce
+++ b/demos/qpipopt.dem.sce
@@ -4,7 +4,7 @@ mode(1)
//
//Find x in R^6 such that:
-conMatrix= [1,-1,1,0,3,1;
+A= [1,-1,1,0,3,1;
-1,0,-3,-4,5,6;
2,5,3,0,1,0
0,1,0,1,2,-1;
@@ -13,13 +13,13 @@ conLB=[1;2;3;-%inf;-%inf];
conUB = [1;2;3;-1;2.5];
lb=[-1000;-10000; 0; -1000; -1000; -1000];
ub=[10000; 100; 1.5; 100; 100; 1000];
-//and minimize 0.5*x'*Q*x + p'*x with
-p=[1; 2; 3; 4; 5; 6]; Q=eye(6,6);
+//and minimize 0.5*x'â‹…Hâ‹…x + f'â‹…x with
+f=[1; 2; 3; 4; 5; 6]; H=eye(6,6);
nbVar = 6;
nbCon = 5;
x0 = repmat(0,nbVar,1);
param = list("MaxIter", 300, "CpuTime", 100);
-[xopt,fopt,exitflag,output,lambda]=qpipopt(nbVar,nbCon,Q,p,lb,ub,conMatrix,conLB,conUB,x0,param)
+[xopt,fopt,exitflag,output,lambda]=qpipopt(nbVar,nbCon,H,f,lb,ub,A,conLB,conUB,x0,param)
// Press ENTER to continue
halt() // Press return to continue
@@ -30,14 +30,14 @@ halt() // Press return to continue
// –x1 + 2x2 ≤ 2
// 2x1 + x2 ≤ 3
// 0 ≤ x1, 0 ≤ x2.
-Q = [1 -1; -1 2];
-p = [-2; -6];
-conMatrix = [1 1; -1 2; 2 1];
+H = [1 -1; -1 2];
+f = [-2; -6];
+A = [1 1; -1 2; 2 1];
conUB = [2; 2; 3];
conLB = [-%inf; -%inf; -%inf];
lb = [0; 0];
ub = [%inf; %inf];
nbVar = 2;
nbCon = 3;
-[xopt,fopt,exitflag,output,lambda] = qpipopt(nbVar,nbCon,Q,p,lb,ub,conMatrix,conLB,conUB)
+[xopt,fopt,exitflag,output,lambda] = qpipopt(nbVar,nbCon,H,f,lb,ub,A,conLB,conUB)
//========= E N D === O F === D E M O =========//
diff --git a/demos/symphony.dem.sce b/demos/symphony.dem.sce
index 9dcf6d7..67886a3 100644
--- a/demos/symphony.dem.sce
+++ b/demos/symphony.dem.sce
@@ -5,25 +5,25 @@ mode(1)
//A basic case :
// Objective function
-objCoef = [350*5,330*3,310*4,280*6,500,450,400,100]';
+c = [350*5,330*3,310*4,280*6,500,450,400,100]';
// Lower Bound of variable
lb = repmat(0,8,1);
// Upper Bound of variables
ub = [repmat(1,4,1);repmat(%inf,4,1)];
// Constraint Matrix
-conMatrix = [5,3,4,6,1,1,1,1;
+A = [5,3,4,6,1,1,1,1;
5*0.05,3*0.04,4*0.05,6*0.03,0.08,0.07,0.06,0.03;
5*0.03,3*0.03,4*0.04,6*0.04,0.06,0.07,0.08,0.09;]
-// Lower Bound of constrains
+// Lower Bound of constraints
conlb = [ 25; 1.25; 1.25]
-// Upper Bound of constrains
+// Upper Bound of constraints
conub = [ 25; 1.25; 1.25]
// Row Matrix for telling symphony that the is integer or not
isInt = [repmat(%t,1,4) repmat(%f,1,4)];
xopt = [1 1 0 1 7.25 0 0.25 3.5]
fopt = [8495]
// Calling Symphony
-[x,f,status,output] = symphony(8,3,c,isInt,lb,ub,conMatrix,conlb,conub,1)
+[x,f,status,output] = symphony(8,3,c,isInt,lb,ub,A,conlb,conub,1)
// Press ENTER to continue
halt() // Press return to continue
@@ -37,7 +37,7 @@ halt() // Press return to continue
// st sum{j=1,...,n} r(i,j)x(j) <= b(i) i=1,...,m
// x(j)=0 or 1
// The function to be maximize i.e. P(j)
-p = [ 504 803 667 1103 834 585 811 856 690 832 846 813 868 793 ..
+c = [ 504 803 667 1103 834 585 811 856 690 832 846 813 868 793 ..
825 1002 860 615 540 797 616 660 707 866 647 746 1006 608 ..
877 900 573 788 484 853 942 630 591 630 640 1169 932 1034 ..
957 798 669 625 467 1051 552 717 654 388 559 555 1104 783 ..
@@ -45,7 +45,7 @@ p = [ 504 803 667 1103 834 585 811 856 690 832 846 813 868 793 ..
510 671 575 740 510 675 996 636 826 1022 1140 654 909 799 ..
1162 653 814 625 599 476 767 954 906 904 649 873 565 853 1008 632]';
//Constraint Matrix
-conMatrix = [
+A = [
//Constraint 1
42 41 523 215 819 551 69 193 582 375 367 478 162 898 ..
550 553 298 577 493 183 260 224 852 394 958 282 402 604 ..
@@ -87,15 +87,15 @@ conMatrix = [
483 336 765 637 981 980 202 35 594 689 602 76 767 693 ..
893 160 785 311 417 748 375 362 617 553 474 915 457 261 350 635 ;
];
-nbCon = size(conMatrix,1)
-nbVar = size(conMatrix,2)
+nbCon = size(A,1)
+nbVar = size(A,2)
// Lower Bound of variables
lb = repmat(0,nbVar,1)
// Upper Bound of variables
ub = repmat(1,nbVar,1)
// Row Matrix for telling symphony that the is integer or not
isInt = repmat(%t,1,nbVar)
-// Lower Bound of constrains
+// Lower Bound of constraints
conLB=repmat(0,nbCon,1);
// Upper Bound of constraints
conUB=[11927 13727 11551 13056 13460 ]';
@@ -108,5 +108,5 @@ xopt = [0 1 1 0 0 1 0 1 0 1 0 0 0 0 0 0 0 1 0 0 0 0 1 0 1 1 0 1 1 0 1 ..
// Optimal value
fopt = [ 24381 ]
// Calling Symphony
-[x,f,status,output] = symphony(nbVar,nbCon,p,isInt,lb,ub,conMatrix,conLB,conUB,-1,options);
+[x,f,status,output] = symphony(nbVar,nbCon,c,isInt,lb,ub,A,conLB,conUB,-1,options);
//========= E N D === O F === D E M O =========//
diff --git a/demos/symphonymat.dem.sce b/demos/symphonymat.dem.sce
index bc0f67a..a5e19ac 100644
--- a/demos/symphonymat.dem.sce
+++ b/demos/symphonymat.dem.sce
@@ -4,7 +4,7 @@ mode(1)
//
// Objective function
-C = [350*5,330*3,310*4,280*6,500,450,400,100]';
+c = [350*5,330*3,310*4,280*6,500,450,400,100]';
// Lower Bound of variable
lb = repmat(0,1,8);
// Upper Bound of variables
@@ -30,7 +30,7 @@ halt() // Press return to continue
// st sum{j=1,...,n} r(i,j)x(j) <= b(i) i=1,...,m
// x(j)=0 or 1
// The function to be maximize i.e. P(j)
-C = -1*[ 504 803 667 1103 834 585 811 856 690 832 846 813 868 793 ..
+c = -1*[ 504 803 667 1103 834 585 811 856 690 832 846 813 868 793 ..
825 1002 860 615 540 797 616 660 707 866 647 746 1006 608 ..
877 900 573 788 484 853 942 630 591 630 640 1169 932 1034 ..
957 798 669 625 467 1051 552 717 654 388 559 555 1104 783 ..
@@ -79,7 +79,7 @@ A = [ //Constraint 1
483 336 765 637 981 980 202 35 594 689 602 76 767 693 ..
893 160 785 311 417 748 375 362 617 553 474 915 457 261 350 635 ;
];
-nbVar = size(objCoef,1)
+nbVar = size(c,1)
b=[11927 13727 11551 13056 13460 ];
// Lower Bound of variables
lb = repmat(0,1,nbVar)
@@ -99,5 +99,5 @@ xopt = [0 1 1 0 0 1 0 1 0 1 0 0 0 0 0 0 0 1 0 0 0 0 1 0 1 1 0 1 1 0 1 ..
// Optimal value
fopt = [ 24381 ]
// Calling Symphony
-[x,f,status,output] = symphonymat(C,intcon,A,b,[],[],lb,ub,options);
+[x,f,status,output] = symphonymat(c,intcon,A,b,[],[],lb,ub,options);
//========= E N D === O F === D E M O =========//
diff --git a/help/en_US/lsqlin.xml b/help/en_US/lsqlin.xml
index 73416a9..c08905e 100644
--- a/help/en_US/lsqlin.xml
+++ b/help/en_US/lsqlin.xml
@@ -38,9 +38,9 @@
<title>Parameters</title>
<variablelist>
<varlistentry><term>C :</term>
- <listitem><para> a matrix of double, represents the multiplier of the solution x in the expression C*x - d. C is M-by-N, where M is the number of equations, and N is the number of elements of x.</para></listitem></varlistentry>
+ <listitem><para> a matrix of double, represents the multiplier of the solution x in the expression C*x - d. Number of columns in C is equal to the number of elements in x.</para></listitem></varlistentry>
<varlistentry><term>d :</term>
- <listitem><para> a vector of double, represents the additive constant term in the expression C*x - d. d is M-by-1, where M is the number of equations.</para></listitem></varlistentry>
+ <listitem><para> a vector of double, represents the additive constant term in the expression C*x - d. Number of elements in d is equal to the number of rows in C matrix.</para></listitem></varlistentry>
<varlistentry><term>A :</term>
<listitem><para> a vector of double, represents the linear coefficients in the inequality constraints</para></listitem></varlistentry>
<varlistentry><term>b :</term>
@@ -49,9 +49,9 @@
<listitem><para> a matrix of double, represents the linear coefficients in the equality constraints</para></listitem></varlistentry>
<varlistentry><term>beq :</term>
<listitem><para> a vector of double, represents the linear coefficients in the equality constraints</para></listitem></varlistentry>
- <varlistentry><term>LB :</term>
+ <varlistentry><term>lb :</term>
<listitem><para> a vector of double, contains lower bounds of the variables.</para></listitem></varlistentry>
- <varlistentry><term>UB :</term>
+ <varlistentry><term>ub :</term>
<listitem><para> a vector of double, contains upper bounds of the variables.</para></listitem></varlistentry>
<varlistentry><term>x0 :</term>
<listitem><para> a vector of double, contains initial guess of variables.</para></listitem></varlistentry>
@@ -64,11 +64,11 @@
<varlistentry><term>residual :</term>
<listitem><para> a vector of double, solution residuals returned as the vector C*x-d.</para></listitem></varlistentry>
<varlistentry><term>exitflag :</term>
- <listitem><para> Integer identifying the reason the algorithm terminated.</para></listitem></varlistentry>
+ <listitem><para> Integer identifying the reason the algorithm terminated. It could be 0, 1 or 2 etc. i.e. Optimal, Maximum Number of Iterations Exceeded, CPU time exceeded. Other flags one can see in the lsqlin macro.</para></listitem></varlistentry>
<varlistentry><term>output :</term>
- <listitem><para> Structure containing information about the optimization. Right now it contains number of iteration.</para></listitem></varlistentry>
+ <listitem><para> Structure containing information about the optimization. This version only contains number of iterations.</para></listitem></varlistentry>
<varlistentry><term>lambda :</term>
- <listitem><para> Structure containing the Lagrange multipliers at the solution x (separated by constraint type).It contains lower, upper and linear equality, inequality constraints.</para></listitem></varlistentry>
+ <listitem><para> Structure containing the Lagrange multipliers at the solution x (separated by constraint type).It contains lower, upper bound multiplier and linear equality, inequality constraints.</para></listitem></varlistentry>
</variablelist>
</refsection>
@@ -81,15 +81,15 @@ Search the minimum of a constrained linear least square problem specified by :
<latex>
\begin{eqnarray}
&amp;\mbox{min}_{x}
-&amp; 1/2||C*x - d||_2^2 \\
-&amp; \text{subject to} &amp; A*x \leq b \\
-&amp; &amp; Aeq*x = beq \\
+&amp; 1/2||Câ‹…x - d||_2^2 \\
+&amp; \text{subject to} &amp; Aâ‹…x \leq b \\
+&amp; &amp; Aeqâ‹…x = beq \\
&amp; &amp; lb \leq x \leq ub \\
\end{eqnarray}
</latex>
</para>
<para>
-We are calling IPOpt for solving the linear least square problem, IPOpt is a library written in C++.
+The routine calls Ipopt for solving the linear least square problem, Ipopt is a library written in C++.
</para>
<para>
</para>
@@ -124,7 +124,7 @@ b = [0.5251
<refsection>
<title>Examples</title>
<programlisting role="example"><![CDATA[
-//A basic example for equality, inequality and bounds
+//A basic example for equality, inequality constraints and variable bounds
C = [0.9501 0.7620 0.6153 0.4057
0.2311 0.4564 0.7919 0.9354
0.6068 0.0185 0.9218 0.9169
diff --git a/help/en_US/lsqnonneg.xml b/help/en_US/lsqnonneg.xml
index daf79bf..662ba2a 100644
--- a/help/en_US/lsqnonneg.xml
+++ b/help/en_US/lsqnonneg.xml
@@ -35,21 +35,21 @@
<title>Parameters</title>
<variablelist>
<varlistentry><term>C :</term>
- <listitem><para> a matrix of doubles, represents the multiplier of the solution x in the expression C*x - d. C is M-by-N, where M is the number of equations, and N is the number of elements of x.</para></listitem></varlistentry>
+ <listitem><para> a matrix of double, represents the multiplier of the solution x in the expression C*x - d. Number of columns in C is equal to the number of elements in x.</para></listitem></varlistentry>
<varlistentry><term>d :</term>
- <listitem><para> a vector of doubles, represents the additive constant term in the expression C*x - d. d is M-by-1, where M is the number of equations.</para></listitem></varlistentry>
+ <listitem><para> a vector of double, represents the additive constant term in the expression C*x - d. Number of elements in d is equal to the number of rows in C matrix.</para></listitem></varlistentry>
<varlistentry><term>xopt :</term>
- <listitem><para> a vector of doubles, the computed solution of the optimization problem.</para></listitem></varlistentry>
+ <listitem><para> a vector of double, the computed solution of the optimization problem.</para></listitem></varlistentry>
<varlistentry><term>resnorm :</term>
<listitem><para> a double, objective value returned as the scalar value norm(C*x-d)^2.</para></listitem></varlistentry>
<varlistentry><term>residual :</term>
- <listitem><para> a vector of doubles, solution residuals returned as the vector C*x-d.</para></listitem></varlistentry>
+ <listitem><para> a vector of double, solution residuals returned as the vector C*x-d.</para></listitem></varlistentry>
<varlistentry><term>exitflag :</term>
- <listitem><para> Integer identifying the reason the algorithm terminated.</para></listitem></varlistentry>
+ <listitem><para> Integer identifying the reason the algorithm terminated. It could be 0, 1 or 2 i.e. Optimal, Maximum Number of Iterations Exceeded, CPU time exceeded.</para></listitem></varlistentry>
<varlistentry><term>output :</term>
- <listitem><para> Structure containing information about the optimization. Right now it contains number of iteration.</para></listitem></varlistentry>
+ <listitem><para> Structure containing information about the optimization. This version only contains number of iterations.</para></listitem></varlistentry>
<varlistentry><term>lambda :</term>
- <listitem><para> Structure containing the Lagrange multipliers at the solution x (separated by constraint type).It contains lower, upper and linear equality, inequality constraints.</para></listitem></varlistentry>
+ <listitem><para> Structure containing the Lagrange multipliers at the solution x. It contains lower and upper bound multiplier.</para></listitem></varlistentry>
</variablelist>
</refsection>
@@ -62,13 +62,13 @@ Solves nonnegative least-squares curve fitting problems specified by :
<latex>
\begin{eqnarray}
&amp;\mbox{min}_{x}
-&amp; 1/2||C*x - d||_2^2 \\
+&amp; 1/2||Câ‹…x - d||_2^2 \\
&amp; &amp; x \geq 0 \\
\end{eqnarray}
</latex>
</para>
<para>
-We are calling IPOpt for solving the nonnegative least-squares curve fitting problems, IPOpt is a library written in C++.
+The routine calls Ipopt for solving the nonnegative least-squares curve fitting problems, Ipopt is a library written in C++.
</para>
<para>
</para>
diff --git a/help/en_US/qpipopt.xml b/help/en_US/qpipopt.xml
index 23e2c52..6dd578d 100644
--- a/help/en_US/qpipopt.xml
+++ b/help/en_US/qpipopt.xml
@@ -24,9 +24,9 @@
<refsynopsisdiv>
<title>Calling Sequence</title>
<synopsis>
- xopt = qpipopt(nbVar,nbCon,Q,p,LB,UB,conMatrix,conLB,conUB)
- xopt = qpipopt(nbVar,nbCon,Q,p,LB,UB,conMatrix,conLB,conUB,x0)
- xopt = qpipopt(nbVar,nbCon,Q,p,LB,UB,conMatrix,conLB,conUB,x0,param)
+ xopt = qpipopt(nbVar,nbCon,H,f,lb,ub,A,conLB,conUB)
+ xopt = qpipopt(nbVar,nbCon,H,f,lb,ub,A,conLB,conUB,x0)
+ xopt = qpipopt(nbVar,nbCon,H,f,lb,ub,A,conLB,conUB,x0,param)
[xopt,fopt,exitflag,output,lamda] = qpipopt( ... )
</synopsis>
@@ -39,15 +39,15 @@
<listitem><para> a double, number of variables</para></listitem></varlistentry>
<varlistentry><term>nbCon :</term>
<listitem><para> a double, number of constraints</para></listitem></varlistentry>
- <varlistentry><term>Q :</term>
+ <varlistentry><term>H :</term>
<listitem><para> a symmetric matrix of double, represents coefficients of quadratic in the quadratic problem.</para></listitem></varlistentry>
- <varlistentry><term>p :</term>
+ <varlistentry><term>f :</term>
<listitem><para> a vector of double, represents coefficients of linear in the quadratic problem</para></listitem></varlistentry>
- <varlistentry><term>LB :</term>
+ <varlistentry><term>lb :</term>
<listitem><para> a vector of double, contains lower bounds of the variables.</para></listitem></varlistentry>
- <varlistentry><term>UB :</term>
+ <varlistentry><term>ub :</term>
<listitem><para> a vector of double, contains upper bounds of the variables.</para></listitem></varlistentry>
- <varlistentry><term>conMatrix :</term>
+ <varlistentry><term>A :</term>
<listitem><para> a matrix of double, contains matrix representing the constraint matrix</para></listitem></varlistentry>
<varlistentry><term>conLB :</term>
<listitem><para> a vector of double, contains lower bounds of the constraints.</para></listitem></varlistentry>
@@ -62,9 +62,9 @@
<varlistentry><term>fopt :</term>
<listitem><para> a double, the function value at x.</para></listitem></varlistentry>
<varlistentry><term>exitflag :</term>
- <listitem><para> Integer identifying the reason the algorithm terminated.</para></listitem></varlistentry>
+ <listitem><para> Integer identifying the reason the algorithm terminated. It could be 0, 1 or 2 etc. i.e. Optimal, Maximum Number of Iterations Exceeded, CPU time exceeded. Other flags one can see in the qpipopt macro.</para></listitem></varlistentry>
<varlistentry><term>output :</term>
- <listitem><para> Structure containing information about the optimization. Right now it contains number of iteration.</para></listitem></varlistentry>
+ <listitem><para> Structure containing information about the optimization. This version only contains number of iterations</para></listitem></varlistentry>
<varlistentry><term>lambda :</term>
<listitem><para> Structure containing the Lagrange multipliers at the solution x (separated by constraint type).It contains lower, upper and linear equality, inequality constraints.</para></listitem></varlistentry>
</variablelist>
@@ -80,14 +80,14 @@ find the minimum of f(x) such that
<latex>
\begin{eqnarray}
&amp;\mbox{min}_{x}
-&amp; 1/2*x'*Q*x + p'*x \\
-&amp; \text{subject to} &amp; conLB \leq C(x) \leq conUB \\
+&amp; 1/2â‹…x^Tâ‹…Hâ‹…x + f^Tâ‹…x \\
+&amp; \text{subject to} &amp; conLB \leq Aâ‹…x \leq conUB \\
&amp; &amp; lb \leq x \leq ub \\
\end{eqnarray}
</latex>
</para>
<para>
-We are calling IPOpt for solving the quadratic problem, IPOpt is a library written in C++.
+The routine calls Ipopt for solving the quadratic problem, Ipopt is a library written in C++.
</para>
<para>
</para>
@@ -97,7 +97,7 @@ We are calling IPOpt for solving the quadratic problem, IPOpt is a library writt
<title>Examples</title>
<programlisting role="example"><![CDATA[
//Find x in R^6 such that:
-conMatrix= [1,-1,1,0,3,1;
+A= [1,-1,1,0,3,1;
-1,0,-3,-4,5,6;
2,5,3,0,1,0
0,1,0,1,2,-1;
@@ -106,13 +106,13 @@ conLB=[1;2;3;-%inf;-%inf];
conUB = [1;2;3;-1;2.5];
lb=[-1000;-10000; 0; -1000; -1000; -1000];
ub=[10000; 100; 1.5; 100; 100; 1000];
-//and minimize 0.5*x'*Q*x + p'*x with
-p=[1; 2; 3; 4; 5; 6]; Q=eye(6,6);
+//and minimize 0.5*x'â‹…Hâ‹…x + f'â‹…x with
+f=[1; 2; 3; 4; 5; 6]; H=eye(6,6);
nbVar = 6;
nbCon = 5;
x0 = repmat(0,nbVar,1);
param = list("MaxIter", 300, "CpuTime", 100);
-[xopt,fopt,exitflag,output,lambda]=qpipopt(nbVar,nbCon,Q,p,lb,ub,conMatrix,conLB,conUB,x0,param)
+[xopt,fopt,exitflag,output,lambda]=qpipopt(nbVar,nbCon,H,f,lb,ub,A,conLB,conUB,x0,param)
// Press ENTER to continue
]]></programlisting>
@@ -128,16 +128,16 @@ param = list("MaxIter", 300, "CpuTime", 100);
// –x1 + 2x2 ≤ 2
// 2x1 + x2 ≤ 3
// 0 ≤ x1, 0 ≤ x2.
-Q = [1 -1; -1 2];
-p = [-2; -6];
-conMatrix = [1 1; -1 2; 2 1];
+H = [1 -1; -1 2];
+f = [-2; -6];
+A = [1 1; -1 2; 2 1];
conUB = [2; 2; 3];
conLB = [-%inf; -%inf; -%inf];
lb = [0; 0];
ub = [%inf; %inf];
nbVar = 2;
nbCon = 3;
-[xopt,fopt,exitflag,output,lambda] = qpipopt(nbVar,nbCon,Q,p,lb,ub,conMatrix,conLB,conUB)
+[xopt,fopt,exitflag,output,lambda] = qpipopt(nbVar,nbCon,H,f,lb,ub,A,conLB,conUB)
]]></programlisting>
</refsection>
diff --git a/help/en_US/qpipoptmat.xml b/help/en_US/qpipoptmat.xml
index 70150bc..8d0bc0c 100644
--- a/help/en_US/qpipoptmat.xml
+++ b/help/en_US/qpipoptmat.xml
@@ -50,9 +50,9 @@
<listitem><para> a matrix of double, represents the linear coefficients in the equality constraints</para></listitem></varlistentry>
<varlistentry><term>beq :</term>
<listitem><para> a vector of double, represents the linear coefficients in the equality constraints</para></listitem></varlistentry>
- <varlistentry><term>LB :</term>
+ <varlistentry><term>lb :</term>
<listitem><para> a vector of double, contains lower bounds of the variables.</para></listitem></varlistentry>
- <varlistentry><term>UB :</term>
+ <varlistentry><term>ub :</term>
<listitem><para> a vector of double, contains upper bounds of the variables.</para></listitem></varlistentry>
<varlistentry><term>x0 :</term>
<listitem><para> a vector of double, contains initial guess of variables.</para></listitem></varlistentry>
@@ -63,9 +63,9 @@
<varlistentry><term>fopt :</term>
<listitem><para> a double, the function value at x.</para></listitem></varlistentry>
<varlistentry><term>exitflag :</term>
- <listitem><para> Integer identifying the reason the algorithm terminated.</para></listitem></varlistentry>
+ <listitem><para> Integer identifying the reason the algorithm terminated.It could be 0, 1 or 2 etc. i.e. Optimal, Maximum Number of Iterations Exceeded, CPU time exceeded. Other flags one can see in the qpipoptmat macro.</para></listitem></varlistentry>
<varlistentry><term>output :</term>
- <listitem><para> Structure containing information about the optimization. Right now it contains number of iteration.</para></listitem></varlistentry>
+ <listitem><para> Structure containing information about the optimization. This version only contains number of iterations.</para></listitem></varlistentry>
<varlistentry><term>lambda :</term>
<listitem><para> Structure containing the Lagrange multipliers at the solution x (separated by constraint type).It contains lower, upper and linear equality, inequality constraints.</para></listitem></varlistentry>
</variablelist>
@@ -81,15 +81,15 @@ find the minimum of f(x) such that
<latex>
\begin{eqnarray}
&amp;\mbox{min}_{x}
-&amp; 1/2*x'*H*x + f'*x \\
-&amp; \text{subject to} &amp; A*x \leq b \\
-&amp; &amp; Aeq*x = beq \\
+&amp; 1/2â‹…x^Tâ‹…Hâ‹…x + f^Tâ‹…x \\
+&amp; \text{subject to} &amp; Aâ‹…x \leq b \\
+&amp; &amp; Aeqâ‹…x = beq \\
&amp; &amp; lb \leq x \leq ub \\
\end{eqnarray}
</latex>
</para>
<para>
-We are calling IPOpt for solving the quadratic problem, IPOpt is a library written in C++.
+The routine calls Ipopt for solving the quadratic problem, Ipopt is a library written in C++.
</para>
<para>
</para>
diff --git a/help/en_US/scilab_en_US_help/JavaHelpSearch/DOCS b/help/en_US/scilab_en_US_help/JavaHelpSearch/DOCS
index 90b22d8..8ebf21b 100644
--- a/help/en_US/scilab_en_US_help/JavaHelpSearch/DOCS
+++ b/help/en_US/scilab_en_US_help/JavaHelpSearch/DOCS
Binary files differ
diff --git a/help/en_US/scilab_en_US_help/JavaHelpSearch/DOCS.TAB b/help/en_US/scilab_en_US_help/JavaHelpSearch/DOCS.TAB
index 8cff552..728f68c 100644
--- a/help/en_US/scilab_en_US_help/JavaHelpSearch/DOCS.TAB
+++ b/help/en_US/scilab_en_US_help/JavaHelpSearch/DOCS.TAB
Binary files differ
diff --git a/help/en_US/scilab_en_US_help/JavaHelpSearch/OFFSETS b/help/en_US/scilab_en_US_help/JavaHelpSearch/OFFSETS
index 62368d7..9468d7f 100644
--- a/help/en_US/scilab_en_US_help/JavaHelpSearch/OFFSETS
+++ b/help/en_US/scilab_en_US_help/JavaHelpSearch/OFFSETS
Binary files differ
diff --git a/help/en_US/scilab_en_US_help/JavaHelpSearch/POSITIONS b/help/en_US/scilab_en_US_help/JavaHelpSearch/POSITIONS
index c85a3ee..d5dee46 100644
--- a/help/en_US/scilab_en_US_help/JavaHelpSearch/POSITIONS
+++ b/help/en_US/scilab_en_US_help/JavaHelpSearch/POSITIONS
Binary files differ
diff --git a/help/en_US/scilab_en_US_help/JavaHelpSearch/SCHEMA b/help/en_US/scilab_en_US_help/JavaHelpSearch/SCHEMA
index b5697c6..e2b33d1 100644
--- a/help/en_US/scilab_en_US_help/JavaHelpSearch/SCHEMA
+++ b/help/en_US/scilab_en_US_help/JavaHelpSearch/SCHEMA
@@ -1,2 +1,2 @@
JavaSearch 1.0
-TMAP bs=2048 rt=1 fl=-1 id1=1439 id2=1
+TMAP bs=2048 rt=1 fl=-1 id1=1446 id2=1
diff --git a/help/en_US/scilab_en_US_help/JavaHelpSearch/TMAP b/help/en_US/scilab_en_US_help/JavaHelpSearch/TMAP
index 80e09d1..35dc462 100644
--- a/help/en_US/scilab_en_US_help/JavaHelpSearch/TMAP
+++ b/help/en_US/scilab_en_US_help/JavaHelpSearch/TMAP
Binary files differ
diff --git a/help/en_US/scilab_en_US_help/_LaTeX_lsqlin.xml_1.png b/help/en_US/scilab_en_US_help/_LaTeX_lsqlin.xml_1.png
index 873dc47..9015755 100644
--- a/help/en_US/scilab_en_US_help/_LaTeX_lsqlin.xml_1.png
+++ b/help/en_US/scilab_en_US_help/_LaTeX_lsqlin.xml_1.png
Binary files differ
diff --git a/help/en_US/scilab_en_US_help/_LaTeX_lsqnonneg.xml_1.png b/help/en_US/scilab_en_US_help/_LaTeX_lsqnonneg.xml_1.png
index b923eeb..3dd57aa 100644
--- a/help/en_US/scilab_en_US_help/_LaTeX_lsqnonneg.xml_1.png
+++ b/help/en_US/scilab_en_US_help/_LaTeX_lsqnonneg.xml_1.png
Binary files differ
diff --git a/help/en_US/scilab_en_US_help/_LaTeX_qpipopt.xml_1.png b/help/en_US/scilab_en_US_help/_LaTeX_qpipopt.xml_1.png
index 6750af2..e2fbbde 100644
--- a/help/en_US/scilab_en_US_help/_LaTeX_qpipopt.xml_1.png
+++ b/help/en_US/scilab_en_US_help/_LaTeX_qpipopt.xml_1.png
Binary files differ
diff --git a/help/en_US/scilab_en_US_help/_LaTeX_qpipoptmat.xml_1.png b/help/en_US/scilab_en_US_help/_LaTeX_qpipoptmat.xml_1.png
index 7331197..3846115 100644
--- a/help/en_US/scilab_en_US_help/_LaTeX_qpipoptmat.xml_1.png
+++ b/help/en_US/scilab_en_US_help/_LaTeX_qpipoptmat.xml_1.png
Binary files differ
diff --git a/help/en_US/scilab_en_US_help/_LaTeX_symphony.xml_1.png b/help/en_US/scilab_en_US_help/_LaTeX_symphony.xml_1.png
index 96b5161..9155e8f 100644
--- a/help/en_US/scilab_en_US_help/_LaTeX_symphony.xml_1.png
+++ b/help/en_US/scilab_en_US_help/_LaTeX_symphony.xml_1.png
Binary files differ
diff --git a/help/en_US/scilab_en_US_help/_LaTeX_symphonymat.xml_1.png b/help/en_US/scilab_en_US_help/_LaTeX_symphonymat.xml_1.png
index 2d61fb7..9c2039f 100644
--- a/help/en_US/scilab_en_US_help/_LaTeX_symphonymat.xml_1.png
+++ b/help/en_US/scilab_en_US_help/_LaTeX_symphonymat.xml_1.png
Binary files differ
diff --git a/help/en_US/scilab_en_US_help/lsqlin.html b/help/en_US/scilab_en_US_help/lsqlin.html
index b843257..aef773d 100644
--- a/help/en_US/scilab_en_US_help/lsqlin.html
+++ b/help/en_US/scilab_en_US_help/lsqlin.html
@@ -46,9 +46,9 @@
<div class="refsection"><h3 class="title">Parameters</h3>
<dl><dt><span class="term">C :</span>
- <dd><p class="para">a matrix of double, represents the multiplier of the solution x in the expression C*x - d. C is M-by-N, where M is the number of equations, and N is the number of elements of x.</p></dd></dt>
+ <dd><p class="para">a matrix of double, represents the multiplier of the solution x in the expression C*x - d. Number of columns in C is equal to the number of elements in x.</p></dd></dt>
<dt><span class="term">d :</span>
- <dd><p class="para">a vector of double, represents the additive constant term in the expression C*x - d. d is M-by-1, where M is the number of equations.</p></dd></dt>
+ <dd><p class="para">a vector of double, represents the additive constant term in the expression C*x - d. Number of elements in d is equal to the number of rows in C matrix.</p></dd></dt>
<dt><span class="term">A :</span>
<dd><p class="para">a vector of double, represents the linear coefficients in the inequality constraints</p></dd></dt>
<dt><span class="term">b :</span>
@@ -57,9 +57,9 @@
<dd><p class="para">a matrix of double, represents the linear coefficients in the equality constraints</p></dd></dt>
<dt><span class="term">beq :</span>
<dd><p class="para">a vector of double, represents the linear coefficients in the equality constraints</p></dd></dt>
- <dt><span class="term">LB :</span>
+ <dt><span class="term">lb :</span>
<dd><p class="para">a vector of double, contains lower bounds of the variables.</p></dd></dt>
- <dt><span class="term">UB :</span>
+ <dt><span class="term">ub :</span>
<dd><p class="para">a vector of double, contains upper bounds of the variables.</p></dd></dt>
<dt><span class="term">x0 :</span>
<dd><p class="para">a vector of double, contains initial guess of variables.</p></dd></dt>
@@ -72,16 +72,16 @@
<dt><span class="term">residual :</span>
<dd><p class="para">a vector of double, solution residuals returned as the vector C*x-d.</p></dd></dt>
<dt><span class="term">exitflag :</span>
- <dd><p class="para">Integer identifying the reason the algorithm terminated.</p></dd></dt>
+ <dd><p class="para">Integer identifying the reason the algorithm terminated. It could be 0, 1 or 2 etc. i.e. Optimal, Maximum Number of Iterations Exceeded, CPU time exceeded. Other flags one can see in the lsqlin macro.</p></dd></dt>
<dt><span class="term">output :</span>
- <dd><p class="para">Structure containing information about the optimization. Right now it contains number of iteration.</p></dd></dt>
+ <dd><p class="para">Structure containing information about the optimization. This version only contains number of iterations.</p></dd></dt>
<dt><span class="term">lambda :</span>
- <dd><p class="para">Structure containing the Lagrange multipliers at the solution x (separated by constraint type).It contains lower, upper and linear equality, inequality constraints.</p></dd></dt></dl></div>
+ <dd><p class="para">Structure containing the Lagrange multipliers at the solution x (separated by constraint type).It contains lower, upper bound multiplier and linear equality, inequality constraints.</p></dd></dt></dl></div>
<div class="refsection"><h3 class="title">Description</h3>
<p class="para">Search the minimum of a constrained linear least square problem specified by :</p>
- <p class="para"><span><img src='./_LaTeX_lsqlin.xml_1.png' style='position:relative;top:41px;width:234px;height:90px'/></span></p>
- <p class="para">We are calling IPOpt for solving the linear least square problem, IPOpt is a library written in C++.</p>
+ <p class="para"><span><img src='./_LaTeX_lsqlin.xml_1.png' style='position:relative;top:41px;width:230px;height:90px'/></span></p>
+ <p class="para">The routine calls Ipopt for solving the linear least square problem, Ipopt is a library written in C++.</p>
<p class="para"></p></div>
<div class="refsection"><h3 class="title">Examples</h3>
@@ -106,7 +106,7 @@
<span class="scilabcomment">// Press ENTER to continue</span></pre></td><td valign="top"><a href="scilab://scilab.execexample/"><img src="ScilabExecute.png" border="0"/></a></td><td valign="top"><a href="scilab://scilab.editexample/"><img src="ScilabEdit.png" border="0"/></a></td><td></td></tr></table></div></div>
<div class="refsection"><h3 class="title">Examples</h3>
- <div class="programlisting"><table border="0" width="100%"><tr><td width="98%"><pre class="scilabcode"><span class="scilabcomment">//A basic example for equality, inequality and bounds</span>
+ <div class="programlisting"><table border="0" width="100%"><tr><td width="98%"><pre class="scilabcode"><span class="scilabcomment">//A basic example for equality, inequality constraints and variable bounds</span>
<span class="scilabid">C</span> <span class="scilaboperator">=</span> <span class="scilabopenclose">[</span><span class="scilabnumber">0.9501</span> <span class="scilabnumber">0.7620</span> <span class="scilabnumber">0.6153</span> <span class="scilabnumber">0.4057</span>
<span class="scilabnumber">0.2311</span> <span class="scilabnumber">0.4564</span> <span class="scilabnumber">0.7919</span> <span class="scilabnumber">0.9354</span>
<span class="scilabnumber">0.6068</span> <span class="scilabnumber">0.0185</span> <span class="scilabnumber">0.9218</span> <span class="scilabnumber">0.9169</span>
diff --git a/help/en_US/scilab_en_US_help/lsqnonneg.html b/help/en_US/scilab_en_US_help/lsqnonneg.html
index 40139a0..e9a9110 100644
--- a/help/en_US/scilab_en_US_help/lsqnonneg.html
+++ b/help/en_US/scilab_en_US_help/lsqnonneg.html
@@ -43,26 +43,26 @@
<div class="refsection"><h3 class="title">Parameters</h3>
<dl><dt><span class="term">C :</span>
- <dd><p class="para">a matrix of doubles, represents the multiplier of the solution x in the expression C*x - d. C is M-by-N, where M is the number of equations, and N is the number of elements of x.</p></dd></dt>
+ <dd><p class="para">a matrix of double, represents the multiplier of the solution x in the expression C*x - d. Number of columns in C is equal to the number of elements in x.</p></dd></dt>
<dt><span class="term">d :</span>
- <dd><p class="para">a vector of doubles, represents the additive constant term in the expression C*x - d. d is M-by-1, where M is the number of equations.</p></dd></dt>
+ <dd><p class="para">a vector of double, represents the additive constant term in the expression C*x - d. Number of elements in d is equal to the number of rows in C matrix.</p></dd></dt>
<dt><span class="term">xopt :</span>
- <dd><p class="para">a vector of doubles, the computed solution of the optimization problem.</p></dd></dt>
+ <dd><p class="para">a vector of double, the computed solution of the optimization problem.</p></dd></dt>
<dt><span class="term">resnorm :</span>
<dd><p class="para">a double, objective value returned as the scalar value norm(C*x-d)^2.</p></dd></dt>
<dt><span class="term">residual :</span>
- <dd><p class="para">a vector of doubles, solution residuals returned as the vector C*x-d.</p></dd></dt>
+ <dd><p class="para">a vector of double, solution residuals returned as the vector C*x-d.</p></dd></dt>
<dt><span class="term">exitflag :</span>
- <dd><p class="para">Integer identifying the reason the algorithm terminated.</p></dd></dt>
+ <dd><p class="para">Integer identifying the reason the algorithm terminated. It could be 0, 1 or 2 i.e. Optimal, Maximum Number of Iterations Exceeded, CPU time exceeded.</p></dd></dt>
<dt><span class="term">output :</span>
- <dd><p class="para">Structure containing information about the optimization. Right now it contains number of iteration.</p></dd></dt>
+ <dd><p class="para">Structure containing information about the optimization. This version only contains number of iterations.</p></dd></dt>
<dt><span class="term">lambda :</span>
- <dd><p class="para">Structure containing the Lagrange multipliers at the solution x (separated by constraint type).It contains lower, upper and linear equality, inequality constraints.</p></dd></dt></dl></div>
+ <dd><p class="para">Structure containing the Lagrange multipliers at the solution x. It contains lower and upper bound multiplier.</p></dd></dt></dl></div>
<div class="refsection"><h3 class="title">Description</h3>
<p class="para">Solves nonnegative least-squares curve fitting problems specified by :</p>
- <p class="para"><span><img src='./_LaTeX_lsqnonneg.xml_1.png' style='position:relative;top:19px;width:197px;height:46px'/></span></p>
- <p class="para">We are calling IPOpt for solving the nonnegative least-squares curve fitting problems, IPOpt is a library written in C++.</p>
+ <p class="para"><span><img src='./_LaTeX_lsqnonneg.xml_1.png' style='position:relative;top:19px;width:193px;height:46px'/></span></p>
+ <p class="para">The routine calls Ipopt for solving the nonnegative least-squares curve fitting problems, Ipopt is a library written in C++.</p>
<p class="para"></p></div>
<div class="refsection"><h3 class="title">Examples</h3>
diff --git a/help/en_US/scilab_en_US_help/qpipopt.html b/help/en_US/scilab_en_US_help/qpipopt.html
index d4b6b3c..349bbc4 100644
--- a/help/en_US/scilab_en_US_help/qpipopt.html
+++ b/help/en_US/scilab_en_US_help/qpipopt.html
@@ -37,9 +37,9 @@
<div class="refsynopsisdiv"><h3 class="title">Calling Sequence</h3>
- <div class="synopsis"><pre><span class="default">xopt</span><span class="default"> = </span><span class="functionid">qpipopt</span><span class="default">(</span><span class="default">nbVar</span><span class="default">,</span><span class="default">nbCon</span><span class="default">,</span><span class="default">Q</span><span class="default">,</span><span class="default">p</span><span class="default">,</span><span class="default">LB</span><span class="default">,</span><span class="default">UB</span><span class="default">,</span><span class="default">conMatrix</span><span class="default">,</span><span class="default">conLB</span><span class="default">,</span><span class="default">conUB</span><span class="default">)</span>
-<span class="default">xopt</span><span class="default"> = </span><span class="functionid">qpipopt</span><span class="default">(</span><span class="default">nbVar</span><span class="default">,</span><span class="default">nbCon</span><span class="default">,</span><span class="default">Q</span><span class="default">,</span><span class="default">p</span><span class="default">,</span><span class="default">LB</span><span class="default">,</span><span class="default">UB</span><span class="default">,</span><span class="default">conMatrix</span><span class="default">,</span><span class="default">conLB</span><span class="default">,</span><span class="default">conUB</span><span class="default">,</span><span class="default">x0</span><span class="default">)</span>
-<span class="default">xopt</span><span class="default"> = </span><span class="functionid">qpipopt</span><span class="default">(</span><span class="default">nbVar</span><span class="default">,</span><span class="default">nbCon</span><span class="default">,</span><span class="default">Q</span><span class="default">,</span><span class="default">p</span><span class="default">,</span><span class="default">LB</span><span class="default">,</span><span class="default">UB</span><span class="default">,</span><span class="default">conMatrix</span><span class="default">,</span><span class="default">conLB</span><span class="default">,</span><span class="default">conUB</span><span class="default">,</span><span class="default">x0</span><span class="default">,</span><span class="default">param</span><span class="default">)</span>
+ <div class="synopsis"><pre><span class="default">xopt</span><span class="default"> = </span><span class="functionid">qpipopt</span><span class="default">(</span><span class="default">nbVar</span><span class="default">,</span><span class="default">nbCon</span><span class="default">,</span><span class="default">H</span><span class="default">,</span><span class="default">f</span><span class="default">,</span><span class="default">lb</span><span class="default">,</span><span class="default">ub</span><span class="default">,</span><span class="default">A</span><span class="default">,</span><span class="default">conLB</span><span class="default">,</span><span class="default">conUB</span><span class="default">)</span>
+<span class="default">xopt</span><span class="default"> = </span><span class="functionid">qpipopt</span><span class="default">(</span><span class="default">nbVar</span><span class="default">,</span><span class="default">nbCon</span><span class="default">,</span><span class="default">H</span><span class="default">,</span><span class="default">f</span><span class="default">,</span><span class="default">lb</span><span class="default">,</span><span class="default">ub</span><span class="default">,</span><span class="default">A</span><span class="default">,</span><span class="default">conLB</span><span class="default">,</span><span class="default">conUB</span><span class="default">,</span><span class="default">x0</span><span class="default">)</span>
+<span class="default">xopt</span><span class="default"> = </span><span class="functionid">qpipopt</span><span class="default">(</span><span class="default">nbVar</span><span class="default">,</span><span class="default">nbCon</span><span class="default">,</span><span class="default">H</span><span class="default">,</span><span class="default">f</span><span class="default">,</span><span class="default">lb</span><span class="default">,</span><span class="default">ub</span><span class="default">,</span><span class="default">A</span><span class="default">,</span><span class="default">conLB</span><span class="default">,</span><span class="default">conUB</span><span class="default">,</span><span class="default">x0</span><span class="default">,</span><span class="default">param</span><span class="default">)</span>
<span class="default">[</span><span class="default">xopt</span><span class="default">,</span><span class="default">fopt</span><span class="default">,</span><span class="default">exitflag</span><span class="default">,</span><span class="default">output</span><span class="default">,</span><span class="default">lamda</span><span class="default">] = </span><span class="functionid">qpipopt</span><span class="default">( ... )</span></pre></div></div>
<div class="refsection"><h3 class="title">Parameters</h3>
@@ -47,15 +47,15 @@
<dd><p class="para">a double, number of variables</p></dd></dt>
<dt><span class="term">nbCon :</span>
<dd><p class="para">a double, number of constraints</p></dd></dt>
- <dt><span class="term">Q :</span>
+ <dt><span class="term">H :</span>
<dd><p class="para">a symmetric matrix of double, represents coefficients of quadratic in the quadratic problem.</p></dd></dt>
- <dt><span class="term">p :</span>
+ <dt><span class="term">f :</span>
<dd><p class="para">a vector of double, represents coefficients of linear in the quadratic problem</p></dd></dt>
- <dt><span class="term">LB :</span>
+ <dt><span class="term">lb :</span>
<dd><p class="para">a vector of double, contains lower bounds of the variables.</p></dd></dt>
- <dt><span class="term">UB :</span>
+ <dt><span class="term">ub :</span>
<dd><p class="para">a vector of double, contains upper bounds of the variables.</p></dd></dt>
- <dt><span class="term">conMatrix :</span>
+ <dt><span class="term">A :</span>
<dd><p class="para">a matrix of double, contains matrix representing the constraint matrix</p></dd></dt>
<dt><span class="term">conLB :</span>
<dd><p class="para">a vector of double, contains lower bounds of the constraints.</p></dd></dt>
@@ -70,22 +70,22 @@
<dt><span class="term">fopt :</span>
<dd><p class="para">a double, the function value at x.</p></dd></dt>
<dt><span class="term">exitflag :</span>
- <dd><p class="para">Integer identifying the reason the algorithm terminated.</p></dd></dt>
+ <dd><p class="para">Integer identifying the reason the algorithm terminated. It could be 0, 1 or 2 etc. i.e. Optimal, Maximum Number of Iterations Exceeded, CPU time exceeded. Other flags one can see in the qpipopt macro.</p></dd></dt>
<dt><span class="term">output :</span>
- <dd><p class="para">Structure containing information about the optimization. Right now it contains number of iteration.</p></dd></dt>
+ <dd><p class="para">Structure containing information about the optimization. This version only contains number of iterations</p></dd></dt>
<dt><span class="term">lambda :</span>
<dd><p class="para">Structure containing the Lagrange multipliers at the solution x (separated by constraint type).It contains lower, upper and linear equality, inequality constraints.</p></dd></dt></dl></div>
<div class="refsection"><h3 class="title">Description</h3>
<p class="para">Search the minimum of a constrained linear quadratic optimization problem specified by :
find the minimum of f(x) such that</p>
- <p class="para"><span><img src='./_LaTeX_qpipopt.xml_1.png' style='position:relative;top:31px;width:293px;height:70px'/></span></p>
- <p class="para">We are calling IPOpt for solving the quadratic problem, IPOpt is a library written in C++.</p>
+ <p class="para"><span><img src='./_LaTeX_qpipopt.xml_1.png' style='position:relative;top:31px;width:292px;height:70px'/></span></p>
+ <p class="para">The routine calls Ipopt for solving the quadratic problem, Ipopt is a library written in C++.</p>
<p class="para"></p></div>
<div class="refsection"><h3 class="title">Examples</h3>
<div class="programlisting"><table border="0" width="100%"><tr><td width="98%"><pre class="scilabcode"><span class="scilabcomment">//Find x in R^6 such that:</span>
-<span class="scilabid">conMatrix</span><span class="scilaboperator">=</span> <span class="scilabopenclose">[</span><span class="scilabnumber">1</span><span class="scilabdefault">,</span><span class="scilaboperator">-</span><span class="scilabnumber">1</span><span class="scilabdefault">,</span><span class="scilabnumber">1</span><span class="scilabdefault">,</span><span class="scilabnumber">0</span><span class="scilabdefault">,</span><span class="scilabnumber">3</span><span class="scilabdefault">,</span><span class="scilabnumber">1</span><span class="scilabdefault">;</span>
+<span class="scilabid">A</span><span class="scilaboperator">=</span> <span class="scilabopenclose">[</span><span class="scilabnumber">1</span><span class="scilabdefault">,</span><span class="scilaboperator">-</span><span class="scilabnumber">1</span><span class="scilabdefault">,</span><span class="scilabnumber">1</span><span class="scilabdefault">,</span><span class="scilabnumber">0</span><span class="scilabdefault">,</span><span class="scilabnumber">3</span><span class="scilabdefault">,</span><span class="scilabnumber">1</span><span class="scilabdefault">;</span>
<span class="scilaboperator">-</span><span class="scilabnumber">1</span><span class="scilabdefault">,</span><span class="scilabnumber">0</span><span class="scilabdefault">,</span><span class="scilaboperator">-</span><span class="scilabnumber">3</span><span class="scilabdefault">,</span><span class="scilaboperator">-</span><span class="scilabnumber">4</span><span class="scilabdefault">,</span><span class="scilabnumber">5</span><span class="scilabdefault">,</span><span class="scilabnumber">6</span><span class="scilabdefault">;</span>
<span class="scilabnumber">2</span><span class="scilabdefault">,</span><span class="scilabnumber">5</span><span class="scilabdefault">,</span><span class="scilabnumber">3</span><span class="scilabdefault">,</span><span class="scilabnumber">0</span><span class="scilabdefault">,</span><span class="scilabnumber">1</span><span class="scilabdefault">,</span><span class="scilabnumber">0</span>
<span class="scilabnumber">0</span><span class="scilabdefault">,</span><span class="scilabnumber">1</span><span class="scilabdefault">,</span><span class="scilabnumber">0</span><span class="scilabdefault">,</span><span class="scilabnumber">1</span><span class="scilabdefault">,</span><span class="scilabnumber">2</span><span class="scilabdefault">,</span><span class="scilaboperator">-</span><span class="scilabnumber">1</span><span class="scilabdefault">;</span>
@@ -94,13 +94,13 @@ find the minimum of f(x) such that</p>
<span class="scilabid">conUB</span> <span class="scilaboperator">=</span> <span class="scilabopenclose">[</span><span class="scilabnumber">1</span><span class="scilabdefault">;</span><span class="scilabnumber">2</span><span class="scilabdefault">;</span><span class="scilabnumber">3</span><span class="scilabdefault">;</span><span class="scilaboperator">-</span><span class="scilabnumber">1</span><span class="scilabdefault">;</span><span class="scilabnumber">2.5</span><span class="scilabopenclose">]</span><span class="scilabdefault">;</span>
<span class="scilabid">lb</span><span class="scilaboperator">=</span><span class="scilabopenclose">[</span><span class="scilaboperator">-</span><span class="scilabnumber">1000</span><span class="scilabdefault">;</span><span class="scilaboperator">-</span><span class="scilabnumber">10000</span><span class="scilabdefault">;</span> <span class="scilabnumber">0</span><span class="scilabdefault">;</span> <span class="scilaboperator">-</span><span class="scilabnumber">1000</span><span class="scilabdefault">;</span> <span class="scilaboperator">-</span><span class="scilabnumber">1000</span><span class="scilabdefault">;</span> <span class="scilaboperator">-</span><span class="scilabnumber">1000</span><span class="scilabopenclose">]</span><span class="scilabdefault">;</span>
<span class="scilabid">ub</span><span class="scilaboperator">=</span><span class="scilabopenclose">[</span><span class="scilabnumber">10000</span><span class="scilabdefault">;</span> <span class="scilabnumber">100</span><span class="scilabdefault">;</span> <span class="scilabnumber">1.5</span><span class="scilabdefault">;</span> <span class="scilabnumber">100</span><span class="scilabdefault">;</span> <span class="scilabnumber">100</span><span class="scilabdefault">;</span> <span class="scilabnumber">1000</span><span class="scilabopenclose">]</span><span class="scilabdefault">;</span>
-<span class="scilabcomment">//and minimize 0.5*x</span><span class="scilabcomment">&#0039;</span><span class="scilabcomment">*Q*x + p</span><span class="scilabcomment">&#0039;</span><span class="scilabcomment">*x with</span>
-<span class="scilabid">p</span><span class="scilaboperator">=</span><span class="scilabopenclose">[</span><span class="scilabnumber">1</span><span class="scilabdefault">;</span> <span class="scilabnumber">2</span><span class="scilabdefault">;</span> <span class="scilabnumber">3</span><span class="scilabdefault">;</span> <span class="scilabnumber">4</span><span class="scilabdefault">;</span> <span class="scilabnumber">5</span><span class="scilabdefault">;</span> <span class="scilabnumber">6</span><span class="scilabopenclose">]</span><span class="scilabdefault">;</span> <span class="scilabid">Q</span><span class="scilaboperator">=</span><a class="scilabcommand" href="scilab://eye">eye</a><span class="scilabopenclose">(</span><span class="scilabnumber">6</span><span class="scilabdefault">,</span><span class="scilabnumber">6</span><span class="scilabopenclose">)</span><span class="scilabdefault">;</span>
+<span class="scilabcomment">//and minimize 0.5*x</span><span class="scilabcomment">&#0039;</span><span class="scilabcomment">â‹…Hâ‹…x + f</span><span class="scilabcomment">&#0039;</span><span class="scilabcomment">â‹…x with</span>
+<span class="scilabid">f</span><span class="scilaboperator">=</span><span class="scilabopenclose">[</span><span class="scilabnumber">1</span><span class="scilabdefault">;</span> <span class="scilabnumber">2</span><span class="scilabdefault">;</span> <span class="scilabnumber">3</span><span class="scilabdefault">;</span> <span class="scilabnumber">4</span><span class="scilabdefault">;</span> <span class="scilabnumber">5</span><span class="scilabdefault">;</span> <span class="scilabnumber">6</span><span class="scilabopenclose">]</span><span class="scilabdefault">;</span> <span class="scilabid">H</span><span class="scilaboperator">=</span><a class="scilabcommand" href="scilab://eye">eye</a><span class="scilabopenclose">(</span><span class="scilabnumber">6</span><span class="scilabdefault">,</span><span class="scilabnumber">6</span><span class="scilabopenclose">)</span><span class="scilabdefault">;</span>
<span class="scilabid">nbVar</span> <span class="scilaboperator">=</span> <span class="scilabnumber">6</span><span class="scilabdefault">;</span>
<span class="scilabid">nbCon</span> <span class="scilaboperator">=</span> <span class="scilabnumber">5</span><span class="scilabdefault">;</span>
<span class="scilabid">x0</span> <span class="scilaboperator">=</span> <a class="scilabmacro" href="scilab://repmat">repmat</a><span class="scilabopenclose">(</span><span class="scilabnumber">0</span><span class="scilabdefault">,</span><span class="scilabid">nbVar</span><span class="scilabdefault">,</span><span class="scilabnumber">1</span><span class="scilabopenclose">)</span><span class="scilabdefault">;</span>
<span class="scilabid">param</span> <span class="scilaboperator">=</span> <a class="scilabcommand" href="scilab://list">list</a><span class="scilabopenclose">(</span><span class="scilabstring">&#0034;</span><span class="scilabstring">MaxIter</span><span class="scilabstring">&#0034;</span><span class="scilabdefault">,</span> <span class="scilabnumber">300</span><span class="scilabdefault">,</span> <span class="scilabstring">&#0034;</span><span class="scilabstring">CpuTime</span><span class="scilabstring">&#0034;</span><span class="scilabdefault">,</span> <span class="scilabnumber">100</span><span class="scilabopenclose">)</span><span class="scilabdefault">;</span>
-<span class="scilabopenclose">[</span><span class="scilabid">xopt</span><span class="scilabdefault">,</span><span class="scilabid">fopt</span><span class="scilabdefault">,</span><span class="scilabid">exitflag</span><span class="scilabdefault">,</span><span class="scilabid">output</span><span class="scilabdefault">,</span><span class="scilabid">lambda</span><span class="scilabopenclose">]</span><span class="scilaboperator">=</span><span class="scilabid">qpipopt</span><span class="scilabopenclose">(</span><span class="scilabid">nbVar</span><span class="scilabdefault">,</span><span class="scilabid">nbCon</span><span class="scilabdefault">,</span><span class="scilabid">Q</span><span class="scilabdefault">,</span><span class="scilabid">p</span><span class="scilabdefault">,</span><span class="scilabid">lb</span><span class="scilabdefault">,</span><span class="scilabid">ub</span><span class="scilabdefault">,</span><span class="scilabid">conMatrix</span><span class="scilabdefault">,</span><span class="scilabid">conLB</span><span class="scilabdefault">,</span><span class="scilabid">conUB</span><span class="scilabdefault">,</span><span class="scilabid">x0</span><span class="scilabdefault">,</span><span class="scilabid">param</span><span class="scilabopenclose">)</span>
+<span class="scilabopenclose">[</span><span class="scilabid">xopt</span><span class="scilabdefault">,</span><span class="scilabid">fopt</span><span class="scilabdefault">,</span><span class="scilabid">exitflag</span><span class="scilabdefault">,</span><span class="scilabid">output</span><span class="scilabdefault">,</span><span class="scilabid">lambda</span><span class="scilabopenclose">]</span><span class="scilaboperator">=</span><span class="scilabid">qpipopt</span><span class="scilabopenclose">(</span><span class="scilabid">nbVar</span><span class="scilabdefault">,</span><span class="scilabid">nbCon</span><span class="scilabdefault">,</span><span class="scilabid">H</span><span class="scilabdefault">,</span><span class="scilabid">f</span><span class="scilabdefault">,</span><span class="scilabid">lb</span><span class="scilabdefault">,</span><span class="scilabid">ub</span><span class="scilabdefault">,</span><span class="scilabid">A</span><span class="scilabdefault">,</span><span class="scilabid">conLB</span><span class="scilabdefault">,</span><span class="scilabid">conUB</span><span class="scilabdefault">,</span><span class="scilabid">x0</span><span class="scilabdefault">,</span><span class="scilabid">param</span><span class="scilabopenclose">)</span>
<span class="scilabcomment">// Press ENTER to continue</span></pre></td><td valign="top"><a href="scilab://scilab.execexample/"><img src="ScilabExecute.png" border="0"/></a></td><td valign="top"><a href="scilab://scilab.editexample/"><img src="ScilabEdit.png" border="0"/></a></td><td></td></tr></table></div></div>
<div class="refsection"><h3 class="title">Examples</h3>
@@ -111,16 +111,16 @@ find the minimum of f(x) such that</p>
<span class="scilabcomment">// –x1 + 2x2 ≤ 2</span>
<span class="scilabcomment">// 2x1 + x2 ≤ 3</span>
<span class="scilabcomment">// 0 ≤ x1, 0 ≤ x2.</span>
-<span class="scilabid">Q</span> <span class="scilaboperator">=</span> <span class="scilabopenclose">[</span><span class="scilabnumber">1</span> <span class="scilaboperator">-</span><span class="scilabnumber">1</span><span class="scilabdefault">;</span> <span class="scilaboperator">-</span><span class="scilabnumber">1</span> <span class="scilabnumber">2</span><span class="scilabopenclose">]</span><span class="scilabdefault">;</span>
-<span class="scilabid">p</span> <span class="scilaboperator">=</span> <span class="scilabopenclose">[</span><span class="scilaboperator">-</span><span class="scilabnumber">2</span><span class="scilabdefault">;</span> <span class="scilaboperator">-</span><span class="scilabnumber">6</span><span class="scilabopenclose">]</span><span class="scilabdefault">;</span>
-<span class="scilabid">conMatrix</span> <span class="scilaboperator">=</span> <span class="scilabopenclose">[</span><span class="scilabnumber">1</span> <span class="scilabnumber">1</span><span class="scilabdefault">;</span> <span class="scilaboperator">-</span><span class="scilabnumber">1</span> <span class="scilabnumber">2</span><span class="scilabdefault">;</span> <span class="scilabnumber">2</span> <span class="scilabnumber">1</span><span class="scilabopenclose">]</span><span class="scilabdefault">;</span>
+<span class="scilabid">H</span> <span class="scilaboperator">=</span> <span class="scilabopenclose">[</span><span class="scilabnumber">1</span> <span class="scilaboperator">-</span><span class="scilabnumber">1</span><span class="scilabdefault">;</span> <span class="scilaboperator">-</span><span class="scilabnumber">1</span> <span class="scilabnumber">2</span><span class="scilabopenclose">]</span><span class="scilabdefault">;</span>
+<span class="scilabid">f</span> <span class="scilaboperator">=</span> <span class="scilabopenclose">[</span><span class="scilaboperator">-</span><span class="scilabnumber">2</span><span class="scilabdefault">;</span> <span class="scilaboperator">-</span><span class="scilabnumber">6</span><span class="scilabopenclose">]</span><span class="scilabdefault">;</span>
+<span class="scilabid">A</span> <span class="scilaboperator">=</span> <span class="scilabopenclose">[</span><span class="scilabnumber">1</span> <span class="scilabnumber">1</span><span class="scilabdefault">;</span> <span class="scilaboperator">-</span><span class="scilabnumber">1</span> <span class="scilabnumber">2</span><span class="scilabdefault">;</span> <span class="scilabnumber">2</span> <span class="scilabnumber">1</span><span class="scilabopenclose">]</span><span class="scilabdefault">;</span>
<span class="scilabid">conUB</span> <span class="scilaboperator">=</span> <span class="scilabopenclose">[</span><span class="scilabnumber">2</span><span class="scilabdefault">;</span> <span class="scilabnumber">2</span><span class="scilabdefault">;</span> <span class="scilabnumber">3</span><span class="scilabopenclose">]</span><span class="scilabdefault">;</span>
<span class="scilabid">conLB</span> <span class="scilaboperator">=</span> <span class="scilabopenclose">[</span><span class="scilaboperator">-</span><span class="scilabconstants">%inf</span><span class="scilabdefault">;</span> <span class="scilaboperator">-</span><span class="scilabconstants">%inf</span><span class="scilabdefault">;</span> <span class="scilaboperator">-</span><span class="scilabconstants">%inf</span><span class="scilabopenclose">]</span><span class="scilabdefault">;</span>
<span class="scilabid">lb</span> <span class="scilaboperator">=</span> <span class="scilabopenclose">[</span><span class="scilabnumber">0</span><span class="scilabdefault">;</span> <span class="scilabnumber">0</span><span class="scilabopenclose">]</span><span class="scilabdefault">;</span>
<span class="scilabid">ub</span> <span class="scilaboperator">=</span> <span class="scilabopenclose">[</span><span class="scilabconstants">%inf</span><span class="scilabdefault">;</span> <span class="scilabconstants">%inf</span><span class="scilabopenclose">]</span><span class="scilabdefault">;</span>
<span class="scilabid">nbVar</span> <span class="scilaboperator">=</span> <span class="scilabnumber">2</span><span class="scilabdefault">;</span>
<span class="scilabid">nbCon</span> <span class="scilaboperator">=</span> <span class="scilabnumber">3</span><span class="scilabdefault">;</span>
-<span class="scilabopenclose">[</span><span class="scilabid">xopt</span><span class="scilabdefault">,</span><span class="scilabid">fopt</span><span class="scilabdefault">,</span><span class="scilabid">exitflag</span><span class="scilabdefault">,</span><span class="scilabid">output</span><span class="scilabdefault">,</span><span class="scilabid">lambda</span><span class="scilabopenclose">]</span> <span class="scilaboperator">=</span> <span class="scilabid">qpipopt</span><span class="scilabopenclose">(</span><span class="scilabid">nbVar</span><span class="scilabdefault">,</span><span class="scilabid">nbCon</span><span class="scilabdefault">,</span><span class="scilabid">Q</span><span class="scilabdefault">,</span><span class="scilabid">p</span><span class="scilabdefault">,</span><span class="scilabid">lb</span><span class="scilabdefault">,</span><span class="scilabid">ub</span><span class="scilabdefault">,</span><span class="scilabid">conMatrix</span><span class="scilabdefault">,</span><span class="scilabid">conLB</span><span class="scilabdefault">,</span><span class="scilabid">conUB</span><span class="scilabopenclose">)</span></pre></td><td valign="top"><a href="scilab://scilab.execexample/"><img src="ScilabExecute.png" border="0"/></a></td><td valign="top"><a href="scilab://scilab.editexample/"><img src="ScilabEdit.png" border="0"/></a></td><td></td></tr></table></div></div>
+<span class="scilabopenclose">[</span><span class="scilabid">xopt</span><span class="scilabdefault">,</span><span class="scilabid">fopt</span><span class="scilabdefault">,</span><span class="scilabid">exitflag</span><span class="scilabdefault">,</span><span class="scilabid">output</span><span class="scilabdefault">,</span><span class="scilabid">lambda</span><span class="scilabopenclose">]</span> <span class="scilaboperator">=</span> <span class="scilabid">qpipopt</span><span class="scilabopenclose">(</span><span class="scilabid">nbVar</span><span class="scilabdefault">,</span><span class="scilabid">nbCon</span><span class="scilabdefault">,</span><span class="scilabid">H</span><span class="scilabdefault">,</span><span class="scilabid">f</span><span class="scilabdefault">,</span><span class="scilabid">lb</span><span class="scilabdefault">,</span><span class="scilabid">ub</span><span class="scilabdefault">,</span><span class="scilabid">A</span><span class="scilabdefault">,</span><span class="scilabid">conLB</span><span class="scilabdefault">,</span><span class="scilabid">conUB</span><span class="scilabopenclose">)</span></pre></td><td valign="top"><a href="scilab://scilab.execexample/"><img src="ScilabExecute.png" border="0"/></a></td><td valign="top"><a href="scilab://scilab.editexample/"><img src="ScilabEdit.png" border="0"/></a></td><td></td></tr></table></div></div>
<div class="refsection"><h3 class="title">Authors</h3>
<ul class="itemizedlist"><li class="member">Keyur Joshi, Saikiran, Iswarya, Harpreet Singh</li></ul></div>
diff --git a/help/en_US/scilab_en_US_help/qpipoptmat.html b/help/en_US/scilab_en_US_help/qpipoptmat.html
index 2ed139d..73c7298 100644
--- a/help/en_US/scilab_en_US_help/qpipoptmat.html
+++ b/help/en_US/scilab_en_US_help/qpipoptmat.html
@@ -58,9 +58,9 @@
<dd><p class="para">a matrix of double, represents the linear coefficients in the equality constraints</p></dd></dt>
<dt><span class="term">beq :</span>
<dd><p class="para">a vector of double, represents the linear coefficients in the equality constraints</p></dd></dt>
- <dt><span class="term">LB :</span>
+ <dt><span class="term">lb :</span>
<dd><p class="para">a vector of double, contains lower bounds of the variables.</p></dd></dt>
- <dt><span class="term">UB :</span>
+ <dt><span class="term">ub :</span>
<dd><p class="para">a vector of double, contains upper bounds of the variables.</p></dd></dt>
<dt><span class="term">x0 :</span>
<dd><p class="para">a vector of double, contains initial guess of variables.</p></dd></dt>
@@ -71,17 +71,17 @@
<dt><span class="term">fopt :</span>
<dd><p class="para">a double, the function value at x.</p></dd></dt>
<dt><span class="term">exitflag :</span>
- <dd><p class="para">Integer identifying the reason the algorithm terminated.</p></dd></dt>
+ <dd><p class="para">Integer identifying the reason the algorithm terminated.It could be 0, 1 or 2 etc. i.e. Optimal, Maximum Number of Iterations Exceeded, CPU time exceeded. Other flags one can see in the qpipoptmat macro.</p></dd></dt>
<dt><span class="term">output :</span>
- <dd><p class="para">Structure containing information about the optimization. Right now it contains number of iteration.</p></dd></dt>
+ <dd><p class="para">Structure containing information about the optimization. This version only contains number of iterations.</p></dd></dt>
<dt><span class="term">lambda :</span>
<dd><p class="para">Structure containing the Lagrange multipliers at the solution x (separated by constraint type).It contains lower, upper and linear equality, inequality constraints.</p></dd></dt></dl></div>
<div class="refsection"><h3 class="title">Description</h3>
<p class="para">Search the minimum of a constrained linear quadratic optimization problem specified by :
find the minimum of f(x) such that</p>
- <p class="para"><span><img src='./_LaTeX_qpipoptmat.xml_1.png' style='position:relative;top:40px;width:284px;height:88px'/></span></p>
- <p class="para">We are calling IPOpt for solving the quadratic problem, IPOpt is a library written in C++.</p>
+ <p class="para"><span><img src='./_LaTeX_qpipoptmat.xml_1.png' style='position:relative;top:41px;width:277px;height:90px'/></span></p>
+ <p class="para">The routine calls Ipopt for solving the quadratic problem, Ipopt is a library written in C++.</p>
<p class="para"></p></div>
<div class="refsection"><h3 class="title">Examples</h3>
diff --git a/help/en_US/scilab_en_US_help/symphony.html b/help/en_US/scilab_en_US_help/symphony.html
index 96be830..b81bbb0 100644
--- a/help/en_US/scilab_en_US_help/symphony.html
+++ b/help/en_US/scilab_en_US_help/symphony.html
@@ -37,9 +37,9 @@
<div class="refsynopsisdiv"><h3 class="title">Calling Sequence</h3>
- <div class="synopsis"><pre><span class="default">xopt</span><span class="default"> = </span><span class="functionid">symphony</span><span class="default">(</span><span class="default">nbVar</span><span class="default">,</span><span class="default">nbCon</span><span class="default">,</span><span class="default">objCoef</span><span class="default">,</span><span class="default">isInt</span><span class="default">,</span><span class="default">LB</span><span class="default">,</span><span class="default">UB</span><span class="default">,</span><span class="default">conMatrix</span><span class="default">,</span><span class="default">conLB</span><span class="default">,</span><span class="default">conUB</span><span class="default">)</span>
-<span class="default">xopt</span><span class="default"> = </span><span class="functionid">symphony</span><span class="default">(</span><span class="default">nbVar</span><span class="default">,</span><span class="default">nbCon</span><span class="default">,</span><span class="default">objCoef</span><span class="default">,</span><span class="default">isInt</span><span class="default">,</span><span class="default">LB</span><span class="default">,</span><span class="default">UB</span><span class="default">,</span><span class="default">conMatrix</span><span class="default">,</span><span class="default">conLB</span><span class="default">,</span><span class="default">conUB</span><span class="default">,</span><span class="default">objSense</span><span class="default">)</span>
-<span class="default">xopt</span><span class="default"> = </span><span class="functionid">symphony</span><span class="default">(</span><span class="default">nbVar</span><span class="default">,</span><span class="default">nbCon</span><span class="default">,</span><span class="default">objCoef</span><span class="default">,</span><span class="default">isInt</span><span class="default">,</span><span class="default">LB</span><span class="default">,</span><span class="default">UB</span><span class="default">,</span><span class="default">conMatrix</span><span class="default">,</span><span class="default">conLB</span><span class="default">,</span><span class="default">conUB</span><span class="default">,</span><span class="default">objSense</span><span class="default">,</span><span class="default">options</span><span class="default">)</span>
+ <div class="synopsis"><pre><span class="default">xopt</span><span class="default"> = </span><span class="functionid">symphony</span><span class="default">(</span><span class="default">nbVar</span><span class="default">,</span><span class="default">nbCon</span><span class="default">,</span><span class="default">c</span><span class="default">,</span><span class="default">isInt</span><span class="default">,</span><span class="default">lb</span><span class="default">,</span><span class="default">ub</span><span class="default">,</span><span class="default">A</span><span class="default">,</span><span class="default">conLB</span><span class="default">,</span><span class="default">conUB</span><span class="default">)</span>
+<span class="default">xopt</span><span class="default"> = </span><span class="functionid">symphony</span><span class="default">(</span><span class="default">nbVar</span><span class="default">,</span><span class="default">nbCon</span><span class="default">,</span><span class="default">c</span><span class="default">,</span><span class="default">isInt</span><span class="default">,</span><span class="default">lb</span><span class="default">,</span><span class="default">ub</span><span class="default">,</span><span class="default">A</span><span class="default">,</span><span class="default">conLB</span><span class="default">,</span><span class="default">conUB</span><span class="default">,</span><span class="default">objSense</span><span class="default">)</span>
+<span class="default">xopt</span><span class="default"> = </span><span class="functionid">symphony</span><span class="default">(</span><span class="default">nbVar</span><span class="default">,</span><span class="default">nbCon</span><span class="default">,</span><span class="default">c</span><span class="default">,</span><span class="default">isInt</span><span class="default">,</span><span class="default">lb</span><span class="default">,</span><span class="default">ub</span><span class="default">,</span><span class="default">A</span><span class="default">,</span><span class="default">conLB</span><span class="default">,</span><span class="default">conUB</span><span class="default">,</span><span class="default">objSense</span><span class="default">,</span><span class="default">options</span><span class="default">)</span>
<span class="default">[</span><span class="default">xopt</span><span class="default">,</span><span class="default">fopt</span><span class="default">,</span><span class="default">status</span><span class="default">,</span><span class="default">output</span><span class="default">] = </span><span class="functionid">symphony</span><span class="default">( ... )</span></pre></div></div>
<div class="refsection"><h3 class="title">Parameters</h3>
@@ -47,15 +47,15 @@
<dd><p class="para">a double, number of variables.</p></dd></dt>
<dt><span class="term">nbCon :</span>
<dd><p class="para">a double, number of constraints.</p></dd></dt>
- <dt><span class="term">objCoeff :</span>
+ <dt><span class="term">c :</span>
<dd><p class="para">a vector of double, represents coefficients of the variables in the objective.</p></dd></dt>
<dt><span class="term">isInt :</span>
<dd><p class="para">a vector of boolean, represents wether a variable is constrained to be an integer.</p></dd></dt>
- <dt><span class="term">LB :</span>
+ <dt><span class="term">lb :</span>
<dd><p class="para">a vector of double, represents lower bounds of the variables.</p></dd></dt>
- <dt><span class="term">UB :</span>
+ <dt><span class="term">ub :</span>
<dd><p class="para">a vector of double, represents upper bounds of the variables.</p></dd></dt>
- <dt><span class="term">conMatrix :</span>
+ <dt><span class="term">A :</span>
<dd><p class="para">a matrix of double, represents matrix representing the constraint matrix.</p></dd></dt>
<dt><span class="term">conLB :</span>
<dd><p class="para">a vector of double, represents lower bounds of the constraints.</p></dd></dt>
@@ -64,45 +64,45 @@
<dt><span class="term">objSense :</span>
<dd><p class="para">The sense (maximization/minimization) of the objective. Use 1(sym_minimize ) or -1 (sym_maximize) here.</p></dd></dt>
<dt><span class="term">options :</span>
- <dd><p class="para">a a list containing the the parameters to be set.</p></dd></dt>
+ <dd><p class="para">a list containing the the parameters to be set.</p></dd></dt>
<dt><span class="term">xopt :</span>
<dd><p class="para">a vector of double, the computed solution of the optimization problem.</p></dd></dt>
<dt><span class="term">fopt :</span>
<dd><p class="para">a double, the function value at x.</p></dd></dt>
<dt><span class="term">status :</span>
- <dd><p class="para">status flag from symphony.</p></dd></dt>
+ <dd><p class="para">status flag from symphony. 227 is optimal, 228 is Time limit exceeded, 230 is iteration limit exceeded.</p></dd></dt>
<dt><span class="term">output :</span>
- <dd><p class="para">The output data structure contains detailed informations about the optimization process. Right now it contains number of iteration.</p></dd></dt></dl></div>
+ <dd><p class="para">The output data structure contains detailed information about the optimization process. This version only contains number of iterations</p></dd></dt></dl></div>
<div class="refsection"><h3 class="title">Description</h3>
<p class="para">Search the minimum or maximum of a constrained mixed integer linear programming optimization problem specified by :
find the minimum or maximum of f(x) such that</p>
- <p class="para"><span><img src='./_LaTeX_symphony.xml_1.png' style='position:relative;top:41px;width:295px;height:90px'/></span></p>
- <p class="para">We are calling SYMPHONY written in C by gateway files for the actual computation.</p>
+ <p class="para"><span><img src='./_LaTeX_symphony.xml_1.png' style='position:relative;top:41px;width:292px;height:90px'/></span></p>
+ <p class="para">The routine calls SYMPHONY written in C by gateway files for the actual computation.</p>
<p class="para"></p></div>
<div class="refsection"><h3 class="title">Examples</h3>
<div class="programlisting"><table border="0" width="100%"><tr><td width="98%"><pre class="scilabcode"><span class="scilabcomment">//A basic case :</span>
<span class="scilabcomment">// Objective function</span>
-<span class="scilabid">objCoef</span> <span class="scilaboperator">=</span> <span class="scilabopenclose">[</span><span class="scilabnumber">350</span><span class="scilaboperator">*</span><span class="scilabnumber">5</span><span class="scilabdefault">,</span><span class="scilabnumber">330</span><span class="scilaboperator">*</span><span class="scilabnumber">3</span><span class="scilabdefault">,</span><span class="scilabnumber">310</span><span class="scilaboperator">*</span><span class="scilabnumber">4</span><span class="scilabdefault">,</span><span class="scilabnumber">280</span><span class="scilaboperator">*</span><span class="scilabnumber">6</span><span class="scilabdefault">,</span><span class="scilabnumber">500</span><span class="scilabdefault">,</span><span class="scilabnumber">450</span><span class="scilabdefault">,</span><span class="scilabnumber">400</span><span class="scilabdefault">,</span><span class="scilabnumber">100</span><span class="scilabopenclose">]</span><span class="scilaboperator">&#0039;</span><span class="scilabdefault">;</span>
+<span class="scilabid">c</span> <span class="scilaboperator">=</span> <span class="scilabopenclose">[</span><span class="scilabnumber">350</span><span class="scilaboperator">*</span><span class="scilabnumber">5</span><span class="scilabdefault">,</span><span class="scilabnumber">330</span><span class="scilaboperator">*</span><span class="scilabnumber">3</span><span class="scilabdefault">,</span><span class="scilabnumber">310</span><span class="scilaboperator">*</span><span class="scilabnumber">4</span><span class="scilabdefault">,</span><span class="scilabnumber">280</span><span class="scilaboperator">*</span><span class="scilabnumber">6</span><span class="scilabdefault">,</span><span class="scilabnumber">500</span><span class="scilabdefault">,</span><span class="scilabnumber">450</span><span class="scilabdefault">,</span><span class="scilabnumber">400</span><span class="scilabdefault">,</span><span class="scilabnumber">100</span><span class="scilabopenclose">]</span><span class="scilaboperator">&#0039;</span><span class="scilabdefault">;</span>
<span class="scilabcomment">// Lower Bound of variable</span>
<span class="scilabid">lb</span> <span class="scilaboperator">=</span> <a class="scilabmacro" href="scilab://repmat">repmat</a><span class="scilabopenclose">(</span><span class="scilabnumber">0</span><span class="scilabdefault">,</span><span class="scilabnumber">8</span><span class="scilabdefault">,</span><span class="scilabnumber">1</span><span class="scilabopenclose">)</span><span class="scilabdefault">;</span>
<span class="scilabcomment">// Upper Bound of variables</span>
<span class="scilabid">ub</span> <span class="scilaboperator">=</span> <span class="scilabopenclose">[</span><a class="scilabmacro" href="scilab://repmat">repmat</a><span class="scilabopenclose">(</span><span class="scilabnumber">1</span><span class="scilabdefault">,</span><span class="scilabnumber">4</span><span class="scilabdefault">,</span><span class="scilabnumber">1</span><span class="scilabopenclose">)</span><span class="scilabdefault">;</span><a class="scilabmacro" href="scilab://repmat">repmat</a><span class="scilabopenclose">(</span><span class="scilabconstants">%inf</span><span class="scilabdefault">,</span><span class="scilabnumber">4</span><span class="scilabdefault">,</span><span class="scilabnumber">1</span><span class="scilabopenclose">)</span><span class="scilabopenclose">]</span><span class="scilabdefault">;</span>
<span class="scilabcomment">// Constraint Matrix</span>
-<span class="scilabid">conMatrix</span> <span class="scilaboperator">=</span> <span class="scilabopenclose">[</span><span class="scilabnumber">5</span><span class="scilabdefault">,</span><span class="scilabnumber">3</span><span class="scilabdefault">,</span><span class="scilabnumber">4</span><span class="scilabdefault">,</span><span class="scilabnumber">6</span><span class="scilabdefault">,</span><span class="scilabnumber">1</span><span class="scilabdefault">,</span><span class="scilabnumber">1</span><span class="scilabdefault">,</span><span class="scilabnumber">1</span><span class="scilabdefault">,</span><span class="scilabnumber">1</span><span class="scilabdefault">;</span>
+<span class="scilabid">A</span> <span class="scilaboperator">=</span> <span class="scilabopenclose">[</span><span class="scilabnumber">5</span><span class="scilabdefault">,</span><span class="scilabnumber">3</span><span class="scilabdefault">,</span><span class="scilabnumber">4</span><span class="scilabdefault">,</span><span class="scilabnumber">6</span><span class="scilabdefault">,</span><span class="scilabnumber">1</span><span class="scilabdefault">,</span><span class="scilabnumber">1</span><span class="scilabdefault">,</span><span class="scilabnumber">1</span><span class="scilabdefault">,</span><span class="scilabnumber">1</span><span class="scilabdefault">;</span>
<span class="scilabnumber">5</span><span class="scilaboperator">*</span><span class="scilabnumber">0.05</span><span class="scilabdefault">,</span><span class="scilabnumber">3</span><span class="scilaboperator">*</span><span class="scilabnumber">0.04</span><span class="scilabdefault">,</span><span class="scilabnumber">4</span><span class="scilaboperator">*</span><span class="scilabnumber">0.05</span><span class="scilabdefault">,</span><span class="scilabnumber">6</span><span class="scilaboperator">*</span><span class="scilabnumber">0.03</span><span class="scilabdefault">,</span><span class="scilabnumber">0.08</span><span class="scilabdefault">,</span><span class="scilabnumber">0.07</span><span class="scilabdefault">,</span><span class="scilabnumber">0.06</span><span class="scilabdefault">,</span><span class="scilabnumber">0.03</span><span class="scilabdefault">;</span>
<span class="scilabnumber">5</span><span class="scilaboperator">*</span><span class="scilabnumber">0.03</span><span class="scilabdefault">,</span><span class="scilabnumber">3</span><span class="scilaboperator">*</span><span class="scilabnumber">0.03</span><span class="scilabdefault">,</span><span class="scilabnumber">4</span><span class="scilaboperator">*</span><span class="scilabnumber">0.04</span><span class="scilabdefault">,</span><span class="scilabnumber">6</span><span class="scilaboperator">*</span><span class="scilabnumber">0.04</span><span class="scilabdefault">,</span><span class="scilabnumber">0.06</span><span class="scilabdefault">,</span><span class="scilabnumber">0.07</span><span class="scilabdefault">,</span><span class="scilabnumber">0.08</span><span class="scilabdefault">,</span><span class="scilabnumber">0.09</span><span class="scilabdefault">;</span><span class="scilabopenclose">]</span>
-<span class="scilabcomment">// Lower Bound of constrains</span>
+<span class="scilabcomment">// Lower Bound of constraints</span>
<span class="scilabid">conlb</span> <span class="scilaboperator">=</span> <span class="scilabopenclose">[</span> <span class="scilabnumber">25</span><span class="scilabdefault">;</span> <span class="scilabnumber">1.25</span><span class="scilabdefault">;</span> <span class="scilabnumber">1.25</span><span class="scilabopenclose">]</span>
-<span class="scilabcomment">// Upper Bound of constrains</span>
+<span class="scilabcomment">// Upper Bound of constraints</span>
<span class="scilabid">conub</span> <span class="scilaboperator">=</span> <span class="scilabopenclose">[</span> <span class="scilabnumber">25</span><span class="scilabdefault">;</span> <span class="scilabnumber">1.25</span><span class="scilabdefault">;</span> <span class="scilabnumber">1.25</span><span class="scilabopenclose">]</span>
<span class="scilabcomment">// Row Matrix for telling symphony that the is integer or not</span>
<span class="scilabid">isInt</span> <span class="scilaboperator">=</span> <span class="scilabopenclose">[</span><a class="scilabmacro" href="scilab://repmat">repmat</a><span class="scilabopenclose">(</span><span class="scilabconstants">%t</span><span class="scilabdefault">,</span><span class="scilabnumber">1</span><span class="scilabdefault">,</span><span class="scilabnumber">4</span><span class="scilabopenclose">)</span> <a class="scilabmacro" href="scilab://repmat">repmat</a><span class="scilabopenclose">(</span><span class="scilabconstants">%f</span><span class="scilabdefault">,</span><span class="scilabnumber">1</span><span class="scilabdefault">,</span><span class="scilabnumber">4</span><span class="scilabopenclose">)</span><span class="scilabopenclose">]</span><span class="scilabdefault">;</span>
<span class="scilabid">xopt</span> <span class="scilaboperator">=</span> <span class="scilabopenclose">[</span><span class="scilabnumber">1</span> <span class="scilabnumber">1</span> <span class="scilabnumber">0</span> <span class="scilabnumber">1</span> <span class="scilabnumber">7.25</span> <span class="scilabnumber">0</span> <span class="scilabnumber">0.25</span> <span class="scilabnumber">3.5</span><span class="scilabopenclose">]</span>
<span class="scilabid">fopt</span> <span class="scilaboperator">=</span> <span class="scilabopenclose">[</span><span class="scilabnumber">8495</span><span class="scilabopenclose">]</span>
<span class="scilabcomment">// Calling Symphony</span>
-<span class="scilabopenclose">[</span><span class="scilabid">x</span><span class="scilabdefault">,</span><span class="scilabid">f</span><span class="scilabdefault">,</span><span class="scilabid">status</span><span class="scilabdefault">,</span><span class="scilabid">output</span><span class="scilabopenclose">]</span> <span class="scilaboperator">=</span> <span class="scilabid">symphony</span><span class="scilabopenclose">(</span><span class="scilabnumber">8</span><span class="scilabdefault">,</span><span class="scilabnumber">3</span><span class="scilabdefault">,</span><span class="scilabid">c</span><span class="scilabdefault">,</span><span class="scilabid">isInt</span><span class="scilabdefault">,</span><span class="scilabid">lb</span><span class="scilabdefault">,</span><span class="scilabid">ub</span><span class="scilabdefault">,</span><span class="scilabid">conMatrix</span><span class="scilabdefault">,</span><span class="scilabid">conlb</span><span class="scilabdefault">,</span><span class="scilabid">conub</span><span class="scilabdefault">,</span><span class="scilabnumber">1</span><span class="scilabopenclose">)</span>
+<span class="scilabopenclose">[</span><span class="scilabid">x</span><span class="scilabdefault">,</span><span class="scilabid">f</span><span class="scilabdefault">,</span><span class="scilabid">status</span><span class="scilabdefault">,</span><span class="scilabid">output</span><span class="scilabopenclose">]</span> <span class="scilaboperator">=</span> <span class="scilabid">symphony</span><span class="scilabopenclose">(</span><span class="scilabnumber">8</span><span class="scilabdefault">,</span><span class="scilabnumber">3</span><span class="scilabdefault">,</span><span class="scilabid">c</span><span class="scilabdefault">,</span><span class="scilabid">isInt</span><span class="scilabdefault">,</span><span class="scilabid">lb</span><span class="scilabdefault">,</span><span class="scilabid">ub</span><span class="scilabdefault">,</span><span class="scilabid">A</span><span class="scilabdefault">,</span><span class="scilabid">conlb</span><span class="scilabdefault">,</span><span class="scilabid">conub</span><span class="scilabdefault">,</span><span class="scilabnumber">1</span><span class="scilabopenclose">)</span>
<span class="scilabcomment">// Press ENTER to continue</span></pre></td><td valign="top"><a href="scilab://scilab.execexample/"><img src="ScilabExecute.png" border="0"/></a></td><td valign="top"><a href="scilab://scilab.editexample/"><img src="ScilabEdit.png" border="0"/></a></td><td></td></tr></table></div></div>
<div class="refsection"><h3 class="title">Examples</h3>
@@ -116,7 +116,7 @@ find the minimum or maximum of f(x) such that</p>
<span class="scilabcomment">// st sum{j=1,...,n} r(i,j)x(j) </span><span class="scilabcomment">&#0060;</span><span class="scilabcomment">= b(i) i=1,...,m</span>
<span class="scilabcomment">// x(j)=0 or 1</span>
<span class="scilabcomment">// The function to be maximize i.e. P(j)</span>
-<span class="scilabid">p</span> <span class="scilaboperator">=</span> <span class="scilabopenclose">[</span> <span class="scilabnumber">504</span> <span class="scilabnumber">803</span> <span class="scilabnumber">667</span> <span class="scilabnumber">1103</span> <span class="scilabnumber">834</span> <span class="scilabnumber">585</span> <span class="scilabnumber">811</span> <span class="scilabnumber">856</span> <span class="scilabnumber">690</span> <span class="scilabnumber">832</span> <span class="scilabnumber">846</span> <span class="scilabnumber">813</span> <span class="scilabnumber">868</span> <span class="scilabnumber">793</span> <span class="scilabspecial">..</span>
+<span class="scilabid">c</span> <span class="scilaboperator">=</span> <span class="scilabopenclose">[</span> <span class="scilabnumber">504</span> <span class="scilabnumber">803</span> <span class="scilabnumber">667</span> <span class="scilabnumber">1103</span> <span class="scilabnumber">834</span> <span class="scilabnumber">585</span> <span class="scilabnumber">811</span> <span class="scilabnumber">856</span> <span class="scilabnumber">690</span> <span class="scilabnumber">832</span> <span class="scilabnumber">846</span> <span class="scilabnumber">813</span> <span class="scilabnumber">868</span> <span class="scilabnumber">793</span> <span class="scilabspecial">..</span>
<span class="scilabnumber">825</span> <span class="scilabnumber">1002</span> <span class="scilabnumber">860</span> <span class="scilabnumber">615</span> <span class="scilabnumber">540</span> <span class="scilabnumber">797</span> <span class="scilabnumber">616</span> <span class="scilabnumber">660</span> <span class="scilabnumber">707</span> <span class="scilabnumber">866</span> <span class="scilabnumber">647</span> <span class="scilabnumber">746</span> <span class="scilabnumber">1006</span> <span class="scilabnumber">608</span> <span class="scilabspecial">..</span>
<span class="scilabnumber">877</span> <span class="scilabnumber">900</span> <span class="scilabnumber">573</span> <span class="scilabnumber">788</span> <span class="scilabnumber">484</span> <span class="scilabnumber">853</span> <span class="scilabnumber">942</span> <span class="scilabnumber">630</span> <span class="scilabnumber">591</span> <span class="scilabnumber">630</span> <span class="scilabnumber">640</span> <span class="scilabnumber">1169</span> <span class="scilabnumber">932</span> <span class="scilabnumber">1034</span> <span class="scilabspecial">..</span>
<span class="scilabnumber">957</span> <span class="scilabnumber">798</span> <span class="scilabnumber">669</span> <span class="scilabnumber">625</span> <span class="scilabnumber">467</span> <span class="scilabnumber">1051</span> <span class="scilabnumber">552</span> <span class="scilabnumber">717</span> <span class="scilabnumber">654</span> <span class="scilabnumber">388</span> <span class="scilabnumber">559</span> <span class="scilabnumber">555</span> <span class="scilabnumber">1104</span> <span class="scilabnumber">783</span> <span class="scilabspecial">..</span>
@@ -124,7 +124,7 @@ find the minimum or maximum of f(x) such that</p>
<span class="scilabnumber">510</span> <span class="scilabnumber">671</span> <span class="scilabnumber">575</span> <span class="scilabnumber">740</span> <span class="scilabnumber">510</span> <span class="scilabnumber">675</span> <span class="scilabnumber">996</span> <span class="scilabnumber">636</span> <span class="scilabnumber">826</span> <span class="scilabnumber">1022</span> <span class="scilabnumber">1140</span> <span class="scilabnumber">654</span> <span class="scilabnumber">909</span> <span class="scilabnumber">799</span> <span class="scilabspecial">..</span>
<span class="scilabnumber">1162</span> <span class="scilabnumber">653</span> <span class="scilabnumber">814</span> <span class="scilabnumber">625</span> <span class="scilabnumber">599</span> <span class="scilabnumber">476</span> <span class="scilabnumber">767</span> <span class="scilabnumber">954</span> <span class="scilabnumber">906</span> <span class="scilabnumber">904</span> <span class="scilabnumber">649</span> <span class="scilabnumber">873</span> <span class="scilabnumber">565</span> <span class="scilabnumber">853</span> <span class="scilabnumber">1008</span> <span class="scilabnumber">632</span><span class="scilabopenclose">]</span><span class="scilaboperator">&#0039;</span><span class="scilabdefault">;</span>
<span class="scilabcomment">//Constraint Matrix</span>
-<span class="scilabid">conMatrix</span> <span class="scilaboperator">=</span> <span class="scilabopenclose">[</span>
+<span class="scilabid">A</span> <span class="scilaboperator">=</span> <span class="scilabopenclose">[</span>
<span class="scilabcomment">//Constraint 1</span>
<span class="scilabnumber">42</span> <span class="scilabnumber">41</span> <span class="scilabnumber">523</span> <span class="scilabnumber">215</span> <span class="scilabnumber">819</span> <span class="scilabnumber">551</span> <span class="scilabnumber">69</span> <span class="scilabnumber">193</span> <span class="scilabnumber">582</span> <span class="scilabnumber">375</span> <span class="scilabnumber">367</span> <span class="scilabnumber">478</span> <span class="scilabnumber">162</span> <span class="scilabnumber">898</span> <span class="scilabspecial">..</span>
<span class="scilabnumber">550</span> <span class="scilabnumber">553</span> <span class="scilabnumber">298</span> <span class="scilabnumber">577</span> <span class="scilabnumber">493</span> <span class="scilabnumber">183</span> <span class="scilabnumber">260</span> <span class="scilabnumber">224</span> <span class="scilabnumber">852</span> <span class="scilabnumber">394</span> <span class="scilabnumber">958</span> <span class="scilabnumber">282</span> <span class="scilabnumber">402</span> <span class="scilabnumber">604</span> <span class="scilabspecial">..</span>
@@ -166,15 +166,15 @@ find the minimum or maximum of f(x) such that</p>
<span class="scilabnumber">483</span> <span class="scilabnumber">336</span> <span class="scilabnumber">765</span> <span class="scilabnumber">637</span> <span class="scilabnumber">981</span> <span class="scilabnumber">980</span> <span class="scilabnumber">202</span> <span class="scilabnumber">35</span> <span class="scilabnumber">594</span> <span class="scilabnumber">689</span> <span class="scilabnumber">602</span> <span class="scilabnumber">76</span> <span class="scilabnumber">767</span> <span class="scilabnumber">693</span> <span class="scilabspecial">..</span>
<span class="scilabnumber">893</span> <span class="scilabnumber">160</span> <span class="scilabnumber">785</span> <span class="scilabnumber">311</span> <span class="scilabnumber">417</span> <span class="scilabnumber">748</span> <span class="scilabnumber">375</span> <span class="scilabnumber">362</span> <span class="scilabnumber">617</span> <span class="scilabnumber">553</span> <span class="scilabnumber">474</span> <span class="scilabnumber">915</span> <span class="scilabnumber">457</span> <span class="scilabnumber">261</span> <span class="scilabnumber">350</span> <span class="scilabnumber">635</span> <span class="scilabdefault">;</span>
<span class="scilabopenclose">]</span><span class="scilabdefault">;</span>
-<span class="scilabid">nbCon</span> <span class="scilaboperator">=</span> <a class="scilabcommand" href="scilab://size">size</a><span class="scilabopenclose">(</span><span class="scilabid">conMatrix</span><span class="scilabdefault">,</span><span class="scilabnumber">1</span><span class="scilabopenclose">)</span>
-<span class="scilabid">nbVar</span> <span class="scilaboperator">=</span> <a class="scilabcommand" href="scilab://size">size</a><span class="scilabopenclose">(</span><span class="scilabid">conMatrix</span><span class="scilabdefault">,</span><span class="scilabnumber">2</span><span class="scilabopenclose">)</span>
+<span class="scilabid">nbCon</span> <span class="scilaboperator">=</span> <a class="scilabcommand" href="scilab://size">size</a><span class="scilabopenclose">(</span><span class="scilabid">A</span><span class="scilabdefault">,</span><span class="scilabnumber">1</span><span class="scilabopenclose">)</span>
+<span class="scilabid">nbVar</span> <span class="scilaboperator">=</span> <a class="scilabcommand" href="scilab://size">size</a><span class="scilabopenclose">(</span><span class="scilabid">A</span><span class="scilabdefault">,</span><span class="scilabnumber">2</span><span class="scilabopenclose">)</span>
<span class="scilabcomment">// Lower Bound of variables</span>
<span class="scilabid">lb</span> <span class="scilaboperator">=</span> <a class="scilabmacro" href="scilab://repmat">repmat</a><span class="scilabopenclose">(</span><span class="scilabnumber">0</span><span class="scilabdefault">,</span><span class="scilabid">nbVar</span><span class="scilabdefault">,</span><span class="scilabnumber">1</span><span class="scilabopenclose">)</span>
<span class="scilabcomment">// Upper Bound of variables</span>
<span class="scilabid">ub</span> <span class="scilaboperator">=</span> <a class="scilabmacro" href="scilab://repmat">repmat</a><span class="scilabopenclose">(</span><span class="scilabnumber">1</span><span class="scilabdefault">,</span><span class="scilabid">nbVar</span><span class="scilabdefault">,</span><span class="scilabnumber">1</span><span class="scilabopenclose">)</span>
<span class="scilabcomment">// Row Matrix for telling symphony that the is integer or not</span>
<span class="scilabid">isInt</span> <span class="scilaboperator">=</span> <a class="scilabmacro" href="scilab://repmat">repmat</a><span class="scilabopenclose">(</span><span class="scilabconstants">%t</span><span class="scilabdefault">,</span><span class="scilabnumber">1</span><span class="scilabdefault">,</span><span class="scilabid">nbVar</span><span class="scilabopenclose">)</span>
-<span class="scilabcomment">// Lower Bound of constrains</span>
+<span class="scilabcomment">// Lower Bound of constraints</span>
<span class="scilabid">conLB</span><span class="scilaboperator">=</span><a class="scilabmacro" href="scilab://repmat">repmat</a><span class="scilabopenclose">(</span><span class="scilabnumber">0</span><span class="scilabdefault">,</span><span class="scilabid">nbCon</span><span class="scilabdefault">,</span><span class="scilabnumber">1</span><span class="scilabopenclose">)</span><span class="scilabdefault">;</span>
<span class="scilabcomment">// Upper Bound of constraints</span>
<span class="scilabid">conUB</span><span class="scilaboperator">=</span><span class="scilabopenclose">[</span><span class="scilabnumber">11927</span> <span class="scilabnumber">13727</span> <span class="scilabnumber">11551</span> <span class="scilabnumber">13056</span> <span class="scilabnumber">13460</span> <span class="scilabopenclose">]</span><span class="scilaboperator">&#0039;</span><span class="scilabdefault">;</span>
@@ -187,7 +187,7 @@ find the minimum or maximum of f(x) such that</p>
<span class="scilabcomment">// Optimal value</span>
<span class="scilabid">fopt</span> <span class="scilaboperator">=</span> <span class="scilabopenclose">[</span> <span class="scilabnumber">24381</span> <span class="scilabopenclose">]</span>
<span class="scilabcomment">// Calling Symphony</span>
-<span class="scilabopenclose">[</span><span class="scilabid">x</span><span class="scilabdefault">,</span><span class="scilabid">f</span><span class="scilabdefault">,</span><span class="scilabid">status</span><span class="scilabdefault">,</span><span class="scilabid">output</span><span class="scilabopenclose">]</span> <span class="scilaboperator">=</span> <span class="scilabid">symphony</span><span class="scilabopenclose">(</span><span class="scilabid">nbVar</span><span class="scilabdefault">,</span><span class="scilabid">nbCon</span><span class="scilabdefault">,</span><span class="scilabid">p</span><span class="scilabdefault">,</span><span class="scilabid">isInt</span><span class="scilabdefault">,</span><span class="scilabid">lb</span><span class="scilabdefault">,</span><span class="scilabid">ub</span><span class="scilabdefault">,</span><span class="scilabid">conMatrix</span><span class="scilabdefault">,</span><span class="scilabid">conLB</span><span class="scilabdefault">,</span><span class="scilabid">conUB</span><span class="scilabdefault">,</span><span class="scilaboperator">-</span><span class="scilabnumber">1</span><span class="scilabdefault">,</span><span class="scilabid">options</span><span class="scilabopenclose">)</span><span class="scilabdefault">;</span></pre></td><td valign="top"><a href="scilab://scilab.execexample/"><img src="ScilabExecute.png" border="0"/></a></td><td valign="top"><a href="scilab://scilab.editexample/"><img src="ScilabEdit.png" border="0"/></a></td><td></td></tr></table></div></div>
+<span class="scilabopenclose">[</span><span class="scilabid">x</span><span class="scilabdefault">,</span><span class="scilabid">f</span><span class="scilabdefault">,</span><span class="scilabid">status</span><span class="scilabdefault">,</span><span class="scilabid">output</span><span class="scilabopenclose">]</span> <span class="scilaboperator">=</span> <span class="scilabid">symphony</span><span class="scilabopenclose">(</span><span class="scilabid">nbVar</span><span class="scilabdefault">,</span><span class="scilabid">nbCon</span><span class="scilabdefault">,</span><span class="scilabid">c</span><span class="scilabdefault">,</span><span class="scilabid">isInt</span><span class="scilabdefault">,</span><span class="scilabid">lb</span><span class="scilabdefault">,</span><span class="scilabid">ub</span><span class="scilabdefault">,</span><span class="scilabid">A</span><span class="scilabdefault">,</span><span class="scilabid">conLB</span><span class="scilabdefault">,</span><span class="scilabid">conUB</span><span class="scilabdefault">,</span><span class="scilaboperator">-</span><span class="scilabnumber">1</span><span class="scilabdefault">,</span><span class="scilabid">options</span><span class="scilabopenclose">)</span><span class="scilabdefault">;</span></pre></td><td valign="top"><a href="scilab://scilab.execexample/"><img src="ScilabExecute.png" border="0"/></a></td><td valign="top"><a href="scilab://scilab.editexample/"><img src="ScilabEdit.png" border="0"/></a></td><td></td></tr></table></div></div>
<div class="refsection"><h3 class="title">Authors</h3>
<ul class="itemizedlist"><li class="member">Keyur Joshi, Saikiran, Iswarya, Harpreet Singh</li></ul></div>
diff --git a/help/en_US/scilab_en_US_help/symphony.html~ b/help/en_US/scilab_en_US_help/symphony.html~
deleted file mode 100644
index 0b78b0d..0000000
--- a/help/en_US/scilab_en_US_help/symphony.html~
+++ /dev/null
@@ -1,318 +0,0 @@
-<html><head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
- <title>fmincon</title>
- <style type="text/css" media="all">
- @import url("scilab_code.css");
- @import url("xml_code.css");
- @import url("c_code.css");
- @import url("style.css");
- </style>
- </head>
- <body>
- <div class="manualnavbar">
- <table width="100%"><tr>
- <td width="30%">
- <span class="previous"><a href="section_ed3c614d9a2555a6802170ca29940f55.html">&lt;&lt; Fmincon Toolbox</a></span>
-
- </td>
- <td width="40%" class="center">
- <span class="top"><a href="section_ed3c614d9a2555a6802170ca29940f55.html">Fmincon Toolbox</a></span>
-
- </td>
- <td width="30%" class="next">
- <span class="next"><a href="optimget.html">optimget &gt;&gt;</a></span>
-
- </td>
- </tr></table>
- <hr />
- </div>
-
-
-
- <span class="path"><a href="index.html">Fmincon Toolbox</a> &gt;&gt; <a href="section_ed3c614d9a2555a6802170ca29940f55.html">Fmincon Toolbox</a> &gt; fmincon</span>
-
- <br /><br />
- <div class="info"></div>
-
- <div class="refnamediv"><h1 class="refname">fmincon</h1><p class="refpurpose">Solves a nonlinearily constrained optimization problem.</p></div>
-
-
-
-<div class="refsynopsisdiv"><h3 class="title">Calling Sequence</h3>
- <div class="synopsis"><pre><span class="default">x</span><span class="default"> = </span><span class="functionid">fmincon</span><span class="default">(</span><span class="default">fun</span><span class="default">,</span><span class="default">x0</span><span class="default">)</span>
-<span class="default">x</span><span class="default"> = </span><span class="functionid">fmincon</span><span class="default">(</span><span class="default">fun</span><span class="default">,</span><span class="default">x0</span><span class="default">,</span><span class="default">A</span><span class="default">,</span><span class="default">b</span><span class="default">)</span>
-<span class="default">x</span><span class="default"> = </span><span class="functionid">fmincon</span><span class="default">(</span><span class="default">fun</span><span class="default">,</span><span class="default">x0</span><span class="default">,</span><span class="default">A</span><span class="default">,</span><span class="default">b</span><span class="default">,</span><span class="default">Aeq</span><span class="default">,</span><span class="default">beq</span><span class="default">)</span>
-<span class="default">x</span><span class="default"> = </span><span class="functionid">fmincon</span><span class="default">(</span><span class="default">fun</span><span class="default">,</span><span class="default">x0</span><span class="default">,</span><span class="default">A</span><span class="default">,</span><span class="default">b</span><span class="default">,</span><span class="default">Aeq</span><span class="default">,</span><span class="default">beq</span><span class="default">,</span><span class="default">lb</span><span class="default">,</span><span class="default">ub</span><span class="default">)</span>
-<span class="default">x</span><span class="default"> = </span><span class="functionid">fmincon</span><span class="default">(</span><span class="default">fun</span><span class="default">,</span><span class="default">x0</span><span class="default">,</span><span class="default">A</span><span class="default">,</span><span class="default">b</span><span class="default">,</span><span class="default">Aeq</span><span class="default">,</span><span class="default">beq</span><span class="default">,</span><span class="default">lb</span><span class="default">,</span><span class="default">ub</span><span class="default">,</span><span class="default">nonlcon</span><span class="default">)</span>
-<span class="default">x</span><span class="default"> = </span><span class="functionid">fmincon</span><span class="default">(</span><span class="default">fun</span><span class="default">,</span><span class="default">x0</span><span class="default">,</span><span class="default">A</span><span class="default">,</span><span class="default">b</span><span class="default">,</span><span class="default">Aeq</span><span class="default">,</span><span class="default">beq</span><span class="default">,</span><span class="default">lb</span><span class="default">,</span><span class="default">ub</span><span class="default">,</span><span class="default">nonlcon</span><span class="default">,</span><span class="default">options</span><span class="default">)</span>
-<span class="default">[</span><span class="default">x</span><span class="default">,</span><span class="default">fval</span><span class="default">,</span><span class="default">exitflag</span><span class="default">,</span><span class="default">output</span><span class="default">,</span><span class="default">lambda</span><span class="default">,</span><span class="default">grad</span><span class="default">,</span><span class="default">hessian</span><span class="default">] = </span><span class="functionid">fmincon</span><span class="default"> ( ... )</span></pre></div></div>
-
-<div class="refsection"><h3 class="title">Parameters</h3>
- <dl><dt><span class="term">fun:</span>
- <dd><p class="para">a function, the function to minimize. See below for the complete specifications.</p></dd></dt>
- <dt><span class="term">x0:</span>
- <dd><p class="para">a nx1 or 1xn matrix of doubles, where n is the number of variables. The initial guess for the optimization algorithm.</p></dd></dt>
- <dt><span class="term">A:</span>
- <dd><p class="para">a nil x n matrix of doubles, where n is the number of variables and nil is the number of linear inequalities. If A==[] and b==[], it is assumed that there is no linear inequality constraints. If (A==[] &amp; b&lt;&gt;[]), fmincon generates an error (the same happens if (A&lt;&gt;[] &amp; b==[])).</p></dd></dt>
- <dt><span class="term">b:</span>
- <dd><p class="para">a nil x 1 matrix of doubles, where nil is the number of linear inequalities.</p></dd></dt>
- <dt><span class="term">Aeq:</span>
- <dd><p class="para">a nel x n matrix of doubles, where n is the number of variables and nel is the number of linear equalities. If A==[] and b==[], it is assumed that there is no linear equality constraints. If (Aeq==[] &amp; beq&lt;&gt;[]), fmincon generates an error (the same happens if (Aeq&lt;&gt;[] &amp; beq==[])).</p></dd></dt>
- <dt><span class="term">beq:</span>
- <dd><p class="para">a nel x 1 matrix of doubles, where nel is the number of linear inequalities.</p></dd></dt>
- <dt><span class="term">lb:</span>
- <dd><p class="para">a nx1 or 1xn matrix of doubles, where n is the number of variables. The lower bound for x. If lb==[], then the lower bound is automatically set to -inf.</p></dd></dt>
- <dt><span class="term">ub:</span>
- <dd><p class="para">a nx1 or 1xn matrix of doubles, where n is the number of variables. The upper bound for x. If lb==[], then the upper bound is automatically set to +inf.</p></dd></dt>
- <dt><span class="term">nonlcon:</span>
- <dd><p class="para">a function, the nonlinear constraints. See below for the complete specifications.</p></dd></dt>
- <dt><span class="term">x:</span>
- <dd><p class="para">a nx1 matrix of doubles, the computed solution of the optimization problem</p></dd></dt>
- <dt><span class="term">fval:</span>
- <dd><p class="para">a 1x1 matrix of doubles, the function value at x</p></dd></dt>
- <dt><span class="term">exitflag:</span>
- <dd><p class="para">a 1x1 matrix of floating point integers, the exit status. See below for details.</p></dd></dt>
- <dt><span class="term">output:</span>
- <dd><p class="para">a struct, the details of the optimization process. See below for details.</p></dd></dt>
- <dt><span class="term">lambda:</span>
- <dd><p class="para">a struct, the Lagrange multipliers at optimum. See below for details.</p></dd></dt>
- <dt><span class="term">grad:</span>
- <dd><p class="para">a nx1 matrix of doubles, the gradient of the objective function at optimum</p></dd></dt>
- <dt><span class="term">hessian:</span>
- <dd><p class="para">a nxn matrix of doubles, the Hessian of the objective function at optimum</p></dd></dt>
- <dt><span class="term">options:</span>
- <dd><p class="para">an optional struct, as provided by optimset</p></dd></dt></dl></div>
-
-<div class="refsection"><h3 class="title">Description</h3>
- <p class="para">Search the minimum of a constrained optimization problem specified by :
-find the minimum of f(x) such that</p>
- <p class="para">c(x)&lt;=0, ceq(x)&lt;=0, A*x&lt;=b, Aeq*x=beq and lb&lt;=x&lt;=ub.</p>
- <p class="para"><span><img src='./_LaTeX_fmincon.xml_1.png' style='position:relative;top:64px;width:186px;height:136px'/></span></p>
- <p class="para">Currently, we use ipopt for the actual solver of fmincon.</p>
- <p class="para">See the demonstrations for additionnal examples.</p>
- <p class="para">The objective function must have header :
-<div class="programlisting"><table border="0" width="100%"><tr><td width="98%"><pre class="scilabcode"><span class="scilabid">f</span> <span class="scilaboperator">=</span> <span class="scilabid">objfun</span> <span class="scilabopenclose">(</span> <span class="scilabid">x</span> <span class="scilabopenclose">)</span></pre></td><td valign="top"><a href="scilab://scilab.execexample/"><img src="ScilabExecute.png" border="0"/></a></td><td valign="top"><a href="scilab://scilab.editexample/"><img src="ScilabEdit.png" border="0"/></a></td><td></td></tr></table></div>
-where x is a n x 1 matrix of doubles and f is a 1 x 1 matrix of doubles.
-On input, the variable x contains the current point and, on output,
-the variable f must contain the objective function value.</p>
- <p class="para">By default, fmincon uses finite differences with order 2 formulas and
-optimum step size in order to compute a numerical gradient of the
-objective function.
-If we can provide exact gradients, we should do so since it improves
-the convergence speed of the optimization algorithm.
-In order to use exact gradients, we must update the header of the
-objective function to :
-<div class="programlisting"><table border="0" width="100%"><tr><td width="98%"><pre class="scilabcode"><span class="scilabopenclose">[</span><span class="scilabid">f</span><span class="scilabdefault">,</span><span class="scilabid">G</span><span class="scilabopenclose">]</span> <span class="scilaboperator">=</span> <span class="scilabid">objfungrad</span> <span class="scilabopenclose">(</span> <span class="scilabid">x</span> <span class="scilabopenclose">)</span></pre></td><td valign="top"><a href="scilab://scilab.execexample/"><img src="ScilabExecute.png" border="0"/></a></td><td valign="top"><a href="scilab://scilab.editexample/"><img src="ScilabEdit.png" border="0"/></a></td><td></td></tr></table></div>
-where x is a n x 1 matrix of doubles, f is a 1 x 1 matrix of doubles
-and G is a n x 1 matrix of doubles.
-On input, the variable x contains the current point and, on output,
-the variable f must contain the objective function value and the variable
-G must contain the gradient of the objective function.
-Furthermore, we must enable the &#0034;GradObj&#0034; option with the statement :
-<div class="programlisting"><table border="0" width="100%"><tr><td width="98%"><pre class="scilabcode"><span class="scilabid">options</span> <span class="scilaboperator">=</span> <a class="scilabmacro" href="optimset.html">optimset</a><span class="scilabopenclose">(</span><span class="scilabstring">&#0034;</span><span class="scilabstring">GradObj</span><span class="scilabstring">&#0034;</span><span class="scilabdefault">,</span><span class="scilabstring">&#0034;</span><span class="scilabstring">on</span><span class="scilabstring">&#0034;</span><span class="scilabopenclose">)</span><span class="scilabdefault">;</span></pre></td><td valign="top"><a href="scilab://scilab.execexample/"><img src="ScilabExecute.png" border="0"/></a></td><td valign="top"><a href="scilab://scilab.editexample/"><img src="ScilabEdit.png" border="0"/></a></td><td></td></tr></table></div>
-This will let fmincon know that the exact gradient of the objective
-function is known, so that it can change the calling sequence to the
-objective function.</p>
- <p class="para">The constraint function must have header :
-<div class="programlisting"><table border="0" width="100%"><tr><td width="98%"><pre class="scilabcode"><span class="scilabopenclose">[</span><span class="scilabid">c</span><span class="scilabdefault">,</span> <span class="scilabid">ceq</span><span class="scilabopenclose">]</span> <span class="scilaboperator">=</span> <span class="scilabid">confun</span><span class="scilabopenclose">(</span><span class="scilabid">x</span><span class="scilabopenclose">)</span></pre></td><td valign="top"><a href="scilab://scilab.execexample/"><img src="ScilabExecute.png" border="0"/></a></td><td valign="top"><a href="scilab://scilab.editexample/"><img src="ScilabEdit.png" border="0"/></a></td><td></td></tr></table></div>
-where x is a n x 1 matrix of doubles, c is a nni x 1 matrix of doubles and
-ceq is a nne x 1 matrix of doubles (nni : number of nonlinear inequality
-constraints, nne : number of nonlinear equality constraints).
-On input, the variable x contains the current point and, on output,
-the variable c must contain the nonlinear inequality constraints and ceq must contain the
-nonlinear equality constraints.</p>
- <p class="para">By default, fmincon uses finite differences with order 2 formulas and
-optimum step size in order to compute a numerical gradient of the
-constraint function.
-In order to use exact gradients, we must update the header of the
-constraint function to :
-<div class="programlisting"><table border="0" width="100%"><tr><td width="98%"><pre class="scilabcode"><span class="scilabopenclose">[</span><span class="scilabid">c</span><span class="scilabdefault">,</span><span class="scilabid">ceq</span><span class="scilabdefault">,</span><span class="scilabid">DC</span><span class="scilabdefault">,</span><span class="scilabid">DCeq</span><span class="scilabopenclose">]</span> <span class="scilaboperator">=</span> <span class="scilabid">confungrad</span><span class="scilabopenclose">(</span><span class="scilabid">x</span><span class="scilabopenclose">)</span></pre></td><td valign="top"><a href="scilab://scilab.execexample/"><img src="ScilabExecute.png" border="0"/></a></td><td valign="top"><a href="scilab://scilab.editexample/"><img src="ScilabEdit.png" border="0"/></a></td><td></td></tr></table></div>
-where x is a n x 1 matrix of doubles, c is a nni x 1 matrix of doubles,
-ceq is a nne x 1 matrix of doubles, DC is a n x nni matrix of doubles and
-DCeq is a n x nne matrix of doubles.
-On input, the variable x contains the current point and, on output,
-the variable c must contain the nonlinear inequality constraint function value,
-the variable ceq must contain the nonlinear equality constraint function value,
-the variable DC must contain the Jacobian matrix of the nonlinear inequality constraints
-and the variable DCeq must contain the Jacobian matrix of the nonlinear equality constraints.
-The i-th nonlinear inequality constraint is associated to the i-th column of
-the matrix DC, i.e, it is stored in DC(:,i) (same for DCeq).
-Furthermore, we must enable the &#0034;GradObj&#0034; option with the statement :
-<div class="programlisting"><table border="0" width="100%"><tr><td width="98%"><pre class="scilabcode"><span class="scilabid">options</span> <span class="scilaboperator">=</span> <a class="scilabmacro" href="optimset.html">optimset</a><span class="scilabopenclose">(</span><span class="scilabstring">&#0034;</span><span class="scilabstring">GradConstr</span><span class="scilabstring">&#0034;</span><span class="scilabdefault">,</span><span class="scilabstring">&#0034;</span><span class="scilabstring">on</span><span class="scilabstring">&#0034;</span><span class="scilabopenclose">)</span><span class="scilabdefault">;</span></pre></td><td valign="top"><a href="scilab://scilab.execexample/"><img src="ScilabExecute.png" border="0"/></a></td><td valign="top"><a href="scilab://scilab.editexample/"><img src="ScilabEdit.png" border="0"/></a></td><td></td></tr></table></div></p>
- <p class="para">By default, fmincon uses a L-BFGS formula to compute an
-approximation of the Hessian of the Lagrangian.
-Notice that this is different from Matlab&#0039;s fmincon, which
-default is to use a BFGS.</p>
- <p class="para">The exitflag variable allows to know the status of the optimization.
-<ul class="itemizedlist"><li>exitflag=0 : Number of iterations exceeded options.MaxIter or number of function evaluations exceeded options.FunEvals.</li>
-<li>exitflag=1 : First-order optimality measure was less than options.TolFun, and maximum constraint violation was less than options.TolCon.</li>
-<li>exitflag=-1 : The output function terminated the algorithm.</li>
-<li>exitflag=-2 : No feasible point was found.</li>
-<li>exitflag=%nan : Other type of termination.</li></ul></p>
- <p class="para">The output data structure contains detailed informations about the
-optimization process.
-It has type &#0034;struct&#0034; and contains the following fields.
-<ul class="itemizedlist"><li>output.iterations: the number of iterations performed during the search</li>
-<li>output.funcCount: the number of function evaluations during the search</li>
-<li>output.stepsize: an empty matrix</li>
-<li>output.algorithm : the string containing the name of the algorithm. In the current version, algorithm=&#0034;ipopt&#0034;.</li>
-<li>output.firstorderopt: the max-norm of the first-order KKT conditions.</li>
-<li>output.constrviolation: the max-norm of the constraint violation.</li>
-<li>output.cgiterations: the number of preconditionned conjugate gradient steps. In the current version, cgiterations=0.</li>
-<li>output.message: a string containing a message describing the status of the optimization.</li></ul></p>
- <p class="para">The lambda data structure contains the Lagrange multipliers at the
-end of optimization.
-It has type &#0034;struct&#0034; and contains the following
-fields.
-<ul class="itemizedlist"><li>lambda.lower: the Lagrange multipliers for the lower bound constraints. In the current version, an empty matrix.</li>
-<li>lambda.upper: the Lagrange multipliers for the upper bound constraints. In the current version, an empty matrix.</li>
-<li>lambda.eqlin: the Lagrange multipliers for the linear equality constraints.</li>
-<li>lambda.eqnonlin: the Lagrange multipliers for the nonlinear equality constraints.</li>
-<li>lambda.ineqlin: the Lagrange multipliers for the linear inequality constraints.</li>
-<li>lambda.ineqnonlin: the Lagrange multipliers for the nonlinear inequality constraints.</li></ul></p>
- <p class="para">TODO : exitflag=2 : Change in x was less than options.TolX and maximum constraint violation was less than options.TolCon.
-TODO : exitflag=-3 : Current point x went below options.ObjectiveLimit and maximum constraint violation was less than options.TolCon.
-TODO : fill lambda.lower and lambda.upper consistently. See ticket #111 : http://forge.scilab.org/index.php/p/sci-ipopt/issues/111/
-TODO : test with A, b
-TODO : test with Aeq, beq
-TODO : test with ceq
-TODO : avoid using global for ipopt_data
-TODO : implement Display option
-TODO : implement FinDiffType option
-TODO : implement MaxFunEvals option
-TODO : implement DerivativeCheck option
-TODO : implement MaxIter option
-TODO : implement OutputFcn option
-TODO : implement PlotFcns option
-TODO : implement TolFun option
-TODO : implement TolCon option
-TODO : implement TolX option
-TODO : implement Hessian option
-TODO : check that the hessian output argument is Hessian of f only
-TODO : test all exitflag values</p>
- <p class="para"></p></div>
-
-<div class="refsection"><h3 class="title">Examples</h3>
- <div class="programlisting"><table border="0" width="100%"><tr><td width="98%"><pre class="scilabcode"><span class="scilabcomment">// A basic case :</span>
-<span class="scilabcomment">// we provide only the objective function and the nonlinear constraint</span>
-<span class="scilabcomment">// function : we let fmincon compute the gradients by numerical</span>
-<span class="scilabcomment">// derivatives.</span>
-<span class="scilabfkeyword">function</span> <span class="scilabinputoutputargs">f</span><span class="scilaboperator">=</span><span class="scilabfunctionid">objfun</span><span class="scilabopenclose">(</span><span class="scilabinputoutputargs">x</span><span class="scilabopenclose">)</span>
-<span class="scilabinputoutputargs">f</span> <span class="scilaboperator">=</span> <a class="scilabcommand" href="scilab://exp">exp</a><span class="scilabopenclose">(</span><span class="scilabinputoutputargs">x</span><span class="scilabopenclose">(</span><span class="scilabnumber">1</span><span class="scilabopenclose">)</span><span class="scilabopenclose">)</span><span class="scilaboperator">*</span><span class="scilabopenclose">(</span><span class="scilabnumber">4</span><span class="scilaboperator">*</span><span class="scilabinputoutputargs">x</span><span class="scilabopenclose">(</span><span class="scilabnumber">1</span><span class="scilabopenclose">)</span><span class="scilaboperator">^</span><span class="scilabnumber">2</span> <span class="scilaboperator">+</span> <span class="scilabnumber">2</span><span class="scilaboperator">*</span><span class="scilabinputoutputargs">x</span><span class="scilabopenclose">(</span><span class="scilabnumber">2</span><span class="scilabopenclose">)</span><span class="scilaboperator">^</span><span class="scilabnumber">2</span> <span class="scilaboperator">+</span> <span class="scilabnumber">4</span><span class="scilaboperator">*</span><span class="scilabinputoutputargs">x</span><span class="scilabopenclose">(</span><span class="scilabnumber">1</span><span class="scilabopenclose">)</span><span class="scilaboperator">*</span><span class="scilabinputoutputargs">x</span><span class="scilabopenclose">(</span><span class="scilabnumber">2</span><span class="scilabopenclose">)</span> <span class="scilaboperator">+</span> <span class="scilabnumber">2</span><span class="scilaboperator">*</span><span class="scilabinputoutputargs">x</span><span class="scilabopenclose">(</span><span class="scilabnumber">2</span><span class="scilabopenclose">)</span> <span class="scilaboperator">+</span> <span class="scilabnumber">1</span><span class="scilabopenclose">)</span>
-<span class="scilabfkeyword">endfunction</span>
-<span class="scilabfkeyword">function</span> <span class="scilabopenclose">[</span><span class="scilabinputoutputargs">c</span><span class="scilabdefault">, </span><span class="scilabinputoutputargs">ceq</span><span class="scilabopenclose">]</span><span class="scilaboperator">=</span><span class="scilabfunctionid">confun</span><span class="scilabopenclose">(</span><span class="scilabinputoutputargs">x</span><span class="scilabopenclose">)</span>
-<span class="scilabcomment">// Nonlinear inequality constraints</span>
-<span class="scilabinputoutputargs">c</span> <span class="scilaboperator">=</span> <span class="scilabopenclose">[</span>
-<span class="scilabnumber">1.5</span> <span class="scilaboperator">+</span> <span class="scilabinputoutputargs">x</span><span class="scilabopenclose">(</span><span class="scilabnumber">1</span><span class="scilabopenclose">)</span><span class="scilaboperator">*</span><span class="scilabinputoutputargs">x</span><span class="scilabopenclose">(</span><span class="scilabnumber">2</span><span class="scilabopenclose">)</span> <span class="scilaboperator">-</span> <span class="scilabinputoutputargs">x</span><span class="scilabopenclose">(</span><span class="scilabnumber">1</span><span class="scilabopenclose">)</span> <span class="scilaboperator">-</span> <span class="scilabinputoutputargs">x</span><span class="scilabopenclose">(</span><span class="scilabnumber">2</span><span class="scilabopenclose">)</span>
-<span class="scilaboperator">-</span><span class="scilabinputoutputargs">x</span><span class="scilabopenclose">(</span><span class="scilabnumber">1</span><span class="scilabopenclose">)</span><span class="scilaboperator">*</span><span class="scilabinputoutputargs">x</span><span class="scilabopenclose">(</span><span class="scilabnumber">2</span><span class="scilabopenclose">)</span> <span class="scilaboperator">-</span> <span class="scilabnumber">10</span>
-<span class="scilabopenclose">]</span>
-<span class="scilabcomment">// Nonlinear equality constraints</span>
-<span class="scilabinputoutputargs">ceq</span> <span class="scilaboperator">=</span> <span class="scilabopenclose">[</span><span class="scilabopenclose">]</span>
-<span class="scilabfkeyword">endfunction</span>
-<span class="scilabcomment">// The initial guess</span>
-<span class="scilabid">x0</span> <span class="scilaboperator">=</span> <span class="scilabopenclose">[</span><span class="scilaboperator">-</span><span class="scilabnumber">1</span><span class="scilabdefault">,</span><span class="scilabnumber">1</span><span class="scilabopenclose">]</span><span class="scilabdefault">;</span>
-<span class="scilabcomment">// The expected solution : only 4 digits are guaranteed</span>
-<span class="scilabid">xopt</span> <span class="scilaboperator">=</span> <span class="scilabopenclose">[</span><span class="scilaboperator">-</span><span class="scilabnumber">9.547345885974547</span> <span class="scilabnumber">1.047408305349257</span><span class="scilabopenclose">]</span>
-<span class="scilabid">fopt</span> <span class="scilaboperator">=</span> <span class="scilabnumber">0.023551460139148</span>
-<span class="scilabcomment">// Run fmincon</span>
-<span class="scilabopenclose">[</span><span class="scilabid">x</span><span class="scilabdefault">,</span><span class="scilabid">fval</span><span class="scilabdefault">,</span><span class="scilabid">exitflag</span><span class="scilabdefault">,</span><span class="scilabid">output</span><span class="scilabdefault">,</span><span class="scilabid">lambda</span><span class="scilabdefault">,</span><span class="scilabid">grad</span><span class="scilabdefault">,</span><span class="scilabid">hessian</span><span class="scilabopenclose">]</span> <span class="scilaboperator">=</span> <span class="scilabspecial">..</span>
-<span class="scilabid">fmincon</span> <span class="scilabopenclose">(</span> <span class="scilabfunctionid">objfun</span><span class="scilabdefault">,</span><span class="scilabid">x0</span><span class="scilabdefault">,</span><span class="scilabopenclose">[</span><span class="scilabopenclose">]</span><span class="scilabdefault">,</span><span class="scilabopenclose">[</span><span class="scilabopenclose">]</span><span class="scilabdefault">,</span><span class="scilabopenclose">[</span><span class="scilabopenclose">]</span><span class="scilabdefault">,</span><span class="scilabopenclose">[</span><span class="scilabopenclose">]</span><span class="scilabdefault">,</span><span class="scilabopenclose">[</span><span class="scilabopenclose">]</span><span class="scilabdefault">,</span><span class="scilabopenclose">[</span><span class="scilabopenclose">]</span><span class="scilabdefault">,</span> <span class="scilabfunctionid">confun</span> <span class="scilabstring">)</span></pre></td><td valign="top"><a href="scilab://scilab.execexample/"><img src="ScilabExecute.png" border="0"/></a></td><td valign="top"><a href="scilab://scilab.editexample/"><img src="ScilabEdit.png" border="0"/></a></td><td></td></tr></table></div></div>
-
-<div class="refsection"><h3 class="title">Examples</h3>
- <div class="programlisting"><table border="0" width="100%"><tr><td width="98%"><pre class="scilabcode"><span class="scilabcomment">// A case where we provide the gradient of the objective</span>
-<span class="scilabcomment">// function and the Jacobian matrix of the constraints.</span>
-<span class="scilabcomment">// The objective function and its gradient</span>
-<span class="scilabfkeyword">function</span> <span class="scilabopenclose">[</span><span class="scilabinputoutputargs">f</span><span class="scilabdefault">, </span><span class="scilabinputoutputargs">G</span><span class="scilabopenclose">]</span><span class="scilaboperator">=</span><span class="scilabfunctionid">objfungrad</span><span class="scilabopenclose">(</span><span class="scilabinputoutputargs">x</span><span class="scilabopenclose">)</span>
-<span class="scilabopenclose">[</span><span class="scilabid">lhs</span><span class="scilabdefault">,</span><span class="scilabid">rhs</span><span class="scilabopenclose">]</span><span class="scilaboperator">=</span><a class="scilabcommand" href="scilab://argn">argn</a><span class="scilabopenclose">(</span><span class="scilabopenclose">)</span>
-<span class="scilabinputoutputargs">f</span> <span class="scilaboperator">=</span> <a class="scilabcommand" href="scilab://exp">exp</a><span class="scilabopenclose">(</span><span class="scilabinputoutputargs">x</span><span class="scilabopenclose">(</span><span class="scilabnumber">1</span><span class="scilabopenclose">)</span><span class="scilabopenclose">)</span><span class="scilaboperator">*</span><span class="scilabopenclose">(</span><span class="scilabnumber">4</span><span class="scilaboperator">*</span><span class="scilabinputoutputargs">x</span><span class="scilabopenclose">(</span><span class="scilabnumber">1</span><span class="scilabopenclose">)</span><span class="scilaboperator">^</span><span class="scilabnumber">2</span><span class="scilaboperator">+</span><span class="scilabnumber">2</span><span class="scilaboperator">*</span><span class="scilabinputoutputargs">x</span><span class="scilabopenclose">(</span><span class="scilabnumber">2</span><span class="scilabopenclose">)</span><span class="scilaboperator">^</span><span class="scilabnumber">2</span><span class="scilaboperator">+</span><span class="scilabnumber">4</span><span class="scilaboperator">*</span><span class="scilabinputoutputargs">x</span><span class="scilabopenclose">(</span><span class="scilabnumber">1</span><span class="scilabopenclose">)</span><span class="scilaboperator">*</span><span class="scilabinputoutputargs">x</span><span class="scilabopenclose">(</span><span class="scilabnumber">2</span><span class="scilabopenclose">)</span><span class="scilaboperator">+</span><span class="scilabnumber">2</span><span class="scilaboperator">*</span><span class="scilabinputoutputargs">x</span><span class="scilabopenclose">(</span><span class="scilabnumber">2</span><span class="scilabopenclose">)</span><span class="scilaboperator">+</span><span class="scilabnumber">1</span><span class="scilabopenclose">)</span>
-<span class="scilabskeyword">if</span> <span class="scilabopenclose">(</span> <span class="scilabid">lhs</span> <span class="scilaboperator">&#0062;</span> <span class="scilabnumber">1</span> <span class="scilabopenclose">)</span> <span class="scilabskeyword">then</span>
-<span class="scilabinputoutputargs">G</span> <span class="scilaboperator">=</span> <span class="scilabopenclose">[</span>
-<span class="scilabinputoutputargs">f</span> <span class="scilaboperator">+</span> <a class="scilabcommand" href="scilab://exp">exp</a><span class="scilabopenclose">(</span><span class="scilabinputoutputargs">x</span><span class="scilabopenclose">(</span><span class="scilabnumber">1</span><span class="scilabopenclose">)</span><span class="scilabopenclose">)</span> <span class="scilaboperator">*</span> <span class="scilabopenclose">(</span><span class="scilabnumber">8</span><span class="scilaboperator">*</span><span class="scilabinputoutputargs">x</span><span class="scilabopenclose">(</span><span class="scilabnumber">1</span><span class="scilabopenclose">)</span> <span class="scilaboperator">+</span> <span class="scilabnumber">4</span><span class="scilaboperator">*</span><span class="scilabinputoutputargs">x</span><span class="scilabopenclose">(</span><span class="scilabnumber">2</span><span class="scilabopenclose">)</span><span class="scilabopenclose">)</span>
-<a class="scilabcommand" href="scilab://exp">exp</a><span class="scilabopenclose">(</span><span class="scilabinputoutputargs">x</span><span class="scilabopenclose">(</span><span class="scilabnumber">1</span><span class="scilabopenclose">)</span><span class="scilabopenclose">)</span><span class="scilaboperator">*</span><span class="scilabopenclose">(</span><span class="scilabnumber">4</span><span class="scilaboperator">*</span><span class="scilabinputoutputargs">x</span><span class="scilabopenclose">(</span><span class="scilabnumber">1</span><span class="scilabopenclose">)</span><span class="scilaboperator">+</span><span class="scilabnumber">4</span><span class="scilaboperator">*</span><span class="scilabinputoutputargs">x</span><span class="scilabopenclose">(</span><span class="scilabnumber">2</span><span class="scilabopenclose">)</span><span class="scilaboperator">+</span><span class="scilabnumber">2</span><span class="scilabopenclose">)</span>
-<span class="scilabopenclose">]</span>
-<span class="scilabskeyword">end</span>
-<span class="scilabfkeyword">endfunction</span>
-<span class="scilabcomment">// The nonlinear constraints and the Jacobian</span>
-<span class="scilabcomment">// matrix of the constraints</span>
-<span class="scilabfkeyword">function</span> <span class="scilabopenclose">[</span><span class="scilabinputoutputargs">c</span><span class="scilabdefault">, </span><span class="scilabinputoutputargs">ceq</span><span class="scilabdefault">, </span><span class="scilabinputoutputargs">DC</span><span class="scilabdefault">, </span><span class="scilabinputoutputargs">DCeq</span><span class="scilabopenclose">]</span><span class="scilaboperator">=</span><span class="scilabfunctionid">confungrad</span><span class="scilabopenclose">(</span><span class="scilabinputoutputargs">x</span><span class="scilabopenclose">)</span>
-<span class="scilabcomment">// Inequality constraints</span>
-<span class="scilabinputoutputargs">c</span><span class="scilabopenclose">(</span><span class="scilabnumber">1</span><span class="scilabopenclose">)</span> <span class="scilaboperator">=</span> <span class="scilabnumber">1.5</span> <span class="scilaboperator">+</span> <span class="scilabinputoutputargs">x</span><span class="scilabopenclose">(</span><span class="scilabnumber">1</span><span class="scilabopenclose">)</span> <span class="scilaboperator">*</span> <span class="scilabinputoutputargs">x</span><span class="scilabopenclose">(</span><span class="scilabnumber">2</span><span class="scilabopenclose">)</span> <span class="scilaboperator">-</span> <span class="scilabinputoutputargs">x</span><span class="scilabopenclose">(</span><span class="scilabnumber">1</span><span class="scilabopenclose">)</span> <span class="scilaboperator">-</span> <span class="scilabinputoutputargs">x</span><span class="scilabopenclose">(</span><span class="scilabnumber">2</span><span class="scilabopenclose">)</span>
-<span class="scilabinputoutputargs">c</span><span class="scilabopenclose">(</span><span class="scilabnumber">2</span><span class="scilabopenclose">)</span> <span class="scilaboperator">=</span> <span class="scilaboperator">-</span><span class="scilabinputoutputargs">x</span><span class="scilabopenclose">(</span><span class="scilabnumber">1</span><span class="scilabopenclose">)</span> <span class="scilaboperator">*</span> <span class="scilabinputoutputargs">x</span><span class="scilabopenclose">(</span><span class="scilabnumber">2</span><span class="scilabopenclose">)</span><span class="scilaboperator">-</span><span class="scilabnumber">10</span>
-<span class="scilabcomment">// No nonlinear equality constraints</span>
-<span class="scilabinputoutputargs">ceq</span><span class="scilaboperator">=</span><span class="scilabopenclose">[</span><span class="scilabopenclose">]</span>
-<span class="scilabopenclose">[</span><span class="scilabid">lhs</span><span class="scilabdefault">,</span><span class="scilabid">rhs</span><span class="scilabopenclose">]</span><span class="scilaboperator">=</span><a class="scilabcommand" href="scilab://argn">argn</a><span class="scilabopenclose">(</span><span class="scilabopenclose">)</span>
-<span class="scilabskeyword">if</span> <span class="scilabopenclose">(</span> <span class="scilabid">lhs</span> <span class="scilaboperator">&#0062;</span> <span class="scilabnumber">2</span> <span class="scilabopenclose">)</span> <span class="scilabskeyword">then</span>
-<span class="scilabcomment">// DC(:,i) = gradient of the i-th constraint</span>
-<span class="scilabcomment">// DC = [</span>
-<span class="scilabcomment">// Dc1/Dx1 Dc2/Dx1</span>
-<span class="scilabcomment">// Dc1/Dx2 Dc2/Dx2</span>
-<span class="scilabcomment">// ]</span>
-<span class="scilabinputoutputargs">DC</span><span class="scilaboperator">=</span> <span class="scilabopenclose">[</span>
-<span class="scilabinputoutputargs">x</span><span class="scilabopenclose">(</span><span class="scilabnumber">2</span><span class="scilabopenclose">)</span><span class="scilaboperator">-</span><span class="scilabnumber">1</span><span class="scilabdefault">,</span> <span class="scilaboperator">-</span><span class="scilabinputoutputargs">x</span><span class="scilabopenclose">(</span><span class="scilabnumber">2</span><span class="scilabopenclose">)</span>
-<span class="scilabinputoutputargs">x</span><span class="scilabopenclose">(</span><span class="scilabnumber">1</span><span class="scilabopenclose">)</span><span class="scilaboperator">-</span><span class="scilabnumber">1</span><span class="scilabdefault">,</span> <span class="scilaboperator">-</span><span class="scilabinputoutputargs">x</span><span class="scilabopenclose">(</span><span class="scilabnumber">1</span><span class="scilabopenclose">)</span>
-<span class="scilabopenclose">]</span>
-<span class="scilabinputoutputargs">DCeq</span> <span class="scilaboperator">=</span> <span class="scilabopenclose">[</span><span class="scilabopenclose">]</span>
-<span class="scilabskeyword">end</span>
-<span class="scilabfkeyword">endfunction</span>
-<span class="scilabcomment">// Test with both gradient of objective and gradient of constraints</span>
-<span class="scilabid">options</span> <span class="scilaboperator">=</span> <a class="scilabmacro" href="optimset.html">optimset</a><span class="scilabopenclose">(</span><span class="scilabstring">&#0034;</span><span class="scilabstring">GradObj</span><span class="scilabstring">&#0034;</span><span class="scilabdefault">,</span><span class="scilabstring">&#0034;</span><span class="scilabstring">on</span><span class="scilabstring">&#0034;</span><span class="scilabdefault">,</span><span class="scilabstring">&#0034;</span><span class="scilabstring">GradConstr</span><span class="scilabstring">&#0034;</span><span class="scilabdefault">,</span><span class="scilabstring">&#0034;</span><span class="scilabstring">on</span><span class="scilabstring">&#0034;</span><span class="scilabopenclose">)</span><span class="scilabdefault">;</span>
-<span class="scilabcomment">// The initial guess</span>
-<span class="scilabid">x0</span> <span class="scilaboperator">=</span> <span class="scilabopenclose">[</span><span class="scilaboperator">-</span><span class="scilabnumber">1</span><span class="scilabdefault">,</span><span class="scilabnumber">1</span><span class="scilabopenclose">]</span><span class="scilabdefault">;</span>
-<span class="scilabcomment">// The expected solution : only 4 digits are guaranteed</span>
-<span class="scilabid">xopt</span> <span class="scilaboperator">=</span> <span class="scilabopenclose">[</span><span class="scilaboperator">-</span><span class="scilabnumber">9.547345885974547</span> <span class="scilabnumber">1.047408305349257</span><span class="scilabopenclose">]</span>
-<span class="scilabid">fopt</span> <span class="scilaboperator">=</span> <span class="scilabnumber">0.023551460139148</span>
-<span class="scilabcomment">// Run fmincon</span>
-<span class="scilabopenclose">[</span><span class="scilabid">x</span><span class="scilabdefault">,</span><span class="scilabid">fval</span><span class="scilabdefault">,</span><span class="scilabid">exitflag</span><span class="scilabdefault">,</span><span class="scilabid">output</span><span class="scilabopenclose">]</span> <span class="scilaboperator">=</span> <span class="scilabspecial">..</span>
-<span class="scilabid">fmincon</span><span class="scilabopenclose">(</span><span class="scilabfunctionid">objfungrad</span><span class="scilabdefault">,</span><span class="scilabid">x0</span><span class="scilabdefault">,</span><span class="scilabopenclose">[</span><span class="scilabopenclose">]</span><span class="scilabdefault">,</span><span class="scilabopenclose">[</span><span class="scilabopenclose">]</span><span class="scilabdefault">,</span><span class="scilabopenclose">[</span><span class="scilabopenclose">]</span><span class="scilabdefault">,</span><span class="scilabopenclose">[</span><span class="scilabopenclose">]</span><span class="scilabdefault">,</span><span class="scilabopenclose">[</span><span class="scilabopenclose">]</span><span class="scilabdefault">,</span><span class="scilabopenclose">[</span><span class="scilabopenclose">]</span><span class="scilabdefault">,</span> <span class="scilabfunctionid">confungrad</span><span class="scilabdefault">,</span><span class="scilabid">options</span><span class="scilabopenclose">)</span></pre></td><td valign="top"><a href="scilab://scilab.execexample/"><img src="ScilabExecute.png" border="0"/></a></td><td valign="top"><a href="scilab://scilab.editexample/"><img src="ScilabEdit.png" border="0"/></a></td><td></td></tr></table></div></div>
-
-<div class="refsection"><h3 class="title">Examples</h3>
- <div class="programlisting"><table border="0" width="100%"><tr><td width="98%"><pre class="scilabcode"><span class="scilabcomment">// A case where we set the bounds of the optimization.</span>
-<span class="scilabcomment">// By default, the bounds are set to infinity.</span>
-<span class="scilabfkeyword">function</span> <span class="scilabinputoutputargs">f</span><span class="scilaboperator">=</span><span class="scilabfunctionid">objfun</span><span class="scilabopenclose">(</span><span class="scilabinputoutputargs">x</span><span class="scilabopenclose">)</span>
-<span class="scilabinputoutputargs">f</span> <span class="scilaboperator">=</span> <a class="scilabcommand" href="scilab://exp">exp</a><span class="scilabopenclose">(</span><span class="scilabinputoutputargs">x</span><span class="scilabopenclose">(</span><span class="scilabnumber">1</span><span class="scilabopenclose">)</span><span class="scilabopenclose">)</span><span class="scilaboperator">*</span><span class="scilabopenclose">(</span><span class="scilabnumber">4</span><span class="scilaboperator">*</span><span class="scilabinputoutputargs">x</span><span class="scilabopenclose">(</span><span class="scilabnumber">1</span><span class="scilabopenclose">)</span><span class="scilaboperator">^</span><span class="scilabnumber">2</span> <span class="scilaboperator">+</span> <span class="scilabnumber">2</span><span class="scilaboperator">*</span><span class="scilabinputoutputargs">x</span><span class="scilabopenclose">(</span><span class="scilabnumber">2</span><span class="scilabopenclose">)</span><span class="scilaboperator">^</span><span class="scilabnumber">2</span> <span class="scilaboperator">+</span> <span class="scilabnumber">4</span><span class="scilaboperator">*</span><span class="scilabinputoutputargs">x</span><span class="scilabopenclose">(</span><span class="scilabnumber">1</span><span class="scilabopenclose">)</span><span class="scilaboperator">*</span><span class="scilabinputoutputargs">x</span><span class="scilabopenclose">(</span><span class="scilabnumber">2</span><span class="scilabopenclose">)</span> <span class="scilaboperator">+</span> <span class="scilabnumber">2</span><span class="scilaboperator">*</span><span class="scilabinputoutputargs">x</span><span class="scilabopenclose">(</span><span class="scilabnumber">2</span><span class="scilabopenclose">)</span> <span class="scilaboperator">+</span> <span class="scilabnumber">1</span><span class="scilabopenclose">)</span>
-<span class="scilabfkeyword">endfunction</span>
-<span class="scilabfkeyword">function</span> <span class="scilabopenclose">[</span><span class="scilabinputoutputargs">c</span><span class="scilabdefault">, </span><span class="scilabinputoutputargs">ceq</span><span class="scilabopenclose">]</span><span class="scilaboperator">=</span><span class="scilabfunctionid">confun</span><span class="scilabopenclose">(</span><span class="scilabinputoutputargs">x</span><span class="scilabopenclose">)</span>
-<span class="scilabcomment">// Nonlinear inequality constraints</span>
-<span class="scilabinputoutputargs">c</span> <span class="scilaboperator">=</span> <span class="scilabopenclose">[</span>
-<span class="scilabnumber">1.5</span> <span class="scilaboperator">+</span> <span class="scilabinputoutputargs">x</span><span class="scilabopenclose">(</span><span class="scilabnumber">1</span><span class="scilabopenclose">)</span><span class="scilaboperator">*</span><span class="scilabinputoutputargs">x</span><span class="scilabopenclose">(</span><span class="scilabnumber">2</span><span class="scilabopenclose">)</span> <span class="scilaboperator">-</span> <span class="scilabinputoutputargs">x</span><span class="scilabopenclose">(</span><span class="scilabnumber">1</span><span class="scilabopenclose">)</span> <span class="scilaboperator">-</span> <span class="scilabinputoutputargs">x</span><span class="scilabopenclose">(</span><span class="scilabnumber">2</span><span class="scilabopenclose">)</span>
-<span class="scilaboperator">-</span><span class="scilabinputoutputargs">x</span><span class="scilabopenclose">(</span><span class="scilabnumber">1</span><span class="scilabopenclose">)</span><span class="scilaboperator">*</span><span class="scilabinputoutputargs">x</span><span class="scilabopenclose">(</span><span class="scilabnumber">2</span><span class="scilabopenclose">)</span> <span class="scilaboperator">-</span> <span class="scilabnumber">10</span>
-<span class="scilabopenclose">]</span>
-<span class="scilabcomment">// Nonlinear equality constraints</span>
-<span class="scilabinputoutputargs">ceq</span> <span class="scilaboperator">=</span> <span class="scilabopenclose">[</span><span class="scilabopenclose">]</span>
-<span class="scilabfkeyword">endfunction</span>
-<span class="scilabcomment">// The initial guess</span>
-<span class="scilabid">x0</span> <span class="scilaboperator">=</span> <span class="scilabopenclose">[</span><span class="scilaboperator">-</span><span class="scilabnumber">1</span><span class="scilabdefault">,</span><span class="scilabnumber">1</span><span class="scilabopenclose">]</span><span class="scilabdefault">;</span>
-<span class="scilabcomment">// The expected solution</span>
-<span class="scilabid">xopt</span> <span class="scilaboperator">=</span> <span class="scilabopenclose">[</span><span class="scilabnumber">0</span> <span class="scilabnumber">1.5</span><span class="scilabopenclose">]</span>
-<span class="scilabid">fopt</span> <span class="scilaboperator">=</span> <span class="scilabnumber">8.5</span>
-<span class="scilabcomment">// Make sure that x(1)</span><span class="scilabcomment">&#0062;</span><span class="scilabcomment">=0, and x(2)</span><span class="scilabcomment">&#0062;</span><span class="scilabcomment">=0</span>
-<span class="scilabid">lb</span> <span class="scilaboperator">=</span> <span class="scilabopenclose">[</span><span class="scilabnumber">0</span><span class="scilabdefault">,</span><span class="scilabnumber">0</span><span class="scilabopenclose">]</span><span class="scilabdefault">;</span>
-<span class="scilabid">ub</span> <span class="scilaboperator">=</span> <span class="scilabopenclose">[</span> <span class="scilabopenclose">]</span><span class="scilabdefault">;</span>
-<span class="scilabcomment">// Run fmincon</span>
-<span class="scilabopenclose">[</span><span class="scilabid">x</span><span class="scilabdefault">,</span><span class="scilabid">fval</span><span class="scilabopenclose">]</span> <span class="scilaboperator">=</span> <span class="scilabid">fmincon</span> <span class="scilabopenclose">(</span> <span class="scilabfunctionid">objfun</span> <span class="scilabdefault">,</span> <span class="scilabid">x0</span><span class="scilabdefault">,</span><span class="scilabopenclose">[</span><span class="scilabopenclose">]</span><span class="scilabdefault">,</span><span class="scilabopenclose">[</span><span class="scilabopenclose">]</span><span class="scilabdefault">,</span><span class="scilabopenclose">[</span><span class="scilabopenclose">]</span><span class="scilabdefault">,</span><span class="scilabopenclose">[</span><span class="scilabopenclose">]</span><span class="scilabdefault">,</span><span class="scilabid">lb</span><span class="scilabdefault">,</span><span class="scilabid">ub</span><span class="scilabdefault">,</span><span class="scilabfunctionid">confun</span><span class="scilabopenclose">)</span></pre></td><td valign="top"><a href="scilab://scilab.execexample/"><img src="ScilabExecute.png" border="0"/></a></td><td valign="top"><a href="scilab://scilab.editexample/"><img src="ScilabEdit.png" border="0"/></a></td><td></td></tr></table></div></div>
-
-<div class="refsection"><h3 class="title">Authors</h3>
- <ul class="itemizedlist"><li class="member">Michael Baudin, DIGITEO, 2010</li></ul></div>
- <br />
-
- <div class="manualnavbar">
- <table width="100%">
- <tr><td colspan="3" class="next"><a href="http://bugzilla.scilab.org/enter_bug.cgi?product=Scilab%20software&component=Documentation%20pages" class="ulink">Report an issue</a></td></tr>
-<tr>
- <td width="30%">
- <span class="previous"><a href="section_ed3c614d9a2555a6802170ca29940f55.html">&lt;&lt; Fmincon Toolbox</a></span>
-
- </td>
- <td width="40%" class="center">
- <span class="top"><a href="section_ed3c614d9a2555a6802170ca29940f55.html">Fmincon Toolbox</a></span>
-
- </td>
- <td width="30%" class="next">
- <span class="next"><a href="optimget.html">optimget &gt;&gt;</a></span>
-
- </td>
- </tr></table>
- <hr />
- </div>
- </body>
-</html>
diff --git a/help/en_US/scilab_en_US_help/symphonymat.html b/help/en_US/scilab_en_US_help/symphonymat.html
index c580508..fc60daf 100644
--- a/help/en_US/scilab_en_US_help/symphonymat.html
+++ b/help/en_US/scilab_en_US_help/symphonymat.html
@@ -37,25 +37,25 @@
<div class="refsynopsisdiv"><h3 class="title">Calling Sequence</h3>
- <div class="synopsis"><pre><span class="default">xopt</span><span class="default"> = </span><span class="functionid">symphonymat</span><span class="default">(</span><span class="default">C</span><span class="default">,</span><span class="default">intcon</span><span class="default">,</span><span class="default">A</span><span class="default">,</span><span class="default">b</span><span class="default">)</span>
-<span class="default">xopt</span><span class="default"> = </span><span class="functionid">symphonymat</span><span class="default">(</span><span class="default">C</span><span class="default">,</span><span class="default">intcon</span><span class="default">,</span><span class="default">A</span><span class="default">,</span><span class="default">b</span><span class="default">,</span><span class="default">Aeq</span><span class="default">,</span><span class="default">beq</span><span class="default">)</span>
-<span class="default">xopt</span><span class="default"> = </span><span class="functionid">symphonymat</span><span class="default">(</span><span class="default">C</span><span class="default">,</span><span class="default">intcon</span><span class="default">,</span><span class="default">A</span><span class="default">,</span><span class="default">b</span><span class="default">,</span><span class="default">Aeq</span><span class="default">,</span><span class="default">beq</span><span class="default">,</span><span class="default">lb</span><span class="default">,</span><span class="default">ub</span><span class="default">)</span>
-<span class="default">xopt</span><span class="default"> = </span><span class="functionid">symphonymat</span><span class="default">(</span><span class="default">C</span><span class="default">,</span><span class="default">intcon</span><span class="default">,</span><span class="default">A</span><span class="default">,</span><span class="default">b</span><span class="default">,</span><span class="default">Aeq</span><span class="default">,</span><span class="default">beq</span><span class="default">,</span><span class="default">lb</span><span class="default">,</span><span class="default">ub</span><span class="default">,</span><span class="default">options</span><span class="default">)</span>
+ <div class="synopsis"><pre><span class="default">xopt</span><span class="default"> = </span><span class="functionid">symphonymat</span><span class="default">(</span><span class="default">c</span><span class="default">,</span><span class="default">intcon</span><span class="default">,</span><span class="default">A</span><span class="default">,</span><span class="default">b</span><span class="default">)</span>
+<span class="default">xopt</span><span class="default"> = </span><span class="functionid">symphonymat</span><span class="default">(</span><span class="default">c</span><span class="default">,</span><span class="default">intcon</span><span class="default">,</span><span class="default">A</span><span class="default">,</span><span class="default">b</span><span class="default">,</span><span class="default">Aeq</span><span class="default">,</span><span class="default">beq</span><span class="default">)</span>
+<span class="default">xopt</span><span class="default"> = </span><span class="functionid">symphonymat</span><span class="default">(</span><span class="default">c</span><span class="default">,</span><span class="default">intcon</span><span class="default">,</span><span class="default">A</span><span class="default">,</span><span class="default">b</span><span class="default">,</span><span class="default">Aeq</span><span class="default">,</span><span class="default">beq</span><span class="default">,</span><span class="default">lb</span><span class="default">,</span><span class="default">ub</span><span class="default">)</span>
+<span class="default">xopt</span><span class="default"> = </span><span class="functionid">symphonymat</span><span class="default">(</span><span class="default">c</span><span class="default">,</span><span class="default">intcon</span><span class="default">,</span><span class="default">A</span><span class="default">,</span><span class="default">b</span><span class="default">,</span><span class="default">Aeq</span><span class="default">,</span><span class="default">beq</span><span class="default">,</span><span class="default">lb</span><span class="default">,</span><span class="default">ub</span><span class="default">,</span><span class="default">options</span><span class="default">)</span>
<span class="default">[</span><span class="default">xopt</span><span class="default">,</span><span class="default">fopt</span><span class="default">,</span><span class="default">status</span><span class="default">,</span><span class="default">output</span><span class="default">] = </span><span class="functionid">symphonymat</span><span class="default">( ... )</span></pre></div></div>
<div class="refsection"><h3 class="title">Parameters</h3>
- <dl><dt><span class="term">f :</span>
+ <dl><dt><span class="term">c :</span>
<dd><p class="para">a vector of double, contains coefficients of the variables in the objective</p></dd></dt>
<dt><span class="term">intcon :</span>
<dd><p class="para">Vector of integer constraints, specified as a vector of positive integers. The values in intcon indicate the components of the decision variable x that are integer-valued. intcon has values from 1 through number of variable.</p></dd></dt>
<dt><span class="term">A :</span>
- <dd><p class="para">Linear inequality constraint matrix, specified as a matrix of double. A represents the linear coefficients in the constraints A*x ≤ b. A has size M-by-N, where M is the number of constraints and N is number of variables</p></dd></dt>
+ <dd><p class="para">Linear inequality constraint matrix, specified as a matrix of double. A represents the linear coefficients in the constraints A*x ≤ b. A has the size where columns equals to the number of variables.</p></dd></dt>
<dt><span class="term">b :</span>
- <dd><p class="para">Linear inequality constraint vector, specified as a vector of double. b represents the constant vector in the constraints A*x ≤ b. b has length M, where A is M-by-N</p></dd></dt>
+ <dd><p class="para">Linear inequality constraint vector, specified as a vector of double. b represents the constant vector in the constraints A*x ≤ b. b has size equals to the number of rows in A.</p></dd></dt>
<dt><span class="term">Aeq :</span>
- <dd><p class="para">Linear equality constraint matrix, specified as a matrix of double. Aeq represents the linear coefficients in the constraints Aeq*x = beq. Aeq has size Meq-by-N, where Meq is the number of constraints and N is number of variables</p></dd></dt>
+ <dd><p class="para">Linear equality constraint matrix, specified as a matrix of double. Aeq represents the linear coefficients in the constraints Aeq*x = beq. Aeq has the size where columns equals to the number of variables.</p></dd></dt>
<dt><span class="term">beq :</span>
- <dd><p class="para">Linear equality constraint vector, specified as a vector of double. beq represents the constant vector in the constraints Aeq*x = beq. beq has length Meq, where Aeq is Meq-by-N.</p></dd></dt>
+ <dd><p class="para">Linear equality constraint vector, specified as a vector of double. beq represents the constant vector in the constraints Aeq*x = beq. beq has size equals to the number of rows in Aeq.</p></dd></dt>
<dt><span class="term">lb :</span>
<dd><p class="para">Lower bounds, specified as a vector or array of double. lb represents the lower bounds elementwise in lb ≤ x ≤ ub.</p></dd></dt>
<dt><span class="term">ub :</span>
@@ -63,24 +63,24 @@
<dt><span class="term">options :</span>
<dd><p class="para">a list containing the the parameters to be set.</p></dd></dt>
<dt><span class="term">xopt :</span>
- <dd><p class="para">a vector of double, the computed solution of the optimization problem</p></dd></dt>
+ <dd><p class="para">a vector of double, the computed solution of the optimization problem.</p></dd></dt>
<dt><span class="term">fopt :</span>
<dd><p class="para">a double, the function value at x</p></dd></dt>
<dt><span class="term">status :</span>
- <dd><p class="para">status flag from symphony.</p></dd></dt>
+ <dd><p class="para">status flag from symphony. 227 is optimal, 228 is Time limit exceeded, 230 is iteration limit exceeded.</p></dd></dt>
<dt><span class="term">output :</span>
- <dd><p class="para">The output data structure contains detailed informations about the optimization process. Right now it contains number of iteration.</p></dd></dt></dl></div>
+ <dd><p class="para">The output data structure contains detailed information about the optimization process. This version only contains number of iterations.</p></dd></dt></dl></div>
<div class="refsection"><h3 class="title">Description</h3>
<p class="para">Search the minimum or maximum of a constrained mixed integer linear programming optimization problem specified by :
-find the minimum or maximum of f(x) such that</p>
- <p class="para"><span><img src='./_LaTeX_symphonymat.xml_1.png' style='position:relative;top:51px;width:216px;height:110px'/></span></p>
- <p class="para">We are calling SYMPHONY written in C by gateway files for the actual computation.</p>
+find the minimum or maximum of C&#0039;â‹…x such that</p>
+ <p class="para"><span><img src='./_LaTeX_symphonymat.xml_1.png' style='position:relative;top:51px;width:212px;height:110px'/></span></p>
+ <p class="para">The routine calls SYMPHONY written in C by gateway files for the actual computation.</p>
<p class="para"></p></div>
<div class="refsection"><h3 class="title">Examples</h3>
<div class="programlisting"><table border="0" width="100%"><tr><td width="98%"><pre class="scilabcode"><span class="scilabcomment">// Objective function</span>
-<span class="scilabid">C</span> <span class="scilaboperator">=</span> <span class="scilabopenclose">[</span><span class="scilabnumber">350</span><span class="scilaboperator">*</span><span class="scilabnumber">5</span><span class="scilabdefault">,</span><span class="scilabnumber">330</span><span class="scilaboperator">*</span><span class="scilabnumber">3</span><span class="scilabdefault">,</span><span class="scilabnumber">310</span><span class="scilaboperator">*</span><span class="scilabnumber">4</span><span class="scilabdefault">,</span><span class="scilabnumber">280</span><span class="scilaboperator">*</span><span class="scilabnumber">6</span><span class="scilabdefault">,</span><span class="scilabnumber">500</span><span class="scilabdefault">,</span><span class="scilabnumber">450</span><span class="scilabdefault">,</span><span class="scilabnumber">400</span><span class="scilabdefault">,</span><span class="scilabnumber">100</span><span class="scilabopenclose">]</span><span class="scilaboperator">&#0039;</span><span class="scilabdefault">;</span>
+<span class="scilabid">c</span> <span class="scilaboperator">=</span> <span class="scilabopenclose">[</span><span class="scilabnumber">350</span><span class="scilaboperator">*</span><span class="scilabnumber">5</span><span class="scilabdefault">,</span><span class="scilabnumber">330</span><span class="scilaboperator">*</span><span class="scilabnumber">3</span><span class="scilabdefault">,</span><span class="scilabnumber">310</span><span class="scilaboperator">*</span><span class="scilabnumber">4</span><span class="scilabdefault">,</span><span class="scilabnumber">280</span><span class="scilaboperator">*</span><span class="scilabnumber">6</span><span class="scilabdefault">,</span><span class="scilabnumber">500</span><span class="scilabdefault">,</span><span class="scilabnumber">450</span><span class="scilabdefault">,</span><span class="scilabnumber">400</span><span class="scilabdefault">,</span><span class="scilabnumber">100</span><span class="scilabopenclose">]</span><span class="scilaboperator">&#0039;</span><span class="scilabdefault">;</span>
<span class="scilabcomment">// Lower Bound of variable</span>
<span class="scilabid">lb</span> <span class="scilaboperator">=</span> <a class="scilabmacro" href="scilab://repmat">repmat</a><span class="scilabopenclose">(</span><span class="scilabnumber">0</span><span class="scilabdefault">,</span><span class="scilabnumber">1</span><span class="scilabdefault">,</span><span class="scilabnumber">8</span><span class="scilabopenclose">)</span><span class="scilabdefault">;</span>
<span class="scilabcomment">// Upper Bound of variables</span>
@@ -106,7 +106,7 @@ find the minimum or maximum of f(x) such that</p>
<span class="scilabcomment">// st sum{j=1,...,n} r(i,j)x(j) </span><span class="scilabcomment">&#0060;</span><span class="scilabcomment">= b(i) i=1,...,m</span>
<span class="scilabcomment">// x(j)=0 or 1</span>
<span class="scilabcomment">// The function to be maximize i.e. P(j)</span>
-<span class="scilabid">C</span> <span class="scilaboperator">=</span> <span class="scilaboperator">-</span><span class="scilabnumber">1</span><span class="scilaboperator">*</span><span class="scilabopenclose">[</span> <span class="scilabnumber">504</span> <span class="scilabnumber">803</span> <span class="scilabnumber">667</span> <span class="scilabnumber">1103</span> <span class="scilabnumber">834</span> <span class="scilabnumber">585</span> <span class="scilabnumber">811</span> <span class="scilabnumber">856</span> <span class="scilabnumber">690</span> <span class="scilabnumber">832</span> <span class="scilabnumber">846</span> <span class="scilabnumber">813</span> <span class="scilabnumber">868</span> <span class="scilabnumber">793</span> <span class="scilabspecial">..</span>
+<span class="scilabid">c</span> <span class="scilaboperator">=</span> <span class="scilaboperator">-</span><span class="scilabnumber">1</span><span class="scilaboperator">*</span><span class="scilabopenclose">[</span> <span class="scilabnumber">504</span> <span class="scilabnumber">803</span> <span class="scilabnumber">667</span> <span class="scilabnumber">1103</span> <span class="scilabnumber">834</span> <span class="scilabnumber">585</span> <span class="scilabnumber">811</span> <span class="scilabnumber">856</span> <span class="scilabnumber">690</span> <span class="scilabnumber">832</span> <span class="scilabnumber">846</span> <span class="scilabnumber">813</span> <span class="scilabnumber">868</span> <span class="scilabnumber">793</span> <span class="scilabspecial">..</span>
<span class="scilabnumber">825</span> <span class="scilabnumber">1002</span> <span class="scilabnumber">860</span> <span class="scilabnumber">615</span> <span class="scilabnumber">540</span> <span class="scilabnumber">797</span> <span class="scilabnumber">616</span> <span class="scilabnumber">660</span> <span class="scilabnumber">707</span> <span class="scilabnumber">866</span> <span class="scilabnumber">647</span> <span class="scilabnumber">746</span> <span class="scilabnumber">1006</span> <span class="scilabnumber">608</span> <span class="scilabspecial">..</span>
<span class="scilabnumber">877</span> <span class="scilabnumber">900</span> <span class="scilabnumber">573</span> <span class="scilabnumber">788</span> <span class="scilabnumber">484</span> <span class="scilabnumber">853</span> <span class="scilabnumber">942</span> <span class="scilabnumber">630</span> <span class="scilabnumber">591</span> <span class="scilabnumber">630</span> <span class="scilabnumber">640</span> <span class="scilabnumber">1169</span> <span class="scilabnumber">932</span> <span class="scilabnumber">1034</span> <span class="scilabspecial">..</span>
<span class="scilabnumber">957</span> <span class="scilabnumber">798</span> <span class="scilabnumber">669</span> <span class="scilabnumber">625</span> <span class="scilabnumber">467</span> <span class="scilabnumber">1051</span> <span class="scilabnumber">552</span> <span class="scilabnumber">717</span> <span class="scilabnumber">654</span> <span class="scilabnumber">388</span> <span class="scilabnumber">559</span> <span class="scilabnumber">555</span> <span class="scilabnumber">1104</span> <span class="scilabnumber">783</span> <span class="scilabspecial">..</span>
@@ -155,7 +155,7 @@ find the minimum or maximum of f(x) such that</p>
<span class="scilabnumber">483</span> <span class="scilabnumber">336</span> <span class="scilabnumber">765</span> <span class="scilabnumber">637</span> <span class="scilabnumber">981</span> <span class="scilabnumber">980</span> <span class="scilabnumber">202</span> <span class="scilabnumber">35</span> <span class="scilabnumber">594</span> <span class="scilabnumber">689</span> <span class="scilabnumber">602</span> <span class="scilabnumber">76</span> <span class="scilabnumber">767</span> <span class="scilabnumber">693</span> <span class="scilabspecial">..</span>
<span class="scilabnumber">893</span> <span class="scilabnumber">160</span> <span class="scilabnumber">785</span> <span class="scilabnumber">311</span> <span class="scilabnumber">417</span> <span class="scilabnumber">748</span> <span class="scilabnumber">375</span> <span class="scilabnumber">362</span> <span class="scilabnumber">617</span> <span class="scilabnumber">553</span> <span class="scilabnumber">474</span> <span class="scilabnumber">915</span> <span class="scilabnumber">457</span> <span class="scilabnumber">261</span> <span class="scilabnumber">350</span> <span class="scilabnumber">635</span> <span class="scilabdefault">;</span>
<span class="scilabopenclose">]</span><span class="scilabdefault">;</span>
-<span class="scilabid">nbVar</span> <span class="scilaboperator">=</span> <a class="scilabcommand" href="scilab://size">size</a><span class="scilabopenclose">(</span><span class="scilabid">objCoef</span><span class="scilabdefault">,</span><span class="scilabnumber">1</span><span class="scilabopenclose">)</span>
+<span class="scilabid">nbVar</span> <span class="scilaboperator">=</span> <a class="scilabcommand" href="scilab://size">size</a><span class="scilabopenclose">(</span><span class="scilabid">c</span><span class="scilabdefault">,</span><span class="scilabnumber">1</span><span class="scilabopenclose">)</span>
<span class="scilabid">b</span><span class="scilaboperator">=</span><span class="scilabopenclose">[</span><span class="scilabnumber">11927</span> <span class="scilabnumber">13727</span> <span class="scilabnumber">11551</span> <span class="scilabnumber">13056</span> <span class="scilabnumber">13460</span> <span class="scilabopenclose">]</span><span class="scilabdefault">;</span>
<span class="scilabcomment">// Lower Bound of variables</span>
<span class="scilabid">lb</span> <span class="scilaboperator">=</span> <a class="scilabmacro" href="scilab://repmat">repmat</a><span class="scilabopenclose">(</span><span class="scilabnumber">0</span><span class="scilabdefault">,</span><span class="scilabnumber">1</span><span class="scilabdefault">,</span><span class="scilabid">nbVar</span><span class="scilabopenclose">)</span>
@@ -175,7 +175,7 @@ find the minimum or maximum of f(x) such that</p>
<span class="scilabcomment">// Optimal value</span>
<span class="scilabid">fopt</span> <span class="scilaboperator">=</span> <span class="scilabopenclose">[</span> <span class="scilabnumber">24381</span> <span class="scilabopenclose">]</span>
<span class="scilabcomment">// Calling Symphony</span>
-<span class="scilabopenclose">[</span><span class="scilabid">x</span><span class="scilabdefault">,</span><span class="scilabid">f</span><span class="scilabdefault">,</span><span class="scilabid">status</span><span class="scilabdefault">,</span><span class="scilabid">output</span><span class="scilabopenclose">]</span> <span class="scilaboperator">=</span> <span class="scilabid">symphonymat</span><span class="scilabopenclose">(</span><span class="scilabid">C</span><span class="scilabdefault">,</span><span class="scilabid">intcon</span><span class="scilabdefault">,</span><span class="scilabid">A</span><span class="scilabdefault">,</span><span class="scilabid">b</span><span class="scilabdefault">,</span><span class="scilabopenclose">[</span><span class="scilabopenclose">]</span><span class="scilabdefault">,</span><span class="scilabopenclose">[</span><span class="scilabopenclose">]</span><span class="scilabdefault">,</span><span class="scilabid">lb</span><span class="scilabdefault">,</span><span class="scilabid">ub</span><span class="scilabdefault">,</span><span class="scilabid">options</span><span class="scilabopenclose">)</span><span class="scilabdefault">;</span></pre></td><td valign="top"><a href="scilab://scilab.execexample/"><img src="ScilabExecute.png" border="0"/></a></td><td valign="top"><a href="scilab://scilab.editexample/"><img src="ScilabEdit.png" border="0"/></a></td><td></td></tr></table></div></div>
+<span class="scilabopenclose">[</span><span class="scilabid">x</span><span class="scilabdefault">,</span><span class="scilabid">f</span><span class="scilabdefault">,</span><span class="scilabid">status</span><span class="scilabdefault">,</span><span class="scilabid">output</span><span class="scilabopenclose">]</span> <span class="scilaboperator">=</span> <span class="scilabid">symphonymat</span><span class="scilabopenclose">(</span><span class="scilabid">c</span><span class="scilabdefault">,</span><span class="scilabid">intcon</span><span class="scilabdefault">,</span><span class="scilabid">A</span><span class="scilabdefault">,</span><span class="scilabid">b</span><span class="scilabdefault">,</span><span class="scilabopenclose">[</span><span class="scilabopenclose">]</span><span class="scilabdefault">,</span><span class="scilabopenclose">[</span><span class="scilabopenclose">]</span><span class="scilabdefault">,</span><span class="scilabid">lb</span><span class="scilabdefault">,</span><span class="scilabid">ub</span><span class="scilabdefault">,</span><span class="scilabid">options</span><span class="scilabopenclose">)</span><span class="scilabdefault">;</span></pre></td><td valign="top"><a href="scilab://scilab.execexample/"><img src="ScilabExecute.png" border="0"/></a></td><td valign="top"><a href="scilab://scilab.editexample/"><img src="ScilabEdit.png" border="0"/></a></td><td></td></tr></table></div></div>
<div class="refsection"><h3 class="title">Authors</h3>
<ul class="itemizedlist"><li class="member">Keyur Joshi, Saikiran, Iswarya, Harpreet Singh</li></ul></div>
diff --git a/help/en_US/symphony.xml b/help/en_US/symphony.xml
index 1f77555..c0caa8e 100644
--- a/help/en_US/symphony.xml
+++ b/help/en_US/symphony.xml
@@ -24,9 +24,9 @@
<refsynopsisdiv>
<title>Calling Sequence</title>
<synopsis>
- xopt = symphony(nbVar,nbCon,objCoef,isInt,LB,UB,conMatrix,conLB,conUB)
- xopt = symphony(nbVar,nbCon,objCoef,isInt,LB,UB,conMatrix,conLB,conUB,objSense)
- xopt = symphony(nbVar,nbCon,objCoef,isInt,LB,UB,conMatrix,conLB,conUB,objSense,options)
+ xopt = symphony(nbVar,nbCon,c,isInt,lb,ub,A,conLB,conUB)
+ xopt = symphony(nbVar,nbCon,c,isInt,lb,ub,A,conLB,conUB,objSense)
+ xopt = symphony(nbVar,nbCon,c,isInt,lb,ub,A,conLB,conUB,objSense,options)
[xopt,fopt,status,output] = symphony( ... )
</synopsis>
@@ -39,15 +39,15 @@
<listitem><para> a double, number of variables.</para></listitem></varlistentry>
<varlistentry><term>nbCon :</term>
<listitem><para> a double, number of constraints.</para></listitem></varlistentry>
- <varlistentry><term>objCoeff :</term>
+ <varlistentry><term>c :</term>
<listitem><para> a vector of double, represents coefficients of the variables in the objective.</para></listitem></varlistentry>
<varlistentry><term>isInt :</term>
<listitem><para> a vector of boolean, represents wether a variable is constrained to be an integer.</para></listitem></varlistentry>
- <varlistentry><term>LB :</term>
+ <varlistentry><term>lb :</term>
<listitem><para> a vector of double, represents lower bounds of the variables.</para></listitem></varlistentry>
- <varlistentry><term>UB :</term>
+ <varlistentry><term>ub :</term>
<listitem><para> a vector of double, represents upper bounds of the variables.</para></listitem></varlistentry>
- <varlistentry><term>conMatrix :</term>
+ <varlistentry><term>A :</term>
<listitem><para> a matrix of double, represents matrix representing the constraint matrix.</para></listitem></varlistentry>
<varlistentry><term>conLB :</term>
<listitem><para> a vector of double, represents lower bounds of the constraints.</para></listitem></varlistentry>
@@ -56,15 +56,15 @@
<varlistentry><term>objSense :</term>
<listitem><para> The sense (maximization/minimization) of the objective. Use 1(sym_minimize ) or -1 (sym_maximize) here.</para></listitem></varlistentry>
<varlistentry><term>options :</term>
- <listitem><para> a a list containing the the parameters to be set.</para></listitem></varlistentry>
+ <listitem><para> a list containing the the parameters to be set.</para></listitem></varlistentry>
<varlistentry><term>xopt :</term>
<listitem><para> a vector of double, the computed solution of the optimization problem.</para></listitem></varlistentry>
<varlistentry><term>fopt :</term>
<listitem><para> a double, the function value at x.</para></listitem></varlistentry>
<varlistentry><term>status :</term>
- <listitem><para> status flag from symphony.</para></listitem></varlistentry>
+ <listitem><para> status flag from symphony. 227 is optimal, 228 is Time limit exceeded, 230 is iteration limit exceeded.</para></listitem></varlistentry>
<varlistentry><term>output :</term>
- <listitem><para> The output data structure contains detailed informations about the optimization process. Right now it contains number of iteration.</para></listitem></varlistentry>
+ <listitem><para> The output data structure contains detailed information about the optimization process. This version only contains number of iterations</para></listitem></varlistentry>
</variablelist>
</refsection>
@@ -78,15 +78,15 @@ find the minimum or maximum of f(x) such that
<latex>
\begin{eqnarray}
&amp;\mbox{min}_{x}
-&amp; f^T*x \\
-&amp; \text{subject to} &amp; conLB \leq C*x \leq conUB \\
+&amp; f^Tâ‹…x \\
+&amp; \text{subject to} &amp; conLB \leq Aâ‹…x \leq conUB \\
&amp; &amp; lb \leq x \leq ub \\
&amp; &amp; x_i \in \!\, \mathbb{Z}, i \in \!\, I
\end{eqnarray}
</latex>
</para>
<para>
-We are calling SYMPHONY written in C by gateway files for the actual computation.
+The routine calls SYMPHONY written in C by gateway files for the actual computation.
</para>
<para>
</para>
@@ -97,25 +97,25 @@ We are calling SYMPHONY written in C by gateway files for the actual computation
<programlisting role="example"><![CDATA[
//A basic case :
// Objective function
-objCoef = [350*5,330*3,310*4,280*6,500,450,400,100]';
+c = [350*5,330*3,310*4,280*6,500,450,400,100]';
// Lower Bound of variable
lb = repmat(0,8,1);
// Upper Bound of variables
ub = [repmat(1,4,1);repmat(%inf,4,1)];
// Constraint Matrix
-conMatrix = [5,3,4,6,1,1,1,1;
+A = [5,3,4,6,1,1,1,1;
5*0.05,3*0.04,4*0.05,6*0.03,0.08,0.07,0.06,0.03;
5*0.03,3*0.03,4*0.04,6*0.04,0.06,0.07,0.08,0.09;]
-// Lower Bound of constrains
+// Lower Bound of constraints
conlb = [ 25; 1.25; 1.25]
-// Upper Bound of constrains
+// Upper Bound of constraints
conub = [ 25; 1.25; 1.25]
// Row Matrix for telling symphony that the is integer or not
isInt = [repmat(%t,1,4) repmat(%f,1,4)];
xopt = [1 1 0 1 7.25 0 0.25 3.5]
fopt = [8495]
// Calling Symphony
-[x,f,status,output] = symphony(8,3,c,isInt,lb,ub,conMatrix,conlb,conub,1)
+[x,f,status,output] = symphony(8,3,c,isInt,lb,ub,A,conlb,conub,1)
// Press ENTER to continue
]]></programlisting>
@@ -134,7 +134,7 @@ fopt = [8495]
// st sum{j=1,...,n} r(i,j)x(j) <= b(i) i=1,...,m
// x(j)=0 or 1
// The function to be maximize i.e. P(j)
-p = [ 504 803 667 1103 834 585 811 856 690 832 846 813 868 793 ..
+c = [ 504 803 667 1103 834 585 811 856 690 832 846 813 868 793 ..
825 1002 860 615 540 797 616 660 707 866 647 746 1006 608 ..
877 900 573 788 484 853 942 630 591 630 640 1169 932 1034 ..
957 798 669 625 467 1051 552 717 654 388 559 555 1104 783 ..
@@ -142,7 +142,7 @@ p = [ 504 803 667 1103 834 585 811 856 690 832 846 813 868 793 ..
510 671 575 740 510 675 996 636 826 1022 1140 654 909 799 ..
1162 653 814 625 599 476 767 954 906 904 649 873 565 853 1008 632]';
//Constraint Matrix
-conMatrix = [
+A = [
//Constraint 1
42 41 523 215 819 551 69 193 582 375 367 478 162 898 ..
550 553 298 577 493 183 260 224 852 394 958 282 402 604 ..
@@ -184,15 +184,15 @@ conMatrix = [
483 336 765 637 981 980 202 35 594 689 602 76 767 693 ..
893 160 785 311 417 748 375 362 617 553 474 915 457 261 350 635 ;
];
-nbCon = size(conMatrix,1)
-nbVar = size(conMatrix,2)
+nbCon = size(A,1)
+nbVar = size(A,2)
// Lower Bound of variables
lb = repmat(0,nbVar,1)
// Upper Bound of variables
ub = repmat(1,nbVar,1)
// Row Matrix for telling symphony that the is integer or not
isInt = repmat(%t,1,nbVar)
-// Lower Bound of constrains
+// Lower Bound of constraints
conLB=repmat(0,nbCon,1);
// Upper Bound of constraints
conUB=[11927 13727 11551 13056 13460 ]';
@@ -205,7 +205,7 @@ xopt = [0 1 1 0 0 1 0 1 0 1 0 0 0 0 0 0 0 1 0 0 0 0 1 0 1 1 0 1 1 0 1 ..
// Optimal value
fopt = [ 24381 ]
// Calling Symphony
-[x,f,status,output] = symphony(nbVar,nbCon,p,isInt,lb,ub,conMatrix,conLB,conUB,-1,options);
+[x,f,status,output] = symphony(nbVar,nbCon,c,isInt,lb,ub,A,conLB,conUB,-1,options);
]]></programlisting>
</refsection>
diff --git a/help/en_US/symphonymat.xml b/help/en_US/symphonymat.xml
index 792eb15..cf95807 100644
--- a/help/en_US/symphonymat.xml
+++ b/help/en_US/symphonymat.xml
@@ -24,10 +24,10 @@
<refsynopsisdiv>
<title>Calling Sequence</title>
<synopsis>
- xopt = symphonymat(C,intcon,A,b)
- xopt = symphonymat(C,intcon,A,b,Aeq,beq)
- xopt = symphonymat(C,intcon,A,b,Aeq,beq,lb,ub)
- xopt = symphonymat(C,intcon,A,b,Aeq,beq,lb,ub,options)
+ xopt = symphonymat(c,intcon,A,b)
+ xopt = symphonymat(c,intcon,A,b,Aeq,beq)
+ xopt = symphonymat(c,intcon,A,b,Aeq,beq,lb,ub)
+ xopt = symphonymat(c,intcon,A,b,Aeq,beq,lb,ub,options)
[xopt,fopt,status,output] = symphonymat( ... )
</synopsis>
@@ -36,18 +36,18 @@
<refsection>
<title>Parameters</title>
<variablelist>
- <varlistentry><term>f :</term>
+ <varlistentry><term>c :</term>
<listitem><para> a vector of double, contains coefficients of the variables in the objective</para></listitem></varlistentry>
<varlistentry><term>intcon :</term>
<listitem><para> Vector of integer constraints, specified as a vector of positive integers. The values in intcon indicate the components of the decision variable x that are integer-valued. intcon has values from 1 through number of variable.</para></listitem></varlistentry>
<varlistentry><term>A :</term>
- <listitem><para> Linear inequality constraint matrix, specified as a matrix of double. A represents the linear coefficients in the constraints A*x ≤ b. A has size M-by-N, where M is the number of constraints and N is number of variables</para></listitem></varlistentry>
+ <listitem><para> Linear inequality constraint matrix, specified as a matrix of double. A represents the linear coefficients in the constraints A*x ≤ b. A has the size where columns equals to the number of variables.</para></listitem></varlistentry>
<varlistentry><term>b :</term>
- <listitem><para> Linear inequality constraint vector, specified as a vector of double. b represents the constant vector in the constraints A*x ≤ b. b has length M, where A is M-by-N</para></listitem></varlistentry>
+ <listitem><para> Linear inequality constraint vector, specified as a vector of double. b represents the constant vector in the constraints A*x ≤ b. b has size equals to the number of rows in A.</para></listitem></varlistentry>
<varlistentry><term>Aeq :</term>
- <listitem><para> Linear equality constraint matrix, specified as a matrix of double. Aeq represents the linear coefficients in the constraints Aeq*x = beq. Aeq has size Meq-by-N, where Meq is the number of constraints and N is number of variables</para></listitem></varlistentry>
+ <listitem><para> Linear equality constraint matrix, specified as a matrix of double. Aeq represents the linear coefficients in the constraints Aeq*x = beq. Aeq has the size where columns equals to the number of variables.</para></listitem></varlistentry>
<varlistentry><term>beq :</term>
- <listitem><para> Linear equality constraint vector, specified as a vector of double. beq represents the constant vector in the constraints Aeq*x = beq. beq has length Meq, where Aeq is Meq-by-N.</para></listitem></varlistentry>
+ <listitem><para> Linear equality constraint vector, specified as a vector of double. beq represents the constant vector in the constraints Aeq*x = beq. beq has size equals to the number of rows in Aeq.</para></listitem></varlistentry>
<varlistentry><term>lb :</term>
<listitem><para> Lower bounds, specified as a vector or array of double. lb represents the lower bounds elementwise in lb ≤ x ≤ ub.</para></listitem></varlistentry>
<varlistentry><term>ub :</term>
@@ -55,13 +55,13 @@
<varlistentry><term>options :</term>
<listitem><para> a list containing the the parameters to be set.</para></listitem></varlistentry>
<varlistentry><term>xopt :</term>
- <listitem><para> a vector of double, the computed solution of the optimization problem</para></listitem></varlistentry>
+ <listitem><para> a vector of double, the computed solution of the optimization problem.</para></listitem></varlistentry>
<varlistentry><term>fopt :</term>
<listitem><para> a double, the function value at x</para></listitem></varlistentry>
<varlistentry><term>status :</term>
- <listitem><para> status flag from symphony.</para></listitem></varlistentry>
+ <listitem><para> status flag from symphony. 227 is optimal, 228 is Time limit exceeded, 230 is iteration limit exceeded.</para></listitem></varlistentry>
<varlistentry><term>output :</term>
- <listitem><para> The output data structure contains detailed informations about the optimization process. Right now it contains number of iteration.</para></listitem></varlistentry>
+ <listitem><para> The output data structure contains detailed information about the optimization process. This version only contains number of iterations.</para></listitem></varlistentry>
</variablelist>
</refsection>
@@ -69,22 +69,22 @@
<title>Description</title>
<para>
Search the minimum or maximum of a constrained mixed integer linear programming optimization problem specified by :
-find the minimum or maximum of f(x) such that
+find the minimum or maximum of C'â‹…x such that
</para>
<para>
<latex>
\begin{eqnarray}
&amp;\mbox{min}_{x}
-&amp; C^T*x \\
-&amp; \text{subject to} &amp; A*x \leq b \\
-&amp; &amp; Aeq*x = beq \\
+&amp; C^Tâ‹…x \\
+&amp; \text{subject to} &amp; Aâ‹…x \leq b \\
+&amp; &amp; Aeqâ‹…x = beq \\
&amp; &amp; lb \leq x \leq ub \\
&amp; &amp; x_i \in \!\, \mathbb{Z}, i \in \!\, I
\end{eqnarray}
</latex>
</para>
<para>
-We are calling SYMPHONY written in C by gateway files for the actual computation.
+The routine calls SYMPHONY written in C by gateway files for the actual computation.
</para>
<para>
</para>
@@ -94,7 +94,7 @@ We are calling SYMPHONY written in C by gateway files for the actual computation
<title>Examples</title>
<programlisting role="example"><![CDATA[
// Objective function
-C = [350*5,330*3,310*4,280*6,500,450,400,100]';
+c = [350*5,330*3,310*4,280*6,500,450,400,100]';
// Lower Bound of variable
lb = repmat(0,1,8);
// Upper Bound of variables
@@ -125,7 +125,7 @@ intcon = [1 2 3 4];
// st sum{j=1,...,n} r(i,j)x(j) <= b(i) i=1,...,m
// x(j)=0 or 1
// The function to be maximize i.e. P(j)
-C = -1*[ 504 803 667 1103 834 585 811 856 690 832 846 813 868 793 ..
+c = -1*[ 504 803 667 1103 834 585 811 856 690 832 846 813 868 793 ..
825 1002 860 615 540 797 616 660 707 866 647 746 1006 608 ..
877 900 573 788 484 853 942 630 591 630 640 1169 932 1034 ..
957 798 669 625 467 1051 552 717 654 388 559 555 1104 783 ..
@@ -174,7 +174,7 @@ A = [ //Constraint 1
483 336 765 637 981 980 202 35 594 689 602 76 767 693 ..
893 160 785 311 417 748 375 362 617 553 474 915 457 261 350 635 ;
];
-nbVar = size(objCoef,1)
+nbVar = size(c,1)
b=[11927 13727 11551 13056 13460 ];
// Lower Bound of variables
lb = repmat(0,1,nbVar)
@@ -194,7 +194,7 @@ xopt = [0 1 1 0 0 1 0 1 0 1 0 0 0 0 0 0 0 1 0 0 0 0 1 0 1 1 0 1 1 0 1 ..
// Optimal value
fopt = [ 24381 ]
// Calling Symphony
-[x,f,status,output] = symphonymat(C,intcon,A,b,[],[],lb,ub,options);
+[x,f,status,output] = symphonymat(c,intcon,A,b,[],[],lb,ub,options);
]]></programlisting>
</refsection>
diff --git a/jar/scilab_en_US_help.jar b/jar/scilab_en_US_help.jar
index 5b41fec..204eacb 100644
--- a/jar/scilab_en_US_help.jar
+++ b/jar/scilab_en_US_help.jar
Binary files differ
diff --git a/macros/lsqlin.bin b/macros/lsqlin.bin
index ce5d4a4..8c30789 100644
--- a/macros/lsqlin.bin
+++ b/macros/lsqlin.bin
Binary files differ
diff --git a/macros/lsqlin.sci b/macros/lsqlin.sci
index 08554e1..fba036d 100644
--- a/macros/lsqlin.sci
+++ b/macros/lsqlin.sci
@@ -22,22 +22,22 @@ function [xopt,resnorm,residual,exitflag,output,lambda] = lsqlin (varargin)
// [xopt,resnorm,residual,exitflag,output,lambda] = lsqlin( ... )
//
// Parameters
- // C : a matrix of double, represents the multiplier of the solution x in the expression C*x - d. C is M-by-N, where M is the number of equations, and N is the number of elements of x.
- // d : a vector of double, represents the additive constant term in the expression C*x - d. d is M-by-1, where M is the number of equations.
+ // C : a matrix of double, represents the multiplier of the solution x in the expression C*x - d. Number of columns in C is equal to the number of elements in x.
+ // d : a vector of double, represents the additive constant term in the expression C*x - d. Number of elements in d is equal to the number of rows in C matrix.
// A : a vector of double, represents the linear coefficients in the inequality constraints
// b : a vector of double, represents the linear coefficients in the inequality constraints
// Aeq : a matrix of double, represents the linear coefficients in the equality constraints
// beq : a vector of double, represents the linear coefficients in the equality constraints
- // LB : a vector of double, contains lower bounds of the variables.
- // UB : a vector of double, contains upper bounds of the variables.
+ // lb : a vector of double, contains lower bounds of the variables.
+ // ub : a vector of double, contains upper bounds of the variables.
// x0 : a vector of double, contains initial guess of variables.
// param : a list containing the the parameters to be set.
// xopt : a vector of double, the computed solution of the optimization problem.
// resnorm : a double, objective value returned as the scalar value norm(C*x-d)^2.
// residual : a vector of double, solution residuals returned as the vector C*x-d.
- // exitflag : Integer identifying the reason the algorithm terminated.
- // output : Structure containing information about the optimization. Right now it contains number of iteration.
- // lambda : Structure containing the Lagrange multipliers at the solution x (separated by constraint type).It contains lower, upper and linear equality, inequality constraints.
+ // exitflag : Integer identifying the reason the algorithm terminated. It could be 0, 1 or 2 etc. i.e. Optimal, Maximum Number of Iterations Exceeded, CPU time exceeded. Other flags one can see in the lsqlin macro.
+ // output : Structure containing information about the optimization. This version only contains number of iterations.
+ // lambda : Structure containing the Lagrange multipliers at the solution x (separated by constraint type).It contains lower, upper bound multiplier and linear equality, inequality constraints.
//
// Description
// Search the minimum of a constrained linear least square problem specified by :
@@ -45,14 +45,14 @@ function [xopt,resnorm,residual,exitflag,output,lambda] = lsqlin (varargin)
// <latex>
// \begin{eqnarray}
// &\mbox{min}_{x}
- // & 1/2||C*x - d||_2^2 \\
- // & \text{subject to} & A*x \leq b \\
- // & & Aeq*x = beq \\
+ // & 1/2||Câ‹…x - d||_2^2 \\
+ // & \text{subject to} & Aâ‹…x \leq b \\
+ // & & Aeqâ‹…x = beq \\
// & & lb \leq x \leq ub \\
// \end{eqnarray}
// </latex>
//
- // We are calling IPOpt for solving the linear least square problem, IPOpt is a library written in C++.
+ // The routine calls Ipopt for solving the linear least square problem, Ipopt is a library written in C++.
//
// Examples
// //A simple linear least square example
@@ -76,7 +76,7 @@ function [xopt,resnorm,residual,exitflag,output,lambda] = lsqlin (varargin)
// // Press ENTER to continue
//
// Examples
- // //A basic example for equality, inequality and bounds
+ // //A basic example for equality, inequality constraints and variable bounds
// C = [0.9501 0.7620 0.6153 0.4057
// 0.2311 0.4564 0.7919 0.9354
// 0.6068 0.0185 0.9218 0.9169
@@ -111,11 +111,22 @@ function [xopt,resnorm,residual,exitflag,output,lambda] = lsqlin (varargin)
error(errmsg)
end
+// Initializing all the values to empty matrix
+ C=[];
+ d=[];
+ A=[];
+ b=[];
+ Aeq=[];
+ beq=[];
+ lb=[];
+ ub=[];
+ x0=[];
+
C = varargin(1);
d = varargin(2);
A = varargin(3);
b = varargin(4);
- nbVar = size(C,2);
+ nbVar = size(C,2);
if ( rhs<5 ) then
Aeq = []
@@ -126,11 +137,11 @@ function [xopt,resnorm,residual,exitflag,output,lambda] = lsqlin (varargin)
end
if ( rhs<7 ) then
- LB = repmat(-%inf,nbVar,1);
- UB = repmat(%inf,nbVar,1);
+ lb = repmat(-%inf,nbVar,1);
+ ub = repmat(%inf,nbVar,1);
else
- LB = varargin(7);
- UB = varargin(8);
+ lb = varargin(7);
+ ub = varargin(8);
end
@@ -146,12 +157,12 @@ function [xopt,resnorm,residual,exitflag,output,lambda] = lsqlin (varargin)
param =varargin(10);
end
- if (size(LB,2)==0) then
- LB = repmat(-%inf,nbVar,1);
+ if (size(lb,2)==0) then
+ lb = repmat(-%inf,nbVar,1);
end
- if (size(UB,2)==0) then
- UB = repmat(%inf,nbVar,1);
+ if (size(ub,2)==0) then
+ ub = repmat(%inf,nbVar,1);
end
if (type(param) ~= 15) then
@@ -193,12 +204,12 @@ function [xopt,resnorm,residual,exitflag,output,lambda] = lsqlin (varargin)
d=d';
end
- if (size(LB,2)== [nbVar]) then
- LB = LB';
+ if (size(lb,2)== [nbVar]) then
+ lb = lb';
end
- if (size(UB,2)== [nbVar]) then
- UB = UB';
+ if (size(ub,2)== [nbVar]) then
+ ub = ub';
end
if (size(b,2)==nbConInEq) then
@@ -221,7 +232,7 @@ function [xopt,resnorm,residual,exitflag,output,lambda] = lsqlin (varargin)
//Check the size of inequality constraint which should be equal to the number of variables
if ( size(A,2) ~= nbVar & size(A,2) ~= 0) then
- errmsg = msprintf(gettext("%s: The number of columns in A must be the same as the number of elements of d"), "lsqlin");
+ errmsg = msprintf(gettext("%s: The number of columns in A must be the same as the number of columns in C"), "lsqlin");
error(errmsg);
end
@@ -232,20 +243,20 @@ function [xopt,resnorm,residual,exitflag,output,lambda] = lsqlin (varargin)
end
//Check the size of Lower Bound which should be equal to the number of variables
- if ( size(LB,1) ~= nbVar) then
+ if ( size(lb,1) ~= nbVar) then
errmsg = msprintf(gettext("%s: The Lower Bound is not equal to the number of variables"), "lsqlin");
error(errmsg);
end
//Check the size of Upper Bound which should equal to the number of variables
- if ( size(UB,1) ~= nbVar) then
+ if ( size(ub,1) ~= nbVar) then
errmsg = msprintf(gettext("%s: The Upper Bound is not equal to the number of variables"), "lsqlin");
error(errmsg);
end
//Check the size of constraints of Lower Bound which should equal to the number of constraints
if ( size(b,1) ~= nbConInEq & size(b,1) ~= 0) then
- errmsg = msprintf(gettext("%s: The number of rows in A must be the same as the number of elementsof b"), "lsqlin");
+ errmsg = msprintf(gettext("%s: The number of rows in A must be the same as the number of elements of b"), "lsqlin");
error(errmsg);
end
@@ -259,6 +270,7 @@ function [xopt,resnorm,residual,exitflag,output,lambda] = lsqlin (varargin)
if ( size(x0,1) ~= nbVar) then
warnmsg = msprintf(gettext("%s: Ignoring initial guess of variables as it is not equal to the number of variables"), "lsqlin");
warning(warnmsg);
+ x0 = repmat(0,nbVar,1);
end
//Check if the user gives a matrix instead of a vector
@@ -268,12 +280,12 @@ function [xopt,resnorm,residual,exitflag,output,lambda] = lsqlin (varargin)
error(errmsg);
end
- if (size(LB,1)~=1)& (size(LB,2)~=1) then
+ if (size(lb,1)~=1)& (size(lb,2)~=1) then
errmsg = msprintf(gettext("%s: Lower Bound should be a vector"), "lsqlin");
error(errmsg);
end
- if (size(UB,1)~=1)& (size(UB,2)~=1) then
+ if (size(ub,1)~=1)& (size(ub,2)~=1) then
errmsg = msprintf(gettext("%s: Upper Bound should be a vector"), "lsqlin");
error(errmsg);
end
@@ -294,31 +306,31 @@ function [xopt,resnorm,residual,exitflag,output,lambda] = lsqlin (varargin)
for i = 1:nbConInEq
if (b(i) == -%inf)
- errmsg = msprintf(gettext("%s: Value of b can not be negative infinity"), "qpipoptmat");
+ errmsg = msprintf(gettext("%s: Value of b can not be negative infinity"), "lsqlin");
error(errmsg);
end
end
for i = 1:nbConEq
if (beq(i) == -%inf)
- errmsg = msprintf(gettext("%s: Value of beq can not be negative infinity"), "qpipoptmat");
+ errmsg = msprintf(gettext("%s: Value of beq can not be negative infinity"), "lsqlin");
error(errmsg);
end
end
//Converting it into Quadratic Programming Problem
- Q = C'*C;
- p = [-C'*d]';
+ H = C'*C;
+ f = [-C'*d]';
op_add = d'*d;
- LB = LB';
- UB = UB';
+ lb = lb';
+ ub = ub';
x0 = x0';
conMatrix = [Aeq;A];
nbCon = size(conMatrix,1);
conLB = [beq; repmat(-%inf,nbConInEq,1)]';
conUB = [beq;b]' ;
- [xopt,fopt,status,iter,Zl,Zu,lmbda] = solveqp(nbVar,nbCon,Q,p,conMatrix,conLB,conUB,LB,UB,x0,options);
+ [xopt,fopt,status,iter,Zl,Zu,lmbda] = solveqp(nbVar,nbCon,H,f,conMatrix,conLB,conUB,lb,ub,x0,options);
xopt = xopt';
residual = -1*(C*xopt-d);
@@ -326,15 +338,15 @@ function [xopt,resnorm,residual,exitflag,output,lambda] = lsqlin (varargin)
exitflag = status;
output = struct("Iterations" , []);
output.Iterations = iter;
- lambda = struct("lower" , [], ..
- "upper" , [], ..
- "eqlin" , [], ..
+ lambda = struct("lower" , [], ..
+ "upper" , [], ..
+ "eqlin" , [], ..
"ineqlin" , []);
-
- lambda.lower = Zl;
- lambda.upper = Zu;
- lambda.eqlin = lmbda(1:nbConEq);
- lambda.ineqlin = lmbda(nbConEq+1:nbCon);
+
+ lambda.lower = Zl;
+ lambda.upper = Zu;
+ lambda.eqlin = lmbda(1:nbConEq);
+ lambda.ineqlin = lmbda(nbConEq+1:nbCon);
select status
case 0 then
@@ -362,11 +374,11 @@ function [xopt,resnorm,residual,exitflag,output,lambda] = lsqlin (varargin)
case 12 then
printf("\nProblem has too few degrees of freedom.\n");
case 13 then
- printf("\nInvalid option thrown back by IPOpt\n");
+ printf("\nInvalid option thrown back by Ipopt\n");
case 14 then
printf("\nNot enough memory.\n");
case 15 then
- printf("\nINTERNAL ERROR: Unknown SolverReturn value - Notify IPOPT Authors.\n");
+ printf("\nINTERNAL ERROR: Unknown SolverReturn value - Notify Ipopt Authors.\n");
else
printf("\nInvalid status returned. Notify the Toolbox authors\n");
break;
diff --git a/macros/lsqnonneg.bin b/macros/lsqnonneg.bin
index 84e307b..182cfa9 100644
--- a/macros/lsqnonneg.bin
+++ b/macros/lsqnonneg.bin
Binary files differ
diff --git a/macros/lsqnonneg.sci b/macros/lsqnonneg.sci
index b8694b4..5f6ffa2 100644
--- a/macros/lsqnonneg.sci
+++ b/macros/lsqnonneg.sci
@@ -19,14 +19,14 @@ function [xopt,resnorm,residual,exitflag,output,lambda] = lsqnonneg (varargin)
// [xopt,resnorm,residual,exitflag,output,lambda] = lsqnonneg( ... )
//
// Parameters
- // C : a matrix of doubles, represents the multiplier of the solution x in the expression C*x - d. C is M-by-N, where M is the number of equations, and N is the number of elements of x.
- // d : a vector of doubles, represents the additive constant term in the expression C*x - d. d is M-by-1, where M is the number of equations.
- // xopt : a vector of doubles, the computed solution of the optimization problem.
+ // C : a matrix of double, represents the multiplier of the solution x in the expression C*x - d. Number of columns in C is equal to the number of elements in x.
+ // d : a vector of double, represents the additive constant term in the expression C*x - d. Number of elements in d is equal to the number of rows in C matrix.
+ // xopt : a vector of double, the computed solution of the optimization problem.
// resnorm : a double, objective value returned as the scalar value norm(C*x-d)^2.
- // residual : a vector of doubles, solution residuals returned as the vector C*x-d.
- // exitflag : Integer identifying the reason the algorithm terminated.
- // output : Structure containing information about the optimization. Right now it contains number of iteration.
- // lambda : Structure containing the Lagrange multipliers at the solution x (separated by constraint type).It contains lower, upper and linear equality, inequality constraints.
+ // residual : a vector of double, solution residuals returned as the vector C*x-d.
+ // exitflag : Integer identifying the reason the algorithm terminated. It could be 0, 1 or 2 i.e. Optimal, Maximum Number of Iterations Exceeded, CPU time exceeded.
+ // output : Structure containing information about the optimization. This version only contains number of iterations.
+ // lambda : Structure containing the Lagrange multipliers at the solution x. It contains lower and upper bound multiplier.
//
// Description
// Solves nonnegative least-squares curve fitting problems specified by :
@@ -34,12 +34,12 @@ function [xopt,resnorm,residual,exitflag,output,lambda] = lsqnonneg (varargin)
// <latex>
// \begin{eqnarray}
// &\mbox{min}_{x}
- // & 1/2||C*x - d||_2^2 \\
+ // & 1/2||Câ‹…x - d||_2^2 \\
// & & x \geq 0 \\
// \end{eqnarray}
// </latex>
//
- // We are calling IPOpt for solving the nonnegative least-squares curve fitting problems, IPOpt is a library written in C++.
+ // The routine calls Ipopt for solving the nonnegative least-squares curve fitting problems, Ipopt is a library written in C++.
//
// Examples
// // A basic lsqnonneg problem
@@ -63,7 +63,7 @@ function [xopt,resnorm,residual,exitflag,output,lambda] = lsqnonneg (varargin)
//To check the number of argument given by user
if ( rhs < 2 | rhs > 3 ) then
- errmsg = msprintf(gettext("%s: Unexpected number of input arguments : %d provided while should be in the set of [2 3]"), "lsqlin", rhs);
+ errmsg = msprintf(gettext("%s: Unexpected number of input arguments : %d provided while should be in the set of [2 3]"), "lsqnonneg", rhs);
error(errmsg)
end
@@ -73,21 +73,21 @@ function [xopt,resnorm,residual,exitflag,output,lambda] = lsqnonneg (varargin)
if ( rhs<3 | size(varargin(3)) ==0 ) then
param = list();
else
- param =varargin(10);
+ param =varargin(3);
end
if (type(param) ~= 15) then
- errmsg = msprintf(gettext("%s: param should be a list "), "lsqlin");
+ errmsg = msprintf(gettext("%s: param should be a list "), "lsqnonneg");
error(errmsg);
end
if (modulo(size(param),2)) then
- errmsg = msprintf(gettext("%s: Size of parameters should be even"), "lsqlin");
+ errmsg = msprintf(gettext("%s: Size of parameters should be even"), "lsqnonneg");
error(errmsg);
end
- options = list( "MaxIter" , [3000], ...
+ options = list( "MaxIter" , [3000], ...
"CpuTime" , [600] ...
);
@@ -99,7 +99,7 @@ function [xopt,resnorm,residual,exitflag,output,lambda] = lsqnonneg (varargin)
case "CpuTime" then
options(2*i) = param(2*i);
else
- errmsg = msprintf(gettext("%s: Unrecognized parameter name ''%s''."), "lsqlin", param(2*i-1));
+ errmsg = msprintf(gettext("%s: Unrecognized parameter name ''%s''."), "lsqnonneg", param(2*i-1));
error(errmsg)
end
end
@@ -114,7 +114,7 @@ function [xopt,resnorm,residual,exitflag,output,lambda] = lsqnonneg (varargin)
//Check the size of f which should equal to the number of variable
if ( size(d,1) ~= size(C,1)) then
- errmsg = msprintf(gettext("%s: The number of rows in C must be equal the number of elements of d"), "lsqlin");
+ errmsg = msprintf(gettext("%s: The number of rows in C must be equal the number of elements of d"), "lsqnonneg");
error(errmsg);
end
@@ -123,14 +123,14 @@ function [xopt,resnorm,residual,exitflag,output,lambda] = lsqnonneg (varargin)
Q = C'*C;
p = [-C'*d]';
op_add = d'*d;
- LB = repmat(0,1,nbVar);
- UB = repmat(%inf,1,nbVar);
+ lb = repmat(0,1,nbVar);
+ ub = repmat(%inf,1,nbVar);
x0 = repmat(0,1,nbVar);;
conMatrix = [];
nbCon = size(conMatrix,1);
conLB = [];
conUB = [] ;
- [xopt,fopt,status,iter,Zl,Zu,lmbda] = solveqp(nbVar,nbCon,Q,p,conMatrix,conLB,conUB,LB,UB,x0,options);
+ [xopt,fopt,status,iter,Zl,Zu,lmbda] = solveqp(nbVar,nbCon,Q,p,conMatrix,conLB,conUB,lb,ub,x0,options);
xopt = xopt';
residual = -1*(C*xopt-d);
@@ -170,11 +170,11 @@ function [xopt,resnorm,residual,exitflag,output,lambda] = lsqnonneg (varargin)
case 12 then
printf("\nProblem has too few degrees of freedom.\n");
case 13 then
- printf("\nInvalid option thrown back by IPOpt\n");
+ printf("\nInvalid option thrown back by Ipopt\n");
case 14 then
printf("\nNot enough memory.\n");
case 15 then
- printf("\nINTERNAL ERROR: Unknown SolverReturn value - Notify IPOPT Authors.\n");
+ printf("\nINTERNAL ERROR: Unknown SolverReturn value - Notify Ipopt Authors.\n");
else
printf("\nInvalid status returned. Notify the Toolbox authors\n");
break;
diff --git a/macros/qpipopt.bin b/macros/qpipopt.bin
index f4b14b9..4a407c4 100644
--- a/macros/qpipopt.bin
+++ b/macros/qpipopt.bin
Binary files differ
diff --git a/macros/qpipopt.sci b/macros/qpipopt.sci
index 6a53693..ed531e1 100644
--- a/macros/qpipopt.sci
+++ b/macros/qpipopt.sci
@@ -14,27 +14,27 @@ function [xopt,fopt,exitflag,output,lambda] = qpipopt (varargin)
// Solves a linear quadratic problem.
//
// Calling Sequence
- // xopt = qpipopt(nbVar,nbCon,Q,p,LB,UB,conMatrix,conLB,conUB)
- // xopt = qpipopt(nbVar,nbCon,Q,p,LB,UB,conMatrix,conLB,conUB,x0)
- // xopt = qpipopt(nbVar,nbCon,Q,p,LB,UB,conMatrix,conLB,conUB,x0,param)
+ // xopt = qpipopt(nbVar,nbCon,H,f,lb,ub,A,conLB,conUB)
+ // xopt = qpipopt(nbVar,nbCon,H,f,lb,ub,A,conLB,conUB,x0)
+ // xopt = qpipopt(nbVar,nbCon,H,f,lb,ub,A,conLB,conUB,x0,param)
// [xopt,fopt,exitflag,output,lamda] = qpipopt( ... )
//
// Parameters
// nbVar : a double, number of variables
// nbCon : a double, number of constraints
- // Q : a symmetric matrix of double, represents coefficients of quadratic in the quadratic problem.
- // p : a vector of double, represents coefficients of linear in the quadratic problem
- // LB : a vector of double, contains lower bounds of the variables.
- // UB : a vector of double, contains upper bounds of the variables.
- // conMatrix : a matrix of double, contains matrix representing the constraint matrix
+ // H : a symmetric matrix of double, represents coefficients of quadratic in the quadratic problem.
+ // f : a vector of double, represents coefficients of linear in the quadratic problem
+ // lb : a vector of double, contains lower bounds of the variables.
+ // ub : a vector of double, contains upper bounds of the variables.
+ // A : a matrix of double, contains matrix representing the constraint matrix
// conLB : a vector of double, contains lower bounds of the constraints.
// conUB : a vector of double, contains upper bounds of the constraints.
// x0 : a vector of double, contains initial guess of variables.
// param : a list containing the the parameters to be set.
// xopt : a vector of double, the computed solution of the optimization problem.
// fopt : a double, the function value at x.
- // exitflag : Integer identifying the reason the algorithm terminated.
- // output : Structure containing information about the optimization. Right now it contains number of iteration.
+ // exitflag : Integer identifying the reason the algorithm terminated. It could be 0, 1 or 2 etc. i.e. Optimal, Maximum Number of Iterations Exceeded, CPU time exceeded. Other flags one can see in the qpipopt macro.
+ // output : Structure containing information about the optimization. This version only contains number of iterations
// lambda : Structure containing the Lagrange multipliers at the solution x (separated by constraint type).It contains lower, upper and linear equality, inequality constraints.
//
// Description
@@ -44,32 +44,32 @@ function [xopt,fopt,exitflag,output,lambda] = qpipopt (varargin)
// <latex>
// \begin{eqnarray}
// &\mbox{min}_{x}
- // & 1/2*x'*Q*x + p'*x \\
- // & \text{subject to} & conLB \leq C(x) \leq conUB \\
+ // & 1/2â‹…x^Tâ‹…Hâ‹…x + f^Tâ‹…x \\
+ // & \text{subject to} & conLB \leq Aâ‹…x \leq conUB \\
// & & lb \leq x \leq ub \\
// \end{eqnarray}
// </latex>
//
- // We are calling IPOpt for solving the quadratic problem, IPOpt is a library written in C++.
+ // The routine calls Ipopt for solving the quadratic problem, Ipopt is a library written in C++.
//
// Examples
// //Find x in R^6 such that:
- // conMatrix= [1,-1,1,0,3,1;
- // -1,0,-3,-4,5,6;
- // 2,5,3,0,1,0
- // 0,1,0,1,2,-1;
- // -1,0,2,1,1,0];
+ // A= [1,-1,1,0,3,1;
+ // -1,0,-3,-4,5,6;
+ // 2,5,3,0,1,0
+ // 0,1,0,1,2,-1;
+ // -1,0,2,1,1,0];
// conLB=[1;2;3;-%inf;-%inf];
// conUB = [1;2;3;-1;2.5];
// lb=[-1000;-10000; 0; -1000; -1000; -1000];
// ub=[10000; 100; 1.5; 100; 100; 1000];
- // //and minimize 0.5*x'*Q*x + p'*x with
- // p=[1; 2; 3; 4; 5; 6]; Q=eye(6,6);
+ // //and minimize 0.5*x'â‹…Hâ‹…x + f'â‹…x with
+ // f=[1; 2; 3; 4; 5; 6]; H=eye(6,6);
// nbVar = 6;
// nbCon = 5;
// x0 = repmat(0,nbVar,1);
// param = list("MaxIter", 300, "CpuTime", 100);
- // [xopt,fopt,exitflag,output,lambda]=qpipopt(nbVar,nbCon,Q,p,lb,ub,conMatrix,conLB,conUB,x0,param)
+ // [xopt,fopt,exitflag,output,lambda]=qpipopt(nbVar,nbCon,H,f,lb,ub,A,conLB,conUB,x0,param)
// // Press ENTER to continue
//
// Examples
@@ -80,16 +80,16 @@ function [xopt,fopt,exitflag,output,lambda] = qpipopt (varargin)
// // –x1 + 2x2 ≤ 2
// // 2x1 + x2 ≤ 3
// // 0 ≤ x1, 0 ≤ x2.
- // Q = [1 -1; -1 2];
- // p = [-2; -6];
- // conMatrix = [1 1; -1 2; 2 1];
+ // H = [1 -1; -1 2];
+ // f = [-2; -6];
+ // A = [1 1; -1 2; 2 1];
// conUB = [2; 2; 3];
// conLB = [-%inf; -%inf; -%inf];
// lb = [0; 0];
// ub = [%inf; %inf];
// nbVar = 2;
// nbCon = 3;
- // [xopt,fopt,exitflag,output,lambda] = qpipopt(nbVar,nbCon,Q,p,lb,ub,conMatrix,conLB,conUB)
+ // [xopt,fopt,exitflag,output,lambda] = qpipopt(nbVar,nbCon,H,f,lb,ub,A,conLB,conUB)
// Authors
// Keyur Joshi, Saikiran, Iswarya, Harpreet Singh
@@ -103,35 +103,43 @@ function [xopt,fopt,exitflag,output,lambda] = qpipopt (varargin)
error(errmsg)
end
+ nbVar = [];
+ nbCon = [];
+ H = [];
+ f = [];
+ A = [];
+ conLB = [];
+ conUB = [];
+ lb = [];
+ ub = [];
- nbVar = varargin(1);
- nbCon = varargin(2);
- Q = varargin(3);
- p = varargin(4);
- LB = varargin(5);
- UB = varargin(6);
- conMatrix = varargin(7);
- conLB = varargin(8);
- conUB = varargin(9);
+ nbVar = varargin(1);
+ nbCon = varargin(2);
+ H = varargin(3);
+ f = varargin(4);
+ lb = varargin(5);
+ ub = varargin(6);
+ A = varargin(7);
+ conLB = varargin(8);
+ conUB = varargin(9);
- if (size(LB,2)==0) then
- LB = repmat(-%inf,nbVar,1);
+ if (size(lb,2)==0) then
+ lb = repmat(-%inf,nbVar,1);
end
- if (size(UB,2)==0) then
- UB = repmat(%inf,nbVar,1);
+ if (size(ub,2)==0) then
+ ub = repmat(%inf,nbVar,1);
end
- if (size(p,2)==0) then
- p = repmat(0,nbVar,1);
+ if (size(f,2)==0) then
+ f = repmat(0,nbVar,1);
end
-
- if ( rhs<10 | size(varargin(10)) ==0 ) then
- x0 = repmat(0,nbVar,1);
- else
- x0 = varargin(10);
- end
+ if ( rhs<10 | size(varargin(10)) ==0 ) then
+ x0 = repmat(0,nbVar,1);
+ else
+ x0 = varargin(10);
+ end
if ( rhs<11 | size(varargin(11)) ==0 ) then
param = list();
@@ -144,11 +152,10 @@ function [xopt,fopt,exitflag,output,lambda] = qpipopt (varargin)
error(errmsg);
end
- if (modulo(size(param),2)) then
- errmsg = msprintf(gettext("%s: Size of parameters should be even"), "qpipopt");
- error(errmsg);
- end
-
+ if (modulo(size(param),2)) then
+ errmsg = msprintf(gettext("%s: Size of parameters should be even"), "qpipopt");
+ error(errmsg);
+ end
options = list(..
"MaxIter" , [3000], ...
@@ -171,16 +178,16 @@ function [xopt,fopt,exitflag,output,lambda] = qpipopt (varargin)
// Check if the user gives row vector
// and Changing it to a column matrix
- if (size(p,2)== [nbVar]) then
- p=p';
- end
+ if (size(f,2)== [nbVar]) then
+ f=f';
+ end
- if (size(LB,2)== [nbVar]) then
- LB = LB';
- end
+ if (size(lb,2)== [nbVar]) then
+ lb = lb';
+ end
- if (size(UB,2)== [nbVar]) then
- UB = UB';
+ if (size(ub,2)== [nbVar]) then
+ ub = ub';
end
if (size(conUB,2)== [nbCon]) then
@@ -196,53 +203,53 @@ function [xopt,fopt,exitflag,output,lambda] = qpipopt (varargin)
end
//IPOpt wants it in row matrix form
- p = p';
- LB = LB';
- UB = UB';
+ f = f';
+ lb = lb';
+ ub = ub';
conLB = conLB';
conUB = conUB';
x0 = x0';
- //Checking the Q matrix which needs to be a symmetric matrix
- if ( ~isequal(Q,Q') ) then
- errmsg = msprintf(gettext("%s: Q is not a symmetric matrix"), "qpipopt");
+ //Checking the H matrix which needs to be a symmetric matrix
+ if ( ~isequal(H,H') ) then
+ errmsg = msprintf(gettext("%s: H is not a symmetric matrix"), "qpipopt");
error(errmsg);
end
- //Check the size of Q which should equal to the number of variable
- if ( size(Q) ~= [nbVar nbVar]) then
- errmsg = msprintf(gettext("%s: The Size of Q is not equal to the number of variables"), "qpipopt");
+ //Check the size of H which should equal to the number of variable
+ if ( size(H) ~= [nbVar nbVar]) then
+ errmsg = msprintf(gettext("%s: The Size of H is not equal to the number of variables"), "qpipopt");
error(errmsg);
end
//Check the size of p which should equal to the number of variable
- if ( size(p,2) ~= [nbVar]) then
- errmsg = msprintf(gettext("%s: The Size of p is not equal to the number of variables"), "qpipopt");
+ if ( size(f,2) ~= [nbVar]) then
+ errmsg = msprintf(gettext("%s: The Size of f is not equal to the number of variables"), "qpipopt");
error(errmsg);
end
if (nbCon) then
//Check the size of constraint which should equal to the number of variables
- if ( size(conMatrix,2) ~= nbVar) then
+ if ( size(A,2) ~= nbVar) then
errmsg = msprintf(gettext("%s: The size of constraints is not equal to the number of variables"), "qpipopt");
error(errmsg);
end
end
//Check the number of constraint
- if ( size(conMatrix,1) ~= nbCon) then
+ if ( size(A,1) ~= nbCon) then
errmsg = msprintf(gettext("%s: The size of constraint matrix is not equal to the number of constraint given i.e. %d"), "qpipopt", nbCon);
error(errmsg);
end
//Check the size of Lower Bound which should equal to the number of variables
- if ( size(LB,2) ~= nbVar) then
+ if ( size(lb,2) ~= nbVar) then
errmsg = msprintf(gettext("%s: The size of Lower Bound is not equal to the number of variables"), "qpipopt");
error(errmsg);
end
//Check the size of Upper Bound which should equal to the number of variables
- if ( size(UB,2) ~= nbVar) then
+ if ( size(ub,2) ~= nbVar) then
errmsg = msprintf(gettext("%s: The size of Upper Bound is not equal to the number of variables"), "qpipopt");
error(errmsg);
end
@@ -263,21 +270,22 @@ function [xopt,fopt,exitflag,output,lambda] = qpipopt (varargin)
if ( size(x0,2) ~= nbVar | size(x0,"*")>nbVar) then
warnmsg = msprintf(gettext("%s: Ignoring initial guess of variables as it is not equal to the number of variables"), "qpipopt");
warning(warnmsg);
+ x0 = repmat(0,1,nbVar);
end
//Check if the user gives a matrix instead of a vector
- if ((size(p,1)~=1)& (size(p,2)~=1)) then
- errmsg = msprintf(gettext("%s: p should be a vector"), "qpipopt");
+ if ((size(f,1)~=1)& (size(f,2)~=1)) then
+ errmsg = msprintf(gettext("%s: f should be a vector"), "qpipopt");
error(errmsg);
end
- if (size(LB,1)~=1)& (size(LB,2)~=1) then
+ if (size(lb,1)~=1)& (size(lb,2)~=1) then
errmsg = msprintf(gettext("%s: Lower Bound should be a vector"), "qpipopt");
error(errmsg);
end
- if (size(UB,1)~=1)& (size(UB,2)~=1) then
+ if (size(ub,1)~=1)& (size(ub,2)~=1) then
errmsg = msprintf(gettext("%s: Upper Bound should be a vector"), "qpipopt");
error(errmsg);
end
@@ -307,7 +315,7 @@ function [xopt,fopt,exitflag,output,lambda] = qpipopt (varargin)
end
end
- [xopt,fopt,status,iter,Zl,Zu,lmbda] = solveqp(nbVar,nbCon,Q,p,conMatrix,conLB,conUB,LB,UB,x0,options);
+ [xopt,fopt,status,iter,Zl,Zu,lmbda] = solveqp(nbVar,nbCon,H,f,A,conLB,conUB,lb,ub,x0,options);
xopt = xopt';
exitflag = status;
@@ -348,11 +356,11 @@ function [xopt,fopt,exitflag,output,lambda] = qpipopt (varargin)
case 12 then
printf("\nProblem has too few degrees of freedom.\n");
case 13 then
- printf("\nInvalid option thrown back by IPOpt\n");
+ printf("\nInvalid option thrown back by Ipopt\n");
case 14 then
printf("\nNot enough memory.\n");
case 15 then
- printf("\nINTERNAL ERROR: Unknown SolverReturn value - Notify IPOPT Authors.\n");
+ printf("\nINTERNAL ERROR: Unknown SolverReturn value - Notify Ipopt Authors.\n");
else
printf("\nInvalid status returned. Notify the Toolbox authors\n");
break;
diff --git a/macros/qpipoptmat.bin b/macros/qpipoptmat.bin
index 89ce559..35142ae 100644
--- a/macros/qpipoptmat.bin
+++ b/macros/qpipoptmat.bin
Binary files differ
diff --git a/macros/qpipoptmat.sci b/macros/qpipoptmat.sci
index e9ed9a5..8e9c67e 100644
--- a/macros/qpipoptmat.sci
+++ b/macros/qpipoptmat.sci
@@ -29,14 +29,14 @@ function [xopt,fopt,exitflag,output,lambda] = qpipoptmat (varargin)
// b : a vector of double, represents the linear coefficients in the inequality constraints
// Aeq : a matrix of double, represents the linear coefficients in the equality constraints
// beq : a vector of double, represents the linear coefficients in the equality constraints
- // LB : a vector of double, contains lower bounds of the variables.
- // UB : a vector of double, contains upper bounds of the variables.
+ // lb : a vector of double, contains lower bounds of the variables.
+ // ub : a vector of double, contains upper bounds of the variables.
// x0 : a vector of double, contains initial guess of variables.
// param : a list containing the the parameters to be set.
// xopt : a vector of double, the computed solution of the optimization problem.
// fopt : a double, the function value at x.
- // exitflag : Integer identifying the reason the algorithm terminated.
- // output : Structure containing information about the optimization. Right now it contains number of iteration.
+ // exitflag : Integer identifying the reason the algorithm terminated.It could be 0, 1 or 2 etc. i.e. Optimal, Maximum Number of Iterations Exceeded, CPU time exceeded. Other flags one can see in the qpipoptmat macro.
+ // output : Structure containing information about the optimization. This version only contains number of iterations.
// lambda : Structure containing the Lagrange multipliers at the solution x (separated by constraint type).It contains lower, upper and linear equality, inequality constraints.
//
// Description
@@ -46,14 +46,14 @@ function [xopt,fopt,exitflag,output,lambda] = qpipoptmat (varargin)
// <latex>
// \begin{eqnarray}
// &\mbox{min}_{x}
- // & 1/2*x'*H*x + f'*x \\
- // & \text{subject to} & A*x \leq b \\
- // & & Aeq*x = beq \\
+ // & 1/2â‹…x^Tâ‹…Hâ‹…x + f^Tâ‹…x \\
+ // & \text{subject to} & Aâ‹…x \leq b \\
+ // & & Aeqâ‹…x = beq \\
// & & lb \leq x \leq ub \\
// \end{eqnarray}
// </latex>
//
- // We are calling IPOpt for solving the quadratic problem, IPOpt is a library written in C++.
+ // The routine calls Ipopt for solving the quadratic problem, Ipopt is a library written in C++.
//
// Examples
// //Find the value of x that minimize following function
@@ -101,9 +101,18 @@ function [xopt,fopt,exitflag,output,lambda] = qpipoptmat (varargin)
error(errmsg)
end
- H = varargin(1);
- f = varargin(2);
- nbVar = size(H,1);
+ H = [];
+ f = [];
+ A = [];
+ b = [];
+ Aeq = [];
+ beq = [];
+ lb = [];
+ ub = [];
+
+ H = varargin(1);
+ f = varargin(2);
+ nbVar = size(H,1);
if ( rhs<3 ) then
@@ -123,11 +132,11 @@ function [xopt,fopt,exitflag,output,lambda] = qpipoptmat (varargin)
end
if ( rhs<7 ) then
- LB = repmat(-%inf,nbVar,1);
- UB = repmat(%inf,nbVar,1);
+ lb = repmat(-%inf,nbVar,1);
+ ub = repmat(%inf,nbVar,1);
else
- LB = varargin(7);
- UB = varargin(8);
+ lb = varargin(7);
+ ub = varargin(8);
end
@@ -143,12 +152,12 @@ function [xopt,fopt,exitflag,output,lambda] = qpipoptmat (varargin)
param =varargin(10);
end
- if (size(LB,2)==0) then
- LB = repmat(-%inf,nbVar,1);
+ if (size(lb,2)==0) then
+ lb = repmat(-%inf,nbVar,1);
end
- if (size(UB,2)==0) then
- UB = repmat(%inf,nbVar,1);
+ if (size(ub,2)==0) then
+ ub = repmat(%inf,nbVar,1);
end
if (size(f,2)==0) then
@@ -195,12 +204,12 @@ function [xopt,fopt,exitflag,output,lambda] = qpipoptmat (varargin)
f=f';
end
- if (size(LB,2)== [nbVar]) then
- LB = LB';
+ if (size(lb,2)== [nbVar]) then
+ lb = lb';
end
- if (size(UB,2)== [nbVar]) then
- UB = UB';
+ if (size(ub,2)== [nbVar]) then
+ ub = ub';
end
if (size(b,2)==nbConInEq) then
@@ -228,7 +237,6 @@ function [xopt,fopt,exitflag,output,lambda] = qpipoptmat (varargin)
error(errmsg);
end
-
//Check the size of inequality constraint which should be equal to the number of variables
if ( size(A,2) ~= nbVar & size(A,2) ~= 0) then
errmsg = msprintf(gettext("%s: The number of columns in A must be the same as the number of elements of f"), "qpipoptmat");
@@ -243,13 +251,13 @@ function [xopt,fopt,exitflag,output,lambda] = qpipoptmat (varargin)
//Check the size of Lower Bound which should be equal to the number of variables
- if ( size(LB,1) ~= nbVar) then
+ if ( size(lb,1) ~= nbVar) then
errmsg = msprintf(gettext("%s: The Lower Bound is not equal to the number of variables"), "qpipoptmat");
error(errmsg);
end
//Check the size of Upper Bound which should equal to the number of variables
- if ( size(UB,1) ~= nbVar) then
+ if ( size(ub,1) ~= nbVar) then
errmsg = msprintf(gettext("%s: The Upper Bound is not equal to the number of variables"), "qpipoptmat");
error(errmsg);
end
@@ -270,6 +278,7 @@ function [xopt,fopt,exitflag,output,lambda] = qpipoptmat (varargin)
if ( size(x0,1) ~= nbVar) then
warnmsg = msprintf(gettext("%s: Ignoring initial guess of variables as it is not equal to the number of variables"), "qpipoptmat");
warning(warnmsg);
+ x0 = repmat(0,nbVar,1);
end
//Check if the user gives a matrix instead of a vector
@@ -279,12 +288,12 @@ function [xopt,fopt,exitflag,output,lambda] = qpipoptmat (varargin)
error(errmsg);
end
- if (size(LB,1)~=1)& (size(LB,2)~=1) then
+ if (size(lb,1)~=1)& (size(ub,2)~=1) then
errmsg = msprintf(gettext("%s: Lower Bound should be a vector"), "qpipoptmat");
error(errmsg);
end
- if (size(UB,1)~=1)& (size(UB,2)~=1) then
+ if (size(ub,1)~=1)& (size(ub,2)~=1) then
errmsg = msprintf(gettext("%s: Upper Bound should be a vector"), "qpipoptmat");
error(errmsg);
end
@@ -319,14 +328,14 @@ function [xopt,fopt,exitflag,output,lambda] = qpipoptmat (varargin)
//Converting it into ipopt format
f = f';
- LB = LB';
- UB = UB';
+ lb = lb';
+ ub = ub';
x0 = x0';
conMatrix = [Aeq;A];
nbCon = size(conMatrix,1);
conLB = [beq; repmat(-%inf,nbConInEq,1)]';
conUB = [beq;b]' ;
- [xopt,fopt,status,iter,Zl,Zu,lmbda] = solveqp(nbVar,nbCon,H,f,conMatrix,conLB,conUB,LB,UB,x0,options);
+ [xopt,fopt,status,iter,Zl,Zu,lmbda] = solveqp(nbVar,nbCon,H,f,conMatrix,conLB,conUB,lb,ub,x0,options);
xopt = xopt';
exitflag = status;
@@ -369,11 +378,11 @@ function [xopt,fopt,exitflag,output,lambda] = qpipoptmat (varargin)
case 12 then
printf("\nProblem has too few degrees of freedom.\n");
case 13 then
- printf("\nInvalid option thrown back by IPOpt\n");
+ printf("\nInvalid option thrown back by Ipopt\n");
case 14 then
printf("\nNot enough memory.\n");
case 15 then
- printf("\nINTERNAL ERROR: Unknown SolverReturn value - Notify IPOPT Authors.\n");
+ printf("\nINTERNAL ERROR: Unknown SolverReturn value - Notify Ipopt Authors.\n");
else
printf("\nInvalid status returned. Notify the Toolbox authors\n");
break;
diff --git a/macros/symphony.bin b/macros/symphony.bin
index 562f5cc..9217660 100644
--- a/macros/symphony.bin
+++ b/macros/symphony.bin
Binary files differ
diff --git a/macros/symphony.sci b/macros/symphony.sci
index cc05dcd..264a513 100644
--- a/macros/symphony.sci
+++ b/macros/symphony.sci
@@ -13,27 +13,27 @@ function [xopt,fopt,status,output] = symphony (varargin)
// Solves a mixed integer linear programming constrained optimization problem.
//
// Calling Sequence
- // xopt = symphony(nbVar,nbCon,objCoef,isInt,LB,UB,conMatrix,conLB,conUB)
- // xopt = symphony(nbVar,nbCon,objCoef,isInt,LB,UB,conMatrix,conLB,conUB,objSense)
- // xopt = symphony(nbVar,nbCon,objCoef,isInt,LB,UB,conMatrix,conLB,conUB,objSense,options)
+ // xopt = symphony(nbVar,nbCon,c,isInt,lb,ub,A,conLB,conUB)
+ // xopt = symphony(nbVar,nbCon,c,isInt,lb,ub,A,conLB,conUB,objSense)
+ // xopt = symphony(nbVar,nbCon,c,isInt,lb,ub,A,conLB,conUB,objSense,options)
// [xopt,fopt,status,output] = symphony( ... )
//
// Parameters
// nbVar : a double, number of variables.
// nbCon : a double, number of constraints.
- // objCoeff : a vector of double, represents coefficients of the variables in the objective.
+ // c : a vector of double, represents coefficients of the variables in the objective.
// isInt : a vector of boolean, represents wether a variable is constrained to be an integer.
- // LB : a vector of double, represents lower bounds of the variables.
- // UB : a vector of double, represents upper bounds of the variables.
- // conMatrix : a matrix of double, represents matrix representing the constraint matrix.
+ // lb : a vector of double, represents lower bounds of the variables.
+ // ub : a vector of double, represents upper bounds of the variables.
+ // A : a matrix of double, represents matrix representing the constraint matrix.
// conLB : a vector of double, represents lower bounds of the constraints.
// conUB : a vector of double, represents upper bounds of the constraints
// objSense : The sense (maximization/minimization) of the objective. Use 1(sym_minimize ) or -1 (sym_maximize) here.
- // options : a a list containing the the parameters to be set.
+ // options : a list containing the the parameters to be set.
// xopt : a vector of double, the computed solution of the optimization problem.
// fopt : a double, the function value at x.
- // status : status flag from symphony.
- // output : The output data structure contains detailed informations about the optimization process. Right now it contains number of iteration.
+ // status : status flag from symphony. 227 is optimal, 228 is Time limit exceeded, 230 is iteration limit exceeded.
+ // output : The output data structure contains detailed information about the optimization process. This version only contains number of iterations
//
// Description
// Search the minimum or maximum of a constrained mixed integer linear programming optimization problem specified by :
@@ -42,37 +42,37 @@ function [xopt,fopt,status,output] = symphony (varargin)
// <latex>
// \begin{eqnarray}
// &\mbox{min}_{x}
- // & f^T*x \\
- // & \text{subject to} & conLB \leq C*x \leq conUB \\
+ // & f^Tâ‹…x \\
+ // & \text{subject to} & conLB \leq Aâ‹…x \leq conUB \\
// & & lb \leq x \leq ub \\
// & & x_i \in \!\, \mathbb{Z}, i \in \!\, I
// \end{eqnarray}
// </latex>
//
- // We are calling SYMPHONY written in C by gateway files for the actual computation.
+ // The routine calls SYMPHONY written in C by gateway files for the actual computation.
//
// Examples
// //A basic case :
// // Objective function
- // objCoef = [350*5,330*3,310*4,280*6,500,450,400,100]';
+ // c = [350*5,330*3,310*4,280*6,500,450,400,100]';
// // Lower Bound of variable
// lb = repmat(0,8,1);
// // Upper Bound of variables
// ub = [repmat(1,4,1);repmat(%inf,4,1)];
// // Constraint Matrix
- // conMatrix = [5,3,4,6,1,1,1,1;
- // 5*0.05,3*0.04,4*0.05,6*0.03,0.08,0.07,0.06,0.03;
- // 5*0.03,3*0.03,4*0.04,6*0.04,0.06,0.07,0.08,0.09;]
- // // Lower Bound of constrains
+ // A = [5,3,4,6,1,1,1,1;
+ // 5*0.05,3*0.04,4*0.05,6*0.03,0.08,0.07,0.06,0.03;
+ // 5*0.03,3*0.03,4*0.04,6*0.04,0.06,0.07,0.08,0.09;]
+ // // Lower Bound of constraints
// conlb = [ 25; 1.25; 1.25]
- // // Upper Bound of constrains
+ // // Upper Bound of constraints
// conub = [ 25; 1.25; 1.25]
// // Row Matrix for telling symphony that the is integer or not
// isInt = [repmat(%t,1,4) repmat(%f,1,4)];
// xopt = [1 1 0 1 7.25 0 0.25 3.5]
// fopt = [8495]
// // Calling Symphony
- // [x,f,status,output] = symphony(8,3,c,isInt,lb,ub,conMatrix,conlb,conub,1)
+ // [x,f,status,output] = symphony(8,3,c,isInt,lb,ub,A,conlb,conub,1)
// // Press ENTER to continue
//
// Examples
@@ -86,7 +86,7 @@ function [xopt,fopt,status,output] = symphony (varargin)
// // st sum{j=1,...,n} r(i,j)x(j) <= b(i) i=1,...,m
// // x(j)=0 or 1
// // The function to be maximize i.e. P(j)
- // p = [ 504 803 667 1103 834 585 811 856 690 832 846 813 868 793 ..
+ // c = [ 504 803 667 1103 834 585 811 856 690 832 846 813 868 793 ..
// 825 1002 860 615 540 797 616 660 707 866 647 746 1006 608 ..
// 877 900 573 788 484 853 942 630 591 630 640 1169 932 1034 ..
// 957 798 669 625 467 1051 552 717 654 388 559 555 1104 783 ..
@@ -94,57 +94,57 @@ function [xopt,fopt,status,output] = symphony (varargin)
// 510 671 575 740 510 675 996 636 826 1022 1140 654 909 799 ..
// 1162 653 814 625 599 476 767 954 906 904 649 873 565 853 1008 632]';
// //Constraint Matrix
- // conMatrix = [
- // //Constraint 1
- // 42 41 523 215 819 551 69 193 582 375 367 478 162 898 ..
- // 550 553 298 577 493 183 260 224 852 394 958 282 402 604 ..
- // 164 308 218 61 273 772 191 117 276 877 415 873 902 465 ..
- // 320 870 244 781 86 622 665 155 680 101 665 227 597 354 ..
- // 597 79 162 998 849 136 112 751 735 884 71 449 266 420 ..
- // 797 945 746 46 44 545 882 72 383 714 987 183 731 301 ..
- // 718 91 109 567 708 507 983 808 766 615 554 282 995 946 651 298;
- // //Constraint 2
- // 509 883 229 569 706 639 114 727 491 481 681 948 687 941 ..
- // 350 253 573 40 124 384 660 951 739 329 146 593 658 816 ..
- // 638 717 779 289 430 851 937 289 159 260 930 248 656 833 ..
- // 892 60 278 741 297 967 86 249 354 614 836 290 893 857 ..
- // 158 869 206 504 799 758 431 580 780 788 583 641 32 653 ..
- // 252 709 129 368 440 314 287 854 460 594 512 239 719 751 ..
- // 708 670 269 832 137 356 960 651 398 893 407 477 552 805 881 850;
- // //Constraint 3
- // 806 361 199 781 596 669 957 358 259 888 319 751 275 177 ..
- // 883 749 229 265 282 694 819 77 190 551 140 442 867 283 ..
- // 137 359 445 58 440 192 485 744 844 969 50 833 57 877 ..
- // 482 732 968 113 486 710 439 747 174 260 877 474 841 422 ..
- // 280 684 330 910 791 322 404 403 519 148 948 414 894 147 ..
- // 73 297 97 651 380 67 582 973 143 732 624 518 847 113 ..
- // 382 97 905 398 859 4 142 110 11 213 398 173 106 331 254 447 ;
- // //Constraint 4
- // 404 197 817 1000 44 307 39 659 46 334 448 599 931 776 ..
- // 263 980 807 378 278 841 700 210 542 636 388 129 203 110 ..
- // 817 502 657 804 662 989 585 645 113 436 610 948 919 115 ..
- // 967 13 445 449 740 592 327 167 368 335 179 909 825 614 ..
- // 987 350 179 415 821 525 774 283 427 275 659 392 73 896 ..
- // 68 982 697 421 246 672 649 731 191 514 983 886 95 846 ..
- // 689 206 417 14 735 267 822 977 302 687 118 990 323 993 525 322;
- // //Constrain 5
- // 475 36 287 577 45 700 803 654 196 844 657 387 518 143 ..
- // 515 335 942 701 332 803 265 922 908 139 995 845 487 100 ..
- // 447 653 649 738 424 475 425 926 795 47 136 801 904 740 ..
- // 768 460 76 660 500 915 897 25 716 557 72 696 653 933 ..
- // 420 582 810 861 758 647 237 631 271 91 75 756 409 440 ..
- // 483 336 765 637 981 980 202 35 594 689 602 76 767 693 ..
- // 893 160 785 311 417 748 375 362 617 553 474 915 457 261 350 635 ;
- // ];
- // nbCon = size(conMatrix,1)
- // nbVar = size(conMatrix,2)
+ // A = [
+ // //Constraint 1
+ // 42 41 523 215 819 551 69 193 582 375 367 478 162 898 ..
+ // 550 553 298 577 493 183 260 224 852 394 958 282 402 604 ..
+ // 164 308 218 61 273 772 191 117 276 877 415 873 902 465 ..
+ // 320 870 244 781 86 622 665 155 680 101 665 227 597 354 ..
+ // 597 79 162 998 849 136 112 751 735 884 71 449 266 420 ..
+ // 797 945 746 46 44 545 882 72 383 714 987 183 731 301 ..
+ // 718 91 109 567 708 507 983 808 766 615 554 282 995 946 651 298;
+ // //Constraint 2
+ // 509 883 229 569 706 639 114 727 491 481 681 948 687 941 ..
+ // 350 253 573 40 124 384 660 951 739 329 146 593 658 816 ..
+ // 638 717 779 289 430 851 937 289 159 260 930 248 656 833 ..
+ // 892 60 278 741 297 967 86 249 354 614 836 290 893 857 ..
+ // 158 869 206 504 799 758 431 580 780 788 583 641 32 653 ..
+ // 252 709 129 368 440 314 287 854 460 594 512 239 719 751 ..
+ // 708 670 269 832 137 356 960 651 398 893 407 477 552 805 881 850;
+ // //Constraint 3
+ // 806 361 199 781 596 669 957 358 259 888 319 751 275 177 ..
+ // 883 749 229 265 282 694 819 77 190 551 140 442 867 283 ..
+ // 137 359 445 58 440 192 485 744 844 969 50 833 57 877 ..
+ // 482 732 968 113 486 710 439 747 174 260 877 474 841 422 ..
+ // 280 684 330 910 791 322 404 403 519 148 948 414 894 147 ..
+ // 73 297 97 651 380 67 582 973 143 732 624 518 847 113 ..
+ // 382 97 905 398 859 4 142 110 11 213 398 173 106 331 254 447 ;
+ // //Constraint 4
+ // 404 197 817 1000 44 307 39 659 46 334 448 599 931 776 ..
+ // 263 980 807 378 278 841 700 210 542 636 388 129 203 110 ..
+ // 817 502 657 804 662 989 585 645 113 436 610 948 919 115 ..
+ // 967 13 445 449 740 592 327 167 368 335 179 909 825 614 ..
+ // 987 350 179 415 821 525 774 283 427 275 659 392 73 896 ..
+ // 68 982 697 421 246 672 649 731 191 514 983 886 95 846 ..
+ // 689 206 417 14 735 267 822 977 302 687 118 990 323 993 525 322;
+ // //Constrain 5
+ // 475 36 287 577 45 700 803 654 196 844 657 387 518 143 ..
+ // 515 335 942 701 332 803 265 922 908 139 995 845 487 100 ..
+ // 447 653 649 738 424 475 425 926 795 47 136 801 904 740 ..
+ // 768 460 76 660 500 915 897 25 716 557 72 696 653 933 ..
+ // 420 582 810 861 758 647 237 631 271 91 75 756 409 440 ..
+ // 483 336 765 637 981 980 202 35 594 689 602 76 767 693 ..
+ // 893 160 785 311 417 748 375 362 617 553 474 915 457 261 350 635 ;
+ // ];
+ // nbCon = size(A,1)
+ // nbVar = size(A,2)
// // Lower Bound of variables
// lb = repmat(0,nbVar,1)
// // Upper Bound of variables
// ub = repmat(1,nbVar,1)
// // Row Matrix for telling symphony that the is integer or not
// isInt = repmat(%t,1,nbVar)
- // // Lower Bound of constrains
+ // // Lower Bound of constraints
// conLB=repmat(0,nbCon,1);
// // Upper Bound of constraints
// conUB=[11927 13727 11551 13056 13460 ]';
@@ -157,7 +157,7 @@ function [xopt,fopt,status,output] = symphony (varargin)
// // Optimal value
// fopt = [ 24381 ]
// // Calling Symphony
- // [x,f,status,output] = symphony(nbVar,nbCon,p,isInt,lb,ub,conMatrix,conLB,conUB,-1,options);
+ // [x,f,status,output] = symphony(nbVar,nbCon,c,isInt,lb,ub,A,conLB,conUB,-1,options);
// Authors
// Keyur Joshi, Saikiran, Iswarya, Harpreet Singh
@@ -170,15 +170,26 @@ function [xopt,fopt,status,output] = symphony (varargin)
error(errmsg)
end
- nbVar = varargin(1);
- nbCon = varargin(2);
- objCoef = varargin(3);
- isInt = varargin(4);
- LB = varargin(5);
- UB = varargin(6);
- conMatrix = varargin(7);
- conLB = varargin(8);
- conUB = varargin(9);
+// Initializing all the variables to empty matrix
+ nbVar = [];
+ nbCon = [];
+ c = [];
+ isInt = [];
+ lb = [];
+ ub = [];
+ A = [];
+ conLB = [];
+ conUB = [];
+
+ nbVar = varargin(1);
+ nbCon = varargin(2);
+ c = varargin(3);
+ isInt = varargin(4);
+ lb = varargin(5);
+ ub = varargin(6);
+ A = varargin(7);
+ conLB = varargin(8);
+ conUB = varargin(9);
if ( rhs<10 ) then
objSense = 1;
@@ -199,12 +210,12 @@ function [xopt,fopt,status,output] = symphony (varargin)
isInt = isInt';
end
- if (size(LB,2)== [nbVar]) then
- LB = LB';
+ if (size(lb,2)== [nbVar]) then
+ lb = lb';
end
- if (size(UB,2)== [nbVar]) then
- UB = UB';
+ if (size(ub,2)== [nbVar]) then
+ ub = ub';
end
if (size(conLB,2)== [nbCon]) then
@@ -216,12 +227,12 @@ function [xopt,fopt,status,output] = symphony (varargin)
end
- if (size(objCoef,2)~=1) then
+ if (size(c,2)~=1) then
errmsg = msprintf(gettext("%s: Objective Coefficients should be a column matrix"), "Symphony");
error(errmsg);
end
- if (size(objCoef,1)~=nbVar) then
+ if (size(c,1)~=nbVar) then
errmsg = msprintf(gettext("%s: Number of variables in Objective Coefficients is not equal to number of variables given"), "Symphony");
error(errmsg);
end
@@ -245,25 +256,25 @@ function [xopt,fopt,status,output] = symphony (varargin)
end
//Check the row of constraint which should equal to the number of constraints
- if ( size(conMatrix,1) ~= nbCon) then
+ if ( size(A,1) ~= nbCon) then
errmsg = msprintf(gettext("%s: The number of rows in constraint should be equal to the number of constraints"), "Symphony");
error(errmsg);
end
//Check the column of constraint which should equal to the number of variables
- if ( size(conMatrix,2) ~= nbVar) then
+ if ( size(A,2) ~= nbVar) then
errmsg = msprintf(gettext("%s: The number of columns in constraint should equal to the number of variables"), "Symphony");
error(errmsg);
end
//Check the size of Lower Bound which should equal to the number of variables
- if ( size(LB,1) ~= nbVar) then
+ if ( size(lb,1) ~= nbVar) then
errmsg = msprintf(gettext("%s: The Lower Bound is not equal to the number of variables"), "Symphony");
error(errmsg);
end
//Check the size of Upper Bound which should equal to the number of variables
- if ( size(UB,1) ~= nbVar) then
+ if ( size(ub,1) ~= nbVar) then
errmsg = msprintf(gettext("%s: The Upper Bound is not equal to the number of variables"), "Symphony");
error(errmsg);
end
@@ -285,12 +296,12 @@ function [xopt,fopt,status,output] = symphony (varargin)
error(errmsg);
end
- if (size(LB,1)~=1)& (size(LB,2)~=1) then
+ if (size(lb,1)~=1)& (size(lb,2)~=1) then
errmsg = msprintf(gettext("%s: Lower Bound should be a vector"), "qpipopt");
error(errmsg);
end
- if (size(UB,1)~=1)& (size(UB,2)~=1) then
+ if (size(ub,1)~=1)& (size(ub,2)~=1) then
errmsg = msprintf(gettext("%s: Upper Bound should be a vector"), "qpipopt");
error(errmsg);
end
@@ -308,11 +319,11 @@ function [xopt,fopt,status,output] = symphony (varargin)
end
- LB = LB';
- UB = UB';
+ lb = lb';
+ ub = ub';
isInt = isInt';
- objCoef = objCoef';
+ c = c';
- [xopt,fopt,status,output] = symphony_call(nbVar,nbCon,objCoef,isInt,LB,UB,conMatrix,conLB,conUB,objSense,options);
+ [xopt,fopt,status,output] = symphony_call(nbVar,nbCon,c,isInt,lb,ub,A,conLB,conUB,objSense,options);
endfunction
diff --git a/macros/symphonymat.bin b/macros/symphonymat.bin
index c6d4fbc..0841d41 100644
--- a/macros/symphonymat.bin
+++ b/macros/symphonymat.bin
Binary files differ
diff --git a/macros/symphonymat.sci b/macros/symphonymat.sci
index 9226bd6..2c0c18d 100644
--- a/macros/symphonymat.sci
+++ b/macros/symphonymat.sci
@@ -13,47 +13,47 @@ function [xopt,fopt,status,iter] = symphonymat (varargin)
// Solves a mixed integer linear programming constrained optimization problem in intlinprog format.
//
// Calling Sequence
- // xopt = symphonymat(C,intcon,A,b)
- // xopt = symphonymat(C,intcon,A,b,Aeq,beq)
- // xopt = symphonymat(C,intcon,A,b,Aeq,beq,lb,ub)
- // xopt = symphonymat(C,intcon,A,b,Aeq,beq,lb,ub,options)
+ // xopt = symphonymat(c,intcon,A,b)
+ // xopt = symphonymat(c,intcon,A,b,Aeq,beq)
+ // xopt = symphonymat(c,intcon,A,b,Aeq,beq,lb,ub)
+ // xopt = symphonymat(c,intcon,A,b,Aeq,beq,lb,ub,options)
// [xopt,fopt,status,output] = symphonymat( ... )
//
// Parameters
- // f : a vector of double, contains coefficients of the variables in the objective
+ // c : a vector of double, contains coefficients of the variables in the objective
// intcon : Vector of integer constraints, specified as a vector of positive integers. The values in intcon indicate the components of the decision variable x that are integer-valued. intcon has values from 1 through number of variable.
- // A : Linear inequality constraint matrix, specified as a matrix of double. A represents the linear coefficients in the constraints A*x ≤ b. A has size M-by-N, where M is the number of constraints and N is number of variables
- // b : Linear inequality constraint vector, specified as a vector of double. b represents the constant vector in the constraints A*x ≤ b. b has length M, where A is M-by-N
- // Aeq : Linear equality constraint matrix, specified as a matrix of double. Aeq represents the linear coefficients in the constraints Aeq*x = beq. Aeq has size Meq-by-N, where Meq is the number of constraints and N is number of variables
- // beq : Linear equality constraint vector, specified as a vector of double. beq represents the constant vector in the constraints Aeq*x = beq. beq has length Meq, where Aeq is Meq-by-N.
+ // A : Linear inequality constraint matrix, specified as a matrix of double. A represents the linear coefficients in the constraints A*x ≤ b. A has the size where columns equals to the number of variables.
+ // b : Linear inequality constraint vector, specified as a vector of double. b represents the constant vector in the constraints A*x ≤ b. b has size equals to the number of rows in A.
+ // Aeq : Linear equality constraint matrix, specified as a matrix of double. Aeq represents the linear coefficients in the constraints Aeq*x = beq. Aeq has the size where columns equals to the number of variables.
+ // beq : Linear equality constraint vector, specified as a vector of double. beq represents the constant vector in the constraints Aeq*x = beq. beq has size equals to the number of rows in Aeq.
// lb : Lower bounds, specified as a vector or array of double. lb represents the lower bounds elementwise in lb ≤ x ≤ ub.
// ub : Upper bounds, specified as a vector or array of double. ub represents the upper bounds elementwise in lb ≤ x ≤ ub.
// options : a list containing the the parameters to be set.
- // xopt : a vector of double, the computed solution of the optimization problem
+ // xopt : a vector of double, the computed solution of the optimization problem.
// fopt : a double, the function value at x
- // status : status flag from symphony.
- // output : The output data structure contains detailed informations about the optimization process. Right now it contains number of iteration.
+ // status : status flag from symphony. 227 is optimal, 228 is Time limit exceeded, 230 is iteration limit exceeded.
+ // output : The output data structure contains detailed information about the optimization process. This version only contains number of iterations.
//
// Description
// Search the minimum or maximum of a constrained mixed integer linear programming optimization problem specified by :
- // find the minimum or maximum of f(x) such that
+ // find the minimum or maximum of C'â‹…x such that
//
// <latex>
// \begin{eqnarray}
// &\mbox{min}_{x}
- // & C^T*x \\
- // & \text{subject to} & A*x \leq b \\
- // & & Aeq*x = beq \\
+ // & C^Tâ‹…x \\
+ // & \text{subject to} & Aâ‹…x \leq b \\
+ // & & Aeqâ‹…x = beq \\
// & & lb \leq x \leq ub \\
// & & x_i \in \!\, \mathbb{Z}, i \in \!\, I
// \end{eqnarray}
// </latex>
//
- // We are calling SYMPHONY written in C by gateway files for the actual computation.
+ // The routine calls SYMPHONY written in C by gateway files for the actual computation.
//
// Examples
// // Objective function
- // C = [350*5,330*3,310*4,280*6,500,450,400,100]';
+ // c = [350*5,330*3,310*4,280*6,500,450,400,100]';
// // Lower Bound of variable
// lb = repmat(0,1,8);
// // Upper Bound of variables
@@ -79,7 +79,7 @@ function [xopt,fopt,status,iter] = symphonymat (varargin)
// // st sum{j=1,...,n} r(i,j)x(j) <= b(i) i=1,...,m
// // x(j)=0 or 1
// // The function to be maximize i.e. P(j)
- // C = -1*[ 504 803 667 1103 834 585 811 856 690 832 846 813 868 793 ..
+ // c = -1*[ 504 803 667 1103 834 585 811 856 690 832 846 813 868 793 ..
// 825 1002 860 615 540 797 616 660 707 866 647 746 1006 608 ..
// 877 900 573 788 484 853 942 630 591 630 640 1169 932 1034 ..
// 957 798 669 625 467 1051 552 717 654 388 559 555 1104 783 ..
@@ -88,47 +88,47 @@ function [xopt,fopt,status,iter] = symphonymat (varargin)
// 1162 653 814 625 599 476 767 954 906 904 649 873 565 853 1008 632]';
// //Constraint Matrix
// A = [ //Constraint 1
- // 42 41 523 215 819 551 69 193 582 375 367 478 162 898 ..
- // 550 553 298 577 493 183 260 224 852 394 958 282 402 604 ..
- // 164 308 218 61 273 772 191 117 276 877 415 873 902 465 ..
- // 320 870 244 781 86 622 665 155 680 101 665 227 597 354 ..
- // 597 79 162 998 849 136 112 751 735 884 71 449 266 420 ..
- // 797 945 746 46 44 545 882 72 383 714 987 183 731 301 ..
- // 718 91 109 567 708 507 983 808 766 615 554 282 995 946 651 298;
- // //Constraint 2
- // 509 883 229 569 706 639 114 727 491 481 681 948 687 941 ..
- // 350 253 573 40 124 384 660 951 739 329 146 593 658 816 ..
- // 638 717 779 289 430 851 937 289 159 260 930 248 656 833 ..
- // 892 60 278 741 297 967 86 249 354 614 836 290 893 857 ..
- // 158 869 206 504 799 758 431 580 780 788 583 641 32 653 ..
- // 252 709 129 368 440 314 287 854 460 594 512 239 719 751 ..
- // 708 670 269 832 137 356 960 651 398 893 407 477 552 805 881 850;
- // //Constraint 3
- // 806 361 199 781 596 669 957 358 259 888 319 751 275 177 ..
- // 883 749 229 265 282 694 819 77 190 551 140 442 867 283 ..
- // 137 359 445 58 440 192 485 744 844 969 50 833 57 877 ..
- // 482 732 968 113 486 710 439 747 174 260 877 474 841 422 ..
- // 280 684 330 910 791 322 404 403 519 148 948 414 894 147 ..
- // 73 297 97 651 380 67 582 973 143 732 624 518 847 113 ..
- // 382 97 905 398 859 4 142 110 11 213 398 173 106 331 254 447 ;
- // //Constraint 4
- // 404 197 817 1000 44 307 39 659 46 334 448 599 931 776 ..
- // 263 980 807 378 278 841 700 210 542 636 388 129 203 110 ..
- // 817 502 657 804 662 989 585 645 113 436 610 948 919 115 ..
- // 967 13 445 449 740 592 327 167 368 335 179 909 825 614 ..
- // 987 350 179 415 821 525 774 283 427 275 659 392 73 896 ..
- // 68 982 697 421 246 672 649 731 191 514 983 886 95 846 ..
- // 689 206 417 14 735 267 822 977 302 687 118 990 323 993 525 322;
- // //Constrain 5
- // 475 36 287 577 45 700 803 654 196 844 657 387 518 143 ..
- // 515 335 942 701 332 803 265 922 908 139 995 845 487 100 ..
- // 447 653 649 738 424 475 425 926 795 47 136 801 904 740 ..
- // 768 460 76 660 500 915 897 25 716 557 72 696 653 933 ..
- // 420 582 810 861 758 647 237 631 271 91 75 756 409 440 ..
- // 483 336 765 637 981 980 202 35 594 689 602 76 767 693 ..
- // 893 160 785 311 417 748 375 362 617 553 474 915 457 261 350 635 ;
+ // 42 41 523 215 819 551 69 193 582 375 367 478 162 898 ..
+ // 550 553 298 577 493 183 260 224 852 394 958 282 402 604 ..
+ // 164 308 218 61 273 772 191 117 276 877 415 873 902 465 ..
+ // 320 870 244 781 86 622 665 155 680 101 665 227 597 354 ..
+ // 597 79 162 998 849 136 112 751 735 884 71 449 266 420 ..
+ // 797 945 746 46 44 545 882 72 383 714 987 183 731 301 ..
+ // 718 91 109 567 708 507 983 808 766 615 554 282 995 946 651 298;
+ // //Constraint 2
+ // 509 883 229 569 706 639 114 727 491 481 681 948 687 941 ..
+ // 350 253 573 40 124 384 660 951 739 329 146 593 658 816 ..
+ // 638 717 779 289 430 851 937 289 159 260 930 248 656 833 ..
+ // 892 60 278 741 297 967 86 249 354 614 836 290 893 857 ..
+ // 158 869 206 504 799 758 431 580 780 788 583 641 32 653 ..
+ // 252 709 129 368 440 314 287 854 460 594 512 239 719 751 ..
+ // 708 670 269 832 137 356 960 651 398 893 407 477 552 805 881 850;
+ // //Constraint 3
+ // 806 361 199 781 596 669 957 358 259 888 319 751 275 177 ..
+ // 883 749 229 265 282 694 819 77 190 551 140 442 867 283 ..
+ // 137 359 445 58 440 192 485 744 844 969 50 833 57 877 ..
+ // 482 732 968 113 486 710 439 747 174 260 877 474 841 422 ..
+ // 280 684 330 910 791 322 404 403 519 148 948 414 894 147 ..
+ // 73 297 97 651 380 67 582 973 143 732 624 518 847 113 ..
+ // 382 97 905 398 859 4 142 110 11 213 398 173 106 331 254 447 ;
+ // //Constraint 4
+ // 404 197 817 1000 44 307 39 659 46 334 448 599 931 776 ..
+ // 263 980 807 378 278 841 700 210 542 636 388 129 203 110 ..
+ // 817 502 657 804 662 989 585 645 113 436 610 948 919 115 ..
+ // 967 13 445 449 740 592 327 167 368 335 179 909 825 614 ..
+ // 987 350 179 415 821 525 774 283 427 275 659 392 73 896 ..
+ // 68 982 697 421 246 672 649 731 191 514 983 886 95 846 ..
+ // 689 206 417 14 735 267 822 977 302 687 118 990 323 993 525 322;
+ // //Constrain 5
+ // 475 36 287 577 45 700 803 654 196 844 657 387 518 143 ..
+ // 515 335 942 701 332 803 265 922 908 139 995 845 487 100 ..
+ // 447 653 649 738 424 475 425 926 795 47 136 801 904 740 ..
+ // 768 460 76 660 500 915 897 25 716 557 72 696 653 933 ..
+ // 420 582 810 861 758 647 237 631 271 91 75 756 409 440 ..
+ // 483 336 765 637 981 980 202 35 594 689 602 76 767 693 ..
+ // 893 160 785 311 417 748 375 362 617 553 474 915 457 261 350 635 ;
// ];
- // nbVar = size(objCoef,1)
+ // nbVar = size(c,1)
// b=[11927 13727 11551 13056 13460 ];
// // Lower Bound of variables
// lb = repmat(0,1,nbVar)
@@ -148,7 +148,7 @@ function [xopt,fopt,status,iter] = symphonymat (varargin)
// // Optimal value
// fopt = [ 24381 ]
// // Calling Symphony
- // [x,f,status,output] = symphonymat(C,intcon,A,b,[],[],lb,ub,options);
+ // [x,f,status,output] = symphonymat(c,intcon,A,b,[],[],lb,ub,options);
// Authors
// Keyur Joshi, Saikiran, Iswarya, Harpreet Singh
@@ -157,24 +157,33 @@ function [xopt,fopt,status,iter] = symphonymat (varargin)
[lhs , rhs] = argn();
//To check the number of argument given by user
- if ( rhs < 4 | rhs == 5 | rhs == 7 | rhs > 9 ) then
- errmsg = msprintf(gettext("%s: Unexpected number of input arguments : %d provided while should be in the set [4 6 8 9]"), "Symphony", rhs);
- error(errmsg)
- end
-
+ if ( rhs < 4 | rhs == 5 | rhs == 7 | rhs > 9 ) then
+ errmsg = msprintf(gettext("%s: Unexpected number of input arguments : %d provided while should be in the set [4 6 8 9]"), "Symphony", rhs);
+ error(errmsg);
+ end
- objCoef = varargin(1)
- intcon = varargin(2)
- A = varargin(3)
- b = varargin(4)
+ c = [];
+ intcon = [];
+ A = [];
+ b = [];
+ Aeq = [];
+ beq = [];
+ lb = [];
+ ub = [];
+
+
+ c = varargin(1)
+ intcon = varargin(2)
+ A = varargin(3)
+ b = varargin(4)
- if (size(objCoef,2)~=1) then
+ if (size(c,2)~=1) then
errmsg = msprintf(gettext("%s: Objective Coefficients should be a column matrix"), "Symphonymat");
error(errmsg);
end
- nbVar = size(objCoef,1);
+ nbVar = size(c,1);
if ( rhs<5 ) then
Aeq = []
@@ -218,25 +227,25 @@ function [xopt,fopt,status,iter] = symphonymat (varargin)
// Check if the user gives row vector
// and Changing it to a column matrix
- if (size(lb,2)== [nbVar]) then
- lb = lb';
- end
+ if (size(lb,2)== [nbVar]) then
+ lb = lb';
+ end
- if (size(ub,2)== [nbVar]) then
- ub = ub';
- end
+ if (size(ub,2)== [nbVar]) then
+ ub = ub';
+ end
- if (size(b,2)== [nbConInEq]) then
- b = b';
- end
+ if (size(b,2)== [nbConInEq]) then
+ b = b';
+ end
- if (size(beq,2)== [nbConEq]) then
- beq = beq';
- end
+ if (size(beq,2)== [nbConEq]) then
+ beq = beq';
+ end
for i=1:size(intcon,2)
if(intcon(i)>nbVar) then
- errmsg = msprintf(gettext("%s: The values inside intcon should not exceed total number of variable "), "Symphonymat");
+ errmsg = msprintf(gettext("%s: The values inside intcon should be less than the number of variables"), "Symphonymat");
error(errmsg);
end
@@ -246,35 +255,35 @@ function [xopt,fopt,status,iter] = symphonymat (varargin)
end
if(modulo(intcon(i),1)) then
- errmsg = msprintf(gettext("%s: The values inside intcon should be integer "), "Symphonymat");
+ errmsg = msprintf(gettext("%s: The values inside intcon should be an integer "), "Symphonymat");
error(errmsg);
end
end
//Check the size of inequality constraint which should equal to the number of inequality constraints
- if ( size(A,2) ~= nbVar & size(A,2) ~= 0) then
- errmsg = msprintf(gettext("%s: The size of inequality constraint is not equal to the number of variables"), "Symphonymat");
- error(errmsg);
- end
+ if ( size(A,2) ~= nbVar & size(A,2) ~= 0) then
+ errmsg = msprintf(gettext("%s: The size of inequality constraint is not equal to the number of variables"), "Symphonymat");
+ error(errmsg);
+ end
//Check the size of lower bound of inequality constraint which should equal to the number of constraints
- if ( size(b,1) ~= size(A,1)) then
- errmsg = msprintf(gettext("%s: The Lower Bound of inequality constraint is not equal to the number of constraint"), "Symphonymat");
- error(errmsg);
- end
+ if ( size(b,1) ~= size(A,1)) then
+ errmsg = msprintf(gettext("%s: The Lower Bound of inequality constraint is not equal to the number of constraint"), "Symphonymat");
+ error(errmsg);
+ end
//Check the size of equality constraint which should equal to the number of inequality constraints
- if ( size(Aeq,2) ~= nbVar & size(Aeq,2) ~= 0) then
- errmsg = msprintf(gettext("%s: The size of equality constraint is not equal to the number of variables"), "Symphonymat");
- error(errmsg);
- end
+ if ( size(Aeq,2) ~= nbVar & size(Aeq,2) ~= 0) then
+ errmsg = msprintf(gettext("%s: The size of equality constraint is not equal to the number of variables"), "Symphonymat");
+ error(errmsg);
+ end
//Check the size of upper bound of equality constraint which should equal to the number of constraints
- if ( size(beq,1) ~= size(Aeq,1)) then
- errmsg = msprintf(gettext("%s: The equality constraint upper bound is not equal to the number of equality constraint"), "Symphonymat");
- error(errmsg);
- end
+ if ( size(beq,1) ~= size(Aeq,1)) then
+ errmsg = msprintf(gettext("%s: The equality constraint upper bound is not equal to the number of equality constraint"), "Symphonymat");
+ error(errmsg);
+ end
//Check the size of Lower Bound which should equal to the number of variables
if ( size(lb,1) ~= nbVar) then
@@ -349,9 +358,9 @@ function [xopt,fopt,status,iter] = symphonymat (varargin)
//Changing into row vector
lb = lb';
ub = ub';
- objCoef = objCoef';
+ c = c';
- [xopt,fopt,status,iter] = symphony_call(nbVar,nbCon,objCoef,isInt,lb,ub,conMatrix,conLB,conUB,objSense,options);
+ [xopt,fopt,status,iter] = symphony_call(nbVar,nbCon,c,isInt,lb,ub,conMatrix,conLB,conUB,objSense,options);
endfunction
diff --git a/tests/general_tests/lsqlin/lsqlin_A1.sce b/tests/general_tests/lsqlin/lsqlin_A1.sce
new file mode 100644
index 0000000..ba9b5be
--- /dev/null
+++ b/tests/general_tests/lsqlin/lsqlin_A1.sce
@@ -0,0 +1,25 @@
+// Check for elements in A
+C = [0.9501 0.7620 0.6153 0.4057
+ 0.2311 0.4564 0.7919 0.9354
+ 0.6068 0.0185 0.9218 0.9169
+ 0.4859 0.8214 0.7382 0.4102
+ 0.8912 0.4447 0.1762 0.8936];
+d = [0.0578
+ 0.3528
+ 0.8131
+ 0.0098
+ 0.1388];
+A = [0.2027 0.2721 0.7467 0.4659 0
+ 0.1987 0.1988 0.4450 0.4186 0
+ 0.6037 0.0152 0.9318 0.8462 0];
+b = [0.5251
+ 0.2026
+ 0.6721];
+
+//Error
+//lsqlin: The number of columns in A must be the same as the number of elements of d
+//at line 213 of function lsqlin called by :
+//[xopt,resnorm,residual,exitflag,output,lambda] = lsqlin(C,d,A,b)
+
+[xopt,resnorm,residual,exitflag,output,lambda] = lsqlin(C,d,A,b)
+
diff --git a/tests/general_tests/lsqlin/lsqlin_Aeq1.sce b/tests/general_tests/lsqlin/lsqlin_Aeq1.sce
new file mode 100644
index 0000000..458cbb0
--- /dev/null
+++ b/tests/general_tests/lsqlin/lsqlin_Aeq1.sce
@@ -0,0 +1,25 @@
+// Check for elements in Aeq
+C = [0.9501 0.7620 0.6153 0.4057
+ 0.2311 0.4564 0.7919 0.9354
+ 0.6068 0.0185 0.9218 0.9169
+ 0.4859 0.8214 0.7382 0.4102
+ 0.8912 0.4447 0.1762 0.8936];
+d = [0.0578
+ 0.3528
+ 0.8131
+ 0.0098
+ 0.1388];
+Aeq = [0.2027 0.2721 0.7467 0.4659 0
+ 0.1987 0.1988 0.4450 0.4186 0
+ 0.6037 0.0152 0.9318 0.8462 0];
+beq = [0.5251
+ 0.2026
+ 0.6721];
+
+//Error
+//lsqlin: The number of columns in Aeq must be the same as the number of elements of d
+//at line 219 of function lsqlin called by :
+//[xopt,resnorm,residual,exitflag,output,lambda] = lsqlin(C,d,[],[],Aeq,beq)
+
+[xopt,resnorm,residual,exitflag,output,lambda] = lsqlin(C,d,[],[],Aeq,beq)
+
diff --git a/tests/general_tests/lsqlin/lsqlin_C1.sce b/tests/general_tests/lsqlin/lsqlin_C1.sce
new file mode 100644
index 0000000..55fe976
--- /dev/null
+++ b/tests/general_tests/lsqlin/lsqlin_C1.sce
@@ -0,0 +1,26 @@
+// Check for elements in C and d
+C = [0.9501 0.7620 0.6153 0.4057
+ 0.2311 0.4564 0.7919 0.9354
+ 0.6068 0.0185 0.9218 0.9169
+ 0.4859 0.8214 0.7382 0.4102
+ 0.8912 0.4447 0.1762 0.8936];
+d = [0.0578
+ 0.3528
+ 0.8131
+ 0.0098
+ 0.1388
+ 0.2536];
+A = [0.2027 0.2721 0.7467 0.4659
+ 0.1987 0.1988 0.4450 0.4186
+ 0.6037 0.0152 0.9318 0.8462];
+b = [0.5251
+ 0.2026
+ 0.6721];
+
+//Error
+//lsqlin: The number of rows in C must be equal the number of elements of d
+//at line 207 of function lsqlin called by :
+//[xopt,resnorm,residual,exitflag,output,lambda] = lsqlin(C,d,A,b)
+
+[xopt,resnorm,residual,exitflag,output,lambda] = lsqlin(C,d,A,b)
+
diff --git a/tests/general_tests/lsqlin/lsqlin_b1.sce b/tests/general_tests/lsqlin/lsqlin_b1.sce
new file mode 100644
index 0000000..49b6dec
--- /dev/null
+++ b/tests/general_tests/lsqlin/lsqlin_b1.sce
@@ -0,0 +1,23 @@
+// Check for elements in b
+C = [0.9501 0.7620 0.6153 0.4057
+ 0.2311 0.4564 0.7919 0.9354
+ 0.6068 0.0185 0.9218 0.9169
+ 0.4859 0.8214 0.7382 0.4102
+ 0.8912 0.4447 0.1762 0.8936];
+d = [0.0578
+ 0.3528
+ 0.8131
+ 0.0098
+ 0.1388];
+A = [0.2027 0.2721 0.7467 0.4659
+ 0.1987 0.1988 0.4450 0.4186
+ 0.6037 0.0152 0.9318 0.8462];
+b = [-%inf -%inf -%inf];
+
+//Error
+//lsqlin: Value of b can not be negative infinity
+//at line 286 of function lsqlin called by :
+//[xopt,resnorm,residual,exitflag,output,lambda] = lsqlin(C,d,A,b)
+
+[xopt,resnorm,residual,exitflag,output,lambda] = lsqlin(C,d,A,b)
+
diff --git a/tests/general_tests/lsqlin/lsqlin_beq1.sce b/tests/general_tests/lsqlin/lsqlin_beq1.sce
new file mode 100644
index 0000000..b71486e
--- /dev/null
+++ b/tests/general_tests/lsqlin/lsqlin_beq1.sce
@@ -0,0 +1,23 @@
+// Check for elements in beq
+C = [0.9501 0.7620 0.6153 0.4057
+ 0.2311 0.4564 0.7919 0.9354
+ 0.6068 0.0185 0.9218 0.9169
+ 0.4859 0.8214 0.7382 0.4102
+ 0.8912 0.4447 0.1762 0.8936];
+d = [0.0578
+ 0.3528
+ 0.8131
+ 0.0098
+ 0.1388];
+Aeq = [0.2027 0.2721 0.7467 0.4659
+ 0.1987 0.1988 0.4450 0.4186
+ 0.6037 0.0152 0.9318 0.8462];
+beq = [-%inf -%inf -%inf];
+
+//Error
+//lsqlin: Value of beq can not be negative infinity
+//at line 293 of function lsqlin called by :
+//[xopt,resnorm,residual,exitflag,output,lambda] = lsqlin(C,d,[],[],Aeq,beq)
+
+[xopt,resnorm,residual,exitflag,output,lambda] = lsqlin(C,d,[],[],Aeq,beq)
+
diff --git a/tests/general_tests/lsqlin/lsqlin_infeasible1.sce b/tests/general_tests/lsqlin/lsqlin_infeasible1.sce
new file mode 100644
index 0000000..a66dd0f
--- /dev/null
+++ b/tests/general_tests/lsqlin/lsqlin_infeasible1.sce
@@ -0,0 +1,43 @@
+// Check for the infeasible problem
+C = [0.9501 0.7620 0.6153 0.4057
+ 0.2311 0.4564 0.7919 0.9354
+ 0.6068 0.0185 0.9218 0.9169
+ 0.4859 0.8214 0.7382 0.4102
+ 0.8912 0.4447 0.1762 0.8936];
+d = [0.0578
+ 0.3528
+ 0.8131
+ 0.0098
+ 0.1388];
+Aeq = [-1 0 0 0; 0 -1 0 0; 1 1 0 0 ];
+beq = [-6 -6 11];
+
+//Converged to a point of local infeasibility.
+// lambda =
+//
+// lower: [0x0 constant]
+// upper: [0x0 constant]
+// eqlin: [0x0 constant]
+// ineqlin: [0x0 constant]
+// output =
+//
+// Iterations: 0
+// exitflag =
+//
+// 5
+// residual =
+//
+// 0.0578
+// 0.3528
+// 0.8131
+// 0.0098
+// 0.1388
+// resnorm =
+//
+// 0.8083018
+// xopt =
+//
+// []
+
+[xopt,resnorm,residual,exitflag,output,lambda] = lsqlin(C,d,[],[],Aeq,beq)
+
diff --git a/tests/general_tests/lsqlin/lsqlin_input1.sce b/tests/general_tests/lsqlin/lsqlin_input1.sce
new file mode 100644
index 0000000..7521f61
--- /dev/null
+++ b/tests/general_tests/lsqlin/lsqlin_input1.sce
@@ -0,0 +1,25 @@
+// Check for the input arguments
+C = [0.9501 0.7620 0.6153 0.4057
+ 0.2311 0.4564 0.7919 0.9354
+ 0.6068 0.0185 0.9218 0.9169
+ 0.4859 0.8214 0.7382 0.4102
+ 0.8912 0.4447 0.1762 0.8936];
+d = [0.0578
+ 0.3528
+ 0.8131
+ 0.0098
+ 0.1388];
+A = [0.2027 0.2721 0.7467 0.4659
+ 0.1987 0.1988 0.4450 0.4186
+ 0.6037 0.0152 0.9318 0.8462];
+b = [0.5251
+ 0.2026
+ 0.6721];
+
+//Error
+//lsqlin: Unexpected number of input arguments : 2 provided while should be in the set of [4 6 8 9 10]
+//at line 99 of function lsqlin called by :
+//[xopt,resnorm,residual,exitflag,output,lambda] = lsqlin(C,d)
+
+[xopt,resnorm,residual,exitflag,output,lambda] = lsqlin(C,d)
+
diff --git a/tests/general_tests/lsqlin/lsqlin_input2.sce b/tests/general_tests/lsqlin/lsqlin_input2.sce
new file mode 100644
index 0000000..9826583
--- /dev/null
+++ b/tests/general_tests/lsqlin/lsqlin_input2.sce
@@ -0,0 +1,25 @@
+// Check for the input arguments
+C = [0.9501 0.7620 0.6153 0.4057
+ 0.2311 0.4564 0.7919 0.9354
+ 0.6068 0.0185 0.9218 0.9169
+ 0.4859 0.8214 0.7382 0.4102
+ 0.8912 0.4447 0.1762 0.8936];
+d = [0.0578
+ 0.3528
+ 0.8131
+ 0.0098
+ 0.1388];
+A = [0.2027 0.2721 0.7467 0.4659
+ 0.1987 0.1988 0.4450 0.4186
+ 0.6037 0.0152 0.9318 0.8462];
+b = [0.5251
+ 0.2026
+ 0.6721];
+
+//Error
+//lsqlin: Unexpected number of input arguments : 14 provided while should be in the set of [4 6 8 9 10]
+//at line 99 of function lsqlin called by :
+//[xopt,resnorm,residual,exitflag,output,lambda] = lsqlin(C,d,A,b,[],[],[],[],[],[],[],[],[],[])
+
+[xopt,resnorm,residual,exitflag,output,lambda] = lsqlin(C,d,A,b,[],[],[],[],[],[],[],[],[],[])
+
diff --git a/tests/general_tests/lsqlin/lsqlin_logical1.sce b/tests/general_tests/lsqlin/lsqlin_logical1.sce
new file mode 100644
index 0000000..bc0dc06
--- /dev/null
+++ b/tests/general_tests/lsqlin/lsqlin_logical1.sce
@@ -0,0 +1,52 @@
+// Check for elements in A
+C = [0.9501 0.7620 0.6153 0.4057
+ 0.2311 0.4564 0.7919 0.9354
+ 0.6068 0.0185 0.9218 0.9169
+ 0.4859 0.8214 0.7382 0.4102
+ 0.8912 0.4447 0.1762 0.8936];
+d = [0.0578
+ 0.3528
+ 0.8131
+ 0.0098
+ 0.1388];
+A = [0.2027 0.2721 0.7467 0.4659
+ 0.1987 0.1988 0.4450 0.4186
+ 0.6037 0.0152 0.9318 0.8462];
+b = [0.5251
+ 0.2026
+ 0.6721];
+
+// Output
+//Optimal Solution Found.
+// lambda =
+//
+// lower: [0,0,0,0]
+// upper: [0,0,0,0]
+// eqlin: [0x0 constant]
+// ineqlin: [8.697D-11,0.0925859,0.1118582]
+// output =
+//
+// Iterations: 7
+// exitflag =
+//
+// 0
+// residual =
+//
+// 0.0126031
+// 0.0208054
+// 0.1295085
+// 0.0057397
+// - 0.0137246
+// resnorm =
+//
+// 0.0175855
+// xopt =
+//
+// 0.1298639
+// - 0.5756958
+// 0.4251033
+// 0.2438436
+
+[xopt,resnorm,residual,exitflag,output,lambda] = lsqlin(C,d,A,b)
+
+
diff --git a/tests/general_tests/lsqlin/lsqlin_param1.sce b/tests/general_tests/lsqlin/lsqlin_param1.sce
new file mode 100644
index 0000000..a9d24bc
--- /dev/null
+++ b/tests/general_tests/lsqlin/lsqlin_param1.sce
@@ -0,0 +1,26 @@
+// Check for the param to be a list
+C = [0.9501 0.7620 0.6153 0.4057
+ 0.2311 0.4564 0.7919 0.9354
+ 0.6068 0.0185 0.9218 0.9169
+ 0.4859 0.8214 0.7382 0.4102
+ 0.8912 0.4447 0.1762 0.8936];
+d = [0.0578
+ 0.3528
+ 0.8131
+ 0.0098
+ 0.1388];
+A = [0.2027 0.2721 0.7467 0.4659
+ 0.1987 0.1988 0.4450 0.4186
+ 0.6037 0.0152 0.9318 0.8462];
+b = [0.5251
+ 0.2026
+ 0.6721];
+param = 0;
+
+//Error
+//lsqlin: param should be a list
+//at line 147 of function lsqlin called by :
+//[xopt,resnorm,residual,exitflag,output,lambda] = lsqlin(C,d,A,b,[],[],[],[],[],0)
+
+[xopt,resnorm,residual,exitflag,output,lambda] = lsqlin(C,d,A,b,[],[],[],[],[],param)
+
diff --git a/tests/general_tests/lsqlin/lsqlin_param2.sce b/tests/general_tests/lsqlin/lsqlin_param2.sce
new file mode 100644
index 0000000..bb7cffa
--- /dev/null
+++ b/tests/general_tests/lsqlin/lsqlin_param2.sce
@@ -0,0 +1,26 @@
+// Check for the param to be even in number
+C = [0.9501 0.7620 0.6153 0.4057
+ 0.2311 0.4564 0.7919 0.9354
+ 0.6068 0.0185 0.9218 0.9169
+ 0.4859 0.8214 0.7382 0.4102
+ 0.8912 0.4447 0.1762 0.8936];
+d = [0.0578
+ 0.3528
+ 0.8131
+ 0.0098
+ 0.1388];
+A = [0.2027 0.2721 0.7467 0.4659
+ 0.1987 0.1988 0.4450 0.4186
+ 0.6037 0.0152 0.9318 0.8462];
+b = [0.5251
+ 0.2026
+ 0.6721];
+param = list("MaxIter");
+
+//Error
+//lsqlin: Size of parameters should be even
+//at line 153 of function lsqlin called by :
+//[xopt,resnorm,residual,exitflag,output,lambda] = lsqlin(C,d,A,b,[],[],[],[],[],param)
+
+[xopt,resnorm,residual,exitflag,output,lambda] = lsqlin(C,d,A,b,[],[],[],[],[],param)
+
diff --git a/tests/general_tests/lsqlin/lsqlin_param3.sce b/tests/general_tests/lsqlin/lsqlin_param3.sce
new file mode 100644
index 0000000..60e960d
--- /dev/null
+++ b/tests/general_tests/lsqlin/lsqlin_param3.sce
@@ -0,0 +1,26 @@
+// Check for the param to be even in number
+C = [0.9501 0.7620 0.6153 0.4057
+ 0.2311 0.4564 0.7919 0.9354
+ 0.6068 0.0185 0.9218 0.9169
+ 0.4859 0.8214 0.7382 0.4102
+ 0.8912 0.4447 0.1762 0.8936];
+d = [0.0578
+ 0.3528
+ 0.8131
+ 0.0098
+ 0.1388];
+A = [0.2027 0.2721 0.7467 0.4659
+ 0.1987 0.1988 0.4450 0.4186
+ 0.6037 0.0152 0.9318 0.8462];
+b = [0.5251
+ 0.2026
+ 0.6721];
+param = list("Iter",300);
+
+//Error
+//lsqlin: Unrecognized parameter name 'Iter'.
+//at line 180 of function lsqlin called by :
+//[xopt,resnorm,residual,exitflag,output,lambda] = lsqlin(C,d,A,b,[],[],[],[],[],param)
+
+[xopt,resnorm,residual,exitflag,output,lambda] = lsqlin(C,d,A,b,[],[],[],[],[],param)
+
diff --git a/tests/general_tests/lsqlin/lsqlin_x01.sce b/tests/general_tests/lsqlin/lsqlin_x01.sce
new file mode 100644
index 0000000..3b0f6f9
--- /dev/null
+++ b/tests/general_tests/lsqlin/lsqlin_x01.sce
@@ -0,0 +1,54 @@
+// Check for elements in A
+C = [0.9501 0.7620 0.6153 0.4057
+ 0.2311 0.4564 0.7919 0.9354
+ 0.6068 0.0185 0.9218 0.9169
+ 0.4859 0.8214 0.7382 0.4102
+ 0.8912 0.4447 0.1762 0.8936];
+d = [0.0578
+ 0.3528
+ 0.8131
+ 0.0098
+ 0.1388];
+A = [0.2027 0.2721 0.7467 0.4659
+ 0.1987 0.1988 0.4450 0.4186
+ 0.6037 0.0152 0.9318 0.8462];
+b = [0.5251
+ 0.2026
+ 0.6721];
+x0 = [0 0 0];
+
+//WARNING: lsqlin: Ignoring initial guess of variables as it is not equal to the number of variables
+
+//Optimal Solution Found.
+// lambda =
+//
+// lower: [0,0,0,0]
+// upper: [0,0,0,0]
+// eqlin: [0x0 constant]
+// ineqlin: [8.697D-11,0.0925859,0.1118582]
+// output =
+//
+// Iterations: 7
+// exitflag =
+//
+// 0
+// residual =
+//
+// 0.0126031
+// 0.0208054
+// 0.1295085
+// 0.0057397
+// - 0.0137246
+// resnorm =
+//
+// 0.0175855
+// xopt =
+//
+// 0.1298639
+// - 0.5756958
+// 0.4251033
+// 0.2438436
+
+[xopt,resnorm,residual,exitflag,output,lambda] = lsqlin(C,d,A,b,[],[],[],[],x0)
+
+
diff --git a/tests/general_tests/lsqnonneg/lsqnonneg_C.sce b/tests/general_tests/lsqnonneg/lsqnonneg_C.sce
new file mode 100644
index 0000000..f792559
--- /dev/null
+++ b/tests/general_tests/lsqnonneg/lsqnonneg_C.sce
@@ -0,0 +1,20 @@
+// Check for the size of C and d
+C = [
+ 0.0372 0.2869
+ 0.6861 0.7071
+ 0.6233 0.6245
+ 0.6344 0.6170];
+d = [
+ 0.8587
+ 0.1781
+ 0.0747
+ 0.8405
+ 0.2356];
+
+// Error
+//lsqlin: The number of rows in C must be equal the number of elements of d
+//at line 106 of function lsqnonneg called by :
+// [xopt,resnorm,residual,exitflag,output,lambda] = lsqnonneg(C,d)
+
+ [xopt,resnorm,residual,exitflag,output,lambda] = lsqnonneg(C,d)
+
diff --git a/tests/general_tests/lsqnonneg/lsqnonneg_input1.sce b/tests/general_tests/lsqnonneg/lsqnonneg_input1.sce
new file mode 100644
index 0000000..eb0aafc
--- /dev/null
+++ b/tests/general_tests/lsqnonneg/lsqnonneg_input1.sce
@@ -0,0 +1,19 @@
+// Check for the input arguments
+C = [
+ 0.0372 0.2869
+ 0.6861 0.7071
+ 0.6233 0.6245
+ 0.6344 0.6170];
+d = [
+ 0.8587
+ 0.1781
+ 0.0747
+ 0.8405];
+
+// Error
+//lsqlin: Unexpected number of input arguments : 1 provided while should be in the set of [2 3]
+//at line 55 of function lsqnonneg called by :
+// [xopt,resnorm,residual,exitflag,output,lambda] = lsqnonneg(C)
+
+ [xopt,resnorm,residual,exitflag,output,lambda] = lsqnonneg(C)
+
diff --git a/tests/general_tests/lsqnonneg/lsqnonneg_input2.sce b/tests/general_tests/lsqnonneg/lsqnonneg_input2.sce
new file mode 100644
index 0000000..2d2e557
--- /dev/null
+++ b/tests/general_tests/lsqnonneg/lsqnonneg_input2.sce
@@ -0,0 +1,22 @@
+// Check for the input arguments
+C = [
+ 0.0372 0.2869
+ 0.6861 0.7071
+ 0.6233 0.6245
+ 0.6344 0.6170];
+d = [
+ 0.8587
+ 0.1781
+ 0.0747
+ 0.8405];
+
+param = list();
+x0 = [0 0];
+
+//Error
+//lsqnonneg: Unexpected number of input arguments : 4 provided while should be in the set of [2 3]
+//at line 55 of function lsqnonneg called by :
+//[xopt,resnorm,residual,exitflag,output,lambda] = lsqnonneg(C,d,param,x0)
+
+[xopt,resnorm,residual,exitflag,output,lambda] = lsqnonneg(C,d,param,x0)
+
diff --git a/tests/general_tests/lsqnonneg/lsqnonneg_logical.sce b/tests/general_tests/lsqnonneg/lsqnonneg_logical.sce
new file mode 100644
index 0000000..15106f0
--- /dev/null
+++ b/tests/general_tests/lsqnonneg/lsqnonneg_logical.sce
@@ -0,0 +1,40 @@
+// An example with C and d as input
+C = [
+ 0.0372 0.2869
+ 0.6861 0.7071
+ 0.6233 0.6245
+ 0.6344 0.6170];
+d = [
+ 0.8587
+ 0.1781
+ 0.0747
+ 0.8405];
+
+//Output
+//Optimal Solution Found.
+// lambda =
+//
+// lower: [0.1506118,1.441D-11]
+// upper: [0,0]
+// output =
+//
+// Iterations: 5
+// exitflag =
+//
+// 0
+// residual =
+//
+// 0.6598971
+// - 0.3118739
+// - 0.3580375
+// 0.4129595
+// resnorm =
+//
+// 0.8314560
+// xopt =
+//
+// 0.
+// 0.6929344
+
+[xopt,resnorm,residual,exitflag,output,lambda] = lsqnonneg(C,d)
+
diff --git a/tests/general_tests/lsqnonneg/lsqnonneg_param1.sce b/tests/general_tests/lsqnonneg/lsqnonneg_param1.sce
new file mode 100644
index 0000000..d91f4b1
--- /dev/null
+++ b/tests/general_tests/lsqnonneg/lsqnonneg_param1.sce
@@ -0,0 +1,21 @@
+// Check for the parameters to be a list
+C = [
+ 0.0372 0.2869
+ 0.6861 0.7071
+ 0.6233 0.6245
+ 0.6344 0.6170];
+d = [
+ 0.8587
+ 0.1781
+ 0.0747
+ 0.8405];
+
+param = 0;
+
+//Error
+//lsqnonneg: param should be a list
+//at line 69 of function lsqnonneg called by :
+//[xopt,resnorm,residual,exitflag,output,lambda] = lsqnonneg(C,d,param)
+
+[xopt,resnorm,residual,exitflag,output,lambda] = lsqnonneg(C,d,param)
+
diff --git a/tests/general_tests/lsqnonneg/lsqnonneg_param2.sce b/tests/general_tests/lsqnonneg/lsqnonneg_param2.sce
new file mode 100644
index 0000000..557a836
--- /dev/null
+++ b/tests/general_tests/lsqnonneg/lsqnonneg_param2.sce
@@ -0,0 +1,21 @@
+// Check for the size of parameters
+C = [
+ 0.0372 0.2869
+ 0.6861 0.7071
+ 0.6233 0.6245
+ 0.6344 0.6170];
+d = [
+ 0.8587
+ 0.1781
+ 0.0747
+ 0.8405];
+
+param = list("MaxIter");
+
+//Error
+//lsqlin: Size of parameters should be even
+//at line 75 of function lsqnonneg called by :
+//[xopt,resnorm,residual,exitflag,output,lambda] = lsqnonneg(C,d,param)
+
+[xopt,resnorm,residual,exitflag,output,lambda] = lsqnonneg(C,d,param)
+
diff --git a/tests/general_tests/qpipopt/qpipopt_conMatrix1.sce b/tests/general_tests/qpipopt/qpipopt_A1.sce
index 96ee3eb..e78326d 100644
--- a/tests/general_tests/qpipopt/qpipopt_conMatrix1.sce
+++ b/tests/general_tests/qpipopt/qpipopt_A1.sce
@@ -1,7 +1,7 @@
//Find x in R^6 such that:
// Check if a user gives unequal number of constraints as given by him
-conMatrix= [1,-1,1,0,3,1;
+A= [1,-1,1,0,3,1;
-1,0,-3,-4,5,6;
2,5,3,0,1,0
0,1,0,1,2,-1;];
@@ -9,15 +9,17 @@ conLB=[1;2;3;-%inf;-%inf];
conUB = [1;2;3;-1;2.5];
lb=[-1000;-10000; 0; -1000; -1000; -1000];
ub=[10000; 100; 1.5; 100; 100; 1000];
-//and minimize 0.5*x'*Q*x + p'*x with
-p=[1; 2; 3; 4; 5; 6]; Q=eye(6,6);
+//and minimize 0.5*x'*H*x + f'*x with
+f=[1; 2; 3; 4; 5; 6]; H=eye(6,6);
nbVar = 6;
nbCon = 5;
x0 = repmat(0,nbVar,1);
param = list("MaxIter", 300, "CpuTime", 100);
-[xopt,fopt,exitflag,output,lambda]=qpipopt(nbVar,nbCon,Q,p,lb,ub,conMatrix,conLB,conUB,x0,param)
//Error
//qpipopt: The number of constraints is not equal to the number of constraint given i.e. 5
//at line 181 of function qpipopt called by :
//[xopt,fopt,exitflag,output,lambda]=qpipopt(nbVar,nbCon,Q,p,lb,ub,conMatrix,conLB,conUB,x0,param)
+
+[xopt,fopt,exitflag,output,lambda]=qpipopt(nbVar,nbCon,H,f,lb,ub,A,conLB,conUB,x0,param)
+
diff --git a/tests/general_tests/qpipopt/qpipopt_conMatrix2.sce b/tests/general_tests/qpipopt/qpipopt_A2.sce
index f5e3106..1392cb1 100644
--- a/tests/general_tests/qpipopt/qpipopt_conMatrix2.sce
+++ b/tests/general_tests/qpipopt/qpipopt_A2.sce
@@ -1,6 +1,6 @@
//Find x in R^6 such that:
//Check for the size of constraints
-conMatrix= [-1,1,0,3,1;
+A= [-1,1,0,3,1;
-1,0,-3,-4,5;
2,5,3,0,1
0,1,0,1,2;
@@ -9,15 +9,17 @@ conLB=[1;2;3;-%inf;-%inf];
conUB = [1;2;3;-1;2.5];
lb=[-1000;-10000; 0; -1000; -1000; -1000];
ub=[10000; 100; 1.5; 100; 100; 1000];
-//and minimize 0.5*x'*Q*x + p'*x with
-p=[1; 2; 3; 4; 5; 6]; Q=eye(6,6);
+//and minimize 0.5*x'*H*x + f'*x with
+f=[1; 2; 3; 4; 5; 6]; H=eye(6,6);
nbVar = 6;
nbCon = 5;
x0 = repmat(0,nbVar,1);
param = list("MaxIter", 300, "CpuTime", 100);
-[xopt,fopt,exitflag,output,lambda]=qpipopt(nbVar,nbCon,Q,p,lb,ub,conMatrix,conLB,conUB,x0,param)
//Error
//qpipopt: The size of constraints is not equal to the number of variables
//at line 175 of function qpipopt called by :
//[xopt,fopt,exitflag,output,lambda]=qpipopt(nbVar,nbCon,Q,p,lb,ub,conMatrix,conLB,conUB,x0,param)
+
+[xopt,fopt,exitflag,output,lambda]=qpipopt(nbVar,nbCon,H,f,lb,ub,A,conLB,conUB,x0,param)
+
diff --git a/tests/general_tests/qpipopt/qpipopt_LB1.sce b/tests/general_tests/qpipopt/qpipopt_LB1.sce
index b2b92ce..f87ada4 100644
--- a/tests/general_tests/qpipopt/qpipopt_LB1.sce
+++ b/tests/general_tests/qpipopt/qpipopt_LB1.sce
@@ -1,6 +1,6 @@
//Find x in R^6 such that:
// Check if the user gives lower bound unequal to the number of variables
-conMatrix= [1,-1,1,0,3,1;
+A= [1,-1,1,0,3,1;
-1,0,-3,-4,5,6;
2,5,3,0,1,0
0,1,0,1,2,-1;
@@ -9,15 +9,17 @@ conLB=[1;2;3;-%inf;-%inf];
conUB = [1;2;3;-1;2.5];
lb=[-1000;-10000; 0; -1000; -1000];
ub=[10000; 100; 1.5; 100; 100; 1000];
-//and minimize 0.5*x'*Q*x + p'*x with
-p=[1; 2; 3; 4; 5; 6]; Q=eye(6,6);
+//and minimize 0.5*x'*H*x + f'*x with
+f=[1; 2; 3; 4; 5; 6]; H=eye(6,6);
nbVar = 6;
nbCon = 5;
x0 = repmat(0,nbVar,1);
param = list("MaxIter", 300, "CpuTime", 100);
-[xopt,fopt,exitflag,output,lambda]=qpipopt(nbVar,nbCon,Q,p,lb,ub,conMatrix,conLB,conUB,x0,param)
//Error
//qpipopt: The Lower Bound is not equal to the number of variables
-//at line 191 of function qpipopt called by :
-//[xopt,fopt,exitflag,output,lambda]=qpipopt(nbVar,nbCon,Q,p,lb,ub,conMatrix,conLB,conUB,x0,param)
+//at line 236 of function qpipopt called by :
+//[xopt,fopt,exitflag,output,lambda]=qpipopt(nbVar,nbCon,H,f,lb,ub,A,conLB,conUB,x0,param)
+
+[xopt,fopt,exitflag,output,lambda]=qpipopt(nbVar,nbCon,H,f,lb,ub,A,conLB,conUB,x0,param)
+
diff --git a/tests/general_tests/qpipopt/qpipopt_LB2.sce b/tests/general_tests/qpipopt/qpipopt_LB2.sce
deleted file mode 100644
index e6df705..0000000
--- a/tests/general_tests/qpipopt/qpipopt_LB2.sce
+++ /dev/null
@@ -1,23 +0,0 @@
-//Find x in R^6 such that:
-// Check if the user gives lower bound as a row vector
-conMatrix= [1,-1,1,0,3,1;
--1,0,-3,-4,5,6;
-2,5,3,0,1,0
-0,1,0,1,2,-1;
--1,0,2,1,1,0];
-conLB=[1;2;3;-%inf;-%inf];
-conUB = [1;2;3;-1;2.5];
-lb=[-1000;-10000; 0; -1000; -1000; -1000]';
-ub=[10000; 100; 1.5; 100; 100; 1000];
-//and minimize 0.5*x'*Q*x + p'*x with
-p=[1; 2; 3; 4; 5; 6]; Q=eye(6,6);
-nbVar = 6;
-nbCon = 5;
-x0 = repmat(0,nbVar,1);
-param = list("MaxIter", 300, "CpuTime", 100);
-[xopt,fopt,exitflag,output,lambda]=qpipopt(nbVar,nbCon,Q,p,lb,ub,conMatrix,conLB,conUB,x0,param)
-
-//Error
-//qpipopt: The Lower Bound should be a column vector
-//at line 188 of function qpipopt called by :
-//[xopt,fopt,exitflag,output,lambda]=qpipopt(nbVar,nbCon,Q,p,lb,ub,conMatrix,conLB,conUB,x0,param)
diff --git a/tests/general_tests/qpipopt/qpipopt_Q1.sce b/tests/general_tests/qpipopt/qpipopt_Q1.sce
index 06cceea..94e4d7d 100644
--- a/tests/general_tests/qpipopt/qpipopt_Q1.sce
+++ b/tests/general_tests/qpipopt/qpipopt_Q1.sce
@@ -1,6 +1,6 @@
//Find x in R^6 such that:
-// Check for the size of Q matrix
-conMatrix= [1,-1,1,0,3,1;
+// Check for the size of H matrix
+A= [1,-1,1,0,3,1;
-1,0,-3,-4,5,6;
2,5,3,0,1,0
0,1,0,1,2,-1;
@@ -9,16 +9,18 @@ conLB=[1;2;3;-%inf;-%inf];
conUB = [1;2;3;-1;2.5];
lb=[-1000;-10000; 0; -1000; -1000; -1000];
ub=[10000; 100; 1.5; 100; 100; 1000];
-//and minimize 0.5*x'*Q*x + p'*x with
-p=[1; 2; 3; 4; 5; 6]; Q=eye(5,5);
+//and minimize 0.5*x'*H*x + f'*x with
+f=[1; 2; 3; 4; 5; 6]; H=eye(5,5);
nbVar = 6;
nbCon = 5;
x0 = repmat(0,nbVar,1);
param = list("MaxIter", 300, "CpuTime", 100);
-[xopt,fopt,exitflag,output,lambda]=qpipopt(nbVar,nbCon,Q,p,lb,ub,conMatrix,conLB,conUB,x0,param)
//error
-//
-//qpipopt: The Size of Q is not equal to the number of variables
-//at line 158 of function qpipopt called by :
-//[xopt,fopt,exitflag,output,lambda]=qpipopt(nbVar,nbCon,Q,p,lb,ub,conMatrix,conLB,conUB,x0,param)
+//qpipopt: The Size of H is not equal to the number of variables
+//at line 210 of function qpipopt called by :
+//[xopt,fopt,exitflag,output,lambda]=qpipopt(nbVar,nbCon,H,f,lb,ub,A,conLB,conUB,x0,param)
+
+[xopt,fopt,exitflag,output,lambda]=qpipopt(nbVar,nbCon,H,f,lb,ub,A,conLB,conUB,x0,param)
+
+
diff --git a/tests/general_tests/qpipopt/qpipopt_Q2.sce b/tests/general_tests/qpipopt/qpipopt_Q2.sce
index ea23ee4..f10b7c5 100644
--- a/tests/general_tests/qpipopt/qpipopt_Q2.sce
+++ b/tests/general_tests/qpipopt/qpipopt_Q2.sce
@@ -1,6 +1,6 @@
//Find x in R^6 such that:
-// Check for the Q to be a symmetric matrix
-conMatrix= [1,-1,1,0,3,1;
+// Check for the H to be a symmetric matrix
+A= [1,-1,1,0,3,1;
-1,0,-3,-4,5,6;
2,5,3,0,1,0
0,1,0,1,2,-1;
@@ -9,15 +9,16 @@ conLB=[1;2;3;-%inf;-%inf];
conUB = [1;2;3;-1;2.5];
lb=[-1000;-10000; 0; -1000; -1000; -1000];
ub=[10000; 100; 1.5; 100; 100; 1000];
-//and minimize 0.5*x'*Q*x + p'*x with
-p=[1; 2; 3; 4; 5; 6]; Q=eye(6,5);
+//and minimize 0.5*x'*H*x + f'*x with
+f=[1; 2; 3; 4; 5; 6]; H=eye(6,5);
nbVar = 6;
nbCon = 5;
x0 = repmat(0,nbVar,1);
param = list("MaxIter", 300, "CpuTime", 100);
-[xopt,fopt,exitflag,output,lambda]=qpipopt(nbVar,nbCon,Q,p,lb,ub,conMatrix,conLB,conUB,x0,param)
//Error
-//qpipopt: Q is not a symmetric matrix
-//at line 152 of function qpipopt called by :
-//[xopt,fopt,exitflag,output,lambda]=qpipopt(nbVar,nbCon,Q,p,lb,ub,conMatrix,conLB,conUB,x0,param)
+//qpipopt: H is not a symmetric matrix
+//at line 204 of function qpipopt called by :
+//[xopt,fopt,exitflag,output,lambda]=qpipopt(nbVar,nbCon,H,f,lb,ub,A,conLB,conUB,x0,param)
+
+[xopt,fopt,exitflag,output,lambda]=qpipopt(nbVar,nbCon,H,f,lb,ub,A,conLB,conUB,x0,param)
diff --git a/tests/general_tests/qpipopt/qpipopt_UB1.sce b/tests/general_tests/qpipopt/qpipopt_UB1.sce
index 155c695..7422085 100644
--- a/tests/general_tests/qpipopt/qpipopt_UB1.sce
+++ b/tests/general_tests/qpipopt/qpipopt_UB1.sce
@@ -1,6 +1,6 @@
//Find x in R^6 such that:
- // Check if the user gives unequal size of Upper Bound as of the number of variables
-conMatrix= [1,-1,1,0,3,1;
+// Check if the user gives unequal size of Upper Bound as of the number of variables
+A= [1,-1,1,0,3,1;
-1,0,-3,-4,5,6;
2,5,3,0,1,0
0,1,0,1,2,-1;
@@ -9,15 +9,17 @@ conLB=[1;2;3;-%inf;-%inf];
conUB = [1;2;3;-1;2.5];
lb=[-1000;-10000; 0; -1000; -1000; -1000];
ub=[10000; 100; 1.5; 100; 100];
-//and minimize 0.5*x'*Q*x + p'*x with
-p=[1; 2; 3; 4; 5; 6]; Q=eye(6,6);
+//and minimize 0.5*x'*H*x + f'*x with
+f=[1; 2; 3; 4; 5; 6]; H=eye(6,6);
nbVar = 6;
nbCon = 5;
x0 = repmat(0,nbVar,1);
param = list("MaxIter", 300, "CpuTime", 100);
-[xopt,fopt,exitflag,output,lambda]=qpipopt(nbVar,nbCon,Q,p,lb,ub,conMatrix,conLB,conUB,x0,param)
//Error
//qpipopt: The Upper Bound is not equal to the number of variables
-//at line 201 of function qpipopt called by :
-//[xopt,fopt,exitflag,output,lambda]=qpipopt(nbVar,nbCon,Q,p,lb,ub,conMatrix,conLB,conUB,x0,param)
+//at line 242 of function qpipopt called by :
+//[xopt,fopt,exitflag,output,lambda]=qpipopt(nbVar,nbCon,H,f,lb,ub,A,conLB,conUB,x0,param)
+
+[xopt,fopt,exitflag,output,lambda]=qpipopt(nbVar,nbCon,H,f,lb,ub,A,conLB,conUB,x0,param)
+
diff --git a/tests/general_tests/qpipopt/qpipopt_UB2.sce b/tests/general_tests/qpipopt/qpipopt_UB2.sce
deleted file mode 100644
index a4f5270..0000000
--- a/tests/general_tests/qpipopt/qpipopt_UB2.sce
+++ /dev/null
@@ -1,23 +0,0 @@
-//Find x in R^6 such that:
-// Check if the user gives Upper Bound matrix as a row vector
-conMatrix= [1,-1,1,0,3,1;
--1,0,-3,-4,5,6;
-2,5,3,0,1,0
-0,1,0,1,2,-1;
--1,0,2,1,1,0];
-conLB=[1;2;3;-%inf;-%inf];
-conUB = [1;2;3;-1;2.5]';
-lb=[-1000;-10000; 0; -1000; -1000; -1000];
-ub=[10000; 100; 1.5; 100; 100; 1000];
-//and minimize 0.5*x'*Q*x + p'*x with
-p=[1; 2; 3; 4; 5; 6]; Q=eye(6,6);
-nbVar = 6;
-nbCon = 5;
-x0 = repmat(0,nbVar,1);
-param = list("MaxIter", 300, "CpuTime", 100);
-[xopt,fopt,exitflag,output,lambda]=qpipopt(nbVar,nbCon,Q,p,lb,ub,conMatrix,conLB,conUB,x0,param)
-
-//Error
-//qpipopt: The Upper Bound should be a column vector
-//at line 224 of function qpipopt called by :
-//[xopt,fopt,exitflag,output,lambda]=qpipopt(nbVar,nbCon,Q,p,lb,ub,conMatrix,conLB,conUB,x0,param)
diff --git a/tests/general_tests/qpipopt/qpipopt_conLB1.sce b/tests/general_tests/qpipopt/qpipopt_conLB1.sce
index 09105e7..f01a32e 100644
--- a/tests/general_tests/qpipopt/qpipopt_conLB1.sce
+++ b/tests/general_tests/qpipopt/qpipopt_conLB1.sce
@@ -1,6 +1,6 @@
//Find x in R^6 such that:
// Checking if a user gives less or number of constraints Lower Bound
-conMatrix= [1,-1,1,0,3,1;
+A= [1,-1,1,0,3,1;
-1,0,-3,-4,5,6;
2,5,3,0,1,0
0,1,0,1,2,-1;
@@ -9,15 +9,18 @@ conLB=[1;2;3;-%inf];
conUB = [1;2;3;-1;2.5];
lb=[-1000;-10000; 0; -1000; -1000; -1000];
ub=[10000; 100; 1.5; 100; 100; 1000];
-//and minimize 0.5*x'*Q*x + p'*x with
-p=[1; 2; 3; 4; 5; 6]; Q=eye(6,6);
+//and minimize 0.5*x'*H*x + f'*x with
+f=[1; 2; 3; 4; 5; 6]; H=eye(6,6);
nbVar = 6;
nbCon = 5;
x0 = repmat(0,nbVar,1);
param = list("MaxIter", 300, "CpuTime", 100);
-[xopt,fopt,exitflag,output,lambda]=qpipopt(nbVar,nbCon,Q,p,lb,ub,conMatrix,conLB,conUB,x0,param)
//Error
//qpipopt: The Lower Bound of constraints is not equal to the number of constraints
-//at line 211 of function qpipopt called by :
-//[xopt,fopt,exitflag,output,lambda]=qpipopt(nbVar,nbCon,Q,p,lb,ub,conMatrix,conLB,conUB,x0,param)
+//at line 248 of function qpipopt called by :
+//[xopt,fopt,exitflag,output,lambda]=qpipopt(nbVar,nbCon,H,f,lb,ub,A,conLB,conUB,x0,param)
+
+[xopt,fopt,exitflag,output,lambda]=qpipopt(nbVar,nbCon,H,f,lb,ub,A,conLB,conUB,x0,param)
+
+
diff --git a/tests/general_tests/qpipopt/qpipopt_conLB2.sce b/tests/general_tests/qpipopt/qpipopt_conLB2.sce
deleted file mode 100644
index d0236c0..0000000
--- a/tests/general_tests/qpipopt/qpipopt_conLB2.sce
+++ /dev/null
@@ -1,23 +0,0 @@
-//Find x in R^6 such that:
-// Checking if a user gives a column vector
-conMatrix= [1,-1,1,0,3,1;
--1,0,-3,-4,5,6;
-2,5,3,0,1,0
-0,1,0,1,2,-1;
--1,0,2,1,1,0];
-conLB=[1;2;3;-%inf;-%inf]';
-conUB = [1;2;3;-1;2.5];
-lb=[-1000;-10000; 0; -1000; -1000; -1000];
-ub=[10000; 100; 1.5; 100; 100; 1000];
-//and minimize 0.5*x'*Q*x + p'*x with
-p=[1; 2; 3; 4; 5; 6]; Q=eye(6,6);
-nbVar = 6;
-nbCon = 5;
-x0 = repmat(0,nbVar,1);
-param = list("MaxIter", 300, "CpuTime", 100);
-[xopt,fopt,exitflag,output,lambda]=qpipopt(nbVar,nbCon,Q,p,lb,ub,conMatrix,conLB,conUB,x0,param)
-
-//Error
-//qpipopt: The Lower Bound should be a column vector
-//at line 208 of function qpipopt called by :
-//[xopt,fopt,exitflag,output,lambda]=qpipopt(nbVar,nbCon,Q,p,lb,ub,conMatrix,conLB,conUB,x0,param)
diff --git a/tests/general_tests/qpipopt/qpipopt_conUB1.sce b/tests/general_tests/qpipopt/qpipopt_conUB1.sce
index 2c4bfa6..ab7bfe6 100644
--- a/tests/general_tests/qpipopt/qpipopt_conUB1.sce
+++ b/tests/general_tests/qpipopt/qpipopt_conUB1.sce
@@ -1,6 +1,6 @@
//Find x in R^6 such that:
// Check for the Upper Bound of constraints is which should be equal to the number of constraints
-conMatrix= [1,-1,1,0,3,1;
+A= [1,-1,1,0,3,1;
-1,0,-3,-4,5,6;
2,5,3,0,1,0
0,1,0,1,2,-1;
@@ -9,15 +9,17 @@ conLB=[1;2;3;-%inf;-%inf];
conUB = [1;2;3;-1];
lb=[-1000;-10000; 0; -1000; -1000; -1000];
ub=[10000; 100; 1.5; 100; 100; 1000];
-//and minimize 0.5*x'*Q*x + p'*x with
-p=[1; 2; 3; 4; 5; 6]; Q=eye(6,6);
+//and minimize 0.5*x'*H*x + f'*x with
+f=[1; 2; 3; 4; 5; 6]; H=eye(6,6);
nbVar = 6;
nbCon = 5;
x0 = repmat(0,nbVar,1);
param = list("MaxIter", 300, "CpuTime", 100);
-[xopt,fopt,exitflag,output,lambda]=qpipopt(nbVar,nbCon,Q,p,lb,ub,conMatrix,conLB,conUB,x0,param)
//Error
//qpipopt: The Upper Bound of constraints is not equal to the number of constraints
//at line 221 of function qpipopt called by :
//[xopt,fopt,exitflag,output,lambda]=qpipopt(nbVar,nbCon,Q,p,lb,ub,conMatrix,conLB,conUB,x0,param)
+
+[xopt,fopt,exitflag,output,lambda]=qpipopt(nbVar,nbCon,H,f,lb,ub,A,conLB,conUB,x0,param)
+
diff --git a/tests/general_tests/qpipopt/qpipopt_conUB2.sce b/tests/general_tests/qpipopt/qpipopt_conUB2.sce
index 33b3f2d..9aab4a8 100644
--- a/tests/general_tests/qpipopt/qpipopt_conUB2.sce
+++ b/tests/general_tests/qpipopt/qpipopt_conUB2.sce
@@ -1,6 +1,6 @@
//Find x in R^6 such that:
// Check for the Upper Bound of the constraints which should be a column vector
-conMatrix= [1,-1,1,0,3,1;
+A= [1,-1,1,0,3,1;
-1,0,-3,-4,5,6;
2,5,3,0,1,0
0,1,0,1,2,-1;
@@ -9,15 +9,18 @@ conLB=[1;2;3;-%inf;-%inf];
conUB = [1;2;3;-1;2.5]';
lb=[-1000;-10000; 0; -1000; -1000; -1000];
ub=[10000; 100; 1.5; 100; 100; 1000];
-//and minimize 0.5*x'*Q*x + p'*x with
-p=[1; 2; 3; 4; 5; 6]; Q=eye(6,6);
+//and minimize 0.5*x'*H*x + f'*x with
+f=[1; 2; 3; 4; 5; 6]; f=eye(6,6);
nbVar = 6;
nbCon = 5;
x0 = repmat(0,nbVar,1);
param = list("MaxIter", 300, "CpuTime", 100);
-[xopt,fopt,exitflag,output,lambda]=qpipopt(nbVar,nbCon,Q,p,lb,ub,conMatrix,conLB,conUB,x0,param)
//Error
//qpipopt: The Upper Bound should be a column vector
//at line 218 of function qpipopt called by :
-//[xopt,fopt,exitflag,output,lambda]=qpipopt(nbVar,nbCon,Q,p,lb,ub,conMatrix,conLB,conUB,x0,param)
+//[xopt,fopt,exitflag,output,lambda]=qpipopt(nbVar,nbCon,H,f,lb,ub,A,conLB,conUB,x0,param)
+
+[xopt,fopt,exitflag,output,lambda]=qpipopt(nbVar,nbCon,H,f,lb,ub,A,conLB,conUB,x0,param)
+
+
diff --git a/tests/general_tests/qpipopt/qpipopt_infeasible.sci b/tests/general_tests/qpipopt/qpipopt_infeasible.sci
new file mode 100644
index 0000000..49bb233
--- /dev/null
+++ b/tests/general_tests/qpipopt/qpipopt_infeasible.sci
@@ -0,0 +1,33 @@
+// qpipopt infeasibility test
+
+H = [2 0;0 8];
+f = [0 -32];
+A = [-1 0; 0, -1; 1 1];
+conUB = [-6 -6 11];
+conLB = -1*[%inf %inf %inf];
+nbVar = 2;
+nbCon = 3;
+ub = [%inf %inf];
+lb = -1*ub;
+
+// Output
+//Converged to a point of local infeasibility.
+// lamda =
+//
+// lower: [0x0 constant]
+// upper: [0x0 constant]
+// constraint: [0x0 constant]
+// output =
+//
+// Iterations: 0
+// exitflag =
+//
+// 5
+// fopt =
+//
+// 0.
+// xopt =
+//
+// []
+
+[xopt,fopt,exitflag,output,lamda] = qpipopt(nbVar,nbCon,H,f,lb,ub,A,conLB,conUB)
diff --git a/tests/general_tests/qpipopt/qpipopt_input.sce b/tests/general_tests/qpipopt/qpipopt_input.sce
index 08bd468..520ad97 100644
--- a/tests/general_tests/qpipopt/qpipopt_input.sce
+++ b/tests/general_tests/qpipopt/qpipopt_input.sce
@@ -1,6 +1,6 @@
//Find x in R^6 such that:
// Check for the number of inputs
-conMatrix= [1,-1,1,0,3,1;
+A= [1,-1,1,0,3,1;
-1,0,-3,-4,5,6;
2,5,3,0,1,0
0,1,0,1,2,-1;
@@ -9,15 +9,16 @@ conLB=[1;2;3;-%inf;-%inf];
conUB = [1;2;3;-1;2.5];
lb=[-1000;-10000; 0; -1000; -1000; -1000];
ub=[10000; 100; 1.5; 100; 100; 1000];
-//and minimize 0.5*x'*Q*x + p'*x with
-p=[1; 2; 3; 4; 5; 6]; Q=eye(6,6);
+//and minimize 0.5*x'*H*x + f'*x with
+f=[1; 2; 3; 4; 5; 6]; H=eye(6,6);
nbVar = 6;
nbCon = 5;
x0 = repmat(0,nbVar,1);
param = list("MaxIter", 300, "CpuTime", 100);
-[xopt,fopt,exitflag,output,lambda]=qpipopt(nbVar,nbCon,Q,p,lb,ub,conMatrix,conLB)
//Error
//qpipopt: Unexpected number of input arguments : 8 provided while should be 9, 10 or 11
//at line 91 of function qpipopt called by :
-//[xopt,fopt,exitflag,output,lambda]=qpipopt(nbVar,nbCon,Q,p,lb,ub,conMatrix,conLB)
+//[xopt,fopt,exitflag,output,lambda]=qpipopt(nbVar,nbCon,H,f,lb,ub,A,conLB)
+
+[xopt,fopt,exitflag,output,lambda]=qpipopt(nbVar,nbCon,H,f,lb,ub,A,conLB)
diff --git a/tests/general_tests/qpipopt/qpipopt_input2.sce b/tests/general_tests/qpipopt/qpipopt_input2.sce
index decc8a8..70c2e8d 100644
--- a/tests/general_tests/qpipopt/qpipopt_input2.sce
+++ b/tests/general_tests/qpipopt/qpipopt_input2.sce
@@ -1,6 +1,6 @@
//Find x in R^6 such that:
// Check if the number of input is more
-conMatrix= [1,-1,1,0,3,1;
+A= [1,-1,1,0,3,1;
-1,0,-3,-4,5,6;
2,5,3,0,1,0
0,1,0,1,2,-1;
@@ -9,15 +9,18 @@ conLB=[1;2;3;-%inf;-%inf];
conUB = [1;2;3;-1;2.5];
lb=[-1000;-10000; 0; -1000; -1000; -1000];
ub=[10000; 100; 1.5; 100; 100; 1000];
-//and minimize 0.5*x'*Q*x + p'*x with
-p=[1; 2; 3; 4; 5; 6]; Q=eye(6,5);
+//and minimize 0.5*x'*H*x + f'*x with
+f=[1; 2; 3; 4; 5; 6]; H=eye(6,6);
nbVar = 6;
nbCon = 5;
x0 = repmat(0,nbVar,1);
param = list("MaxIter", 300, "CpuTime", 100);
-[xopt,fopt,exitflag,output,lambda]=qpipopt(nbVar,nbCon,Q,p,lb,ub,conMatrix,conLB,conUB,x0,param,[])
//Error
//qpipopt: Unexpected number of input arguments : 12 provided while should be 9, 10 or 11
//at line 91 of function qpipopt called by :
//[xopt,fopt,exitflag,output,lambda]=qpipopt(nbVar,nbCon,Q,p,lb,ub,conMatrix,conLB)
+
+[xopt,fopt,exitflag,output,lambda]=qpipopt(nbVar,nbCon,H,f,lb,ub,A,conLB,conUB,x0,param,[])
+
+
diff --git a/tests/general_tests/qpipopt/qpipopt_logical_1.sce b/tests/general_tests/qpipopt/qpipopt_logical_1.sce
index 03853a7..52d5493 100644
--- a/tests/general_tests/qpipopt/qpipopt_logical_1.sce
+++ b/tests/general_tests/qpipopt/qpipopt_logical_1.sce
@@ -1,6 +1,6 @@
//Find x in R^6 such that:
// A simple example with constraints
-conMatrix= [1,-1,1,0,3,1;
+A= [1,-1,1,0,3,1;
-1,0,-3,-4,5,6;
2,5,3,0,1,0
0,1,0,1,2,-1;
@@ -9,15 +9,12 @@ conLB=[1;2;3;-%inf;-%inf];
conUB = [1;2;3;-1;2.5];
lb=[-1000;-10000; 0; -1000; -1000; -1000];
ub=[10000; 100; 1.5; 100; 100; 1000];
-//and minimize 0.5*x'*Q*x + p'*x with
-p=[1; 2; 3; 4; 5; 6]; Q=eye(6,6);
+//and minimize 0.5*x'*H*x + f'*x with
+f=[1; 2; 3; 4; 5; 6]; H=eye(6,6);
nbVar = 6;
nbCon = 5;
x0 = repmat(0,nbVar,1);
param = list("MaxIter", 300, "CpuTime", 100);
-[xopt,fopt,exitflag,output,lambda]=qpipopt(nbVar,nbCon,Q,p,lb,ub,conMatrix,conLB,conUB,x0,param)
-
-disp("xopt",xopt,"fopt",fopt,"exitflag",exitflag,"output",output,"lambda",lambda)
//Output
//
@@ -49,3 +46,9 @@ disp("xopt",xopt,"fopt",fopt,"exitflag",exitflag,"output",output,"lambda",lambda
// - 3.1155623
//
// xopt
+
+[xopt,fopt,exitflag,output,lambda]=qpipopt(nbVar,nbCon,H,f,lb,ub,A,conLB,conUB,x0,param);
+
+disp("xopt",xopt,"fopt",fopt,"exitflag",exitflag,"output",output,"lambda",lambda)
+
+
diff --git a/tests/general_tests/qpipopt/qpipopt_logical_2.sce b/tests/general_tests/qpipopt/qpipopt_logical_2.sce
index 933508b..a61e416 100644
--- a/tests/general_tests/qpipopt/qpipopt_logical_2.sce
+++ b/tests/general_tests/qpipopt/qpipopt_logical_2.sce
@@ -1,16 +1,14 @@
// A simple example without constraints
-conMatrix= [];
+A= [];
conLB=[];
conUB = [];
lb=[];
ub=[];
-p=[2 -35 -47]';
-Q =[5 -2 -1; -2 4 3; -1 3 5];
+f=[2 -35 -47]';
+H =[5 -2 -1; -2 4 3; -1 3 5];
nbVar = 3;
nbCon = 0;
-[xopt,fopt,exitflag,output,lambda]=qpipopt(nbVar,nbCon,Q,p,lb,ub,conMatrix,conLB,conUB)
-disp("xopt",xopt,"fopt",fopt,"exitflag",exitflag,"output",output,"lambda",lambda)
//Output
@@ -40,3 +38,8 @@ disp("xopt",xopt,"fopt",fopt,"exitflag",exitflag,"output",output,"lambda",lambda
// 7.
//
// xopt
+
+[xopt,fopt,exitflag,output,lambda]=qpipopt(nbVar,nbCon,H,f,lb,ub,A,conLB,conUB);
+disp("xopt",xopt,"fopt",fopt,"exitflag",exitflag,"output",output,"lambda",lambda);
+
+
diff --git a/tests/general_tests/qpipopt/qpipopt_options1.sce b/tests/general_tests/qpipopt/qpipopt_options1.sce
index 6cebc51..23d6b2b 100644
--- a/tests/general_tests/qpipopt/qpipopt_options1.sce
+++ b/tests/general_tests/qpipopt/qpipopt_options1.sce
@@ -1,6 +1,6 @@
//Find x in R^6 such that:
//Check if the user gives uneven number of parameters
-conMatrix= [1,-1,1,0,3,1;
+A= [1,-1,1,0,3,1;
-1,0,-3,-4,5,6;
2,5,3,0,1,0
0,1,0,1,2,-1;
@@ -9,15 +9,17 @@ conLB=[1;2;3;-%inf;-%inf];
conUB = [1;2;3;-1;2.5];
lb=[-1000;-10000; 0; -1000; -1000; -1000];
ub=[10000; 100; 1.5; 100; 100; 1000];
-//and minimize 0.5*x'*Q*x + p'*x with
-p=[1; 2; 3; 4; 5; 6]; Q=eye(6,6);
+//and minimize 0.5*x'*H*x + f'*x with
+f=[1; 2; 3; 4; 5; 6]; H=eye(6,6);
nbVar = 6;
nbCon = 5;
x0 = repmat(0,nbVar,1);
param = list("MaxIter", "CpuTime", 100);
-[xopt,fopt,exitflag,output,lambda]=qpipopt(nbVar,nbCon,Q,p,lb,ub,conMatrix,conLB,conUB,x0,param)
//Error
//qpipopt: Size of parameters should be even
-//at line 120 of function qpipopt called by :
-//[xopt,fopt,exitflag,output,lambda]=qpipopt(nbVar,nbCon,Q,p,lb,ub,conMatrix,conLB,conUB,x0,param)
+//at line 145 of function qpipopt called by :
+//[xopt,fopt,exitflag,output,lambda]=qpipopt(nbVar,nbCon,H,f,lb,ub,A,conLB,conUB,x0,param)
+
+[xopt,fopt,exitflag,output,lambda]=qpipopt(nbVar,nbCon,H,f,lb,ub,A,conLB,conUB,x0,param)
+
diff --git a/tests/general_tests/qpipopt/qpipopt_options2.sce b/tests/general_tests/qpipopt/qpipopt_options2.sce
index ba5208b..2c07536 100644
--- a/tests/general_tests/qpipopt/qpipopt_options2.sce
+++ b/tests/general_tests/qpipopt/qpipopt_options2.sce
@@ -1,6 +1,6 @@
//Find x in R^6 such that:
// Check if the user gives different parameter other than predefined
-conMatrix= [1,-1,1,0,3,1;
+A= [1,-1,1,0,3,1;
-1,0,-3,-4,5,6;
2,5,3,0,1,0
0,1,0,1,2,-1;
@@ -9,15 +9,18 @@ conLB=[1;2;3;-%inf;-%inf];
conUB = [1;2;3;-1;2.5];
lb=[-1000;-10000; 0; -1000; -1000; -1000];
ub=[10000; 100; 1.5; 100; 100; 1000];
-//and minimize 0.5*x'*Q*x + p'*x with
-p=[1; 2; 3; 4; 5; 6]; Q=eye(6,6);
+//and minimize 0.5*x'*H*x + f'*x with
+f=[1; 2; 3; 4; 5; 6]; H=eye(6,6);
nbVar = 6;
nbCon = 5;
x0 = repmat(0,nbVar,1);
param = list("MaxIter", 300, "Time", 100);
-[xopt,fopt,exitflag,output,lambda]=qpipopt(nbVar,nbCon,Q,p,lb,ub,conMatrix,conLB,conUB,x0,param)
//Error
//qpipopt: Unrecognized parameter name 'Time'.
-//at line 137 of function qpipopt called by :
-//[xopt,fopt,exitflag,output,lambda]=qpipopt(nbVar,nbCon,Q,p,lb,ub,conMatrix,conLB,conUB,x0,param)
+//at line 162 of function qpipopt called by :
+//[xopt,fopt,exitflag,output,lambda]=qpipopt(nbVar,nbCon,H,f,lb,ub,A,conLB,conUB,x0,param)
+
+[xopt,fopt,exitflag,output,lambda]=qpipopt(nbVar,nbCon,H,f,lb,ub,A,conLB,conUB,x0,param)
+
+
diff --git a/tests/general_tests/qpipopt/qpipopt_options3.sce b/tests/general_tests/qpipopt/qpipopt_options3.sce
index b267d77..1612c21 100644
--- a/tests/general_tests/qpipopt/qpipopt_options3.sce
+++ b/tests/general_tests/qpipopt/qpipopt_options3.sce
@@ -1,6 +1,6 @@
//Find x in R^6 such that:
// Check if the user for a list for the param
-conMatrix= [1,-1,1,0,3,1;
+A= [1,-1,1,0,3,1;
-1,0,-3,-4,5,6;
2,5,3,0,1,0
0,1,0,1,2,-1;
@@ -9,15 +9,17 @@ conLB=[1;2;3;-%inf;-%inf];
conUB = [1;2;3;-1;2.5];
lb=[-1000;-10000; 0; -1000; -1000; -1000];
ub=[10000; 100; 1.5; 100; 100; 1000];
-//and minimize 0.5*x'*Q*x + p'*x with
-p=[1; 2; 3; 4; 5; 6]; Q=eye(6,6);
+//and minimize 0.5*x'*H*x + f'*x with
+f=[1; 2; 3; 4; 5; 6]; H=eye(6,6);
nbVar = 6;
nbCon = 5;
x0 = repmat(0,nbVar,1);
param = ["MaxIter", "CpuTime"];
-[xopt,fopt,exitflag,output,lambda]=qpipopt(nbVar,nbCon,Q,p,lb,ub,conMatrix,conLB,conUB,x0,param)
//Error
//qpipopt: param should be a list
-//at line 120 of function qpipopt called by :
-//[xopt,fopt,exitflag,output,lambda]=qpipopt(nbVar,nbCon,Q,p,lb,ub,conMatrix,conLB,conUB,x0,param)
+//at line 140 of function qpipopt called by :
+//[xopt,fopt,exitflag,output,lambda]=qpipopt(nbVar,nbCon,H,f,lb,ub,A,conLB,conUB,x0,param)
+
+[xopt,fopt,exitflag,output,lambda]=qpipopt(nbVar,nbCon,H,f,lb,ub,A,conLB,conUB,x0,param)
+
diff --git a/tests/general_tests/qpipopt/qpipopt_p1.sce b/tests/general_tests/qpipopt/qpipopt_p1.sce
index 2e9ed37..4d05f47 100644
--- a/tests/general_tests/qpipopt/qpipopt_p1.sce
+++ b/tests/general_tests/qpipopt/qpipopt_p1.sce
@@ -1,6 +1,6 @@
//Find x in R^6 such that:
// Check if the user gives unequal size of 'p' as of the number of variables
-conMatrix= [1,-1,1,0,3,1;
+A= [1,-1,1,0,3,1;
-1,0,-3,-4,5,6;
2,5,3,0,1,0
0,1,0,1,2,-1;
@@ -9,15 +9,18 @@ conLB=[1;2;3;-%inf;-%inf];
conUB = [1;2;3;-1;2.5];
lb=[-1000;-10000; 0; -1000; -1000; -1000];
ub=[10000; 100; 1.5; 100; 100; 1000];
-//and minimize 0.5*x'*Q*x + p'*x with
-p=[1; 2; 3; 4; 5]; Q=eye(6,6);
+//and minimize 0.5*x'*H*x + f'*x with
+f=[1; 2; 3; 4; 5; 6; 7]; H=eye(6,6);
nbVar = 6;
nbCon = 5;
x0 = repmat(0,nbVar,1);
param = list("MaxIter", 300, "CpuTime", 100);
-[xopt,fopt,exitflag,output,lambda]=qpipopt(nbVar,nbCon,Q,p,lb,ub,conMatrix,conLB,conUB,x0,param)
//Error
//qpipopt: The Size of p is not equal to the number of variables
//at line 168 of function qpipopt called by :
-//[xopt,fopt,exitflag,output,lambda]=qpipopt(nbVar,nbCon,Q,p,lb,ub,conMatrix,conLB,conUB,x0,param)
+//[xopt,fopt,exitflag,output,lambda]=qpipopt(nbVar,nbCon,H,f,lb,ub,A,conLB,conUB,x0,param)
+
+[xopt,fopt,exitflag,output,lambda]=qpipopt(nbVar,nbCon,H,f,lb,ub,A,conLB,conUB,x0,param)
+
+
diff --git a/tests/general_tests/qpipopt/qpipopt_p2.sce b/tests/general_tests/qpipopt/qpipopt_p2.sce
index 2e9ed37..2a58870 100644
--- a/tests/general_tests/qpipopt/qpipopt_p2.sce
+++ b/tests/general_tests/qpipopt/qpipopt_p2.sce
@@ -1,6 +1,6 @@
//Find x in R^6 such that:
-// Check if the user gives unequal size of 'p' as of the number of variables
-conMatrix= [1,-1,1,0,3,1;
+// Check if the user gives unequal size of 'f' as of the number of variables
+A= [1,-1,1,0,3,1;
-1,0,-3,-4,5,6;
2,5,3,0,1,0
0,1,0,1,2,-1;
@@ -9,15 +9,18 @@ conLB=[1;2;3;-%inf;-%inf];
conUB = [1;2;3;-1;2.5];
lb=[-1000;-10000; 0; -1000; -1000; -1000];
ub=[10000; 100; 1.5; 100; 100; 1000];
-//and minimize 0.5*x'*Q*x + p'*x with
-p=[1; 2; 3; 4; 5]; Q=eye(6,6);
+//and minimize 0.5*x'*H*x + f'*x with
+f=[1; 2; 3; 4; 5]; H=eye(6,6);
nbVar = 6;
nbCon = 5;
x0 = repmat(0,nbVar,1);
param = list("MaxIter", 300, "CpuTime", 100);
-[xopt,fopt,exitflag,output,lambda]=qpipopt(nbVar,nbCon,Q,p,lb,ub,conMatrix,conLB,conUB,x0,param)
//Error
-//qpipopt: The Size of p is not equal to the number of variables
-//at line 168 of function qpipopt called by :
-//[xopt,fopt,exitflag,output,lambda]=qpipopt(nbVar,nbCon,Q,p,lb,ub,conMatrix,conLB,conUB,x0,param)
+//qpipopt: The Size of f is not equal to the number of variables
+//at line 216 of function qpipopt called by :
+//[xopt,fopt,exitflag,output,lambda]=qpipopt(nbVar,nbCon,H,f,lb,ub,A,conLB,conUB,x0,param)
+
+[xopt,fopt,exitflag,output,lambda]=qpipopt(nbVar,nbCon,H,f,lb,ub,A,conLB,conUB,x0,param)
+
+
diff --git a/tests/general_tests/qpipopt/qpipopt_x0.sce b/tests/general_tests/qpipopt/qpipopt_x0.sce
deleted file mode 100644
index ef69b3d..0000000
--- a/tests/general_tests/qpipopt/qpipopt_x0.sce
+++ /dev/null
@@ -1,23 +0,0 @@
-//Find x in R^6 such that:
-// Check if the user gives initial guess matrix as a row vector
-conMatrix= [1,-1,1,0,3,1;
--1,0,-3,-4,5,6;
-2,5,3,0,1,0
-0,1,0,1,2,-1;
--1,0,2,1,1,0];
-conLB=[1;2;3;-%inf;-%inf];
-conUB = [1;2;3;-1;2.5];
-lb=[-1000;-10000; 0; -1000; -1000; -1000];
-ub=[10000; 100; 1.5; 100; 100; 1000];
-//and minimize 0.5*x'*Q*x + p'*x with
-p=[1; 2; 3; 4; 5; 6]; Q=eye(6,6);
-nbVar = 6;
-nbCon = 5;
-x0 = repmat(0,1,nbVar);
-param = list("MaxIter", 300, "CpuTime", 100);
-[xopt,fopt,exitflag,output,lambda]=qpipopt(nbVar,nbCon,Q,p,lb,ub,conMatrix,conLB,conUB,x0,param)
-
-//Error
-//qpipopt: The initial guess should be a column vector
-//at line 228 of function qpipopt called by :
-//[xopt,fopt,exitflag,output,lambda]=qpipopt(nbVar,nbCon,Q,p,lb,ub,conMatrix,conLB,conUB,x0,param)
diff --git a/tests/general_tests/qpipopt/qpipopt_x01.sce b/tests/general_tests/qpipopt/qpipopt_x01.sce
index 6a57269..bb37c50 100644
--- a/tests/general_tests/qpipopt/qpipopt_x01.sce
+++ b/tests/general_tests/qpipopt/qpipopt_x01.sce
@@ -15,7 +15,6 @@ nbVar = 6;
nbCon = 5;
x0 = repmat(0,5,1);
param = list("MaxIter", 300, "CpuTime", 100);
-[xopt,fopt,exitflag,output,lambda]=qpipopt(nbVar,nbCon,Q,p,lb,ub,conMatrix,conLB,conUB,x0,param)
//Error
// WARNING: qpipopt: Ignoring initial guess of variables as it is not equal to the number of variables
@@ -41,3 +40,6 @@ param = list("MaxIter", 300, "CpuTime", 100);
// - 4.9884023
// 0.6054943
// - 3.1155623
+
+[xopt,fopt,exitflag,output,lambda]=qpipopt(nbVar,nbCon,Q,p,lb,ub,conMatrix,conLB,conUB,x0,param)
+
diff --git a/tests/general_tests/qpipopt/qpipopt_x02.sce b/tests/general_tests/qpipopt/qpipopt_x02.sce
deleted file mode 100644
index 52b0b89..0000000
--- a/tests/general_tests/qpipopt/qpipopt_x02.sce
+++ /dev/null
@@ -1,23 +0,0 @@
-//Find x in R^6 such that:
-// Check if the user gives unequal size of initial guess as of the number of variables
-conMatrix= [1,-1,1,0,3,1;
--1,0,-3,-4,5,6;
-2,5,3,0,1,0
-0,1,0,1,2,-1;
--1,0,2,1,1,0];
-conLB=[1;2;3;-%inf;-%inf];
-conUB = [1;2;3;-1;2.5];
-lb=[-1000;-10000; 0; -1000; -1000; -1000];
-ub=[10000; 100; 1.5; 100; 100; 1000];
-//and minimize 0.5*x'*Q*x + p'*x with
-p=[1; 2; 3; 4; 5; 6]; Q=eye(6,6);
-nbVar = 6;
-nbCon = 5;
-x0 = repmat(0,5,1);
-param = list("MaxIter", 300, "CpuTime", 100);
-[xopt,fopt,exitflag,output,lambda]=qpipopt(nbVar,nbCon,Q,p,lb,ub,conMatrix,conLB,conUB,x0,param)
-
-//Error
-//qpipopt: The initial guess of variables is not equal to the number of variables
-//at line 231 of function qpipopt called by :
-//[xopt,fopt,exitflag,output,lambda]=qpipopt(nbVar,nbCon,Q,p,lb,ub,conMatrix,conLB,conUB,x0,param)
diff --git a/tests/general_tests/qpipoptmat/qpipoptmat_A1.sce b/tests/general_tests/qpipoptmat/qpipoptmat_A1.sce
index 1c8d055..56880ab 100644
--- a/tests/general_tests/qpipoptmat/qpipoptmat_A1.sce
+++ b/tests/general_tests/qpipoptmat/qpipoptmat_A1.sce
@@ -14,9 +14,12 @@ x0 = repmat(0,6,1);
param = list("MaxIter", 300, "CpuTime", 100);
f=[1; 2; 3; 4; 5; 6]; H=eye(6,6);
x0 = repmat(0,6,1);
-[xopt,fopt,exitflag,output,lambda]=qpipoptmat(H,f,A,b,Aeq,beq,lb,ub,[],param)
// Error
//qpipoptmat: The number of columns in A must be the same as the number of elements of f
//at line 222 of function qpipoptmat called by :
//[xopt,fopt,exitflag,output,lambda]=qpipoptmat(H,f,A,b,Aeq,beq,lb,ub,[],param)
+
+[xopt,fopt,exitflag,output,lambda]=qpipoptmat(H,f,A,b,Aeq,beq,lb,ub,[],param)
+
+
diff --git a/tests/general_tests/qpipoptmat/qpipoptmat_Aeq1.sce b/tests/general_tests/qpipoptmat/qpipoptmat_Aeq1.sce
index be35586..b44480d 100644
--- a/tests/general_tests/qpipoptmat/qpipoptmat_Aeq1.sce
+++ b/tests/general_tests/qpipoptmat/qpipoptmat_Aeq1.sce
@@ -14,9 +14,10 @@ x0 = repmat(0,6,1);
param = list("MaxIter", 300, "CpuTime", 100);
f=[1; 2; 3; 4; 5; 6]; H=eye(6,6);
x0 = repmat(0,6,1);
-[xopt,fopt,exitflag,output,lambda]=qpipoptmat(H,f,A,b,Aeq,beq,lb,ub,[],param)
// Error
//qpipoptmat: The number of columns in Aeq must be the same as the number of elements of f
//at line 228 of function qpipoptmat called by :
//[xopt,fopt,exitflag,output,lambda]=qpipoptmat(H,f,A,b,Aeq,beq,lb,ub,[],param)
+
+[xopt,fopt,exitflag,output,lambda]=qpipoptmat(H,f,A,b,Aeq,beq,lb,ub,[],param)
diff --git a/tests/general_tests/qpipoptmat/qpipoptmat_H1.sce b/tests/general_tests/qpipoptmat/qpipoptmat_H1.sce
index 0bc90df..b4f2e3a 100644
--- a/tests/general_tests/qpipoptmat/qpipoptmat_H1.sce
+++ b/tests/general_tests/qpipoptmat/qpipoptmat_H1.sce
@@ -14,9 +14,11 @@ x0 = repmat(0,6,1);
param = list("MaxIter", 300, "CpuTime", 100);
f=[1; 2; 3; 4; 5; 6]; H=eye(4,4);
x0 = repmat(0,6,1);
-[xopt,fopt,exitflag,output,lambda]=qpipoptmat(H,f,A,b,Aeq,beq,lb,ub,[],param)
// Error
//qpipoptmat: The number of rows and columns in H must be equal the number of elements of f
//at line 215 of function qpipoptmat called by :
//[xopt,fopt,exitflag,output,lambda]=qpipoptmat(H,f,A,b,Aeq,beq,lb,ub,[],param)
+
+[xopt,fopt,exitflag,output,lambda]=qpipoptmat(H,f,A,b,Aeq,beq,lb,ub,[],param)
+
diff --git a/tests/general_tests/qpipoptmat/qpipoptmat_H2.sce b/tests/general_tests/qpipoptmat/qpipoptmat_H2.sce
index 507487f..158c142 100644
--- a/tests/general_tests/qpipoptmat/qpipoptmat_H2.sce
+++ b/tests/general_tests/qpipoptmat/qpipoptmat_H2.sce
@@ -14,9 +14,10 @@ x0 = repmat(0,6,1);
param = list("MaxIter", 300, "CpuTime", 100);
f=[1; 2; 3; 4; 5; 6]; H=eye(6,4);
x0 = repmat(0,6,1);
-[xopt,fopt,exitflag,output,lambda]=qpipoptmat(H,f,A,b,Aeq,beq,lb,ub,[],param)
// Error
//qpipoptmat: H is not a symmetric matrix
//at line 208 of function qpipoptmat called by :
//[xopt,fopt,exitflag,output,lambda]=qpipoptmat(H,f,A,b,Aeq,beq,lb,ub,[],param)
+
+[xopt,fopt,exitflag,output,lambda]=qpipoptmat(H,f,A,b,Aeq,beq,lb,ub,[],param)
diff --git a/tests/general_tests/qpipoptmat/qpipoptmat_b1.sce b/tests/general_tests/qpipoptmat/qpipoptmat_b1.sce
index f039833..3940fa0 100644
--- a/tests/general_tests/qpipoptmat/qpipoptmat_b1.sce
+++ b/tests/general_tests/qpipoptmat/qpipoptmat_b1.sce
@@ -14,9 +14,10 @@ x0 = repmat(0,6,1);
param = list("MaxIter", 300, "CpuTime", 100);
f=[1; 2; 3; 4; 5; 6]; H=eye(6,6);
x0 = repmat(0,6,1);
-[xopt,fopt,exitflag,output,lambda]=qpipoptmat(H,f,A,b,Aeq,beq,lb,ub,[],param)
// Error
//qpipoptmat: The number of rows in A must be the same as the number of elementsof b
//at line 247 of function qpipoptmat called by :
//[xopt,fopt,exitflag,output,lambda]=qpipoptmat(H,f,A,b,Aeq,beq,lb,ub,[],param)
+
+[xopt,fopt,exitflag,output,lambda]=qpipoptmat(H,f,A,b,Aeq,beq,lb,ub,[],param)
diff --git a/tests/general_tests/qpipoptmat/qpipoptmat_beq1.sce b/tests/general_tests/qpipoptmat/qpipoptmat_beq1.sce
index 2641ac4..bcdda3c 100644
--- a/tests/general_tests/qpipoptmat/qpipoptmat_beq1.sce
+++ b/tests/general_tests/qpipoptmat/qpipoptmat_beq1.sce
@@ -14,9 +14,11 @@ x0 = repmat(0,6,1);
param = list("MaxIter", 300, "CpuTime", 100);
f=[1; 2; 3; 4; 5; 6]; H=eye(6,6);
x0 = repmat(0,6,1);
-[xopt,fopt,exitflag,output,lambda]=qpipoptmat(H,f,A,b,Aeq,beq,lb,ub,[],param)
// Error
//qpipoptmat: The number of rows in Aeq must be the same as the number of elements of beq
//at line 253 of function qpipoptmat called by :
//[xopt,fopt,exitflag,output,lambda]=qpipoptmat(H,f,A,b,Aeq,beq,lb,ub,[],param)
+
+[xopt,fopt,exitflag,output,lambda]=qpipoptmat(H,f,A,b,Aeq,beq,lb,ub,[],param)
+
diff --git a/tests/general_tests/qpipoptmat/qpipoptmat_f1.sce b/tests/general_tests/qpipoptmat/qpipoptmat_f1.sce
index 7f55175..bf863a4 100644
--- a/tests/general_tests/qpipoptmat/qpipoptmat_f1.sce
+++ b/tests/general_tests/qpipoptmat/qpipoptmat_f1.sce
@@ -14,9 +14,11 @@ x0 = repmat(0,6,1);
param = list("MaxIter", 300, "CpuTime", 100);
f=[1; 2; 3; 4; 5]; H=eye(6,6);
x0 = repmat(0,6,1);
-[xopt,fopt,exitflag,output,lambda]=qpipoptmat(H,f,A,b,Aeq,beq,lb,ub,[],param)
// Error
//qpipoptmat: The number of rows and columns in H must be equal the number of elements of f
//at line 215 of function qpipoptmat called by :
//[xopt,fopt,exitflag,output,lambda]=qpipoptmat(H,f,A,b,Aeq,beq,lb,ub,[],param)
+
+[xopt,fopt,exitflag,output,lambda]=qpipoptmat(H,f,A,b,Aeq,beq,lb,ub,[],param)
+
diff --git a/tests/general_tests/qpipoptmat/qpipoptmat_infeasible.sci b/tests/general_tests/qpipoptmat/qpipoptmat_infeasible.sci
new file mode 100644
index 0000000..123f2c9
--- /dev/null
+++ b/tests/general_tests/qpipoptmat/qpipoptmat_infeasible.sci
@@ -0,0 +1,30 @@
+// qpipopt infeasibility test
+
+H = [2 0;0 8];
+f = [0 -32];
+A = [-1 0; 0, -1; 1 1];
+b = [-6 -6 11];
+ub = [%inf %inf];
+lb = -1*ub;
+[xopt,fopt,exitflag,output,lamda] = qpipoptmat(H,f,A,b,[],[],lb,ub)
+
+//Output
+//Converged to a point of local infeasibility.
+// lamda =
+//
+// lower: [0x0 constant]
+// upper: [0x0 constant]
+// eqlin: [0x0 constant]
+// ineqlin: [0x0 constant]
+// output =
+//
+// Iterations: 0
+// exitflag =
+//
+// 5
+// fopt =
+//
+// 0.
+// xopt =
+//
+// []
diff --git a/tests/general_tests/qpipoptmat/qpipoptmat_lb1.sce b/tests/general_tests/qpipoptmat/qpipoptmat_lb1.sce
index e96150e..10229af 100644
--- a/tests/general_tests/qpipoptmat/qpipoptmat_lb1.sce
+++ b/tests/general_tests/qpipoptmat/qpipoptmat_lb1.sce
@@ -14,9 +14,10 @@ x0 = repmat(0,6,1);
param = list("MaxIter", 300, "CpuTime", 100);
f=[1; 2; 3; 4; 5; 6]; H=eye(6,6);
x0 = repmat(0,6,1);
-[xopt,fopt,exitflag,output,lambda]=qpipoptmat(H,f,A,b,Aeq,beq,lb,ub,[],param)
// Error
//qpipoptmat: The Lower Bound is not equal to the number of variables
//at line 235 of function qpipoptmat called by :
//[xopt,fopt,exitflag,output,lambda]=qpipoptmat(H,f,A,b,Aeq,beq,lb,ub,[],param)
+
+[xopt,fopt,exitflag,output,lambda]=qpipoptmat(H,f,A,b,Aeq,beq,lb,ub,[],param)
diff --git a/tests/general_tests/qpipoptmat/qpipoptmat_logical1.sce b/tests/general_tests/qpipoptmat/qpipoptmat_logical1.sce
index 8832300..50ddc6e 100644
--- a/tests/general_tests/qpipoptmat/qpipoptmat_logical1.sce
+++ b/tests/general_tests/qpipoptmat/qpipoptmat_logical1.sce
@@ -1,9 +1,9 @@
-// Check for the Q to be a symmetric matrix
+// A simple example without constraints
f=[2 -35 -47]';
H =[5 -2 -1; -2 4 3; -1 3 5];
-[xopt,fopt,exitflag,output,lambda]=qpipoptmat(H,f)
-disp("xopt",xopt,"fopt",fopt,"exitflag",exitflag,"output",output,"lambda",lambda)
+[xopt,fopt,exitflag,output,lambda]=qpipoptmat(H,f);
+
//Output
//
@@ -33,3 +33,6 @@ disp("xopt",xopt,"fopt",fopt,"exitflag",exitflag,"output",output,"lambda",lambda
// 7.
//
// xopt
+
+disp("xopt",xopt,"fopt",fopt,"exitflag",exitflag,"output",output,"lambda",lambda)
+
diff --git a/tests/general_tests/qpipoptmat/qpipoptmat_logical2.sce b/tests/general_tests/qpipoptmat/qpipoptmat_logical2.sce
index 80802cf..9f11d1d 100644
--- a/tests/general_tests/qpipoptmat/qpipoptmat_logical2.sce
+++ b/tests/general_tests/qpipoptmat/qpipoptmat_logical2.sce
@@ -13,8 +13,7 @@ ub=[10000; 100; 1.5; 100; 100; 1000];
param = list("MaxIter", 300, "CpuTime",100);
//and minimize 0.5*x'*Q*x + p'*x with
f=[1; 2; 3; 4; 5; 6]; H=eye(6,6);
-[xopt,fopt,exitflag,output,lambda]=qpipoptmat(H,f,A,b,Aeq,beq,lb,ub,[],param)
-disp("xopt",xopt,"fopt",fopt,"exitflag",exitflag,"output",output,"lambda",lambda)
+[xopt,fopt,exitflag,output,lambda]=qpipoptmat(H,f,A,b,Aeq,beq,lb,ub,[],param);
//Output
//
@@ -46,4 +45,8 @@ disp("xopt",xopt,"fopt",fopt,"exitflag",exitflag,"output",output,"lambda",lambda
// 0.6054943
// - 3.1155623
//
-// xopt
+// xopt
+
+disp("xopt",xopt,"fopt",fopt,"exitflag",exitflag,"output",output,"lambda",lambda)
+
+
diff --git a/tests/general_tests/qpipoptmat/qpipoptmat_param1.sce b/tests/general_tests/qpipoptmat/qpipoptmat_param1.sce
index ba3915e..6ae5345 100644
--- a/tests/general_tests/qpipoptmat/qpipoptmat_param1.sce
+++ b/tests/general_tests/qpipoptmat/qpipoptmat_param1.sce
@@ -14,9 +14,12 @@ x0 = repmat(0,6,1);
param = list("MaxIter", 300, 100);
f=[1; 2; 3; 4; 5; 6]; H=eye(6,6);
x0 = repmat(0,6,1);
-[xopt,fopt,exitflag,output,lambda]=qpipoptmat(H,f,A,b,Aeq,beq,lb,ub,[],param)
// Error
//qpipoptmat: Size of parameters should be even
//at line 153 of function qpipoptmat called by :
//[xopt,fopt,exitflag,output,lambda]=qpipoptmat(H,f,A,b,Aeq,beq,lb,ub,[],param)
+
+[xopt,fopt,exitflag,output,lambda]=qpipoptmat(H,f,A,b,Aeq,beq,lb,ub,[],param);
+
+
diff --git a/tests/general_tests/qpipoptmat/qpipoptmat_param2.sce b/tests/general_tests/qpipoptmat/qpipoptmat_param2.sce
index 801e0f9..d038962 100644
--- a/tests/general_tests/qpipoptmat/qpipoptmat_param2.sce
+++ b/tests/general_tests/qpipoptmat/qpipoptmat_param2.sce
@@ -14,9 +14,12 @@ x0 = repmat(0,6,1);
param = list("MaxIter", 300, "Time", 100);
f=[1; 2; 3; 4; 5; 6]; H=eye(6,6);
x0 = repmat(0,6,1);
-[xopt,fopt,exitflag,output,lambda]=qpipoptmat(H,f,A,b,Aeq,beq,lb,ub,[],param)
// Error
//qpipoptmat: Unrecognized parameter name 'Time'.
//at line 170 of function qpipoptmat called by :
//[xopt,fopt,exitflag,output,lambda]=qpipoptmat(H,f,A,b,Aeq,beq,lb,ub,[],param)
+
+[xopt,fopt,exitflag,output,lambda]=qpipoptmat(H,f,A,b,Aeq,beq,lb,ub,[],param)
+
+
diff --git a/tests/general_tests/qpipoptmat/qpipoptmat_param3.sce b/tests/general_tests/qpipoptmat/qpipoptmat_param3.sce
index e9198e6..f7cbcf5 100644
--- a/tests/general_tests/qpipoptmat/qpipoptmat_param3.sce
+++ b/tests/general_tests/qpipoptmat/qpipoptmat_param3.sce
@@ -14,9 +14,12 @@ x0 = repmat(0,6,1);
param = ["MaxIter", "CpuTime"];
f=[1; 2; 3; 4; 5; 6]; H=eye(6,6);
x0 = repmat(0,6,1);
-[xopt,fopt,exitflag,output,lambda]=qpipoptmat(H,f,A,b,Aeq,beq,lb,ub,[],param)
// Error
//qpipopt: param should be a list
//at line 147 of function qpipoptmat called by :
//[xopt,fopt,exitflag,output,lambda]=qpipoptmat(H,f,A,b,Aeq,beq,lb,ub,[],param)
+
+[xopt,fopt,exitflag,output,lambda]=qpipoptmat(H,f,A,b,Aeq,beq,lb,ub,[],param)
+
+
diff --git a/tests/general_tests/qpipoptmat/qpipoptmat_ub1.sce b/tests/general_tests/qpipoptmat/qpipoptmat_ub1.sce
index 28ec92e..f3b1559 100644
--- a/tests/general_tests/qpipoptmat/qpipoptmat_ub1.sce
+++ b/tests/general_tests/qpipoptmat/qpipoptmat_ub1.sce
@@ -14,9 +14,11 @@ x0 = repmat(0,6,1);
param = list("MaxIter", 300, "CpuTime", 100);
f=[1; 2; 3; 4; 5; 6]; H=eye(6,6);
x0 = repmat(0,6,1);
-[xopt,fopt,exitflag,output,lambda]=qpipoptmat(H,f,A,b,Aeq,beq,lb,ub,[],param)
// Error
//qpipoptmat: The Upper Bound is not equal to the number of variables
//at line 241 of function qpipoptmat called by :
//[xopt,fopt,exitflag,output,lambda]=qpipoptmat(H,f,A,b,Aeq,beq,lb,ub,[],param)
+
+[xopt,fopt,exitflag,output,lambda]=qpipoptmat(H,f,A,b,Aeq,beq,lb,ub,[],param)
+
diff --git a/tests/general_tests/qpipoptmat/qpipoptmat_x01.sce b/tests/general_tests/qpipoptmat/qpipoptmat_x01.sce
index 59710bb..71a1c6c 100644
--- a/tests/general_tests/qpipoptmat/qpipoptmat_x01.sce
+++ b/tests/general_tests/qpipoptmat/qpipoptmat_x01.sce
@@ -1,4 +1,4 @@
-// Check for the size of H matrix
+// Check for the initial guess x0
//Find x in R^6 such that:
Aeq= [1,-1,1,0,3,1;
@@ -14,7 +14,8 @@ x0 = repmat(0,6,1);
param = list("MaxIter", 300, "CpuTime", 100);
f=[1; 2; 3; 4; 5; 6]; H=eye(6,6);
x0 = repmat(0,5,1);
-[xopt,fopt,exitflag,output,lambda]=qpipoptmat(H,f,A,b,Aeq,beq,lb,ub,[],param)
// Warning
//WARNING: qpipopt: Ignoring initial guess of variables as it is not equal to the number of variables
+
+[xopt,fopt,exitflag,output,lambda]=qpipoptmat(H,f,A,b,Aeq,beq,lb,ub,x0,param);
diff --git a/tests/general_tests/symphony/symphony_conmatrix1.sce b/tests/general_tests/symphony/symphony_A1.sce
index 280c973..53f3813 100644
--- a/tests/general_tests/symphony/symphony_conmatrix1.sce
+++ b/tests/general_tests/symphony/symphony_A1.sce
@@ -1,4 +1,4 @@
-// Check the size for conMatrix
+// Check the size for A matrix
// A basic case :
// Objective function
@@ -11,7 +11,7 @@ lb = repmat(0,8,1);
ub = [repmat(1,4,1);repmat(%inf,4,1)];
// Constraint Matrix
-conMatrix = [5,3,4,6,1,1,1;
+A = [5,3,4,6,1,1,1;
5*0.05,3*0.04,4*0.05,6*0.03,0.08,0.07,0.06;
5*0.03,3*0.03,4*0.04,6*0.04,0.06,0.07,0.08;]
@@ -24,10 +24,12 @@ conub = [ 25; 1.25; 1.25]
// Row Matrix for telling symphony that the is integer or not
isInt = [repmat(%t,1,4) repmat(%f,1,4)];
-// Calling Symphony
-[x,f,status,output] = symphony(8,3,c,isInt,lb,ub,conMatrix,conlb,conub,1)
-
// Error
//Symphony: The number of columns in constraint should equal to the number of variables
//at line 244 of function symphony called by :
-//[x,f,status,output] = symphony(8,3,c,isInt,lb,ub,conMatrix,conlb,conub,1)
+//[x,f,status,output] = symphony(8,3,c,isInt,lb,ub,A,conlb,conub,1)
+
+// Calling Symphony
+[x,f,status,output] = symphony(8,3,c,isInt,lb,ub,A,conlb,conub,1)
+
+
diff --git a/tests/general_tests/symphony/symphony_conmatrix2.sce b/tests/general_tests/symphony/symphony_A2.sce
index 0091f7d..43a61e7 100644
--- a/tests/general_tests/symphony/symphony_conmatrix2.sce
+++ b/tests/general_tests/symphony/symphony_A2.sce
@@ -1,4 +1,4 @@
-// Check the size for conMatrix
+// Check the size for A
// A basic case :
// Objective function
@@ -11,7 +11,7 @@ lb = repmat(0,8,1);
ub = [repmat(1,4,1);repmat(%inf,4,1)];
// Constraint Matrix
-conMatrix = [5,3,4,6,1,1,1,1;
+A = [5,3,4,6,1,1,1,1;
5*0.05,3*0.04,4*0.05,6*0.03,0.08,0.07,0.06,0.03;]
// Lower Bound of constrains
@@ -23,10 +23,12 @@ conub = [ 25; 1.25; 1.25]
// Row Matrix for telling symphony that the is integer or not
isInt = [repmat(%t,1,4) repmat(%f,1,4)];
-// Calling Symphony
-[x,f,status,output] = symphony(8,3,c,isInt,lb,ub,conMatrix,conlb,conub,1)
-
// Error
//Symphony: The number of rows in constraint should be equal to the number of constraints
//at line 238 of function symphony called by :
-//[x,f,status,output] = symphony(8,3,c,isInt,lb,ub,conMatrix,conlb,conub,1)
+//[x,f,status,output] = symphony(8,3,c,isInt,lb,ub,A,conlb,conub,1)
+
+// Calling Symphony
+[x,f,status,output] = symphony(8,3,c,isInt,lb,ub,A,conlb,conub,1)
+
+
diff --git a/tests/general_tests/symphony/symphony_c1.sce b/tests/general_tests/symphony/symphony_c1.sce
index 7b5b7e9..81c95aa 100644
--- a/tests/general_tests/symphony/symphony_c1.sce
+++ b/tests/general_tests/symphony/symphony_c1.sce
@@ -11,7 +11,7 @@ lb = repmat(0,8,1);
ub = [repmat(1,4,1);repmat(%inf,4,1)];
// Constraint Matrix
-conMatrix = [5,3,4,6,1,1,1,1;
+A = [5,3,4,6,1,1,1,1;
5*0.05,3*0.04,4*0.05,6*0.03,0.08,0.07,0.06,0.03;
5*0.03,3*0.03,4*0.04,6*0.04,0.06,0.07,0.08,0.09;]
@@ -24,10 +24,12 @@ conub = [ 25; 1.25; 1.25]
// Row Matrix for telling symphony that the is integer or not
isInt = [repmat(%t,1,4) repmat(%f,1,4)];
-// Calling Symphony
-[x,f,status,output] = symphony(8,3,c,isInt,lb,ub,conMatrix,conlb,conub,1)
-
// Error
//Symphony: Number of variables in Objective Coefficients is not equal to number of variables given
//at line 214 of function symphony called by :
-//[x,f,status,output] = symphony(8,3,c,isInt,lb,ub,conMatrix,conlb,conub,1)
+//[x,f,status,output] = symphony(8,3,c,isInt,lb,ub,A,conlb,conub,1)
+
+// Calling Symphony
+[x,f,status,output] = symphony(8,3,c,isInt,lb,ub,A,conlb,conub,1)
+
+
diff --git a/tests/general_tests/symphony/symphony_c2.sce b/tests/general_tests/symphony/symphony_c2.sce
index 41f9720..83cf860 100644
--- a/tests/general_tests/symphony/symphony_c2.sce
+++ b/tests/general_tests/symphony/symphony_c2.sce
@@ -1,4 +1,4 @@
-// Check for size of Objective Coefficient
+// Check if the user provides a row matrix in Objective Coefficient
// A basic case :
// Objective function
@@ -11,7 +11,7 @@ lb = repmat(0,8,1);
ub = [repmat(1,4,1);repmat(%inf,4,1)];
// Constraint Matrix
-conMatrix = [5,3,4,6,1,1,1,1;
+A = [5,3,4,6,1,1,1,1;
5*0.05,3*0.04,4*0.05,6*0.03,0.08,0.07,0.06,0.03;
5*0.03,3*0.03,4*0.04,6*0.04,0.06,0.07,0.08,0.09;]
@@ -24,10 +24,12 @@ conub = [ 25; 1.25; 1.25]
// Row Matrix for telling symphony that the is integer or not
isInt = [repmat(%t,1,4) repmat(%f,1,4)];
-// Calling Symphony
-[x,f,status,output] = symphony(8,3,c,isInt,lb,ub,conMatrix,conlb,conub,1)
-
// Error
//Symphony: Objective Coefficients should be a column matrix
//at line 209 of function symphony called by :
-//[x,f,status,output] = symphony(8,3,c,isInt,lb,ub,conMatrix,conlb,conub,1)
+//[x,f,status,output] = symphony(8,3,c,isInt,lb,ub,A,conlb,conub,1)
+
+// Calling Symphony
+[x,f,status,output] = symphony(8,3,c,isInt,lb,ub,A,conlb,conub,1)
+
+
diff --git a/tests/general_tests/symphony/symphony_conlb1.sce b/tests/general_tests/symphony/symphony_conlb1.sce
index fe100e0..2fa595d 100644
--- a/tests/general_tests/symphony/symphony_conlb1.sce
+++ b/tests/general_tests/symphony/symphony_conlb1.sce
@@ -1,4 +1,4 @@
-// Check for size of conlb
+// Check for size of constraint lower bound
// A basic case :
// Objective function
@@ -11,7 +11,7 @@ lb = repmat(0,8,1);
ub = [repmat(1,4,1);repmat(%inf,4,1)];
// Constraint Matrix
-conMatrix = [5,3,4,6,1,1,1,1;
+A = [5,3,4,6,1,1,1,1;
5*0.05,3*0.04,4*0.05,6*0.03,0.08,0.07,0.06,0.03;
5*0.03,3*0.03,4*0.04,6*0.04,0.06,0.07,0.08,0.09;]
@@ -24,10 +24,12 @@ conub = [ 25; 1.25; 1.25]
// Row Matrix for telling symphony that the is integer or not
isInt = [repmat(%t,1,4) repmat(%f,1,4)];
-// Calling Symphony
-[x,f,status,output] = symphony(8,3,c,isInt,lb,ub,conMatrix,conlb,conub,1)
-
// Error
//Symphony: The Lower Bound of constraint is not equal to the number of constraint
//at line 226 of function symphony called by :
-//[x,f,status,output] = symphony(8,3,c,isInt,lb,ub,conMatrix,conlb,conub,1)
+//[x,f,status,output] = symphony(8,3,c,isInt,lb,ub,A,conlb,conub,1)
+
+// Calling Symphony
+[x,f,status,output] = symphony(8,3,c,isInt,lb,ub,A,conlb,conub,1)
+
+
diff --git a/tests/general_tests/symphony/symphony_conlb2.sce b/tests/general_tests/symphony/symphony_conub1.sce
index 74f4af1..50cb53a 100644
--- a/tests/general_tests/symphony/symphony_conlb2.sce
+++ b/tests/general_tests/symphony/symphony_conub1.sce
@@ -1,4 +1,4 @@
-// Check for size of Objective Coefficient
+// Check for size of upper bound of constraints
// A basic case :
// Objective function
@@ -11,7 +11,7 @@ lb = repmat(0,8,1);
ub = [repmat(1,4,1);repmat(%inf,4,1)];
// Constraint Matrix
-conMatrix = [5,3,4,6,1,1,1,1;
+A = [5,3,4,6,1,1,1,1;
5*0.05,3*0.04,4*0.05,6*0.03,0.08,0.07,0.06,0.03;
5*0.03,3*0.03,4*0.04,6*0.04,0.06,0.07,0.08,0.09;]
@@ -24,10 +24,12 @@ conub = [ 25; 1.25;]
// Row Matrix for telling symphony that the is integer or not
isInt = [repmat(%t,1,4) repmat(%f,1,4)];
-// Calling Symphony
-[x,f,status,output] = symphony(8,3,c,isInt,lb,ub,conMatrix,conlb,conub,1)
-
// Error
//Symphony: The Upper Bound of constraint is not equal to the number of constraint
//at line 232 of function symphony called by :
-//[x,f,status,output] = symphony(8,3,c,isInt,lb,ub,conMatrix,conlb,conub,1)
+//[x,f,status,output] = symphony(8,3,c,isInt,lb,ub,A,conlb,conub,1)
+
+// Calling Symphony
+[x,f,status,output] = symphony(8,3,c,isInt,lb,ub,A,conlb,conub,1)
+
+
diff --git a/tests/general_tests/symphony/symphony_infeasible.sci b/tests/general_tests/symphony/symphony_infeasible.sce
index 04fe76a..f48446e 100644
--- a/tests/general_tests/symphony/symphony_infeasible.sci
+++ b/tests/general_tests/symphony/symphony_infeasible.sce
@@ -8,4 +8,12 @@ nbCon = 3;
isInt = repmat(%f,1,nbVar)
LB = -1*[%inf %inf]
UB = [%inf %inf]
+
+// Output
+//Problem loaded into environment.
+//Note: There is no limit on time.
+//This problem is infeasible.
+
[xopt, fopt, exitflag, output] = symphony(nbVar,nbCon,objCoef,isInt,LB,UB,conMatrix,conLB,conUB);
+
+
diff --git a/tests/general_tests/symphony/symphony_input1.sce b/tests/general_tests/symphony/symphony_input1.sce
index 4168710..a2b708d 100644
--- a/tests/general_tests/symphony/symphony_input1.sce
+++ b/tests/general_tests/symphony/symphony_input1.sce
@@ -1,4 +1,4 @@
-// Check for size of Objective Coefficient
+// Check if the user provides less number of input arguments
// A basic case :
// Objective function
@@ -11,7 +11,7 @@ lb = repmat(0,8,1);
ub = [repmat(1,4,1);repmat(%inf,4,1)];
// Constraint Matrix
-conMatrix = [5,3,4,6,1,1,1,1;
+A = [5,3,4,6,1,1,1,1;
5*0.05,3*0.04,4*0.05,6*0.03,0.08,0.07,0.06,0.03;
5*0.03,3*0.03,4*0.04,6*0.04,0.06,0.07,0.08,0.09;]
@@ -24,10 +24,12 @@ conub = [ 25; 1.25; 1.25]
// Row Matrix for telling symphony that the is integer or not
isInt = [repmat(%t,1,4) repmat(%f,1,4)];
-// Calling Symphony
-[x,f,status,output] = symphony(8,3,c,isInt,lb,ub)
-
// Error
//Symphony: Unexpected number of input arguments : 6 provided while should be in the set [9 10 11]
//at line 158 of function symphony called by :
//[x,f,status,output] = symphony(8,3,c,isInt,lb,ub)
+
+// Calling Symphony
+[x,f,status,output] = symphony(8,3,c,isInt,lb,ub)
+
+
diff --git a/tests/general_tests/symphony/symphony_input2.sce b/tests/general_tests/symphony/symphony_input2.sce
index d4fa96b..9171dd9 100644
--- a/tests/general_tests/symphony/symphony_input2.sce
+++ b/tests/general_tests/symphony/symphony_input2.sce
@@ -1,4 +1,4 @@
-// Check for size of Objective Coefficient
+// Check if the user provides more number of input arguments
// A basic case :
// Objective function
@@ -11,7 +11,7 @@ lb = repmat(0,8,1);
ub = [repmat(1,4,1);repmat(%inf,4,1)];
// Constraint Matrix
-conMatrix = [5,3,4,6,1,1,1,1;
+A = [5,3,4,6,1,1,1,1;
5*0.05,3*0.04,4*0.05,6*0.03,0.08,0.07,0.06,0.03;
5*0.03,3*0.03,4*0.04,6*0.04,0.06,0.07,0.08,0.09;]
@@ -25,9 +25,9 @@ conub = [ 25; 1.25; 1.25]
isInt = [repmat(%t,1,4) repmat(%f,1,4)];
// Calling Symphony
-[x,f,status,output] = symphony(8,3,c,isInt,lb,ub,conMatrix,conlb,conub,1,[],[],[])
+[x,f,status,output] = symphony(8,3,c,isInt,lb,ub,A,conlb,conub,1,[],[],[])
// Error
//Symphony: Unexpected number of input arguments : 13 provided while should be in the set [9 10 11]
//at line 158 of function symphony called by :
-//[x,f,status,output] = symphony(8,3,c,isInt,lb,ub,conMatrix,conlb,conub,1,[],[],[])
+//[x,f,status,output] = symphony(8,3,c,isInt,lb,ub,A,conlb,conub,1,[],[],[])
diff --git a/tests/general_tests/symphony/symphony_isInt1.sce b/tests/general_tests/symphony/symphony_isInt1.sce
index 914ccb2..fc79a3d 100644
--- a/tests/general_tests/symphony/symphony_isInt1.sce
+++ b/tests/general_tests/symphony/symphony_isInt1.sce
@@ -1,4 +1,4 @@
-// Check for size of Objective Coefficient
+// Check for size of isInt
// A basic case :
// Objective function
@@ -11,7 +11,7 @@ lb = repmat(0,8,1);
ub = [repmat(1,4,1);repmat(%inf,4,1)];
// Constraint Matrix
-conMatrix = [5,3,4,6,1,1,1,1;
+A = [5,3,4,6,1,1,1,1;
5*0.05,3*0.04,4*0.05,6*0.03,0.08,0.07,0.06,0.03;
5*0.03,3*0.03,4*0.04,6*0.04,0.06,0.07,0.08,0.09;]
@@ -24,10 +24,12 @@ conub = [ 25; 1.25; 1.25]
// Row Matrix for telling symphony that the is integer or not
isInt = [repmat(%t,1,4) repmat(%f,1,2)];
-// Calling Symphony
-[x,f,status,output] = symphony(8,3,c,isInt,lb,ub,conMatrix,conlb,conub,1)
-
// Error
//Symphony: The size of isInt is not equal to the number of variables
//at line 220 of function symphony called by :
-//[x,f,status,output] = symphony(8,3,c,isInt,lb,ub,conMatrix,conlb,conub,1)
+//[x,f,status,output] = symphony(8,3,c,isInt,lb,ub,A,conlb,conub,1)
+
+// Calling Symphony
+[x,f,status,output] = symphony(8,3,c,isInt,lb,ub,A,conlb,conub,1)
+
+
diff --git a/tests/general_tests/symphony/symphony_lb1.sce b/tests/general_tests/symphony/symphony_lb1.sce
index feef9ff..1116150 100644
--- a/tests/general_tests/symphony/symphony_lb1.sce
+++ b/tests/general_tests/symphony/symphony_lb1.sce
@@ -5,18 +5,18 @@
c = [350*5,330*3,310*4,280*6,500,450,400,100]';
// Lower Bound of variable
-lb = repmat(0,8,1);
+lb = repmat(0,6,1);
// Upper Bound of variables
ub = [repmat(1,4,1);repmat(%inf,4,1)];
// Constraint Matrix
-conMatrix = [5,3,4,6,1,1,1,1;
+A = [5,3,4,6,1,1,1,1;
5*0.05,3*0.04,4*0.05,6*0.03,0.08,0.07,0.06,0.03;
5*0.03,3*0.03,4*0.04,6*0.04,0.06,0.07,0.08,0.09;]
// Lower Bound of constrains
-conlb = [ 25; 1.25;]
+conlb = [ 25; 1.25; 1.25]
// Upper Bound of constrains
conub = [ 25; 1.25; 1.25]
@@ -24,10 +24,12 @@ conub = [ 25; 1.25; 1.25]
// Row Matrix for telling symphony that the is integer or not
isInt = [repmat(%t,1,4) repmat(%f,1,4)];
+// Error
+//Symphony: The Lower Bound is not equal to the number of variables
+//at line 262 of function symphony called by :
+//[x,f,status,output] = symphony(8,3,c,isInt,lb,ub,A,conlb,conub,1)
+
// Calling Symphony
-[x,f,status,output] = symphony(8,3,c,isInt,lb,ub,conMatrix,conlb,conub,1)
+[x,f,status,output] = symphony(8,3,c,isInt,lb,ub,A,conlb,conub,1)
+
-// Error
-//Symphony: The Lower Bound of constraint is not equal to the number of constraint
-//at line 226 of function symphony called by :
-//[x,f,status,output] = symphony(8,3,c,isInt,lb,ub,conMatrix,conlb,conub,1)
diff --git a/tests/general_tests/symphony/symphony_logical1.sce b/tests/general_tests/symphony/symphony_logical1.sce
index 1f728c8..2f63ed6 100644
--- a/tests/general_tests/symphony/symphony_logical1.sce
+++ b/tests/general_tests/symphony/symphony_logical1.sce
@@ -1,4 +1,3 @@
-// Check for size of Objective Coefficient
// A basic case :
// Objective function
@@ -24,10 +23,6 @@ conub = [ 25; 1.25; 1.25]
// Row Matrix for telling symphony that the is integer or not
isInt = [repmat(%t,1,4) repmat(%f,1,4)];
-// Calling Symphony
-[x,f,status,output] = symphony(8,3,c,isInt,lb,ub,conMatrix,conlb,conub,1)
-disp("x",x,"f",f,"status",status,"output",output);
-
// Output
//Problem loaded into environment.
//
@@ -59,3 +54,9 @@ disp("x",x,"f",f,"status",status,"output",output);
// 3.5
//
// x
+
+// Calling Symphony
+[x,f,status,output] = symphony(8,3,c,isInt,lb,ub,conMatrix,conlb,conub,1)
+disp("x",x,"f",f,"status",status,"output",output);
+
+
diff --git a/tests/general_tests/symphony/symphony_logical2.sce b/tests/general_tests/symphony/symphony_logical2.sce
index 4666fdc..5d0989f 100644
--- a/tests/general_tests/symphony/symphony_logical2.sce
+++ b/tests/general_tests/symphony/symphony_logical2.sce
@@ -11,7 +11,7 @@ lb = repmat(0,3,1);
ub = repmat(%inf,3,1);
// Constraint Matrix
-conMatrix = [3,2,5;
+A = [3,2,5;
2,1,1;
1,1,3;
5,2,4]
@@ -25,9 +25,6 @@ conub = [ 55;26;30;57]
// Row Matrix for telling symphony that the is integer or not
isInt = [repmat(%f,1,3)];
-// Calling Symphony
-[x,f,status,output] = symphony(3,4,c,isInt,lb,ub,conMatrix,conlb,conub,-1)
-disp("x",x,"f",f,"status",status,"output",output);
// Output
//Problem loaded into environment.
//
@@ -54,3 +51,8 @@ disp("x",x,"f",f,"status",status,"output",output);
// 1.6
//
// x
+
+// Calling Symphony
+[x,f,status,output] = symphony(3,4,c,isInt,lb,ub,A,conlb,conub,-1)
+disp("x",x,"f",f,"status",status,"output",output);
+
diff --git a/tests/general_tests/symphony/symphony_ub1.sce b/tests/general_tests/symphony/symphony_ub1.sce
index 74f4af1..75a9f9c 100644
--- a/tests/general_tests/symphony/symphony_ub1.sce
+++ b/tests/general_tests/symphony/symphony_ub1.sce
@@ -1,4 +1,4 @@
-// Check for size of Objective Coefficient
+// Check for size of upper bound
// A basic case :
// Objective function
@@ -8,10 +8,10 @@ c = [350*5,330*3,310*4,280*6,500,450,400,100]';
lb = repmat(0,8,1);
// Upper Bound of variables
-ub = [repmat(1,4,1);repmat(%inf,4,1)];
+ub = [repmat(1,4,1);repmat(%inf,3,1)];
// Constraint Matrix
-conMatrix = [5,3,4,6,1,1,1,1;
+A = [5,3,4,6,1,1,1,1;
5*0.05,3*0.04,4*0.05,6*0.03,0.08,0.07,0.06,0.03;
5*0.03,3*0.03,4*0.04,6*0.04,0.06,0.07,0.08,0.09;]
@@ -19,15 +19,17 @@ conMatrix = [5,3,4,6,1,1,1,1;
conlb = [ 25; 1.25; 1.25]
// Upper Bound of constrains
-conub = [ 25; 1.25;]
+conub = [ 25; 1.25; 1.25]
// Row Matrix for telling symphony that the is integer or not
isInt = [repmat(%t,1,4) repmat(%f,1,4)];
+// Error
+//Symphony: The Upper Bound is not equal to the number of variables
+//at line 268 of function symphony called by :
+//[x,f,status,output] = symphony(8,3,c,isInt,lb,ub,A,conlb,conub,1)
+
// Calling Symphony
-[x,f,status,output] = symphony(8,3,c,isInt,lb,ub,conMatrix,conlb,conub,1)
+[x,f,status,output] = symphony(8,3,c,isInt,lb,ub,A,conlb,conub,1)
+
-// Error
-//Symphony: The Upper Bound of constraint is not equal to the number of constraint
-//at line 232 of function symphony called by :
-//[x,f,status,output] = symphony(8,3,c,isInt,lb,ub,conMatrix,conlb,conub,1)
diff --git a/tests/general_tests/symphonymat/symphonymat_b1.sce b/tests/general_tests/symphonymat/symphonymat_b1.sce
index 68975c3..26c6ddb 100644
--- a/tests/general_tests/symphonymat/symphonymat_b1.sce
+++ b/tests/general_tests/symphonymat/symphonymat_b1.sce
@@ -1,4 +1,4 @@
-// Check for size of Objective Coefficients
+// Check for size of equality constraint upper bound
// Objective function
c = [350*5,330*3,310*4,280*6,500,450,400,100]';
@@ -17,10 +17,12 @@ beq = [ 25, 1.25]
intcon = [1 2 3 4];
-// Calling Symphony
-[x,f,status,output] = symphonymat(c,intcon,[],[],Aeq,beq,lb,ub)
-
//Error
//Symphonymat: The equality constraint upper bound is not equal to the number of equality constraint
//at line 239 of function symphonymat called by :
//[x,f,status,output] = symphonymat(c,intcon,[],[],Aeq,beq,lb,ub)
+
+// Calling Symphony
+[x,f,status,output] = symphonymat(c,intcon,[],[],Aeq,beq,lb,ub)
+
+
diff --git a/tests/general_tests/symphonymat/symphonymat_c1.sce b/tests/general_tests/symphonymat/symphonymat_c1.sce
index 6b8d5f8..990fcd1 100644
--- a/tests/general_tests/symphonymat/symphonymat_c1.sce
+++ b/tests/general_tests/symphonymat/symphonymat_c1.sce
@@ -17,10 +17,11 @@ beq = [ 25, 1.25, 1.25]
intcon = [1 2 3 4];
-// Calling Symphony
-[x,f,status,output] = symphonymat(c,intcon,[],[],Aeq,beq,lb,ub)
-
//Error
//Symphonymat: Objective Coefficients should be a column matrix
//at line 160 of function symphonymat called by :
//[x,f,status,output] = symphonymat(c,intcon,[],[],Aeq,beq,lb,ub)
+
+// Calling Symphony
+[x,f,status,output] = symphonymat(c,intcon,[],[],Aeq,beq,lb,ub)
+
diff --git a/tests/general_tests/symphonymat/symphonymat_infeasible.sce b/tests/general_tests/symphonymat/symphonymat_infeasible.sce
index ed393e9..0f73480 100644
--- a/tests/general_tests/symphonymat/symphonymat_infeasible.sce
+++ b/tests/general_tests/symphonymat/symphonymat_infeasible.sce
@@ -2,4 +2,12 @@
C = -1 * [1 1]'
A = [-1 0; 0, -1; 1 1]
b = [-6 -6 11]
+
+//Output
+//Problem loaded into environment.
+//Note: There is no limit on time.
+//This problem is infeasible.
+
[xopt, fopt, exitflag, output] = symphonymat(C,1,A,b);
+
+
diff --git a/tests/general_tests/symphonymat/symphonymat_input1.sce b/tests/general_tests/symphonymat/symphonymat_input1.sce
index b5ee515..00f2aa0 100644
--- a/tests/general_tests/symphonymat/symphonymat_input1.sce
+++ b/tests/general_tests/symphonymat/symphonymat_input1.sce
@@ -17,10 +17,11 @@ beq = [ 25, 1.25, 1.25]
intcon = [1 2 3 4];
-// Calling Symphony
-[x,f,status,output] = symphonymat(c,intcon,[],[],Aeq,beq,lb,ub,[],[])
-
//Error
//Symphony: Unexpected number of input arguments : 10 provided while should be in the set [4 6 8 9]
//at line 149 of function symphonymat called by :
//[x,f,status,output] = symphonymat(c,intcon,[],[],Aeq,beq,lb,ub,[],[])
+
+// Calling Symphony
+[x,f,status,output] = symphonymat(c,intcon,[],[],Aeq,beq,lb,ub,[],[])
+
diff --git a/tests/general_tests/symphonymat/symphonymat_input2.sce b/tests/general_tests/symphonymat/symphonymat_input2.sce
index 4be6d87..ee733d4 100644
--- a/tests/general_tests/symphonymat/symphonymat_input2.sce
+++ b/tests/general_tests/symphonymat/symphonymat_input2.sce
@@ -17,10 +17,12 @@ beq = [ 25, 1.25, 1.25]
intcon = [1 2 3 4];
-// Calling Symphony
-[x,f,status,output] = symphonymat(c,intcon)
-
//Error
//Symphony: Unexpected number of input arguments : 2 provided while should be in the set [4 6 8 9]
//at line 149 of function symphonymat called by :
//[x,f,status,output] = symphonymat(c,intcon)
+
+// Calling Symphony
+[x,f,status,output] = symphonymat(c,intcon)
+
+
diff --git a/tests/general_tests/symphonymat/symphonymat_intcon1.sce b/tests/general_tests/symphonymat/symphonymat_intcon1.sce
index 0c24f4c..ded8469 100644
--- a/tests/general_tests/symphonymat/symphonymat_intcon1.sce
+++ b/tests/general_tests/symphonymat/symphonymat_intcon1.sce
@@ -1,4 +1,4 @@
-// Check for size of Objective Coefficients
+// Check if the user provides a value greater than the number of variables in intcon
// Objective function
c = [350*5,330*3,310*4,280*6,500,450,400,100]';
@@ -17,10 +17,12 @@ beq = [ 25, 1.25, 1.25]
intcon = [1 2 3 10];
+//Error
+//Symphonymat: The values inside intcon should be less than the number of variables
+//at line 238 of function symphonymat called by :
+//[x,f,status,output] = symphonymat(c,intcon,[],[],Aeq,beq,lb,ub)
+
// Calling Symphony
[x,f,status,output] = symphonymat(c,intcon,[],[],Aeq,beq,lb,ub)
-//Error
-//Symphonymat: Objective Coefficients should be a column matrix
-//at line 160 of function symphonymat called by :
-//[x,f,status,output] = symphonymat(c,intcon,[],[],Aeq,beq,lb,ub)
+
diff --git a/tests/general_tests/symphonymat/symphonymat_intcon2.sce b/tests/general_tests/symphonymat/symphonymat_intcon2.sce
index 47b7572..9df4d64 100644
--- a/tests/general_tests/symphonymat/symphonymat_intcon2.sce
+++ b/tests/general_tests/symphonymat/symphonymat_intcon2.sce
@@ -1,4 +1,4 @@
-// Check for size of Objective Coefficients
+// Check if the user provides a value less than 0
// Objective function
c = [350*5,330*3,310*4,280*6,500,450,400,100]';
@@ -17,10 +17,12 @@ beq = [ 25, 1.25, 1.25]
intcon = [1 2 3 -10];
-// Calling Symphony
-[x,f,status,output] = symphonymat(c,intcon,[],[],Aeq,beq,lb,ub)
-
//Error
//Symphonymat: The values inside intcon should be greater than 0
//at line 218 of function symphonymat called by :
//[x,f,status,output] = symphonymat(c,intcon,[],[],Aeq,beq,lb,ub)
+
+// Calling Symphony
+[x,f,status,output] = symphonymat(c,intcon,[],[],Aeq,beq,lb,ub)
+
+
diff --git a/tests/general_tests/symphonymat/symphonymat_intcon3.sce b/tests/general_tests/symphonymat/symphonymat_intcon3.sce
index e644967..a7d27ff 100644
--- a/tests/general_tests/symphonymat/symphonymat_intcon3.sce
+++ b/tests/general_tests/symphonymat/symphonymat_intcon3.sce
@@ -17,10 +17,12 @@ beq = [ 25, 1.25, 1.25]
intcon = [1 2 3.5 4];
-// Calling Symphony
-[x,f,status,output] = symphonymat(c,intcon,[],[],Aeq,beq,lb,ub)
-
//Error
//Symphonymat: The values inside intcon should be integer
//at line 223 of function symphonymat called by :
//[x,f,status,output] = symphonymat(c,intcon,[],[],Aeq,beq,lb,ub)
+
+// Calling Symphony
+[x,f,status,output] = symphonymat(c,intcon,[],[],Aeq,beq,lb,ub)
+
+
diff --git a/tests/general_tests/symphonymat/symphonymat_lb1.sce b/tests/general_tests/symphonymat/symphonymat_lb1.sce
index f9a4b29..fee0556 100644
--- a/tests/general_tests/symphonymat/symphonymat_lb1.sce
+++ b/tests/general_tests/symphonymat/symphonymat_lb1.sce
@@ -17,10 +17,12 @@ beq = [ 25, 1.25, 1.25]
intcon = [1 2 3 4];
-// Calling Symphony
-[x,f,status,output] = symphonymat(c,intcon,[],[],Aeq,beq,lb,ub)
-
//Error
//Symphonymat: The Lower Bound is not equal to the number of variables
//at line 245 of function symphonymat called by :
//[x,f,status,output] = symphonymat(c,intcon,[],[],Aeq,beq,lb,ub)
+
+// Calling Symphony
+[x,f,status,output] = symphonymat(c,intcon,[],[],Aeq,beq,lb,ub)
+
+
diff --git a/tests/general_tests/symphonymat/symphonymat_logical1.sce b/tests/general_tests/symphonymat/symphonymat_logical1.sce
index 70ad9f8..ced5e26 100644
--- a/tests/general_tests/symphonymat/symphonymat_logical1.sce
+++ b/tests/general_tests/symphonymat/symphonymat_logical1.sce
@@ -1,3 +1,5 @@
+// An example with equality constraints, variable bounds and options to set
+
// Objective function
c = [350*5,330*3,310*4,280*6,500,450,400,100]';
@@ -18,9 +20,6 @@ intcon = [1 2 3 4 4];
options = list("time_limit",250);
-// Calling Symphony
-[x,f,status,output] = symphonymat(c,intcon,[],[],Aeq,beq,lb,ub,options)
-disp("x",x,"f",f,"status",status,"output",output);
//Output
//setting of double parameter function executed successfully
//Problem loaded into environment.
@@ -53,3 +52,8 @@ disp("x",x,"f",f,"status",status,"output",output);
// 3.5
//
// x
+
+// Calling Symphony
+[x,f,status,output] = symphonymat(c,intcon,[],[],Aeq,beq,lb,ub,options)
+disp("x",x,"f",f,"status",status,"output",output);
+
diff --git a/tests/general_tests/symphonymat/symphonymat_logical2.sce b/tests/general_tests/symphonymat/symphonymat_logical2.sce
index 6bdd1b3..4f3923f 100644
--- a/tests/general_tests/symphonymat/symphonymat_logical2.sce
+++ b/tests/general_tests/symphonymat/symphonymat_logical2.sce
@@ -1,4 +1,5 @@
-// Check for size of Objective Coefficient
+// An example with equality constraints and variable bounds
+
// A basic case :
// Objective function
@@ -22,9 +23,6 @@ b = [ 55;26;30;57]
// Row Matrix for telling symphony that the is integer or not
intcon = [];
-// Calling Symphony
-[x,f,status,output] = symphonymat(c,intcon,A,b,[],[],lb,ub)
-disp("x",x,"f",f,"status",status,"output",output);
// Output
//Problem loaded into environment.
//
@@ -51,3 +49,8 @@ disp("x",x,"f",f,"status",status,"output",output);
// 1.6
//
// x
+
+// Calling Symphony
+[x,f,status,output] = symphonymat(c,intcon,A,b,[],[],lb,ub)
+disp("x",x,"f",f,"status",status,"output",output);
+
diff --git a/tests/general_tests/symphonymat/symphonymat_options1.sce b/tests/general_tests/symphonymat/symphonymat_options1.sce
index 8da8547..01d293e 100644
--- a/tests/general_tests/symphonymat/symphonymat_options1.sce
+++ b/tests/general_tests/symphonymat/symphonymat_options1.sce
@@ -19,10 +19,12 @@ intcon = [1 2 3 4];
options = list("time_limit");
-// Calling Symphony
-[x,f,status,output] = symphonymat(c,intcon,[],[],Aeq,beq,lb,ub,options)
-
//Error
//Symphonymat: Size of parameters should be even
//at line 272 of function symphonymat called by :
//[x,f,status,output] = symphonymat(c,intcon,[],[],Aeq,beq,lb,ub,options)
+
+// Calling Symphony
+[x,f,status,output] = symphonymat(c,intcon,[],[],Aeq,beq,lb,ub,options)
+
+
diff --git a/tests/general_tests/symphonymat/symphonymat_options2.sce b/tests/general_tests/symphonymat/symphonymat_options2.sce
index 89d3e14..2b7792c 100644
--- a/tests/general_tests/symphonymat/symphonymat_options2.sce
+++ b/tests/general_tests/symphonymat/symphonymat_options2.sce
@@ -19,10 +19,11 @@ intcon = [1 2 3 4];
options = ["time_limit" 250];
-// Calling Symphony
-[x,f,status,output] = symphonymat(c,intcon,[],[],Aeq,beq,lb,ub,options)
-
//Error
//Symphonymat: Options should be a list
//at line 266 of function symphonymat called by :
//[x,f,status,output] = symphonymat(c,intcon,[],[],Aeq,beq,lb,ub,options)
+
+// Calling Symphony
+[x,f,status,output] = symphonymat(c,intcon,[],[],Aeq,beq,lb,ub,options)
+
diff --git a/tests/general_tests/symphonymat/symphonymat_ub1.sce b/tests/general_tests/symphonymat/symphonymat_ub1.sce
index fdf345a..82237f2 100644
--- a/tests/general_tests/symphonymat/symphonymat_ub1.sce
+++ b/tests/general_tests/symphonymat/symphonymat_ub1.sce
@@ -17,10 +17,12 @@ beq = [ 25, 1.25, 1.25]
intcon = [1 2 3 4];
-// Calling Symphony
-[x,f,status,output] = symphonymat(c,intcon,[],[],Aeq,beq,lb,ub)
-
//Error
//Symphonymat: The Upper Bound is not equal to the number of variables
//at line 251 of function symphonymat called by :
//[x,f,status,output] = symphonymat(c,intcon,[],[],Aeq,beq,lb,ub)
+
+// Calling Symphony
+[x,f,status,output] = symphonymat(c,intcon,[],[],Aeq,beq,lb,ub)
+
+
diff --git a/tests/unit_tests/lsqnonneg.dia.ref b/tests/unit_tests/lsqnonneg.dia.ref
new file mode 100644
index 0000000..2c7c7d2
--- /dev/null
+++ b/tests/unit_tests/lsqnonneg.dia.ref
@@ -0,0 +1,72 @@
+// Copyright (C) 2015 - IIT Bombay - FOSSEE
+//
+// Author: Harpreet Singh
+// Organization: FOSSEE, IIT Bombay
+// Email: harpreet.mertia@gmail.com
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
+
+// <-- JVM NOT MANDATORY -->
+// <-- ENGLISH IMPOSED -->
+
+
+//
+// assert_close --
+// Returns 1 if the two real matrices computed and expected are close,
+// i.e. if the relative distance between computed and expected is lesser than epsilon.
+// Arguments
+// computed, expected : the two matrices to compare
+// epsilon : a small number
+//
+function flag = assert_close ( computed, expected, epsilon )
+ if expected==0.0 then
+ shift = norm(computed-expected);
+ else
+ shift = norm(computed-expected)/norm(expected);
+ end
+// if shift < epsilon then
+// flag = 1;
+// else
+// flag = 0;
+// end
+// if flag <> 1 then pause,end
+ flag = assert_checktrue ( shift < epsilon );
+endfunction
+//
+// assert_equal --
+// Returns 1 if the two real matrices computed and expected are equal.
+// Arguments
+// computed, expected : the two matrices to compare
+// epsilon : a small number
+//
+//function flag = assert_equal ( computed , expected )
+// if computed==expected then
+// flag = 1;
+// else
+// flag = 0;
+// end
+// if flag <> 1 then pause,end
+//endfunction
+
+// A basic lsqnonneg problem
+C = [
+ 0.0372 0.2869
+ 0.6861 0.7071
+ 0.6233 0.6245
+ 0.6344 0.6170];
+d = [
+ 0.8587
+ 0.1781
+ 0.0747
+ 0.8405];
+[xopt,resnorm,residual,exitflag,output,lambda] = lsqnonneg(C,d)
+
+assert_close ( xopt , [ 0 0.6929344 ]' , 0.0005 );
+assert_close ( residual , [0.6598971 -0.3118739 -0.3580375 0.4129595]' , 0.0005 );
+assert_close ( resnorm , [ 0.8314560] , 0.0005 );
+assert_checkequal( exitflag , int32(0) );
+printf("Test Successful");
diff --git a/tests/unit_tests/lsqnonneg.tst b/tests/unit_tests/lsqnonneg.tst
new file mode 100644
index 0000000..2c7c7d2
--- /dev/null
+++ b/tests/unit_tests/lsqnonneg.tst
@@ -0,0 +1,72 @@
+// Copyright (C) 2015 - IIT Bombay - FOSSEE
+//
+// Author: Harpreet Singh
+// Organization: FOSSEE, IIT Bombay
+// Email: harpreet.mertia@gmail.com
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
+
+// <-- JVM NOT MANDATORY -->
+// <-- ENGLISH IMPOSED -->
+
+
+//
+// assert_close --
+// Returns 1 if the two real matrices computed and expected are close,
+// i.e. if the relative distance between computed and expected is lesser than epsilon.
+// Arguments
+// computed, expected : the two matrices to compare
+// epsilon : a small number
+//
+function flag = assert_close ( computed, expected, epsilon )
+ if expected==0.0 then
+ shift = norm(computed-expected);
+ else
+ shift = norm(computed-expected)/norm(expected);
+ end
+// if shift < epsilon then
+// flag = 1;
+// else
+// flag = 0;
+// end
+// if flag <> 1 then pause,end
+ flag = assert_checktrue ( shift < epsilon );
+endfunction
+//
+// assert_equal --
+// Returns 1 if the two real matrices computed and expected are equal.
+// Arguments
+// computed, expected : the two matrices to compare
+// epsilon : a small number
+//
+//function flag = assert_equal ( computed , expected )
+// if computed==expected then
+// flag = 1;
+// else
+// flag = 0;
+// end
+// if flag <> 1 then pause,end
+//endfunction
+
+// A basic lsqnonneg problem
+C = [
+ 0.0372 0.2869
+ 0.6861 0.7071
+ 0.6233 0.6245
+ 0.6344 0.6170];
+d = [
+ 0.8587
+ 0.1781
+ 0.0747
+ 0.8405];
+[xopt,resnorm,residual,exitflag,output,lambda] = lsqnonneg(C,d)
+
+assert_close ( xopt , [ 0 0.6929344 ]' , 0.0005 );
+assert_close ( residual , [0.6598971 -0.3118739 -0.3580375 0.4129595]' , 0.0005 );
+assert_close ( resnorm , [ 0.8314560] , 0.0005 );
+assert_checkequal( exitflag , int32(0) );
+printf("Test Successful");
diff --git a/tests/unit_tests/symphony_base.dia.ref b/tests/unit_tests/symphony_base.dia.ref
index 64dfeea..4b653a8 100644
--- a/tests/unit_tests/symphony_base.dia.ref
+++ b/tests/unit_tests/symphony_base.dia.ref
@@ -53,7 +53,7 @@ endfunction
//endfunction
// Objective function
-c = [350*5,330*3,310*4,280*6,500,450,400,100]
+c = [350*5,330*3,310*4,280*6,500,450,400,100]';
// Lower Bound of variable
lb = repmat(0,1,8);
@@ -81,7 +81,7 @@ isInt = [repmat(%t,1,4) repmat(%f,1,4)];
//In Symphony Library for optimal solution status = 227
status = sym_getStatus();
-assert_close ( x , [1 1 0 1 7.25 0 0.25 3.5] , 1.e-7 );
+assert_close ( x , [1 1 0 1 7.25 0 0.25 3.5]' , 1.e-7 );
assert_close ( f , [ 8495] , 1.e-7 );
assert_checkequal( status , 227 );
printf("Test Successful");
diff --git a/tests/unit_tests/symphony_base.tst b/tests/unit_tests/symphony_base.tst
index 5ec76ee..31e7547 100644
--- a/tests/unit_tests/symphony_base.tst
+++ b/tests/unit_tests/symphony_base.tst
@@ -53,7 +53,7 @@ endfunction
//endfunction
// Objective function
-c = [350*5,330*3,310*4,280*6,500,450,400,100]
+c = [350*5,330*3,310*4,280*6,500,450,400,100]';
// Lower Bound of variable
lb = repmat(0,1,8);
diff --git a/tests/unit_tests/symphonymat_base.dia.ref b/tests/unit_tests/symphonymat_base.dia.ref
index 1d26663..d57851a 100644
--- a/tests/unit_tests/symphonymat_base.dia.ref
+++ b/tests/unit_tests/symphonymat_base.dia.ref
@@ -53,7 +53,7 @@ endfunction
//endfunction
// Objective function
-c = [350*5,330*3,310*4,280*6,500,450,400,100]
+c = [350*5,330*3,310*4,280*6,500,450,400,100]';
// Lower Bound of variable
lb = repmat(0,1,8);
@@ -77,7 +77,7 @@ intcon = [1 2 3 4];
//In Symphony Library for optimal solution status = 227
status = sym_getStatus();
-assert_close ( x , [1 1 0 1 7.25 0 0.25 3.5] , 1.e-7 );
+assert_close ( x , [1 1 0 1 7.25 0 0.25 3.5]' , 1.e-7 );
assert_close ( f , [ 8495] , 1.e-7 );
assert_checkequal( status , 227 );
printf("Test Successful");
diff --git a/tests/unit_tests/symphonymat_base.tst b/tests/unit_tests/symphonymat_base.tst
index 9b32e42..37b4c3f 100644
--- a/tests/unit_tests/symphonymat_base.tst
+++ b/tests/unit_tests/symphonymat_base.tst
@@ -53,7 +53,7 @@ endfunction
//endfunction
// Objective function
-c = [350*5,330*3,310*4,280*6,500,450,400,100]
+c = [350*5,330*3,310*4,280*6,500,450,400,100]';
// Lower Bound of variable
lb = repmat(0,1,8);