diff options
28 files changed, 942 insertions, 0 deletions
diff --git a/qpipoptmat/qpipoptmat_H2.sce b/qpipoptmat/qpipoptmat_H2.sce new file mode 100644 index 0000000..507487f --- /dev/null +++ b/qpipoptmat/qpipoptmat_H2.sce @@ -0,0 +1,22 @@ +// Check if H is a symmetric matrix +//Find x in R^6 such that: + +Aeq= [1,-1,1,0,3,1; +-1,0,-3,-4,5,6; +2,5,3,0,1,0]; +beq=[1; 2; 3]; +A= [0,1,0,1,2,-1; +-1,0,2,1,1,0]; +b = [-1; 2.5]; +lb=[-1000; -10000; 0; -1000; -1000; -1000]; +ub=[10000; 100; 1.5; 100; 100; 1000]; +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) diff --git a/qpipoptmat/qpipoptmat_logical2.sce b/qpipoptmat/qpipoptmat_logical2.sce new file mode 100644 index 0000000..4571a34 --- /dev/null +++ b/qpipoptmat/qpipoptmat_logical2.sce @@ -0,0 +1,43 @@ +//Find x in R^6 such that: +// A simple example with constraints + +Aeq= [1,-1,1,0,3,1; +-1,0,-3,-4,5,6; +2,5,3,0,1,0]; +beq=[1; 2; 3]; +A= [0,1,0,1,2,-1; +-1,0,2,1,1,0]; +b = [-1; 2.5]; +lb=[-1000; -10000; 0; -1000; -1000; -1000]; +ub=[10000; 100; 1.5; 100; 100; 1000]; +x0 = repmat(0,6,1); +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) + +//Output +// lambda = +// +// lower: [9.982D-15,1.000D-15,7.345D-11,1.005D-14,9.994D-15,1.003D-14] +// upper: [1.000D-15,9.966D-14,7.481D-12,9.525D-14,1.006D-13,9.969D-15] +// ineqlin: [0.3091368,1.197D-12] +// eqlin: [-1.5564027,-0.1698164,-0.7054782] +// output = +// +// Iterations: 13 +// exitflag = +// +// 0 +// fopt = +// +// - 14.843248 +// xopt = +// +// 1.7975426 +// - 0.3381487 +// 0.1633880 +// - 4.9884023 +// 0.6054943 +// - 3.1155623 + diff --git a/symphony/symphony_c1.sce b/symphony/symphony_c1.sce new file mode 100644 index 0000000..7b5b7e9 --- /dev/null +++ b/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/symphony/symphony_c2.sce b/symphony/symphony_c2.sce new file mode 100644 index 0000000..41f9720 --- /dev/null +++ b/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/symphony/symphony_conlb1.sce b/symphony/symphony_conlb1.sce new file mode 100644 index 0000000..fe100e0 --- /dev/null +++ b/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/symphony/symphony_conlb2.sce b/symphony/symphony_conlb2.sce new file mode 100644 index 0000000..74f4af1 --- /dev/null +++ b/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/symphony/symphony_conmatrix1.sce b/symphony/symphony_conmatrix1.sce new file mode 100644 index 0000000..280c973 --- /dev/null +++ b/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/symphony/symphony_conmatrix2.sce b/symphony/symphony_conmatrix2.sce new file mode 100644 index 0000000..0091f7d --- /dev/null +++ b/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/symphony/symphony_input1.sce b/symphony/symphony_input1.sce new file mode 100644 index 0000000..4168710 --- /dev/null +++ b/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/symphony/symphony_input2.sce b/symphony/symphony_input2.sce new file mode 100644 index 0000000..d4fa96b --- /dev/null +++ b/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/symphony/symphony_isInt1.sce b/symphony/symphony_isInt1.sce new file mode 100644 index 0000000..914ccb2 --- /dev/null +++ b/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/symphony/symphony_lb1.sce b/symphony/symphony_lb1.sce new file mode 100644 index 0000000..feef9ff --- /dev/null +++ b/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/symphony/symphony_logical1.sce b/symphony/symphony_logical1.sce new file mode 100644 index 0000000..1f728c8 --- /dev/null +++ b/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/symphony/symphony_logical2.sce b/symphony/symphony_logical2.sce new file mode 100644 index 0000000..4666fdc --- /dev/null +++ b/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/symphony/symphony_ub1.sce b/symphony/symphony_ub1.sce new file mode 100644 index 0000000..74f4af1 --- /dev/null +++ b/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) diff --git a/symphonymat/symphonymat_b1.sce b/symphonymat/symphonymat_b1.sce new file mode 100644 index 0000000..68975c3 --- /dev/null +++ b/symphonymat/symphonymat_b1.sce @@ -0,0 +1,26 @@ +// Check for size of Objective Coefficients +// Objective function +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 +ub = [repmat(1,1,4) repmat(%inf,1,4)]; + +// Constraint Matrix +Aeq = [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;] + +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) diff --git a/symphonymat/symphonymat_c1.sce b/symphonymat/symphonymat_c1.sce new file mode 100644 index 0000000..6b8d5f8 --- /dev/null +++ b/symphonymat/symphonymat_c1.sce @@ -0,0 +1,26 @@ +// Check for size of Objective Coefficients +// Objective function +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 +ub = [repmat(1,1,4) repmat(%inf,1,4)]; + +// Constraint Matrix +Aeq = [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;] + +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) diff --git a/symphonymat/symphonymat_input1.sce b/symphonymat/symphonymat_input1.sce new file mode 100644 index 0000000..b5ee515 --- /dev/null +++ b/symphonymat/symphonymat_input1.sce @@ -0,0 +1,26 @@ +// Check for size of input for symphony +// Objective function +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 +ub = [repmat(1,1,4) repmat(%inf,1,4)]; + +// Constraint Matrix +Aeq = [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;] + +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,[],[]) diff --git a/symphonymat/symphonymat_input2.sce b/symphonymat/symphonymat_input2.sce new file mode 100644 index 0000000..4be6d87 --- /dev/null +++ b/symphonymat/symphonymat_input2.sce @@ -0,0 +1,26 @@ +// Check for size of input for symphony +// Objective function +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 +ub = [repmat(1,1,4) repmat(%inf,1,4)]; + +// Constraint Matrix +Aeq = [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;] + +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) diff --git a/symphonymat/symphonymat_intcon1.sce b/symphonymat/symphonymat_intcon1.sce new file mode 100644 index 0000000..0c24f4c --- /dev/null +++ b/symphonymat/symphonymat_intcon1.sce @@ -0,0 +1,26 @@ +// Check for size of Objective Coefficients +// Objective function +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 +ub = [repmat(1,1,4) repmat(%inf,1,4)]; + +// Constraint Matrix +Aeq = [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;] + +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: 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/symphonymat/symphonymat_intcon2.sce b/symphonymat/symphonymat_intcon2.sce new file mode 100644 index 0000000..47b7572 --- /dev/null +++ b/symphonymat/symphonymat_intcon2.sce @@ -0,0 +1,26 @@ +// Check for size of Objective Coefficients +// Objective function +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 +ub = [repmat(1,1,4) repmat(%inf,1,4)]; + +// Constraint Matrix +Aeq = [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;] + +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) diff --git a/symphonymat/symphonymat_intcon3.sce b/symphonymat/symphonymat_intcon3.sce new file mode 100644 index 0000000..e644967 --- /dev/null +++ b/symphonymat/symphonymat_intcon3.sce @@ -0,0 +1,26 @@ +// Check if the user have given floating value in intcon +// Objective function +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 +ub = [repmat(1,1,4) repmat(%inf,1,4)]; + +// Constraint Matrix +Aeq = [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;] + +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) diff --git a/symphonymat/symphonymat_lb1.sce b/symphonymat/symphonymat_lb1.sce new file mode 100644 index 0000000..f9a4b29 --- /dev/null +++ b/symphonymat/symphonymat_lb1.sce @@ -0,0 +1,26 @@ +// Check for size of lower bound +// Objective function +c = [350*5,330*3,310*4,280*6,500,450,400,100]'; + +// Lower Bound of variable +lb = repmat(0,1,5); + +// Upper Bound of variables +ub = [repmat(1,1,4) repmat(%inf,1,4)]; + +// Constraint Matrix +Aeq = [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;] + +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) diff --git a/symphonymat/symphonymat_logical1.sce b/symphonymat/symphonymat_logical1.sce new file mode 100644 index 0000000..117b59b --- /dev/null +++ b/symphonymat/symphonymat_logical1.sce @@ -0,0 +1,55 @@ +// Objective function +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 +ub = [repmat(1,1,4) repmat(%inf,1,4)]; + +// Constraint Matrix +Aeq = [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;] + +beq = [ 25, 1.25, 1.25] + +intcon = [1 2 3 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. +// +//Note: Time limit has been set to 250.000000. +// +//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/symphonymat/symphonymat_logical2.sce b/symphonymat/symphonymat_logical2.sce new file mode 100644 index 0000000..6bdd1b3 --- /dev/null +++ b/symphonymat/symphonymat_logical2.sce @@ -0,0 +1,53 @@ +// Check for size of Objective Coefficient +// A basic case : + +// Objective function +c = -1*[20,10,15]'; + +// Lower Bound of variable +lb = repmat(0,3,1); + +// Upper Bound of variables +ub = repmat(%inf,3,1); + +// Constraint Matrix +A = [3,2,5; + 2,1,1; + 1,1,3; + 5,2,4] + +// Upper Bound of constrains +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. +// +//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/symphonymat/symphonymat_options1.sce b/symphonymat/symphonymat_options1.sce new file mode 100644 index 0000000..8da8547 --- /dev/null +++ b/symphonymat/symphonymat_options1.sce @@ -0,0 +1,28 @@ +// Check for size of input of options +// Objective function +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 +ub = [repmat(1,1,4) repmat(%inf,1,4)]; + +// Constraint Matrix +Aeq = [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;] + +beq = [ 25, 1.25, 1.25] + +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) diff --git a/symphonymat/symphonymat_options2.sce b/symphonymat/symphonymat_options2.sce new file mode 100644 index 0000000..89d3e14 --- /dev/null +++ b/symphonymat/symphonymat_options2.sce @@ -0,0 +1,28 @@ +// Check for the type of option +// Objective function +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 +ub = [repmat(1,1,4) repmat(%inf,1,4)]; + +// Constraint Matrix +Aeq = [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;] + +beq = [ 25, 1.25, 1.25] + +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) diff --git a/symphonymat/symphonymat_ub1.sce b/symphonymat/symphonymat_ub1.sce new file mode 100644 index 0000000..fdf345a --- /dev/null +++ b/symphonymat/symphonymat_ub1.sce @@ -0,0 +1,26 @@ +// Check for size of lower bound +// Objective function +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 +ub = [repmat(1,1,2) repmat(%inf,1,4)]; + +// Constraint Matrix +Aeq = [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;] + +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) |