Skip to content

Grid

GridBuilderABC

GridBuilderABC(
    label: str,
    power_supply_limit: float,
    feed_in_limit: float,
)

Bases: ComponentABC


              flowchart TD
              nrgise.components.GridBuilderABC[GridBuilderABC]
              nrgise.components.component_abc.ComponentABC[ComponentABC]

                              nrgise.components.component_abc.ComponentABC --> nrgise.components.GridBuilderABC
                


              click nrgise.components.GridBuilderABC href "" "nrgise.components.GridBuilderABC"
              click nrgise.components.component_abc.ComponentABC href "" "nrgise.components.component_abc.ComponentABC"
            

Base class for grid builders.

An EnergySystem needs one grid builder to supply power to the system and accept feed-in power from the system.

Note that requesting positive power means there is a deficit of power in the energy system and power needs to be provided by the grid builder. Requesting negative power means there is a surplus of power in the energy system and the grid builder needs to accept feed-in power.

Parameters:

Name Type Description Default
power_supply_limit float

The maximum amount of power (kW) which can be supplied. This value must be positive.

required
feed_in_limit float

The maximum amount of power (kW) which can be accepted as feed-in. This value must be negative.

required

nrgise.components.GridBuilderABC.supply_power

supply_power(requested_power: float) -> float

Called by the Simulation at the end of each time step to level the energy balance of the enrgy system. Note that requesting positive power means there is a deficit of power in the energy system and power needs to be provided by the grid builder. Requesting negative power means there is a surplus of power in the energy system and the grid builder needs to accept feed-in power.

Parameters:

Name Type Description Default
requested_power float

The power (kW) which is requested by the energy system.

required

Returns:

Type Description
float

The power which was requested. If it does not match with the requested power, the energy system is not balanced and an error is raised in the Simulation.


Grid

Grid(
    label: str,
    power_supply_limit: float = np.inf,
    feed_in_limit: float = -np.inf,
)

Bases: GridBuilderABC


              flowchart TD
              nrgise.components.Grid[Grid]
              nrgise.components.grid_builder.grid_builder_abc.GridBuilderABC[GridBuilderABC]
              nrgise.components.component_abc.ComponentABC[ComponentABC]

                              nrgise.components.grid_builder.grid_builder_abc.GridBuilderABC --> nrgise.components.Grid
                                nrgise.components.component_abc.ComponentABC --> nrgise.components.grid_builder.grid_builder_abc.GridBuilderABC
                



              click nrgise.components.Grid href "" "nrgise.components.Grid"
              click nrgise.components.grid_builder.grid_builder_abc.GridBuilderABC href "" "nrgise.components.grid_builder.grid_builder_abc.GridBuilderABC"
              click nrgise.components.component_abc.ComponentABC href "" "nrgise.components.component_abc.ComponentABC"
            

Concrete implementation of a GridBuilder as simple Grid model. Args: power_supply_limit: The maximum amount of power (kW) which can be supplied. This value must be positive. feed_in_limit: The maximum amount of power (kW) which can be accepted as feed-in. This value must be negative.


Generator

Generator(label: str, power_supply_limit: float = np.inf)

Bases: GridBuilderABC


              flowchart TD
              nrgise.components.Generator[Generator]
              nrgise.components.grid_builder.grid_builder_abc.GridBuilderABC[GridBuilderABC]
              nrgise.components.component_abc.ComponentABC[ComponentABC]

                              nrgise.components.grid_builder.grid_builder_abc.GridBuilderABC --> nrgise.components.Generator
                                nrgise.components.component_abc.ComponentABC --> nrgise.components.grid_builder.grid_builder_abc.GridBuilderABC
                



              click nrgise.components.Generator href "" "nrgise.components.Generator"
              click nrgise.components.grid_builder.grid_builder_abc.GridBuilderABC href "" "nrgise.components.grid_builder.grid_builder_abc.GridBuilderABC"
              click nrgise.components.component_abc.ComponentABC href "" "nrgise.components.component_abc.ComponentABC"
            

Concrete implementation of a GridBuilder as simple Generator model. Feed in is not possible.

Args: power_supply_limit: The maximum amount of power (kW) which can be supplied. This value must be positive.

Parameters:

Name Type Description Default
power_supply_limit float

must be +ve value, defaults to +infinity

inf