Functions | |
if (nargin > 4) ctype | |
endif | if (nargin > 5) lb |
endif | if (nargin > 6) ub |
endif | if (nargin > 7) vartype |
endif | if (nargin > 8) param |
endif | if (nargin > 9 &&!isfield(param,"lpsolver")) param.lpsolver |
endif | if (nargin > 10 &&!isfield(param,"save")) param.save |
endif | if (nargout==0) glpk(c |
elseif (nargout==1) xopt | |
Variables | |
function [xopt, fopt, status, extra] | |
return | |
endif | sense = varargin{1} |
c = varargin{2} | |
a = varargin{3} | |
b = varargin{4} | |
nx = length (c) | |
else | ctype = repmat ("U", nx, 1) |
else | lb = repmat (-Inf, nx, 1) |
else | ub = repmat (Inf, nx, 1) |
else | vartype = repmat ("C", nx, 1) |
else | param = struct () |
fopt = glpk (c, a, b, lb, ub, ctype, vartype, sense, param) | |
status | |
else [xopt, fopt, status, extra] |
elseif | ( | nargout | = = 1 |
) |
endif if | ( | nargout | = = 0 |
) |
if | ( | nargin | , | |
4 | ||||
) |
endif a = varargin{3} |
endif b = varargin{4} |
c = varargin{2} |
Initial value:
glpkmex (varargin) if (nargin < 4 || nargin > 11) print_usage ()
nx = length (c) |
return |