Navigation

Operators and Keywords

Function List:

C++ API

glpk.m File Reference


Functions

endif if (all(size(c) > 1)||iscomplex(c)||ischar(c)) error("C must be a real vector")
 if (isempty(a)) error("A cannot be an empty matrix")
 if (!isreal(a)||nxa!=nx) error("A must be a real valued %d by %d matrix"
endif if (isempty(b)) error("B cannot be an empty vector")
endif if (!isreal(b)||length(b)!=nc) error("B must be a real valued %d by 1 vector"
endif if (nargin > 3) if(isempty(lb)) lb
 elseif (!isreal(lb)||all(size(lb) > 1)||length(lb)!=nx) error("LB must be a real valued %d by 1 column vector"
endif if (nargin > 4) if(isempty(ub)) ub
 elseif (!isreal(ub)||all(size(ub) > 1)||length(ub)!=nx) error("UB must be a real valued %d by 1 column vector"
endif if (nargin > 5) if(isempty(ctype)) ctype
 elseif (!ischar(ctype)||all(size(ctype) > 1)||length(ctype)!=nc) error("CTYPE must be a char valued vector of length %d"
 elseif (!all(ctype=="F"|ctype=="U"|ctype=="S"|ctype=="L"|ctype=="D")) error("CTYPE must contain only F
endif if (nargin > 6) if(isempty(vartype)) vartype
 elseif (!ischar(vartype)||all(size(vartype) > 1)||length(vartype)!=nx) error("VARTYPE must be a char valued vector of length %d"
 elseif (!all(vartype=="C"|vartype=="I")) error("VARTYPE must contain only C or I")
endif if (nargin > 7) if(isempty(sense)) sense
 elseif (ischar(sense)||all(size(sense) > 1)||!isreal(sense)) error("SENSE must be an integer value")
 elseif (sense >=0) sense
endif if (nargin > 8) if(!isstruct(param)) error("PARAM must be a structure")

Variables

 function [xopt, fmin, status, extra]
 return
endif nx = length (c)
 c = c(:)
 endif [nc, nxa] = size(a)
 nc
endif else lb = zeros (nx, 1)
endif else ub = repmat (Inf, nx, 1)
 U
 S
 L
or D
endif else ctype = repmat ("S", nc, 1)
endif else vartype = repmat ("C", nx, 1)
else sense = -1
endif else param = struct ()

Function Documentation

elseif ( sense >=  0  ) 

elseif ( ischar(sense)||all(size(sense) > 1)||!isreal(sense  ) 

elseif ( allvartype=="C"|vartype=="I"  ) 

elseif ( !ischar(vartype)||all(size(vartype) > 1)||length(vartype)!  = nx  ) 

elseif ( allctype=="F"|ctype=="U"|ctype=="S"|ctype=="L"|ctype=="D"  ) 

elseif ( !ischar(ctype)||all(size(ctype) > 1)||length(ctype)!  = nc  ) 

elseif ( !isreal(ub)||all(size(ub) > 1)||length(ub)!  = nx  ) 

elseif ( !isreal(lb)||all(size(lb) > 1)||length(lb)!  = nx  ) 

endif if ( nargin  ,
 
)

endif if ( nargin  ,
 
)

endif if ( nargin  ,
 
)

endif if ( nargin  ,
 
)

endif if ( nargin  ,
 
)

endif if ( nargin  ,
 
)

endif if ( !isreal(b)||length(b)!  = nc  ) 

endif if ( isempty(b)   ) 

if ( !isreal(a)||nxa!  = nx  ) 

if ( isempty(a)   ) 

endif if ( all(size(c) > 1)||iscomplex(c)||ischar(c)   ) 


Variable Documentation

c = c(:)

endif ctype = repmat ("S", nc, 1)

or D

endif[xopt, fmin, status, extra] = size(a)

function[xopt, fmin, status, extra]

Initial value:

 glpk (c, a, b, lb, ub, ctype, vartype, sense, param)


  if (nargin < 3 || nargin > 9)
    print_usage ()

L

endif lb = zeros (nx, 1)

nc

nx = length (c)

endif param = struct ()

return

S

endif sense = -1

U

endif ub = repmat (Inf, nx, 1)

endif vartype = repmat ("C", nx, 1)