diff options
author | Harpreet | 2015-11-19 15:06:02 +0530 |
---|---|---|
committer | Harpreet | 2015-11-19 15:06:02 +0530 |
commit | b949656e486ba8e8ac37a06cd6241bc48c945ea2 (patch) | |
tree | 433c5dd7db16943d79eee9128957ccb7b1b5d65d /macros/symphony_call.sci | |
parent | a8277e2be90bf00bd70ab5e7d6b92b91c49b7320 (diff) | |
download | FOSSEE-Optimization-toolbox-b949656e486ba8e8ac37a06cd6241bc48c945ea2.tar.gz FOSSEE-Optimization-toolbox-b949656e486ba8e8ac37a06cd6241bc48c945ea2.tar.bz2 FOSSEE-Optimization-toolbox-b949656e486ba8e8ac37a06cd6241bc48c945ea2.zip |
Bugs by Prof fixed 1
Diffstat (limited to 'macros/symphony_call.sci')
-rw-r--r-- | macros/symphony_call.sci | 16 |
1 files changed, 8 insertions, 8 deletions
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 |