set_splitnegvarsSet if negative variables must be split into a positive and negative part. void set_splitnegvars(lprec *lp, short splitnegvars); Return Value set_splitnegvars has no return value. Parameters lp Pointer to previously created lp model. See return value of make_lp, copy_lp, read_lp, read_lp_file, read_LP, read_mps, read_MPS splitnegvars Specifies if negative variables must be split into a positive and negative part. Can be any of the following values:
Remarks The set_splitnegvars function specifies if negative variables must be
split into a positive and negative part. The simplex algorithm can't handle
negative variables. Variables are always >= 0. However there are 'tricks' to
overcome this 'limitation'. One way is split the variable in two. A positive
part and a negative part. The disadvantage is that the model becomes bigger
resulting in slower solving times. Another way is doing a substitution of the
variable into another one that is always positive. There is no extra column
needed and thus solving times are not bigger then. When splitnegvars is
set to AUTOMATIC then lp_solve tries to do a substitution whenever possible.
When set to TRUE then lp_solve does a split if the bound is smaller than the
value specified with set_negrange, else is does
the substitution.
Example
See Also make_lp, copy_lp, read_lp, read_lp_file, read_LP, read_mps, read_MPS, get_splitnegvars, set_negrange, get_negrange |