linopy.piecewise.PiecewiseFormulation#
- class linopy.piecewise.PiecewiseFormulation(name, method, variable_names, constraint_names, model, convexity=None)#
Result of
add_piecewise_formulation.Groups all auxiliary variables and constraints created by a single piecewise formulation. Stores only names internally;
variablesandconstraintsproperties return live views from the model.- name#
Formulation name (used as prefix for auxiliary variables and constraints).
- Type:
str
- method#
Resolved method — one of
{"sos2", "incremental", "lp"}. Never"auto"; if the caller passedmethod="auto", this holds the method actually chosen.- Type:
str
- convexity#
Shape of the piecewise curve along the breakpoint axis when it is well-defined (exactly two expressions, non-disjunctive, strictly monotonic
xbreakpoints).Noneotherwise.- Type:
{"convex", "concave", "linear", "mixed"}orNone
- __init__(name, method, variable_names, constraint_names, model, convexity=None)#
Methods
__init__(name, method, variable_names, ...)Attributes