pyepo.dsl¶
PyEPO symbolic DSL: define an LP / MIP / QP once and compile it to any backend.
Public API:
from pyepo import EPO, dsl
x = dsl.Variable(5, vtype=EPO.BINARY)
c = dsl.Parameter(5)
prob = dsl.Problem(dsl.Maximize(c @ x), [W @ x <= cap])
Problem finalizes the symbolic IR (sparse coefficient matrices) and
compiles it to a solver backend.
Submodules¶
Functions¶
|
Module-level reduction: dispatches to the expression's |
Package Contents¶
- pyepo.dsl.sum(expr, axis=None)¶
Module-level reduction: dispatches to the expression’s
.sum(axis).dsl.sum(c * x)returns the scalarParametricObjective;dsl.sumof anAffine/Variablereturns the reduced linear expression.