From 536bbd0cd8e4ca5b29d07e472e682bbb5db63a97 Mon Sep 17 00:00:00 2001 From: Georgey Date: Wed, 5 Jul 2017 11:42:11 +0530 Subject: Updated tests for int and ecos functions --- .../cbcintlinprog/cbcintlinprog_lb1.sce | 35 ++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 tests/general_tests/cbcintlinprog/cbcintlinprog_lb1.sce (limited to 'tests/general_tests/cbcintlinprog/cbcintlinprog_lb1.sce') diff --git a/tests/general_tests/cbcintlinprog/cbcintlinprog_lb1.sce b/tests/general_tests/cbcintlinprog/cbcintlinprog_lb1.sce new file mode 100644 index 0000000..5882d2e --- /dev/null +++ b/tests/general_tests/cbcintlinprog/cbcintlinprog_lb1.sce @@ -0,0 +1,35 @@ +// Check if a user specifies coefficients of linear inequality contraints of the correct dimensions + +// Reference : Example 2 -1, Travelling salesman , Hamdy A. Taha. "Operations Research-An Introduction", 9E(2014)) + +// Objective function +c = [1000,10,17,15,20,1000,19,18,50,44,1000,22,45,40,20,1000]'; + +// Lower Bound of variable +lb = repmat(0,1,8); +// Upper Bound of variables +ub = repmat(1,1,16) ; + +// Constraint Matrix +Aeq=[1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0; + 0,0,0,0,1,1,1,1,0,0,0,0,0,0,0,0; + 0,0,0,0,0,0,0,0,1,1,1,1,0,0,0,0; + 0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1; + 1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0; + 0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0; + 0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0; + 0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1;] + +beq=repmat(1,1,8) + +intcon = 1:1:16 ; + +// Calling cbcintlinprog +[x,f,status,output] = cbcintlinprog(c,intcon,[],[],Aeq,beq,lb,ub) +// !--error 10000 +//cbcintlinprog: The Lower Bound is not equal to the number of variables +//at line 153 of function cbcmatrixintlinprog called by : +//at line 203 of function cbcintlinprog called by : +//[x,f,status,output] = cbcintlinprog(c,intcon,[],[],Aeq,beq,lb,ub) +//at line 28 of exec file called by : +//exec cbcintlinprog_lb1.sce -- cgit