odys.optimization.formulations¶
Model formulations, one per entity type. A Formulation owns, for every entity of its type: the parameter arrays, the decision variables, the constraints, the net power it injects into the power balance and its profit per scenario. FORMULATIONS lists every entity type's formulation, in build and power-balance order.
Modules¶
basechargingcommitmentelectric_vehicleenergy_marketfixed_loadflexible_loadgeneratorbattery_storagestorage
Model formulations, one per entity type.
FORMULATIONS = (GeneratorFormulation, EnergyMarketFormulation, FixedLoadFormulation, FlexibleLoadFormulation, BatteryStorageFormulation, ElectricVehicleFormulation, ChargingFormulation)
module-attribute
¶
Every entity type's formulation, in build and power-balance order (charging after electric vehicles).
The only per-type list in the model layer.
validate_entities_supported(entities)
¶
Validate that a formulation models every entity's type.
A bare Asset or a user-defined Asset subclass would otherwise be
accepted and then silently left out of the model.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
entities
|
Sequence[EnergyEntity]
|
Every asset and market of the system. |
required |
Raises:
| Type | Description |
|---|---|
OdysValidationError
|
If no formulation models an entity's type. |
Source code in src/odys/optimization/formulations/__init__.py
31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 | |