From f7c5cbc61d5b52c749824298cfa39a95db2d879c Mon Sep 17 00:00:00 2001 From: Harpreet Date: Fri, 29 Jan 2016 16:38:03 +0530 Subject: linprog general tests added --- tests/general_tests/linprog/linprog_logical3.sce | 32 ++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 tests/general_tests/linprog/linprog_logical3.sce (limited to 'tests/general_tests/linprog/linprog_logical3.sce') diff --git a/tests/general_tests/linprog/linprog_logical3.sce b/tests/general_tests/linprog/linprog_logical3.sce new file mode 100644 index 0000000..a5b0bb7 --- /dev/null +++ b/tests/general_tests/linprog/linprog_logical3.sce @@ -0,0 +1,32 @@ +// An example with variable bounds, inequality and equality constraints +c=[-1,-1/3]' +A=[1,1;1,1/4;1,-1;-1/4,-1;-1,-1;-1,1] +b=[2,1,2,1,-1,2] +Aeq=[1,1/4] +beq=[1/2] +lb=[-1,-0.5] +ub=[1.5,1.25] + +//Output +//Optimal Solution. +// lambda = +// +// reduced_cost: [0,-0.0833333] +// ineqlin: [0,0,0,0,0,0] +// eqlin: -1 +// output = +// +// Iterations: 0 +// constrviolation: 0 +// exitflag = +// +// 0. +// fopt = +// +// - 0.6041667 +// xopt = +// +// 0.1875 +// 1.25 + +[xopt,fopt,exitflag,output,lambda]=linprog(c, A, b, Aeq, beq, lb, ub) -- cgit