PositiveEdgePivot

As a part of CyLP.python.pivots it implements the positive edge pivot selection rule.

class CyLP.py.pivots.PositiveEdgePivot.PositiveEdgePivot(clpModel, EPSILON=1e-07)[source]

Positive Edge pivot rule implementation.

Usage

>>> from CyLP.cy import CyClpSimplex
>>> from CyLP.py.pivots import PositiveEdgePivot
>>> from CyLP.py.pivots.PositiveEdgePivot import getMpsExample
>>> # Get the path to a sample mps file
>>> f = getMpsExample()
>>> s = CyClpSimplex()
>>> s.readMps(f)  # Returns 0 if OK
0
>>> pivot = PositiveEdgePivot(s)
>>> s.setPivotMethod(pivot)
>>> s.primal()
'optimal'
>>> round(s.objectiveValue, 5)
2520.57174

Previous topic

DualDantzigPivot

Next topic

LIFOPivot

This Page