DualDantzigPivot
¶
- As a part of
cylp.python.pivots
it implements Dantzig’s - Simplex dual pivot rule. Although it already exists in CLP,
for testing purposes we implement one in Python.
-
class
cylp.py.pivots.DualDantzigPivot.
DualDantzigPivot
(clpModel)[source]¶ Dantzig’s dual pivot rule implementation.
Usage
>>> from cylp.cy import CyClpSimplex >>> from cylp.py.pivots.DualDantzigPivot import DualDantzigPivot >>> from cylp.py.pivots.DualDantzigPivot import getMpsExample >>> # Get the path to a sample mps file >>> f = getMpsExample() >>> s = CyClpSimplex() >>> s.readMps(f) # Returns 0 if OK 0 >>> pivot = DualDantzigPivot(s) >>> s.setDualPivotMethod(pivot) >>> s.dual() 'optimal' >>> round(s.objectiveValue, 5) 2520.57174