diff options
Diffstat (limited to 'tests/general_tests/symphony')
-rw-r--r-- | tests/general_tests/symphony/symphony_c1.sce | 33 | ||||
-rw-r--r-- | tests/general_tests/symphony/symphony_c2.sce | 33 | ||||
-rw-r--r-- | tests/general_tests/symphony/symphony_conlb1.sce | 33 | ||||
-rw-r--r-- | tests/general_tests/symphony/symphony_conlb2.sce | 33 | ||||
-rw-r--r-- | tests/general_tests/symphony/symphony_conmatrix1.sce | 33 | ||||
-rw-r--r-- | tests/general_tests/symphony/symphony_conmatrix2.sce | 32 | ||||
-rw-r--r-- | tests/general_tests/symphony/symphony_infeasible.sci | 11 | ||||
-rw-r--r-- | tests/general_tests/symphony/symphony_input1.sce | 33 | ||||
-rw-r--r-- | tests/general_tests/symphony/symphony_input2.sce | 33 | ||||
-rw-r--r-- | tests/general_tests/symphony/symphony_isInt1.sce | 33 | ||||
-rw-r--r-- | tests/general_tests/symphony/symphony_lb1.sce | 33 | ||||
-rw-r--r-- | tests/general_tests/symphony/symphony_logical1.sce | 61 | ||||
-rw-r--r-- | tests/general_tests/symphony/symphony_logical2.sce | 56 | ||||
-rw-r--r-- | tests/general_tests/symphony/symphony_ub1.sce | 33 |
14 files changed, 490 insertions, 0 deletions
diff --git a/tests/general_tests/symphony/symphony_c1.sce b/tests/general_tests/symphony/symphony_c1.sce new file mode 100644 index 0000000..7b5b7e9 --- /dev/null +++ b/tests/general_tests/symphony/symphony_c1.sce @@ -0,0 +1,33 @@ +// Check for size of Objective Coefficient +// A basic case : + +// Objective function +c = [350*5,330*3,310*4,280*6,500,450,400]'; + +// 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 +conlb = [ 25; 1.25; 1.25] + +// Upper Bound of constrains +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) diff --git a/tests/general_tests/symphony/symphony_c2.sce b/tests/general_tests/symphony/symphony_c2.sce new file mode 100644 index 0000000..41f9720 --- /dev/null +++ b/tests/general_tests/symphony/symphony_c2.sce @@ -0,0 +1,33 @@ +// Check for size of Objective Coefficient +// A basic case : + +// Objective function +c = [350*5,330*3,310*4,280*6,500,450,400]; + +// 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 +conlb = [ 25; 1.25; 1.25] + +// Upper Bound of constrains +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) diff --git a/tests/general_tests/symphony/symphony_conlb1.sce b/tests/general_tests/symphony/symphony_conlb1.sce new file mode 100644 index 0000000..fe100e0 --- /dev/null +++ b/tests/general_tests/symphony/symphony_conlb1.sce @@ -0,0 +1,33 @@ +// Check for size of conlb +// A basic case : + +// Objective function +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 +conlb = [ 25; 1.25; ] + +// Upper Bound of constrains +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) diff --git a/tests/general_tests/symphony/symphony_conlb2.sce b/tests/general_tests/symphony/symphony_conlb2.sce new file mode 100644 index 0000000..74f4af1 --- /dev/null +++ b/tests/general_tests/symphony/symphony_conlb2.sce @@ -0,0 +1,33 @@ +// Check for size of Objective Coefficient +// A basic case : + +// Objective function +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 +conlb = [ 25; 1.25; 1.25] + +// Upper Bound of constrains +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) diff --git a/tests/general_tests/symphony/symphony_conmatrix1.sce b/tests/general_tests/symphony/symphony_conmatrix1.sce new file mode 100644 index 0000000..280c973 --- /dev/null +++ b/tests/general_tests/symphony/symphony_conmatrix1.sce @@ -0,0 +1,33 @@ +// Check the size for conMatrix +// A basic case : + +// Objective function +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; +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;] + +// Lower Bound of constrains +conlb = [ 25; 1.25; 1.25] + +// Upper Bound of constrains +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) diff --git a/tests/general_tests/symphony/symphony_conmatrix2.sce b/tests/general_tests/symphony/symphony_conmatrix2.sce new file mode 100644 index 0000000..0091f7d --- /dev/null +++ b/tests/general_tests/symphony/symphony_conmatrix2.sce @@ -0,0 +1,32 @@ +// Check the size for conMatrix +// A basic case : + +// Objective function +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;] + +// Lower Bound of constrains +conlb = [ 25; 1.25; 1.25] + +// Upper Bound of constrains +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) diff --git a/tests/general_tests/symphony/symphony_infeasible.sci b/tests/general_tests/symphony/symphony_infeasible.sci new file mode 100644 index 0000000..04fe76a --- /dev/null +++ b/tests/general_tests/symphony/symphony_infeasible.sci @@ -0,0 +1,11 @@ +// Infeasible problem +objCoef = -1 * [1 1]' +conMatrix = [-1 0; 0, -1; 1 1] +conLB = -1*[%inf %inf %inf ] +conUB = [-6 -6 11] +nbVar = 2; +nbCon = 3; +isInt = repmat(%f,1,nbVar) +LB = -1*[%inf %inf] +UB = [%inf %inf] +[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 new file mode 100644 index 0000000..4168710 --- /dev/null +++ b/tests/general_tests/symphony/symphony_input1.sce @@ -0,0 +1,33 @@ +// Check for size of Objective Coefficient +// A basic case : + +// Objective function +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 +conlb = [ 25; 1.25; 1.25] + +// Upper Bound of constrains +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) diff --git a/tests/general_tests/symphony/symphony_input2.sce b/tests/general_tests/symphony/symphony_input2.sce new file mode 100644 index 0000000..d4fa96b --- /dev/null +++ b/tests/general_tests/symphony/symphony_input2.sce @@ -0,0 +1,33 @@ +// Check for size of Objective Coefficient +// A basic case : + +// Objective function +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 +conlb = [ 25; 1.25; 1.25] + +// Upper Bound of constrains +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: 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,[],[],[]) diff --git a/tests/general_tests/symphony/symphony_isInt1.sce b/tests/general_tests/symphony/symphony_isInt1.sce new file mode 100644 index 0000000..914ccb2 --- /dev/null +++ b/tests/general_tests/symphony/symphony_isInt1.sce @@ -0,0 +1,33 @@ +// Check for size of Objective Coefficient +// A basic case : + +// Objective function +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 +conlb = [ 25; 1.25; 1.25] + +// Upper Bound of constrains +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) diff --git a/tests/general_tests/symphony/symphony_lb1.sce b/tests/general_tests/symphony/symphony_lb1.sce new file mode 100644 index 0000000..feef9ff --- /dev/null +++ b/tests/general_tests/symphony/symphony_lb1.sce @@ -0,0 +1,33 @@ +// Check for size of Objective Coefficient +// A basic case : + +// Objective function +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 +conlb = [ 25; 1.25;] + +// Upper Bound of constrains +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) diff --git a/tests/general_tests/symphony/symphony_logical1.sce b/tests/general_tests/symphony/symphony_logical1.sce new file mode 100644 index 0000000..1f728c8 --- /dev/null +++ b/tests/general_tests/symphony/symphony_logical1.sce @@ -0,0 +1,61 @@ +// Check for size of Objective Coefficient +// A basic case : + +// Objective function +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 +conlb = [ 25; 1.25; 1.25] + +// Upper Bound of constrains +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. +// +//Note: There is no limit on time. +// +//An optimal solution has been found. +// +// 0. +// +// Iterations: 1 +// +// output +// +// 227. +// +// status +// +// 8495. +// +// f +// +// 1. +// 1. +// 0. +// 1. +// 7.25 +// 0. +// 0.25 +// 3.5 +// +// x diff --git a/tests/general_tests/symphony/symphony_logical2.sce b/tests/general_tests/symphony/symphony_logical2.sce new file mode 100644 index 0000000..4666fdc --- /dev/null +++ b/tests/general_tests/symphony/symphony_logical2.sce @@ -0,0 +1,56 @@ +// Check for size of Objective Coefficient +// A basic case : + +// Objective function +c = [20,10,15]'; + +// Lower Bound of variable +lb = repmat(0,3,1); + +// Upper Bound of variables +ub = repmat(%inf,3,1); + +// Constraint Matrix +conMatrix = [3,2,5; + 2,1,1; + 1,1,3; + 5,2,4] + +// Lower Bound of constrains +conlb = repmat(-%inf,4,1) + +// Upper Bound of constrains +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. +// +//Note: There is no limit on time. +// +//An optimal solution has been found. +// +// 0. +// +// Iterations: 1 +// +// output +// +// 227. +// +// status +// +// 268. +// +// f +// +// 1.8 +// 20.8 +// 1.6 +// +// x diff --git a/tests/general_tests/symphony/symphony_ub1.sce b/tests/general_tests/symphony/symphony_ub1.sce new file mode 100644 index 0000000..74f4af1 --- /dev/null +++ b/tests/general_tests/symphony/symphony_ub1.sce @@ -0,0 +1,33 @@ +// Check for size of Objective Coefficient +// A basic case : + +// Objective function +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 +conlb = [ 25; 1.25; 1.25] + +// Upper Bound of constrains +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) |