summaryrefslogtreecommitdiff
path: root/macros/symphony.sci
diff options
context:
space:
mode:
authorHarpreet2015-11-19 15:06:02 +0530
committerHarpreet2015-11-19 15:06:02 +0530
commitb949656e486ba8e8ac37a06cd6241bc48c945ea2 (patch)
tree433c5dd7db16943d79eee9128957ccb7b1b5d65d /macros/symphony.sci
parenta8277e2be90bf00bd70ab5e7d6b92b91c49b7320 (diff)
downloadFOSSEE-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.sci')
-rw-r--r--macros/symphony.sci34
1 files changed, 32 insertions, 2 deletions
diff --git a/macros/symphony.sci b/macros/symphony.sci
index 4b11ae8..c5b1cdf 100644
--- a/macros/symphony.sci
+++ b/macros/symphony.sci
@@ -206,11 +206,11 @@ function [xopt,fopt,status,output] = symphony (varargin)
UB = UB';
end
- if (size(conLB,2)== [nbVar]) then
+ if (size(conLB,2)== [nbCon]) then
conLB = conLB';
end
- if (size(conUB,2)== [nbVar]) then
+ if (size(conUB,2)== [nbCon]) then
conUB = conUB';
end
@@ -277,6 +277,36 @@ function [xopt,fopt,status,output] = symphony (varargin)
error(errmsg);
end
+ //Check if the user gives a matrix instead of a vector
+
+ if ((size(isInt,1)~=1)& (size(isInt,2)~=1)) then
+ errmsg = msprintf(gettext("%s: isInt should be a vector"), "qpipopt");
+ error(errmsg);
+ end
+
+ if (size(LB,1)~=1)& (size(LB,2)~=1) then
+ errmsg = msprintf(gettext("%s: Lower Bound should be a vector"), "qpipopt");
+ error(errmsg);
+ end
+
+ if (size(UB,1)~=1)& (size(UB,2)~=1) then
+ errmsg = msprintf(gettext("%s: Upper Bound should be a vector"), "qpipopt");
+ error(errmsg);
+ end
+
+ if (nbCon) then
+ if ((size(conLB,1)~=1)& (size(conLB,2)~=1)) then
+ errmsg = msprintf(gettext("%s: Constraint Lower Bound should be a vector"), "qpipopt");
+ error(errmsg);
+ end
+
+ if (size(conUB,1)~=1)& (size(conUB,2)~=1) then
+ errmsg = msprintf(gettext("%s: Constraint Upper Bound should be a vector"), "qpipopt");
+ error(errmsg);
+ end
+ end
+
+
LB = LB';
UB = UB';
isInt = isInt';