From b949656e486ba8e8ac37a06cd6241bc48c945ea2 Mon Sep 17 00:00:00 2001 From: Harpreet Date: Thu, 19 Nov 2015 15:06:02 +0530 Subject: Bugs by Prof fixed 1 --- macros/symphony_call.sci | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'macros/symphony_call.sci') diff --git a/macros/symphony_call.sci b/macros/symphony_call.sci index c8323fc..cfe73ae 100644 --- a/macros/symphony_call.sci +++ b/macros/symphony_call.sci @@ -11,6 +11,11 @@ function [xopt,fopt,status,output] = symphony_call(nbVar,nbCon,objCoef,isInt,LB,UB,conMatrix,conLB,conUB,objSense,options) + xopt = []; + fopt = []; + status = []; + output = []; + //Opening Symphony environment sym_open(); @@ -27,14 +32,9 @@ function [xopt,fopt,status,output] = symphony_call(nbVar,nbCon,objCoef,isInt,LB, end op = sym_solve(); - disp(op); - xopt = []; - fopt = []; - status = []; - output = []; - - if (~op) then + status = sym_getStatus(); + if (status == 228 | status == 227 | status == 229 | status == 230 | status == 231 | status == 232 | status == 233) then xopt = sym_getVarSoln(); // Symphony gives a row matrix converting it to column matrix xopt = xopt'; @@ -46,7 +46,7 @@ function [xopt,fopt,status,output] = symphony_call(nbVar,nbCon,objCoef,isInt,LB, output = struct("Iterations" , []); - output.Iterations = sym_getIterCount(); + output.Iterations = sym_getIterCount(); endfunction -- cgit