echo.models.prebuilt package
- class echo.models.prebuilt.Battery(port_name: str, max_capacity: float, initial_state_of_charge: float, charging_power_limit: float, discharging_power_limit: float, storage_capacity_cost: float | None = _CountingAttr(counter=233, _default=None, repr=True, eq=True, order=True, hash=None, init=True, on_setattr=None, alias=None, metadata={}), charging_efficiency: float = 1, discharging_efficiency: float = 1, depth_of_discharge_limit: float = 0, fixed_storage_capacity: bool = True, regularise: bool = False, **data)
Bases:
Node
- class echo.models.prebuilt.DieselGenerator(uid: str = NOTHING, node_name: str = NOTHING, ports: dict[str, Port] = NOTHING, objective: en.numeric_expr.NumericExpression | float = 0, max_output: float | None = None, min_output: float | None = None, max_input: float | None = None, min_input: float | None = None, input_port_ref: str = 'input', output_port_ref: str = 'output', input_port_unit: Units = Units.LPS, output_port_unit: Units = Units.KW, cop: float = 1440.0, startup_efficiency: float = 0.5, C02Intensity: float = 2.7)
Bases:
InputOutputNodeA diesel generator node. Converts diesel into electricity at a fixed rate of cop which is in units of kW/liters per second
- C02Intensity: float
- apply_node_constraints(model: EchoConcreteModel) None
Apply constraints associated with this node to a concrete model.
Intended to be overridden in subclasses.
Define constraints as functions that returns a Constraint, EqualityExpression or InequalityExpression.
Define a subfunction of the form detailed in the example below, then apply with setattr. For example:
- def apply_node_constraints(self, model: EchoConcreteModel) -> None:
- def tellegen_node_rule(model: EchoConcreteModel, p: int, t:int) -> EqualityExpression:
a = 0 for port in node_ports.values():
a += getattr(model, port.port_name)[p, t]
return a == 0
node_ports = self.ports con_name = “reliability_con_” + self.node_name setattr(model, con_name, en.Constraint(model.Expansion, model.Time, rule=tellegen_node_rule))
- Parameters:
model – The model to add the constraints to.
- Returns:
None
- cop: float
- startup_efficiency: float
- class echo.models.prebuilt.FlexElectricalNode(port_name: str, **data)
Bases:
Node- node_name: str
- objective: NumericExpression | float
- uid: str
- class echo.models.prebuilt.FlexNode(port_name: str, port_unit: Units, **data)
Bases:
Node- node_name: str
- objective: NumericExpression | float
- uid: str
- class echo.models.prebuilt.FlexNodeWithEmissions(emitting_port: str, emitting_port_units: Units, carbon_port: str, emissions_factor: float | ndarray, **data)
Bases:
TransformNode
- class echo.models.prebuilt.Load(port_name: str, port_unit: Units, profile: dict | ndarray | list, **data)
Bases:
Node- node_name: str
- objective: NumericExpression | float
- uid: str
- class echo.models.prebuilt.ScaledSolar(port_name: str, solar_size: float, initial_value_ref: str, curtailable: bool = False, **data)
Bases:
NodeSolar Node using size of solar system for scaling of initial value ref
- node_name: str
- objective: NumericExpression | float
- uid: str
- class echo.models.prebuilt.Solar(port_name: str, profile: ndarray | dict, curtailable: bool = False, **data)
Bases:
Node- node_name: str
- objective: NumericExpression | float
- uid: str