Initializing help system before first use

problem.loadpresolvebasis

problem.loadpresolvebasis


Purpose
Loads a presolved basis from the user's areas.
Synopsis
problem.loadpresolvebasis(rstatus, cstatus)
Arguments
rstatus 
Array containing the basis status of the slack, surplus or artificial variable associated with each row. The status must be one of:
slack, surplus or artificial is non-basic at lower bound;
slack, surplus or artificial is basic;
slack or surplus is non-basic at upper bound.
cstatus 
Array containing the basis status of each of the columns in the matrix. The status must be one of:
variable is non-basic at lower bound or superbasic at zero if the variable has no lower bound;
variable is basic;
variable is at upper bound;
variable is super-basic.
Example
The following example saves the presolved basis for one problem, loading it into another:
p1 = xpress.problem()
p2 = xpress.problem()

p1.read("myprob", "")
p1.mipoptimize("l")
rs = []
cs = []
p1.getpresolvebasis(rs, cs)

p2.read("myprob2", "")
p2.mipoptimize("l")
p2.loadpresolvebasis(rs, cs)
Related topics