get_splitnegvarsReturns if negative variables must be split into a positive and negative part. short get_splitnegvars(lprec *lp); Return Value get_splitnegvars returns if negative variables must be split into a positive and negative part. Can be any of the following values:
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 RemarksThe get_splitnegvars function returns 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, set_splitnegvars, set_negrange, get_negrange |