diff options
Diffstat (limited to 'tests')
43 files changed, 736 insertions, 200 deletions
diff --git a/tests/general_tests/lsqlin/lsqlin_infeasible1.sce b/tests/general_tests/lsqlin/lsqlin_infeasible1.sce index 9509309..414841d 100644 --- a/tests/general_tests/lsqlin/lsqlin_infeasible1.sce +++ b/tests/general_tests/lsqlin/lsqlin_infeasible1.sce @@ -17,20 +17,23 @@ beq = [-6 -6 11]; // ineqlin: [0x0 constant] // output = // -// Iterations: 0 +// Iterations: 105 +// ConstrViolation: 0.3333333 // exitflag = // // 5 // residual = // -// 1. -// 0. -// - 1. +// - 10.333333 +// - 1.021D-13 +// - 12.333333 // resnorm = // -// 2. +// 258.88889 // xopt = // -// [] +// 5.6666667 +// 5.6666667 +// 0. [xopt,resnorm,residual,exitflag,output,lambda] = lsqlin(C,d,[],[],Aeq,beq) diff --git a/tests/general_tests/lsqlin/lsqlin_logical1.sce b/tests/general_tests/lsqlin/lsqlin_logical1.sce index 959cc7c..c9930cf 100644 --- a/tests/general_tests/lsqlin/lsqlin_logical1.sce +++ b/tests/general_tests/lsqlin/lsqlin_logical1.sce @@ -21,6 +21,7 @@ b = [4 // output = // // Iterations: 13 +// ConstrViolation: 0 // exitflag = // // 0 diff --git a/tests/general_tests/lsqlin/lsqlin_logical2.sce b/tests/general_tests/lsqlin/lsqlin_logical2.sce new file mode 100644 index 0000000..33cdc79 --- /dev/null +++ b/tests/general_tests/lsqlin/lsqlin_logical2.sce @@ -0,0 +1,53 @@ +// An example with inequality constraints +C = [1 1 1; + 1 1 0; + 0 1 1; + 1 0 0; + 0 0 1] +d = [89; + 67; + 53; + 35; + 20;] +A = [3 2 1; + 2 3 4; + 1 2 3]; +b = [191 + 209 + 162]; +Aeq = [1 2 1]; +beq = 10; + +//Output +//Optimal Solution Found. +// lambda = +// +// lower: [0,0,0] +// upper: [0,0,0] +// eqlin: 73.833333 +// ineqlin: [2.571D-10,2.732D-10,2.571D-10] +// output = +// +// Iterations: 7 +// ConstrViolation: 0 +// exitflag = +// +// 0 +// residual = +// +// 37.666667 +// 54.75 +// 55.25 +// - 18.583333 +// - 19.083333 +// resnorm = +// +// 8178.4167 +// xopt = +// +// 53.583333 +// - 41.333333 +// 39.083333 + +[xopt,resnorm,residual,exitflag,output,lambda] = lsqlin(C,d,A,b,Aeq,beq) + diff --git a/tests/general_tests/lsqlin/lsqlin_logical3.sce b/tests/general_tests/lsqlin/lsqlin_logical3.sce new file mode 100644 index 0000000..f6a44d6 --- /dev/null +++ b/tests/general_tests/lsqlin/lsqlin_logical3.sce @@ -0,0 +1,55 @@ +// An example with inequality constraints +C = [1 1 1; + 1 1 0; + 0 1 1; + 1 0 0; + 0 0 1] +d = [89; + 67; + 53; + 35; + 20;] +A = [3 2 1; + 2 3 4; + 1 2 3]; +b = [191 + 209 + 162]; +Aeq = [1 2 1]; +beq = 10; +lb = repmat(0.1,3,1); +ub = repmat(4,3,1); + +//Output +//Optimal Solution Found. +// lambda = +// +// lower: [5.357D-12,2.334D-11,5.356D-12] +// upper: [78,6.963D-12,49] +// eqlin: 95 +// ineqlin: [1.206D-13,1.146D-13,1.449D-13] +// output = +// +// Iterations: 8 +// ConstrViolation: 8.000D-08 +// exitflag = +// +// 0 +// residual = +// +// 80. +// 62. +// 48. +// 31. +// 16. +// resnorm = +// +// 13765. +// xopt = +// +// 4. +// 1.0000000 +// 4. + +[xopt,resnorm,residual,exitflag,output,lambda] = lsqlin(C,d,A,b,Aeq,beq,lb,ub) + diff --git a/tests/general_tests/lsqlin/lsqlin_logical4.sce b/tests/general_tests/lsqlin/lsqlin_logical4.sce new file mode 100644 index 0000000..231fe02 --- /dev/null +++ b/tests/general_tests/lsqlin/lsqlin_logical4.sce @@ -0,0 +1,56 @@ +// An example with inequality constraints +C = [1 1 1; + 1 1 0; + 0 1 1; + 1 0 0; + 0 0 1] +d = [89; + 67; + 53; + 35; + 20;] +A = [3 2 1; + 2 3 4; + 1 2 3]; +b = [191 + 209 + 162]; +Aeq = [1 2 1]; +beq = 10; +lb = repmat(0.1,3,1); +ub = repmat(4,3,1); +x0 = repmat(0,3,1); + +//Output +//Optimal Solution Found. +// lambda = +// +// lower: [5.357D-12,2.334D-11,5.356D-12] +// upper: [78,6.963D-12,49] +// eqlin: 95 +// ineqlin: [1.206D-13,1.146D-13,1.449D-13] +// output = +// +// Iterations: 8 +// ConstrViolation: 8.000D-08 +// exitflag = +// +// 0 +// residual = +// +// 80. +// 62. +// 48. +// 31. +// 16. +// resnorm = +// +// 13765. +// xopt = +// +// 4. +// 1.0000000 +// 4. + +[xopt,resnorm,residual,exitflag,output,lambda] = lsqlin(C,d,A,b,Aeq,beq,lb,ub,x0) + diff --git a/tests/general_tests/lsqlin/lsqlin_logical5.sce b/tests/general_tests/lsqlin/lsqlin_logical5.sce new file mode 100644 index 0000000..0802609 --- /dev/null +++ b/tests/general_tests/lsqlin/lsqlin_logical5.sce @@ -0,0 +1,57 @@ +// An example with inequality constraints +C = [1 1 1; + 1 1 0; + 0 1 1; + 1 0 0; + 0 0 1] +d = [89; + 67; + 53; + 35; + 20;] +A = [3 2 1; + 2 3 4; + 1 2 3]; +b = [191 + 209 + 162]; +Aeq = [1 2 1]; +beq = 10; +lb = repmat(0.1,3,1); +ub = repmat(4,3,1); +x0 = repmat(0,3,1); +options = list("MaxIter", 300); + +//Output +//Optimal Solution Found. +// lambda = +// +// lower: [5.357D-12,2.334D-11,5.356D-12] +// upper: [78,6.963D-12,49] +// eqlin: 95 +// ineqlin: [1.206D-13,1.146D-13,1.449D-13] +// output = +// +// Iterations: 8 +// ConstrViolation: 8.000D-08 +// exitflag = +// +// 0 +// residual = +// +// 80. +// 62. +// 48. +// 31. +// 16. +// resnorm = +// +// 13765. +// xopt = +// +// 4. +// 1.0000000 +// 4. + +[xopt,resnorm,residual,exitflag,output,lambda] = lsqlin(C,d,A,b,Aeq,beq,lb,ub,x0,options) + diff --git a/tests/general_tests/lsqlin/lsqlin_x01.sce b/tests/general_tests/lsqlin/lsqlin_x01.sce index d014443..c50c359 100644 --- a/tests/general_tests/lsqlin/lsqlin_x01.sce +++ b/tests/general_tests/lsqlin/lsqlin_x01.sce @@ -23,6 +23,7 @@ x0 = [0 0 0]; // output = // // Iterations: 13 +// ConstrViolation: 0 // exitflag = // // 0 diff --git a/tests/general_tests/lsqlin/lsqlin_zeros.sce b/tests/general_tests/lsqlin/lsqlin_zeros.sce index 2695ff1..309b35f 100644 --- a/tests/general_tests/lsqlin/lsqlin_zeros.sce +++ b/tests/general_tests/lsqlin/lsqlin_zeros.sce @@ -14,6 +14,7 @@ b = [0]; // output = // // Iterations: 2 +// ConstrViolation: 0 // exitflag = // // 0 diff --git a/tests/general_tests/lsqnonneg/lsqnonneg_logical.sce b/tests/general_tests/lsqnonneg/lsqnonneg_logical1.sce index 5f59f8c..b151d73 100644 --- a/tests/general_tests/lsqnonneg/lsqnonneg_logical.sce +++ b/tests/general_tests/lsqnonneg/lsqnonneg_logical1.sce @@ -19,6 +19,7 @@ d = [89; // output = // // Iterations: 7 +// ConstrViolation: 0 // exitflag = // // 0 diff --git a/tests/general_tests/lsqnonneg/lsqnonneg_logical2.sce b/tests/general_tests/lsqnonneg/lsqnonneg_logical2.sce new file mode 100644 index 0000000..f19ab00 --- /dev/null +++ b/tests/general_tests/lsqnonneg/lsqnonneg_logical2.sce @@ -0,0 +1,44 @@ +// An example with C and d as input +C = [1 1 1; + 1 1 0; + 0 1 1; + 1 0 0; + 0 0 1] +d = [89; + 67; + 53; + 35; + 20] +options = list("MaxIter", 300); + +//Output +//Optimal Solution Found. +// lambda = +// +// lower: [5.131D-09,5.546D-09,8.739D-09] +// upper: [0,0,0] +// output = +// +// Iterations: 7 +// ConstrViolation: 0 +// exitflag = +// +// 0 +// residual = +// +// 0.75 +// - 0.625 +// - 0.125 +// - 0.125 +// - 0.625 +// resnorm = +// +// 1.375 +// xopt = +// +// 35.125 +// 32.5 +// 20.625 + +[xopt,resnorm,residual,exitflag,output,lambda] = lsqnonneg(C,d,options) + diff --git a/tests/general_tests/lsqnonneg/lsqnonneg_maxiter.sce b/tests/general_tests/lsqnonneg/lsqnonneg_maxiter.sce index fa61c73..cbafee5 100644 --- a/tests/general_tests/lsqnonneg/lsqnonneg_maxiter.sce +++ b/tests/general_tests/lsqnonneg/lsqnonneg_maxiter.sce @@ -19,6 +19,7 @@ options = list("MaxIter",1) // output = // // Iterations: 1 +// ConstrViolation: 0 // exitflag = // // 1 diff --git a/tests/general_tests/lsqnonneg/lsqnonneg_zeros.sce b/tests/general_tests/lsqnonneg/lsqnonneg_zeros.sce index e454f42..cd1eb06 100644 --- a/tests/general_tests/lsqnonneg/lsqnonneg_zeros.sce +++ b/tests/general_tests/lsqnonneg/lsqnonneg_zeros.sce @@ -11,6 +11,7 @@ d = [0]; // output = // // Iterations: 3 +// ConstrViolation: 0 // exitflag = // // 0 diff --git a/tests/general_tests/qpipopt/qpipopt_infeasible.sci b/tests/general_tests/qpipopt/qpipopt_infeasible.sci index 49bb233..b01ee0d 100644 --- a/tests/general_tests/qpipopt/qpipopt_infeasible.sci +++ b/tests/general_tests/qpipopt/qpipopt_infeasible.sci @@ -19,15 +19,17 @@ lb = -1*ub; // constraint: [0x0 constant] // output = // -// Iterations: 0 +// Iterations: -1 +// ConstrViolation: 0.3752562 // exitflag = // // 5 // fopt = // -// 0. +// - 21.80307 // xopt = // -// [] +// 5.6247453 +// 5.6247438 [xopt,fopt,exitflag,output,lamda] = qpipopt(nbVar,nbCon,H,f,lb,ub,A,conLB,conUB) diff --git a/tests/general_tests/qpipopt/qpipopt_logical_1.sce b/tests/general_tests/qpipopt/qpipopt_logical_1.sce index 52d5493..54ba0a0 100644 --- a/tests/general_tests/qpipopt/qpipopt_logical_1.sce +++ b/tests/general_tests/qpipopt/qpipopt_logical_1.sce @@ -27,7 +27,7 @@ param = list("MaxIter", 300, "CpuTime", 100); // lambda // // Iterations: 13 -// +// ConstrViolation: 9.968D-09 // output // // 0 diff --git a/tests/general_tests/qpipopt/qpipopt_logical_2.sce b/tests/general_tests/qpipopt/qpipopt_logical_2.sce index 7a75ebe..d00b07b 100644 --- a/tests/general_tests/qpipopt/qpipopt_logical_2.sce +++ b/tests/general_tests/qpipopt/qpipopt_logical_2.sce @@ -21,7 +21,7 @@ nbCon = 0; // lambda // // Iterations: 1 -// +// ConstrViolation: 0 // output // // 0 diff --git a/tests/general_tests/qpipopt/qpipopt_maxiter.sce b/tests/general_tests/qpipopt/qpipopt_maxiter.sce index 5851630..4c35c9e 100644 --- a/tests/general_tests/qpipopt/qpipopt_maxiter.sce +++ b/tests/general_tests/qpipopt/qpipopt_maxiter.sce @@ -26,6 +26,7 @@ param = list("MaxIter", 1); // output = // // Iterations: 1 +// ConstrViolation: 1.3770464 // exitflag = // // 1 diff --git a/tests/general_tests/qpipopt/qpipopt_x01.sce b/tests/general_tests/qpipopt/qpipopt_x01.sce index bb37c50..b387a94 100644 --- a/tests/general_tests/qpipopt/qpipopt_x01.sce +++ b/tests/general_tests/qpipopt/qpipopt_x01.sce @@ -26,6 +26,7 @@ param = list("MaxIter", 300, "CpuTime", 100); // output = // // Iterations: 13 +// ConstrViolation: 9.968D-09 // exitflag = // // 0 diff --git a/tests/general_tests/qpipopt/qpipopt_zeros.sce b/tests/general_tests/qpipopt/qpipopt_zeros.sce index 9604c4d..993993a 100644 --- a/tests/general_tests/qpipopt/qpipopt_zeros.sce +++ b/tests/general_tests/qpipopt/qpipopt_zeros.sce @@ -22,7 +22,7 @@ nbCon = 0; // lambda // // Iterations: 0 -// +// ConstrViolation: 0 // output // // 0 diff --git a/tests/general_tests/qpipoptmat/qpipoptmat_infeasible.sci b/tests/general_tests/qpipoptmat/qpipoptmat_infeasible.sci index 123f2c9..8964422 100644 --- a/tests/general_tests/qpipoptmat/qpipoptmat_infeasible.sci +++ b/tests/general_tests/qpipoptmat/qpipoptmat_infeasible.sci @@ -6,7 +6,6 @@ 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. @@ -18,13 +17,17 @@ lb = -1*ub; // ineqlin: [0x0 constant] // output = // -// Iterations: 0 +// Iterations: 105 +// ConstrViolation: 0.3752562 // exitflag = // // 5 // fopt = // -// 0. +// - 21.80307 // xopt = // -// [] +// 5.6247453 +// 5.6247438 + +[xopt,fopt,exitflag,output,lamda] = qpipoptmat(H,f,A,b,[],[],lb,ub) diff --git a/tests/general_tests/qpipoptmat/qpipoptmat_logical1.sce b/tests/general_tests/qpipoptmat/qpipoptmat_logical1.sce index 50ddc6e..e1288c6 100644 --- a/tests/general_tests/qpipoptmat/qpipoptmat_logical1.sce +++ b/tests/general_tests/qpipoptmat/qpipoptmat_logical1.sce @@ -1,10 +1,11 @@ // A simple example without constraints f=[2 -35 -47]'; -H =[5 -2 -1; -2 4 3; -1 3 5]; +H =[5 -2 -1; + -2 4 3; + -1 3 5]; [xopt,fopt,exitflag,output,lambda]=qpipoptmat(H,f); - //Output // //Optimal Solution Found. @@ -17,7 +18,7 @@ H =[5 -2 -1; -2 4 3; -1 3 5]; // lambda // // Iterations: 1 -// +// ConstrViolation: 0 // output // // 0 diff --git a/tests/general_tests/qpipoptmat/qpipoptmat_logical2.sce b/tests/general_tests/qpipoptmat/qpipoptmat_logical2.sce index e316253..137c7bb 100644 --- a/tests/general_tests/qpipoptmat/qpipoptmat_logical2.sce +++ b/tests/general_tests/qpipoptmat/qpipoptmat_logical2.sce @@ -13,7 +13,8 @@ ub=[10000; 100; 1.5; 100; 100; 1000]; param = list("MaxIter", 300, "CpuTime",100); //and minimize 0.5*x'*H*x + f'*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); +x0 = repmat(0,6,1); +[xopt,fopt,exitflag,output,lambda]=qpipoptmat(H,f,A,b,Aeq,beq,lb,ub,x0,param); //Output // @@ -27,7 +28,7 @@ f=[1; 2; 3; 4; 5; 6]; H=eye(6,6); // lambda // // Iterations: 13 -// +// ConstrViolation: 9.968D-09 // output // // 0 diff --git a/tests/general_tests/qpipoptmat/qpipoptmat_logical3.sce b/tests/general_tests/qpipoptmat/qpipoptmat_logical3.sce new file mode 100644 index 0000000..3565d34 --- /dev/null +++ b/tests/general_tests/qpipoptmat/qpipoptmat_logical3.sce @@ -0,0 +1,52 @@ +//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]; +//and minimize 0.5*x'*H*x + f'*x with +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,x0); + +//Output +// +//Optimal Solution Found. +// +// lower: [1x6 constant] +// upper: [1x6 constant] +// ineqlin: [0.3091368,1.197D-12] +// eqlin: [-1.5564027,-0.1698164,-0.7054782] +// +// lambda +// +// Iterations: 13 +// ConstrViolation: 9.968D-09 +// output +// +// 0 +// +// exitflag +// +// - 14.843248 +// +// fopt +// +// 1.7975426 +// - 0.3381487 +// 0.1633880 +// - 4.9884023 +// 0.6054943 +// - 3.1155623 +// +// xopt + +disp("xopt",xopt,"fopt",fopt,"exitflag",exitflag,"output",output,"lambda",lambda) + + diff --git a/tests/general_tests/qpipoptmat/qpipoptmat_logical4.sce b/tests/general_tests/qpipoptmat/qpipoptmat_logical4.sce new file mode 100644 index 0000000..bad5b8c --- /dev/null +++ b/tests/general_tests/qpipoptmat/qpipoptmat_logical4.sce @@ -0,0 +1,49 @@ +//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]; +//and minimize 0.5*x'*H*x + f'*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); + +//Output +// +//Optimal Solution Found. +// +// lower: [1x6 constant] +// upper: [1x6 constant] +// ineqlin: [0.3091368,1.197D-12] +// eqlin: [-1.5564027,-0.1698164,-0.7054782] +// +// lambda +// +// Iterations: 13 +// ConstrViolation: 9.968D-09 +// output +// +// 0 +// +// exitflag +// +// - 14.843248 +// +// fopt +// +// 1.7975426 +// - 0.3381487 +// 0.1633880 +// - 4.9884023 +// 0.6054943 +// - 3.1155623 +// +// xopt + +disp("xopt",xopt,"fopt",fopt,"exitflag",exitflag,"output",output,"lambda",lambda) + + diff --git a/tests/general_tests/qpipoptmat/qpipoptmat_logical5.sce b/tests/general_tests/qpipoptmat/qpipoptmat_logical5.sce new file mode 100644 index 0000000..2c78091 --- /dev/null +++ b/tests/general_tests/qpipoptmat/qpipoptmat_logical5.sce @@ -0,0 +1,46 @@ +//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]; +param = list("MaxIter", 300, "CpuTime",100); +//and minimize 0.5*x'*H*x + f'*x with +f=[1; 2; 3; 4; 5; 6]; H=eye(6,6); +x0 = repmat(0,6,1); +//Output +// +//Optimal Solution Found. +// lambda = +// +// lower: [0,0,0,0,0,0] +// upper: [0,0,0,0,0,0] +// eqlin: [0x0 constant] +// ineqlin: [1.232D-12,6.884D-13] +// output = +// +// Iterations: 5 +// ConstrViolation: 0 +// exitflag = +// +// 0 +// fopt = +// +// - 45.5 +// xopt = +// +// - 1. +// - 2. +// - 3. +// - 4. +// - 5. +// - 6. + +[xopt,fopt,exitflag,output,lambda]=qpipoptmat(H,f,A,b) + diff --git a/tests/general_tests/qpipoptmat/qpipoptmat_maxiter.sce b/tests/general_tests/qpipoptmat/qpipoptmat_maxiter.sce index 5e4b0e5..c49cd78 100644 --- a/tests/general_tests/qpipoptmat/qpipoptmat_maxiter.sce +++ b/tests/general_tests/qpipoptmat/qpipoptmat_maxiter.sce @@ -26,6 +26,7 @@ f=[1; 2; 3; 4; 5; 6]; H=eye(6,6); // output = // // Iterations: 1 +// ConstrViolation: 1.3770464 // exitflag = // // 1 diff --git a/tests/general_tests/qpipoptmat/qpipoptmat_x01.sce b/tests/general_tests/qpipoptmat/qpipoptmat_x01.sce index 71a1c6c..f32dcdd 100644 --- a/tests/general_tests/qpipoptmat/qpipoptmat_x01.sce +++ b/tests/general_tests/qpipoptmat/qpipoptmat_x01.sce @@ -16,6 +16,32 @@ f=[1; 2; 3; 4; 5; 6]; H=eye(6,6); x0 = repmat(0,5,1); // Warning -//WARNING: qpipopt: Ignoring initial guess of variables as it is not equal to the number of variables +//WARNING: qpipoptmat: 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); +//Optimal Solution Found. +// 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] +// eqlin: [-1.5564027,-0.1698164,-0.7054782] +// ineqlin: [0.3091368,1.197D-12] +// output = +// +// Iterations: 13 +// ConstrViolation: 9.968D-09 +// exitflag = +// +// 0 +// fopt = +// +// - 14.843248 +// xopt = +// +// 1.7975426 +// - 0.3381487 +// 0.1633880 +// - 4.9884023 +// 0.6054943 +// - 3.1155623 + +[xopt,fopt,exitflag,output,lambda]=qpipoptmat(H,f,A,b,Aeq,beq,lb,ub,x0,param) diff --git a/tests/general_tests/qpipoptmat/qpipoptmat_zeros.sce b/tests/general_tests/qpipoptmat/qpipoptmat_zeros.sce index ee9cfc9..1433a8e 100644 --- a/tests/general_tests/qpipoptmat/qpipoptmat_zeros.sce +++ b/tests/general_tests/qpipoptmat/qpipoptmat_zeros.sce @@ -15,7 +15,7 @@ H =[0]; // lambda // // Iterations: 0 -// +// ConstrViolation: 0 // output // // 0 @@ -31,5 +31,5 @@ H =[0]; // xopt -[xopt,fopt,exitflag,output,lambda]=qpipoptmat(H,f); +[xopt,fopt,exitflag,output,lambda]=qpipoptmat(H,f) diff --git a/tests/general_tests/symphony/symphony_logical1.sce b/tests/general_tests/symphony/symphony_logical1.sce index 2f63ed6..5c41a9a 100644 --- a/tests/general_tests/symphony/symphony_logical1.sce +++ b/tests/general_tests/symphony/symphony_logical1.sce @@ -1,5 +1,6 @@ // A basic case : +// Reference: Westerberg, Carl-Henrik, Bengt Bjorklund, and Eskil Hultman. "An application of mixed integer programming in a Swedish steel mill." Interfaces 7, no. 2 (1977): 39-43. // Objective function c = [350*5,330*3,310*4,280*6,500,450,400,100]'; diff --git a/tests/general_tests/symphonymat/symphonymat_logical2.sce b/tests/general_tests/symphonymat/symphonymat_logical2.sce index 4f3923f..98a3b70 100644 --- a/tests/general_tests/symphonymat/symphonymat_logical2.sce +++ b/tests/general_tests/symphonymat/symphonymat_logical2.sce @@ -2,55 +2,39 @@ // 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 = []; // Output //Problem loaded into environment. -// + //Note: There is no limit on time. -// + //An optimal solution has been found. -// -// 0. +// output = // // Iterations: 1 -// -// output +// status = // // 227. -// -// status +// f = // // - 268. -// -// f +// x = // // 1.8 // 20.8 -// 1.6 -// -// x +// 1.6 // Calling Symphony -[x,f,status,output] = symphonymat(c,intcon,A,b,[],[],lb,ub) -disp("x",x,"f",f,"status",status,"output",output); +[x,f,status,output] = symphonymat(c,intcon,A,b) diff --git a/tests/general_tests/symphonymat/symphonymat_logical3.sce b/tests/general_tests/symphonymat/symphonymat_logical3.sce new file mode 100644 index 0000000..1b2b60c --- /dev/null +++ b/tests/general_tests/symphonymat/symphonymat_logical3.sce @@ -0,0 +1,43 @@ +// An example with equality constraints and variable bounds + +// A basic case : + +c = -1*[20,10,15]'; + +A = [3,2,5; + 2,1,1; + 1,1,3; + 5,2,4] + +b = [ 55;26;30;57] + +Aeq = [2 3 5] + +beq = [5] + +intcon = []; + +// Output +//Problem loaded into environment. +// +//Note: There is no limit on time. +// +//An optimal solution has been found. +// output = +// +// Iterations: 1 +// status = +// +// 227. +// f = +// +// - 233.5 +// x = +// +// 15.6 +// 0.1 +// - 5.3 + +// Calling Symphony +[x,f,status,output] = symphonymat(c,intcon,A,b,Aeq,beq) + diff --git a/tests/general_tests/symphonymat/symphonymat_logical4.sce b/tests/general_tests/symphonymat/symphonymat_logical4.sce new file mode 100644 index 0000000..ccb53a5 --- /dev/null +++ b/tests/general_tests/symphonymat/symphonymat_logical4.sce @@ -0,0 +1,46 @@ +// An example with equality constraints and variable bounds + +// A basic case : + +c = -1*[20,10,15]'; + +A = [3,2,5; + 2,1,1; + 1,1,3; + 5,2,4] + +b = [ 55;26;30;57] + +Aeq = [2 3 5] + +beq = [5] + +intcon = []; + +lb = repmat(0,3,1); +ub = repmat(8,3,1); + +// Output +//Problem loaded into environment. + +//Note: There is no limit on time. + +//An optimal solution has been found. +// output = +// +// Iterations: 1 +// status = +// +// 227. +// f = +// +// - 50. +// x = +// +// 2.5 +// 0. +// 0. + +// Calling Symphony +[x,f,status,output] = symphonymat(c,intcon,A,b,Aeq,beq,lb,ub) + diff --git a/tests/unit_tests/lsqlin.dia.ref b/tests/unit_tests/lsqlin.dia.ref index 9fbe23f..327598e 100644 --- a/tests/unit_tests/lsqlin.dia.ref +++ b/tests/unit_tests/lsqlin.dia.ref @@ -53,30 +53,30 @@ endfunction //endfunction //A simple linear least square example -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]; - Aeq = [3 5 7 9]; - beq = 4; - lb = -0.1*ones(4,1); - ub = 2*ones(4,1); - [xopt,resnorm,residual,exitflag,output,lambda] = lsqlin(C,d,A,b,Aeq,beq,lb,ub) +C = [1 1 1; + 1 1 0; + 0 1 1; + 1 0 0; + 0 0 1] +d = [89; + 67; + 53; + 35; + 20;] +A = [3 2 1; + 2 3 4; + 1 2 3]; +b = [191 + 209 + 162]; +Aeq = [1 2 1]; +beq = 10; +lb = repmat(0.1,3,1); +ub = repmat(4,3,1); +[xopt,resnorm,residual,exitflag,output,lambda] = lsqlin(C,d,A,b,Aeq,beq,lb,ub) -assert_close ( xopt , [ -0.1, -0.1, 0.1599089, 0.4089598 ]' , 0.0005 ); -assert_close ( residual , [-0.0352969 -0.0876228 0.3532508 -0.1452700 -0.1212324 ]' , 0.0005 ); -assert_close ( resnorm , [ 0.1695104] , 0.0005 ); +assert_close ( xopt , [ 4 1 4 ]' , 0.0005 ); +assert_close ( residual , [80 62 48 31 16]' , 0.0005 ); +assert_close ( resnorm , [ 13765] , 0.0005 ); assert_checkequal( exitflag , int32(0) ); printf("Test Successful"); diff --git a/tests/unit_tests/lsqlin.tst b/tests/unit_tests/lsqlin.tst index 9fbe23f..327598e 100644 --- a/tests/unit_tests/lsqlin.tst +++ b/tests/unit_tests/lsqlin.tst @@ -53,30 +53,30 @@ endfunction //endfunction //A simple linear least square example -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]; - Aeq = [3 5 7 9]; - beq = 4; - lb = -0.1*ones(4,1); - ub = 2*ones(4,1); - [xopt,resnorm,residual,exitflag,output,lambda] = lsqlin(C,d,A,b,Aeq,beq,lb,ub) +C = [1 1 1; + 1 1 0; + 0 1 1; + 1 0 0; + 0 0 1] +d = [89; + 67; + 53; + 35; + 20;] +A = [3 2 1; + 2 3 4; + 1 2 3]; +b = [191 + 209 + 162]; +Aeq = [1 2 1]; +beq = 10; +lb = repmat(0.1,3,1); +ub = repmat(4,3,1); +[xopt,resnorm,residual,exitflag,output,lambda] = lsqlin(C,d,A,b,Aeq,beq,lb,ub) -assert_close ( xopt , [ -0.1, -0.1, 0.1599089, 0.4089598 ]' , 0.0005 ); -assert_close ( residual , [-0.0352969 -0.0876228 0.3532508 -0.1452700 -0.1212324 ]' , 0.0005 ); -assert_close ( resnorm , [ 0.1695104] , 0.0005 ); +assert_close ( xopt , [ 4 1 4 ]' , 0.0005 ); +assert_close ( residual , [80 62 48 31 16]' , 0.0005 ); +assert_close ( resnorm , [ 13765] , 0.0005 ); assert_checkequal( exitflag , int32(0) ); printf("Test Successful"); diff --git a/tests/unit_tests/lsqnonneg.dia.ref b/tests/unit_tests/lsqnonneg.dia.ref index 2c7c7d2..af929ee 100644 --- a/tests/unit_tests/lsqnonneg.dia.ref +++ b/tests/unit_tests/lsqnonneg.dia.ref @@ -53,20 +53,20 @@ endfunction //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]; +C = [1 1 1; + 1 1 0; + 0 1 1; + 1 0 0; + 0 0 1] +d = [89; + 67; + 53; + 35; + 20] [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_close ( xopt , [ 35.125 32.5 20.625 ]' , 0.0005 ); +assert_close ( residual , [0.75 -0.625 -0.125 -0.125 -0.625]' , 0.0005 ); +assert_close ( resnorm , [ 1.375] , 0.0005 ); assert_checkequal( exitflag , int32(0) ); printf("Test Successful"); diff --git a/tests/unit_tests/lsqnonneg.tst b/tests/unit_tests/lsqnonneg.tst index 2c7c7d2..af929ee 100644 --- a/tests/unit_tests/lsqnonneg.tst +++ b/tests/unit_tests/lsqnonneg.tst @@ -53,20 +53,20 @@ endfunction //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]; +C = [1 1 1; + 1 1 0; + 0 1 1; + 1 0 0; + 0 0 1] +d = [89; + 67; + 53; + 35; + 20] [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_close ( xopt , [ 35.125 32.5 20.625 ]' , 0.0005 ); +assert_close ( residual , [0.75 -0.625 -0.125 -0.125 -0.625]' , 0.0005 ); +assert_close ( resnorm , [ 1.375] , 0.0005 ); assert_checkequal( exitflag , int32(0) ); printf("Test Successful"); diff --git a/tests/unit_tests/qpipopt_base.dia.ref b/tests/unit_tests/qpipopt_base.dia.ref index 0cc59f1..25b440f 100644 --- a/tests/unit_tests/qpipopt_base.dia.ref +++ b/tests/unit_tests/qpipopt_base.dia.ref @@ -52,25 +52,25 @@ endfunction // if flag <> 1 then pause,end //endfunction -//Find the value of x that minimize following function -// f(x) = 0.5*x1^2 + x2^2 - x1*x2 - 2*x1 - 6*x2 -// Subject to: -// x1 + x2 ≤ 2 -// –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]; -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) +//Find x in R^6 such that: +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'*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) -assert_close ( xopt , [0.6666667 1.3333333]' , 1.e-7 ); -assert_close ( fopt , [ - 8.2222223] , 1.e-7 ); +assert_close ( xopt , [1.7975426 -0.3381487 0.1633880 - 4.9884023 0.6054943 -3.1155623]' , 1.e-7 ); +assert_close ( fopt , [ -14.843248] , 1.e-7 ); assert_checkequal( exitflag , int32(0) ); printf("Test Successful"); diff --git a/tests/unit_tests/qpipopt_base.tst b/tests/unit_tests/qpipopt_base.tst index eee8b91..25b440f 100644 --- a/tests/unit_tests/qpipopt_base.tst +++ b/tests/unit_tests/qpipopt_base.tst @@ -52,26 +52,25 @@ endfunction // if flag <> 1 then pause,end //endfunction -//Find the value of x that minimize following function -// f(x) = 0.5*x1^2 + x2^2 - x1*x2 - 2*x1 - 6*x2 -// Subject to: -// x1 + x2 ≤ 2 -// –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]; -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) - -assert_close ( xopt , [0.6666667 1.3333333]' , 1.e-7 ); -assert_close ( fopt , [ - 8.2222223] , 1.e-7 ); +//Find x in R^6 such that: +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'*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) +assert_close ( xopt , [1.7975426 -0.3381487 0.1633880 - 4.9884023 0.6054943 -3.1155623]' , 1.e-7 ); +assert_close ( fopt , [ -14.843248] , 1.e-7 ); assert_checkequal( exitflag , int32(0) ); -printf("Test Successfull") +printf("Test Successful"); diff --git a/tests/unit_tests/qpipoptmat_base.dia.ref b/tests/unit_tests/qpipoptmat_base.dia.ref index e99255c..fbebe58 100644 --- a/tests/unit_tests/qpipoptmat_base.dia.ref +++ b/tests/unit_tests/qpipoptmat_base.dia.ref @@ -52,22 +52,22 @@ endfunction // if flag <> 1 then pause,end //endfunction -//Find the value of x that minimize following function -// f(x) = 0.5*x1^2 + x2^2 - x1*x2 - 2*x1 - 6*x2 -// Subject to: -// x1 + x2 ≤ 2 -// –x1 + 2x2 ≤ 2 -// 2x1 + x2 ≤ 3 -// 0 ≤ x1, 0 ≤ x2. -H = [1 -1; -1 2]; -f = [-2; -6]; -A = [1 1; -1 2; 2 1]; -b = [2; 2; 3]; -lb = [0; 0]; -ub = [%inf; %inf]; -[xopt,fopt,exitflag,output,lambda] = qpipoptmat(H,f,A,b,[],[],lb,ub) +//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]; +param = list("MaxIter", 300, "CpuTime",100); +//and minimize 0.5*x'*H*x + f'*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); -assert_close ( xopt , [0.6666667 1.3333333]' , 1.e-7 ); -assert_close ( fopt , [ - 8.2222223] , 1.e-7 ); +assert_close ( xopt , [1.7975426 -0.3381487 0.1633880 - 4.9884023 0.6054943 -3.1155623]' , 1.e-7 ); +assert_close ( fopt , [ -14.843248] , 1.e-7 ); assert_checkequal( exitflag , int32(0) ); printf("Test Successful"); diff --git a/tests/unit_tests/qpipoptmat_base.tst b/tests/unit_tests/qpipoptmat_base.tst index 482457d..fbebe58 100644 --- a/tests/unit_tests/qpipoptmat_base.tst +++ b/tests/unit_tests/qpipoptmat_base.tst @@ -52,23 +52,22 @@ endfunction // if flag <> 1 then pause,end //endfunction -//Find the value of x that minimize following function -// f(x) = 0.5*x1^2 + x2^2 - x1*x2 - 2*x1 - 6*x2 -// Subject to: -// x1 + x2 ≤ 2 -// –x1 + 2x2 ≤ 2 -// 2x1 + x2 ≤ 3 -// 0 ≤ x1, 0 ≤ x2. -H = [1 -1; -1 2]; -f = [-2; -6]; -A = [1 1; -1 2; 2 1]; -b = [2; 2; 3]; -lb = [0; 0]; -ub = [%inf; %inf]; -[xopt,fopt,exitflag,output,lambda] = qpipoptmat(H,f,A,b,[],[],lb,ub) +//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]; +param = list("MaxIter", 300, "CpuTime",100); +//and minimize 0.5*x'*H*x + f'*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); -assert_close ( xopt , [0.6666667 1.3333333]' , 1.e-7 ); -assert_close ( fopt , [ - 8.2222223] , 1.e-7 ); +assert_close ( xopt , [1.7975426 -0.3381487 0.1633880 - 4.9884023 0.6054943 -3.1155623]' , 1.e-7 ); +assert_close ( fopt , [ -14.843248] , 1.e-7 ); assert_checkequal( exitflag , int32(0) ); - -printf("Test Successfull") +printf("Test Successful"); diff --git a/tests/unit_tests/symphony_base.dia.ref b/tests/unit_tests/symphony_base.dia.ref index 4b653a8..2e96146 100644 --- a/tests/unit_tests/symphony_base.dia.ref +++ b/tests/unit_tests/symphony_base.dia.ref @@ -52,6 +52,7 @@ endfunction // if flag <> 1 then pause,end //endfunction +//Reference: Westerberg, Carl-Henrik, Bengt Bjorklund, and Eskil Hultman. "An application of mixed integer programming in a Swedish steel mill." Interfaces 7, no. 2 (1977): 39-43. // Objective function c = [350*5,330*3,310*4,280*6,500,450,400,100]'; diff --git a/tests/unit_tests/symphony_base.tst b/tests/unit_tests/symphony_base.tst index 31e7547..2e96146 100644 --- a/tests/unit_tests/symphony_base.tst +++ b/tests/unit_tests/symphony_base.tst @@ -52,6 +52,7 @@ endfunction // if flag <> 1 then pause,end //endfunction +//Reference: Westerberg, Carl-Henrik, Bengt Bjorklund, and Eskil Hultman. "An application of mixed integer programming in a Swedish steel mill." Interfaces 7, no. 2 (1977): 39-43. // Objective function c = [350*5,330*3,310*4,280*6,500,450,400,100]'; @@ -76,9 +77,12 @@ 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,iter] = symphony(8,3,c,isInt,lb,ub,conMatrix,conlb,conub,1); + +//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 ( f , [ 8495] , 1.e-7 ); assert_checkequal( status , 227 ); - +printf("Test Successful"); diff --git a/tests/unit_tests/symphonymat_base.dia.ref b/tests/unit_tests/symphonymat_base.dia.ref index d57851a..17a5566 100644 --- a/tests/unit_tests/symphonymat_base.dia.ref +++ b/tests/unit_tests/symphonymat_base.dia.ref @@ -52,6 +52,7 @@ endfunction // if flag <> 1 then pause,end //endfunction +// Reference: Westerberg, Carl-Henrik, Bengt Bjorklund, and Eskil Hultman. "An application of mixed integer programming in a Swedish steel mill." Interfaces 7, no. 2 (1977): 39-43. // Objective function c = [350*5,330*3,310*4,280*6,500,450,400,100]'; diff --git a/tests/unit_tests/symphonymat_base.tst b/tests/unit_tests/symphonymat_base.tst index 37b4c3f..95a1fec 100644 --- a/tests/unit_tests/symphonymat_base.tst +++ b/tests/unit_tests/symphonymat_base.tst @@ -52,6 +52,7 @@ endfunction // if flag <> 1 then pause,end //endfunction +// Reference: Westerberg, Carl-Henrik, Bengt Bjorklund, and Eskil Hultman. "An application of mixed integer programming in a Swedish steel mill." Interfaces 7, no. 2 (1977): 39-43. // Objective function c = [350*5,330*3,310*4,280*6,500,450,400,100]'; |