diff options
author | Georgey | 2017-07-05 11:42:11 +0530 |
---|---|---|
committer | Georgey | 2017-07-05 11:42:11 +0530 |
commit | 536bbd0cd8e4ca5b29d07e472e682bbb5db63a97 (patch) | |
tree | 7b7c9ee9b99de05aa95db57063a3ca2f84a846eb /tests/general_tests/cbcintlinprog/cbcintlinprog_emptyc.sce | |
parent | 938fef4a37a7b7c61b4b6ff74cb4cfd2f100c427 (diff) | |
download | FOSSEE-Optimization-toolbox-536bbd0cd8e4ca5b29d07e472e682bbb5db63a97.tar.gz FOSSEE-Optimization-toolbox-536bbd0cd8e4ca5b29d07e472e682bbb5db63a97.tar.bz2 FOSSEE-Optimization-toolbox-536bbd0cd8e4ca5b29d07e472e682bbb5db63a97.zip |
Updated tests for int and ecos functions
Diffstat (limited to 'tests/general_tests/cbcintlinprog/cbcintlinprog_emptyc.sce')
-rw-r--r-- | tests/general_tests/cbcintlinprog/cbcintlinprog_emptyc.sce | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/tests/general_tests/cbcintlinprog/cbcintlinprog_emptyc.sce b/tests/general_tests/cbcintlinprog/cbcintlinprog_emptyc.sce new file mode 100644 index 0000000..e222847 --- /dev/null +++ b/tests/general_tests/cbcintlinprog/cbcintlinprog_emptyc.sce @@ -0,0 +1,33 @@ +// Check if a user specifies coefficients of linear inequality contraints of the correct dimensions + +// Reference : Example 1-3, Integer Linear Programming, Hamdy A. Taha. "Operations Research-An Introduction", 9E(2014)) + +// Objective function +c = [0.25,0.21,0.22,16,25,18]'; + +// Lower Bound of variable +lb = repmat(0,1,6); +// Upper Bound of variables +ub = [repmat(%inf,1,3) repmat(1,1,3)]; + +// Constraint Matrix +A = [1, 0, 0, -200, 0, 0; +0, 1, 0, 0, -200, 0; +0, 0, 1, 0, 0, -200] + +b=[0, 0, 0] + +Aeq = [1, 1, 1, 0, 0, 0] + +beq = [ 200] + +intcon = [4 5 6]; + +// Calling cbcintlinprog +[x,f,status,output] = cbcintlinprog([],intcon,A,b,Aeq,beq,lb,ub) +//!--error 10000 +//cbcintlinprog: Cannot determine the number of variables because input objective coefficients is empty +//at line 172 of function cbcintlinprog called by : +//[x,f,status,output] = cbcintlinprog([],intcon,A,b,Aeq,beq,lb,ub) +//at line 27 of exec file called by : +//exec cbcintlinprog_emptyc.sce |