summaryrefslogtreecommitdiff
path: root/macros/symphony.sci
diff options
context:
space:
mode:
authorHarpreet2015-08-31 16:24:10 +0530
committerHarpreet2015-08-31 16:24:10 +0530
commitfa499e4367b4cedda401c94c1f22656dc64fc248 (patch)
tree276a41cf560f121eebd01a70f459d1c6ff02c4ab /macros/symphony.sci
parent1019e3a021f5a51a8f7f052ffe499c3ef8aa5136 (diff)
downloadsymphony-fa499e4367b4cedda401c94c1f22656dc64fc248.tar.gz
symphony-fa499e4367b4cedda401c94c1f22656dc64fc248.tar.bz2
symphony-fa499e4367b4cedda401c94c1f22656dc64fc248.zip
Making of help
Diffstat (limited to 'macros/symphony.sci')
-rw-r--r--macros/symphony.sci57
1 files changed, 51 insertions, 6 deletions
diff --git a/macros/symphony.sci b/macros/symphony.sci
index f0a0618..c90dca2 100644
--- a/macros/symphony.sci
+++ b/macros/symphony.sci
@@ -11,13 +11,52 @@
function [xopt,fopt,iter] = symphony (varargin)
- // Solves a linearily constrained optimization problem.
+ // Solves a mixed integer linear programming constrained optimization problem.
//
- // Calling Sequence
- // x = symphony(nbVar,nbCon,objCoef,isInt,LB,UB,conMatrix,conLB,conUB)
- // x = symphony(nbVar,nbCon,objCoef,isInt,LB,UB,conMatrix,conLB,conUB,objSense)
- // x = symphony(nbVar,nbCon,objCoef,isInt,LB,UB,conMatrix,conLB,conUB,objSense,options)
- // [xopt,fopt,status,iter] = symphony( ... )
+ // Calling Sequence
+ //
+ // xopt = symphony(nbVar,nbCon,objCoef,isInt,LB,UB,conMatrix,conLB,conUB)
+ // xopt = symphony(nbVar,nbCon,objCoef,isInt,LB,UB,conMatrix,conLB,conUB,objSense)
+ // xopt = symphony(nbVar,nbCon,objCoef,isInt,LB,UB,conMatrix,conLB,conUB,objSense,options)
+ // [xopt,fopt,iter] = symphony( ... )
+ //
+ // Parameters
+ //
+ // nbVar = a 1 x 1 matrix of doubles, number of variables
+ // nbCon = a 1 x 1 matrix of doubles, number of constraints
+ // objCoeff = a 1 x n matrix of doubles, where n is number of variables, contains coefficients of the variables in the objective
+ // isInt = a 1 x n matrix of boolean, where n is number of variables, representing wether a variable is constrained to be an integer
+ // LB = a 1 x n matrix of doubles, where n is number of variables, contains lower bounds of the variables. Bound can be negative infinity
+ // UB = a 1 x n matrix of doubles, where n is number of variables, contains upper bounds of the variables. Bound can be infinity
+ // conMatrix = a m x n matrix of doubles, where n is number of variables and m is number of constraints, contains matrix representing the constraint matrix
+ // conLB = a m x 1 matrix of doubles, where m is number of constraints, contains lower bounds of the constraints.
+ // conUB = a m x 1 matrix of doubles, where m is number of constraints, contains upper bounds of the constraints
+ // objSense = The sense (maximization/minimization) of the objective. Use 1(sym_minimize ) or -1 (sym_maximize) here
+
+ // xopt = a nx1 matrix of doubles, the computed solution of the optimization problem
+ // fopt = a 1x1 matrix of doubles, the function value at x
+ // iter = a 1x1 matrix of doubles, contains the number od iterations done by symphony
+ //
+ // Description
+ //
+ // Search the minimum or maximum of a constrained mixed integer linear programming optimization problem specified by :
+ // find the minimum or maximum of f(x) such that
+ //
+ // <latex>
+ // \begin{eqnarray}
+ // \mbox{min}_{x}
+ // & & f(x) \\
+ // & \text{subject to}
+ // & & conLB \geq C(x) \leq conUB \\
+ // & & & lb \geq x \leq ub \\
+ // \end{eqnarray}
+ // </latex>
+ //
+ //
+ //
+ //
+ //
+
//To check the number of input and output argument
[lhs , rhs] = argn();
@@ -51,6 +90,12 @@ function [xopt,fopt,iter] = symphony (varargin)
end
+//Check the size of constraint which should equal to the number of constraints
+ if ( size(LB) ~= nbCon) then
+ errmsg = msprintf(gettext("%s: The Lower Bound is not equal to the number of variables"), "Symphony");
+ error(errmsg);
+ end
+
//Check the size of Lower Bound which should equal to the number of variables
if ( size(LB) ~= nbVar) then
errmsg = msprintf(gettext("%s: The Lower Bound is not equal to the number of variables"), "Symphony");