monee.model.formulation¶
Core¶
- class monee.model.formulation.core.BranchFormulation[source]¶
Bases:
Formulation
- class monee.model.formulation.core.ChildFormulation[source]¶
Bases:
Formulation
- class monee.model.formulation.core.CompoundFormulation[source]¶
Bases:
Formulation
- class monee.model.formulation.core.NetworkConstraint[source]¶
Bases:
objectSolver-agnostic network-level constraint extension.
Analogous to
BranchFormulation/NodeFormulationbut spanning the entire network. Register withnetwork.add_extension(constraint).Phase 1 —
prepare(network): called before variable injection; addVarplaceholders to model objects so the injection loop picks them up.Phase 2 —
equations(network, ignored_nodes) → list: called after variable injection; return relational expressions (==,<=,>=) built from injected model attributes. The solver registers them withm.Equations(eqs)/pm.cons.addwithout inspecting their content — exactly like branch/node equations.
Ready-to-use network formulations¶
The following constants are importable directly from monee.model.formulation:
Electricity¶
Nonlinear AC¶
- class monee.model.formulation.nonlinear.ac.ACElectricityBranchFormulation[source]¶
Bases:
BranchFormulation
- class monee.model.formulation.nonlinear.ac.ACElectricityNodeFormulation[source]¶
Bases:
NodeFormulation
MISOCP relaxation¶
- class monee.model.formulation.misoc.el.MISOCPElectricityBranchFormulation[source]¶
Bases:
BranchFormulation
Gas¶
Nonlinear Weymouth¶
- class monee.model.formulation.nonlinear.gas.NLWeymouthBranchFormulation[source]¶
Bases:
BranchFormulation
Water / district heating¶
Nonlinear Darcy–Weisbach¶
- class monee.model.formulation.nonlinear.water.NLDarcyWeisbachBranchFormulation[source]¶
Bases:
BranchFormulation