How coin-or/cylp works
CyLP is a Python interface to CLP, CBC, and CGL, letting users build or read optimization problems and control solver behavior from Python. The main workflow is model or MPS input, then simplex solving and a solution; customization includes Python pivot rules and, for MIP, cuts and branch-and-bound strategies. QP support and sparse-matrix utilities are separate capabilities. The graph uses README statements and the supplied source index/excerpts for relationships; unsampled implementation details are shown only where the repository tree supports a component, without asserting unverified calls.
Main entry points: QP.py Quadratic programs · __init__.py Python solver API · IClpSimplex.cpp CLP binding · PySolve.py MPS solve entry
Components 18
Modeling and input
- LP modeling
cylp/py/modeling/CyLPModel.py - MPS reader
cylp/cpp/ICoinMpsIO.cpp - Sparse utilities
cylp/py/utils/sparseUtil.py
Solver core
- Python solver API
cylp/cy/__init__.py - CLP binding
cylp/cpp/IClpSimplex.cpp - Simplex engine
cylp/cpp/IClpSimplexPrimal.cpp - Wolfe simplex
cylp/cpp/IClpSimplexPrimal_Wolfe.cpp - MPS solve entry
cylp/py/PySolve.py
Solver customization
- Pivot interface
cylp/py/pivots/PivotPythonBase.py - Pivot strategies
cylp/py/pivots/DantzigPivot.py - Wolfe positive edge
cylp/py/pivots/WolfePivotPE.py
Optimization extensions
- CBC MIP model
cylp/cpp/ICbcModel.cpp - MIP cut generators
cylp/py/mip/GomoryCutGenerator.py - Node comparison
cylp/py/mip/NodeCompareBase.py - Quadratic programs
cylp/py/QP/QP.py - QPS reader
cylp/py/QP/QPSReader.py
Other components
- Python user
- MPS file
Connections 19
- Python user → LP modeling: defines model
README.rst - Python user → MPS file: provides input
README.rst - MPS file → MPS solve entry: loads MPS
cylp/py/PySolve.py - LP modeling → Python solver API: models for
README.rst - MPS solve entry → Python solver API: creates solver
cylp/py/PySolve.py - Python solver API → CLP binding: wraps solver
- MPS reader → CLP binding: loads problem
- CLP binding → Simplex engine: runs primal
cylp/cpp/IClpSimplex.cpp - Simplex engine → Wolfe simplex: supports variant
- MPS solve entry → Pivot strategies: selects strategy
cylp/py/PySolve.py - Pivot strategies → Pivot interface: implements interface
cylp/py/pivots/DantzigPivot.py - Pivot interface → CLP binding: accesses model
- Wolfe positive edge → Pivot interface: implements interface
cylp/py/pivots/WolfePivotPE.py - Python user → Quadratic programs: defines QP
- Quadratic programs → QPS reader: reads QPS
cylp/py/QP/QP.py - Quadratic programs → Sparse utilities: uses matrices
cylp/py/QP/QP.py - Quadratic programs → Python solver API: solves through
cylp/py/QP/QP.py - CBC MIP model → MIP cut generators: accepts cuts
- CBC MIP model → Node comparison: uses strategy