Base class of the LP Plugin.
More...
Go to the source code of this file.
|
def | writeLP (self, filename) |
|
def | readLP (self, filename) |
|
def | infinity (self) |
|
def | isInfinity (self, val) |
|
def | addCol (self, entries, obj=0.0, lb=0.0, ub=None) |
|
def | addCols (self, entrieslist, objs=None, lbs=None, ubs=None) |
|
def | delCols (self, firstcol, lastcol) |
|
def | addRow (self, entries, lhs=0.0, rhs=None) |
|
def | addRows (self, entrieslist, lhss=None, rhss=None) |
|
def | delRows (self, firstrow, lastrow) |
|
def | getBounds (self, firstcol=0, lastcol=None) |
|
def | getSides (self, firstrow=0, lastrow=None) |
|
def | chgObj (self, col, obj) |
|
def | chgCoef (self, row, col, newval) |
|
def | chgBound (self, col, lb, ub) |
|
def | chgSide (self, row, lhs, rhs) |
|
def | clear (self) |
|
def | nrows (self) |
|
def | ncols (self) |
|
def | solve (self, dual=True) |
|
def | getPrimal (self) |
|
def | isPrimalFeasible (self) |
|
def | getDual (self) |
|
def | isDualFeasible (self) |
|
def | getPrimalRay (self) |
|
def | getDualRay (self) |
|
def | getNIterations (self) |
|
def | getRedcost (self) |
|
def | getBasisInds (self) |
|
Base class of the LP Plugin.
Definition in file lp.pxi.
def pyscipopt.lp.addCol |
( |
|
self, |
|
|
|
entries, |
|
|
|
obj = 0.0 , |
|
|
|
lb = 0.0 , |
|
|
|
ub = None |
|
) |
| |
Adds a single column to the LP.
Keyword arguments:
entries -- list of tuples, each tuple consists of a row index and a coefficient
obj -- objective coefficient (default 0.0)
lb -- lower bound (default 0.0)
ub -- upper bound (default infinity)
Definition at line 57 of file lp.pxi.
def pyscipopt.lp.addCols |
( |
|
self, |
|
|
|
entrieslist, |
|
|
|
objs = None , |
|
|
|
lbs = None , |
|
|
|
ubs = None |
|
) |
| |
Adds multiple columns to the LP.
Keyword arguments:
entrieslist -- list containing lists of tuples, each tuple contains a coefficient and a row index
objs -- objective coefficient (default 0.0)
lbs -- lower bounds (default 0.0)
ubs -- upper bounds (default infinity)
Definition at line 89 of file lp.pxi.
def pyscipopt.lp.addRow |
( |
|
self, |
|
|
|
entries, |
|
|
|
lhs = 0.0 , |
|
|
|
rhs = None |
|
) |
| |
Adds a single row to the LP.
Keyword arguments:
entries -- list of tuples, each tuple contains a coefficient and a column index
lhs -- left-hand side of the row (default 0.0)
rhs -- right-hand side of the row (default infinity)
Definition at line 153 of file lp.pxi.
def pyscipopt.lp.addRows |
( |
|
self, |
|
|
|
entrieslist, |
|
|
|
lhss = None , |
|
|
|
rhss = None |
|
) |
| |
Adds multiple rows to the LP.
Keyword arguments:
entrieslist -- list containing lists of tuples, each tuple contains a coefficient and a column index
lhss -- left-hand side of the row (default 0.0)
rhss -- right-hand side of the row (default infinity)
Definition at line 183 of file lp.pxi.
def pyscipopt.lp.chgBound |
( |
|
self, |
|
|
|
col, |
|
|
|
lb, |
|
|
|
ub |
|
) |
| |
Changes the lower and upper bound of a single column.
Keyword arguments:
col -- column to change
lb -- new lower bound
ub -- new upper bound
Definition at line 307 of file lp.pxi.
def pyscipopt.lp.chgCoef |
( |
|
self, |
|
|
|
row, |
|
|
|
col, |
|
|
|
newval |
|
) |
| |
Changes a single coefficient in the LP.
Keyword arguments:
row -- row to change
col -- column to change
newval -- new coefficient
Definition at line 297 of file lp.pxi.
def pyscipopt.lp.chgObj |
( |
|
self, |
|
|
|
col, |
|
|
|
obj |
|
) |
| |
Changes objective coefficient of a single column.
Keyword arguments:
col -- column to change
obj -- new objective coefficient
Definition at line 286 of file lp.pxi.
def pyscipopt.lp.chgSide |
( |
|
self, |
|
|
|
row, |
|
|
|
lhs, |
|
|
|
rhs |
|
) |
| |
Changes the left- and right-hand side of a single row.
Keyword arguments:
row -- row to change
lhs -- new left-hand side
rhs -- new right-hand side
Definition at line 320 of file lp.pxi.
def pyscipopt.lp.clear |
( |
|
self | ) |
|
Clears the whole LP.
Definition at line 333 of file lp.pxi.
def pyscipopt.lp.delCols |
( |
|
self, |
|
|
|
firstcol, |
|
|
|
lastcol |
|
) |
| |
Deletes a range of columns from the LP.
Keyword arguments:
firstcol -- first column to delete
lastcol -- last column to delete
Definition at line 144 of file lp.pxi.
def pyscipopt.lp.delRows |
( |
|
self, |
|
|
|
firstrow, |
|
|
|
lastrow |
|
) |
| |
Deletes a range of rows from the LP.
Keyword arguments:
firstrow -- first row to delete
lastrow -- last row to delete
Definition at line 219 of file lp.pxi.
def pyscipopt.lp.getBasisInds |
( |
|
self | ) |
|
Returns the indices of the basic columns and rows; index i >= 0 corresponds to column i, index i < 0 to row -i-1
Definition at line 444 of file lp.pxi.
def pyscipopt.lp.getBounds |
( |
|
self, |
|
|
|
firstcol = 0 , |
|
|
|
lastcol = None |
|
) |
| |
Returns all lower and upper bounds for a range of columns.
Keyword arguments:
firstcol -- first column (default 0)
lastcol -- last column (default ncols - 1)
Definition at line 228 of file lp.pxi.
def pyscipopt.lp.getDual |
( |
|
self | ) |
|
Returns the dual solution of the last LP solve.
Definition at line 380 of file lp.pxi.
def pyscipopt.lp.getDualRay |
( |
|
self | ) |
|
Returns a dual ray if possible, None otherwise.
Definition at line 410 of file lp.pxi.
def pyscipopt.lp.getNIterations |
( |
|
self | ) |
|
Returns the number of LP iterations of the last LP solve.
Definition at line 424 of file lp.pxi.
def pyscipopt.lp.getPrimal |
( |
|
self | ) |
|
Returns the primal solution of the last LP solve.
Definition at line 364 of file lp.pxi.
def pyscipopt.lp.getPrimalRay |
( |
|
self | ) |
|
Returns a primal ray if possible, None otherwise.
Definition at line 396 of file lp.pxi.
def pyscipopt.lp.getRedcost |
( |
|
self | ) |
|
Returns the reduced cost vector of the last LP solve.
Definition at line 430 of file lp.pxi.
def pyscipopt.lp.getSides |
( |
|
self, |
|
|
|
firstrow = 0 , |
|
|
|
lastrow = None |
|
) |
| |
Returns all left- and right-hand sides for a range of rows.
Keyword arguments:
firstrow -- first row (default 0)
lastrow -- last row (default nrows - 1)
Definition at line 257 of file lp.pxi.
def pyscipopt.lp.infinity |
( |
|
self | ) |
|
Returns infinity value of the LP.
Definition at line 44 of file lp.pxi.
def pyscipopt.lp.isDualFeasible |
( |
|
self | ) |
|
Returns True iff LP is proven to be dual feasible.
Definition at line 392 of file lp.pxi.
def pyscipopt.lp.isInfinity |
( |
|
self, |
|
|
|
val |
|
) |
| |
Checks if a given value is equal to the infinity value of the LP.
Keyword arguments:
val -- value that should be checked
Definition at line 49 of file lp.pxi.
def pyscipopt.lp.isPrimalFeasible |
( |
|
self | ) |
|
Returns True iff LP is proven to be primal feasible.
Definition at line 376 of file lp.pxi.
def pyscipopt.lp.ncols |
( |
|
self | ) |
|
Returns the number of columns.
Definition at line 343 of file lp.pxi.
def pyscipopt.lp.nrows |
( |
|
self | ) |
|
Returns the number of rows.
Definition at line 337 of file lp.pxi.
def pyscipopt.lp.readLP |
( |
|
self, |
|
|
|
filename |
|
) |
| |
Reads LP from a file.
Keyword arguments:
filename -- the name of the file to be used
Definition at line 36 of file lp.pxi.
def pyscipopt.lp.solve |
( |
|
self, |
|
|
|
dual = True |
|
) |
| |
Solves the current LP.
Keyword arguments:
dual -- use the dual or primal Simplex method (default: dual)
Definition at line 349 of file lp.pxi.
def pyscipopt.lp.writeLP |
( |
|
self, |
|
|
|
filename |
|
) |
| |
Writes LP to a file.
Keyword arguments:
filename -- the name of the file to be used
Definition at line 28 of file lp.pxi.