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.- method#
Resolved method actually used. Never
"auto"; if the caller passedmethod="auto", this holds the method that was chosen.- Type:
PWL_METHOD
- 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:
PWL_CONVEXITYorNone
- __init__(name, method, variable_names, constraint_names, model, convexity=None)#
Methods
__init__(name, method, variable_names, ...)Attributes
Resolved formulation method (see
PWL_METHOD).variable_namesconstraint_namesmodelShape of the piecewise curve when well-defined (see
PWL_CONVEXITY), elseNone.View of the auxiliary constraints in this formulation.
View of the auxiliary variables in this formulation.