Initializing help system before first use

getcoeffs

getcoeffs


Purpose
Get all variable coefficients of a constraint.
Synopsis
procedure getcoeffs(c:linctr, a:array(set of mpvar) of real, s:set of mpvar)
Arguments
A linear constraint
An array of reals indiced by decision variables
A set of decision variables
Further information
1. This procedure returns in the parameter a the coefficients of all variables of a constraint. After calling this procedure, the coefficient of variable v of constraint c is a(v). The set s is used to specify for which variables the coefficients have to be retrieved (if this set is empty all variables are considered).
2. If set s is empty all cells of array a are updated ( i.e. cells corresponding to variables not included in constraint c are set to 0). Otherwise only cells corresponding to elements of s are modified.
Related topics