Skip to content

Data Profile Components

PowerProfile

PowerProfile(label: str, power_profile: UnivariateSequence)

Bases: DataProfileMixin, ContributesToPowerBalanceMixin, TimeStepAwareMixin


              flowchart TD
              nrgise.components.PowerProfile[PowerProfile]
              nrgise.components.capabilities.data_profile_mixin.DataProfileMixin[DataProfileMixin]
              nrgise.components.capabilities.contributes_to_power_balance_mixin.ContributesToPowerBalanceMixin[ContributesToPowerBalanceMixin]
              nrgise.components.capabilities.time_step_aware_mixin.TimeStepAwareMixin[TimeStepAwareMixin]
              nrgise.components.component_abc.ComponentABC[ComponentABC]

                              nrgise.components.capabilities.data_profile_mixin.DataProfileMixin --> nrgise.components.PowerProfile
                                nrgise.components.component_abc.ComponentABC --> nrgise.components.capabilities.data_profile_mixin.DataProfileMixin
                

                nrgise.components.capabilities.contributes_to_power_balance_mixin.ContributesToPowerBalanceMixin --> nrgise.components.PowerProfile
                                nrgise.components.component_abc.ComponentABC --> nrgise.components.capabilities.contributes_to_power_balance_mixin.ContributesToPowerBalanceMixin
                

                nrgise.components.capabilities.time_step_aware_mixin.TimeStepAwareMixin --> nrgise.components.PowerProfile
                                nrgise.components.component_abc.ComponentABC --> nrgise.components.capabilities.time_step_aware_mixin.TimeStepAwareMixin
                



              click nrgise.components.PowerProfile href "" "nrgise.components.PowerProfile"
              click nrgise.components.capabilities.data_profile_mixin.DataProfileMixin href "" "nrgise.components.capabilities.data_profile_mixin.DataProfileMixin"
              click nrgise.components.capabilities.contributes_to_power_balance_mixin.ContributesToPowerBalanceMixin href "" "nrgise.components.capabilities.contributes_to_power_balance_mixin.ContributesToPowerBalanceMixin"
              click nrgise.components.capabilities.time_step_aware_mixin.TimeStepAwareMixin href "" "nrgise.components.capabilities.time_step_aware_mixin.TimeStepAwareMixin"
              click nrgise.components.component_abc.ComponentABC href "" "nrgise.components.component_abc.ComponentABC"
            

Represents component that cannot be controlled and its power values (kW) are predefined by a power profile (for example a fixed solar generation or fixed load profile). Note that positive alues mean power is generated, whereas negative values mean power is consumed.

Parameters:

Name Type Description Default
power_profile UnivariateSequence

A profile containing the amount of power (kW) served or consumed by the component for every time step.

required
label str

An unique identifier for the component.

required

Load

Load(label: str, power_profile: UnivariateSequence)

Bases: PowerProfile


              flowchart TD
              nrgise.components.Load[Load]
              nrgise.components.power_profile.PowerProfile[PowerProfile]
              nrgise.components.capabilities.data_profile_mixin.DataProfileMixin[DataProfileMixin]
              nrgise.components.capabilities.contributes_to_power_balance_mixin.ContributesToPowerBalanceMixin[ContributesToPowerBalanceMixin]
              nrgise.components.capabilities.time_step_aware_mixin.TimeStepAwareMixin[TimeStepAwareMixin]
              nrgise.components.component_abc.ComponentABC[ComponentABC]

                              nrgise.components.power_profile.PowerProfile --> nrgise.components.Load
                                nrgise.components.capabilities.data_profile_mixin.DataProfileMixin --> nrgise.components.power_profile.PowerProfile
                                nrgise.components.component_abc.ComponentABC --> nrgise.components.capabilities.data_profile_mixin.DataProfileMixin
                

                nrgise.components.capabilities.contributes_to_power_balance_mixin.ContributesToPowerBalanceMixin --> nrgise.components.power_profile.PowerProfile
                                nrgise.components.component_abc.ComponentABC --> nrgise.components.capabilities.contributes_to_power_balance_mixin.ContributesToPowerBalanceMixin
                

                nrgise.components.capabilities.time_step_aware_mixin.TimeStepAwareMixin --> nrgise.components.power_profile.PowerProfile
                                nrgise.components.component_abc.ComponentABC --> nrgise.components.capabilities.time_step_aware_mixin.TimeStepAwareMixin
                




              click nrgise.components.Load href "" "nrgise.components.Load"
              click nrgise.components.power_profile.PowerProfile href "" "nrgise.components.power_profile.PowerProfile"
              click nrgise.components.capabilities.data_profile_mixin.DataProfileMixin href "" "nrgise.components.capabilities.data_profile_mixin.DataProfileMixin"
              click nrgise.components.capabilities.contributes_to_power_balance_mixin.ContributesToPowerBalanceMixin href "" "nrgise.components.capabilities.contributes_to_power_balance_mixin.ContributesToPowerBalanceMixin"
              click nrgise.components.capabilities.time_step_aware_mixin.TimeStepAwareMixin href "" "nrgise.components.capabilities.time_step_aware_mixin.TimeStepAwareMixin"
              click nrgise.components.component_abc.ComponentABC href "" "nrgise.components.component_abc.ComponentABC"
            

A more concrete implementation of PowerProfileComponent which represents a load (values per time step in kW).

Parameters:

Name Type Description Default
power_profile UnivariateSequence

A profile containing the amount of power (kW) produced by the Pv System. These values are usually positive.

required
label str

An unique identifier for the component.

required

Pv

Pv(label: str, power_profile: UnivariateSequence)

Bases: PowerProfile


              flowchart TD
              nrgise.components.Pv[Pv]
              nrgise.components.power_profile.PowerProfile[PowerProfile]
              nrgise.components.capabilities.data_profile_mixin.DataProfileMixin[DataProfileMixin]
              nrgise.components.capabilities.contributes_to_power_balance_mixin.ContributesToPowerBalanceMixin[ContributesToPowerBalanceMixin]
              nrgise.components.capabilities.time_step_aware_mixin.TimeStepAwareMixin[TimeStepAwareMixin]
              nrgise.components.component_abc.ComponentABC[ComponentABC]

                              nrgise.components.power_profile.PowerProfile --> nrgise.components.Pv
                                nrgise.components.capabilities.data_profile_mixin.DataProfileMixin --> nrgise.components.power_profile.PowerProfile
                                nrgise.components.component_abc.ComponentABC --> nrgise.components.capabilities.data_profile_mixin.DataProfileMixin
                

                nrgise.components.capabilities.contributes_to_power_balance_mixin.ContributesToPowerBalanceMixin --> nrgise.components.power_profile.PowerProfile
                                nrgise.components.component_abc.ComponentABC --> nrgise.components.capabilities.contributes_to_power_balance_mixin.ContributesToPowerBalanceMixin
                

                nrgise.components.capabilities.time_step_aware_mixin.TimeStepAwareMixin --> nrgise.components.power_profile.PowerProfile
                                nrgise.components.component_abc.ComponentABC --> nrgise.components.capabilities.time_step_aware_mixin.TimeStepAwareMixin
                




              click nrgise.components.Pv href "" "nrgise.components.Pv"
              click nrgise.components.power_profile.PowerProfile href "" "nrgise.components.power_profile.PowerProfile"
              click nrgise.components.capabilities.data_profile_mixin.DataProfileMixin href "" "nrgise.components.capabilities.data_profile_mixin.DataProfileMixin"
              click nrgise.components.capabilities.contributes_to_power_balance_mixin.ContributesToPowerBalanceMixin href "" "nrgise.components.capabilities.contributes_to_power_balance_mixin.ContributesToPowerBalanceMixin"
              click nrgise.components.capabilities.time_step_aware_mixin.TimeStepAwareMixin href "" "nrgise.components.capabilities.time_step_aware_mixin.TimeStepAwareMixin"
              click nrgise.components.component_abc.ComponentABC href "" "nrgise.components.component_abc.ComponentABC"
            

A more concrete implementation of PowerProfileComponent which represents a PV system (values per time step in kW).

Parameters:

Name Type Description Default
power_profile UnivariateSequence

A profile containing the amount of power (kW) produced by the Pv System. These values are usually positive.

required
label str

An unique identifier for the component.

required

PvCurtailable

PvCurtailable(label: str, power_profile: ndarray)

Bases: DataProfileMixin, ControllableMixin, PublishesStateMixin, TimeStepAwareMixin


              flowchart TD
              nrgise.components.PvCurtailable[PvCurtailable]
              nrgise.components.capabilities.data_profile_mixin.DataProfileMixin[DataProfileMixin]
              nrgise.components.capabilities.controllable_mixin.ControllableMixin[ControllableMixin]
              nrgise.components.capabilities.publishes_state_mixin.PublishesStateMixin[PublishesStateMixin]
              nrgise.components.capabilities.time_step_aware_mixin.TimeStepAwareMixin[TimeStepAwareMixin]
              nrgise.components.component_abc.ComponentABC[ComponentABC]

                              nrgise.components.capabilities.data_profile_mixin.DataProfileMixin --> nrgise.components.PvCurtailable
                                nrgise.components.component_abc.ComponentABC --> nrgise.components.capabilities.data_profile_mixin.DataProfileMixin
                

                nrgise.components.capabilities.controllable_mixin.ControllableMixin --> nrgise.components.PvCurtailable
                                nrgise.components.component_abc.ComponentABC --> nrgise.components.capabilities.controllable_mixin.ControllableMixin
                

                nrgise.components.capabilities.publishes_state_mixin.PublishesStateMixin --> nrgise.components.PvCurtailable
                                nrgise.components.component_abc.ComponentABC --> nrgise.components.capabilities.publishes_state_mixin.PublishesStateMixin
                

                nrgise.components.capabilities.time_step_aware_mixin.TimeStepAwareMixin --> nrgise.components.PvCurtailable
                                nrgise.components.component_abc.ComponentABC --> nrgise.components.capabilities.time_step_aware_mixin.TimeStepAwareMixin
                



              click nrgise.components.PvCurtailable href "" "nrgise.components.PvCurtailable"
              click nrgise.components.capabilities.data_profile_mixin.DataProfileMixin href "" "nrgise.components.capabilities.data_profile_mixin.DataProfileMixin"
              click nrgise.components.capabilities.controllable_mixin.ControllableMixin href "" "nrgise.components.capabilities.controllable_mixin.ControllableMixin"
              click nrgise.components.capabilities.publishes_state_mixin.PublishesStateMixin href "" "nrgise.components.capabilities.publishes_state_mixin.PublishesStateMixin"
              click nrgise.components.capabilities.time_step_aware_mixin.TimeStepAwareMixin href "" "nrgise.components.capabilities.time_step_aware_mixin.TimeStepAwareMixin"
              click nrgise.components.component_abc.ComponentABC href "" "nrgise.components.component_abc.ComponentABC"
            

Curtailable and therefore controllable photovoltaic (PV) system with a predefined generation power profile (kW).

The component uses a predefined PV power profile to describe the maximum available generation at each time step. Actual power generation does not have to match the profile exactly: it may be lower, for example due to curtailment which can be defined by a Controller.

Note that using this component requires a Controller which provides actions for this component.

Parameters:

Name Type Description Default
label str

Unique label.

required
power_profile ndarray

Maximum available PV generation (kW) per time step. Note that the values are positive as they represent power supplied to the energy system.

required

nrgise.components.PvCurtailable.get_state

get_state() -> dict[str, Any]

Return the predefined pv generation according to the data profile at the current time step.

Returns:

Type Description
dict[str, Any]

A dictionary containing the following keys:

  • generation: The generation according to the data profile for this time step in kW.

ChargePoint

ChargePoint(
    label: str,
    charge_event_data: DataFrame,
    time_delta_seconds: int,
    ev_charge_power_limit: float = -50,
    ev_discharge_power_limit: float = 50,
)

Bases: DataProfileMixin, ControllableMixin, PublishesStateMixin, TimeStepAwareMixin


              flowchart TD
              nrgise.components.ChargePoint[ChargePoint]
              nrgise.components.capabilities.data_profile_mixin.DataProfileMixin[DataProfileMixin]
              nrgise.components.capabilities.controllable_mixin.ControllableMixin[ControllableMixin]
              nrgise.components.capabilities.publishes_state_mixin.PublishesStateMixin[PublishesStateMixin]
              nrgise.components.capabilities.time_step_aware_mixin.TimeStepAwareMixin[TimeStepAwareMixin]
              nrgise.components.component_abc.ComponentABC[ComponentABC]

                              nrgise.components.capabilities.data_profile_mixin.DataProfileMixin --> nrgise.components.ChargePoint
                                nrgise.components.component_abc.ComponentABC --> nrgise.components.capabilities.data_profile_mixin.DataProfileMixin
                

                nrgise.components.capabilities.controllable_mixin.ControllableMixin --> nrgise.components.ChargePoint
                                nrgise.components.component_abc.ComponentABC --> nrgise.components.capabilities.controllable_mixin.ControllableMixin
                

                nrgise.components.capabilities.publishes_state_mixin.PublishesStateMixin --> nrgise.components.ChargePoint
                                nrgise.components.component_abc.ComponentABC --> nrgise.components.capabilities.publishes_state_mixin.PublishesStateMixin
                

                nrgise.components.capabilities.time_step_aware_mixin.TimeStepAwareMixin --> nrgise.components.ChargePoint
                                nrgise.components.component_abc.ComponentABC --> nrgise.components.capabilities.time_step_aware_mixin.TimeStepAwareMixin
                



              click nrgise.components.ChargePoint href "" "nrgise.components.ChargePoint"
              click nrgise.components.capabilities.data_profile_mixin.DataProfileMixin href "" "nrgise.components.capabilities.data_profile_mixin.DataProfileMixin"
              click nrgise.components.capabilities.controllable_mixin.ControllableMixin href "" "nrgise.components.capabilities.controllable_mixin.ControllableMixin"
              click nrgise.components.capabilities.publishes_state_mixin.PublishesStateMixin href "" "nrgise.components.capabilities.publishes_state_mixin.PublishesStateMixin"
              click nrgise.components.capabilities.time_step_aware_mixin.TimeStepAwareMixin href "" "nrgise.components.capabilities.time_step_aware_mixin.TimeStepAwareMixin"
              click nrgise.components.component_abc.ComponentABC href "" "nrgise.components.component_abc.ComponentABC"
            

This class implements a charge point for electric vehicles. If an electric vehicle is connected to the charge point, it will show a Battery in self._electric_vehicle, which can be charged and discharged. It uses the charge_event_data as a data profile of when an EV is connected, and if so, with which capacity and which initial SOC it arrived. A non-null soc_arrival indicates that an EV is connected. Event end times are handled exclusively, so an EV departing at a timestamp is not considered connected during the following simulation interval.

Example structure of charge_event_data containing two electric vehicles (first EV is connected for 30 minutes, second EV for 15 minutes):

time_stamp     soc_arrival  capacity
------------------------------------------
09:45          nan          nan
10:00          0.2          60
10:15          0.2          60
10:30          nan          nan
10:45          0.1          80
11:00          nan          nan

Parameters:

Name Type Description Default
label str

The component label

required
charge_event_data DataFrame

The charge event data contains the timestamps as index, and columns soc_arrival, capacity (nan if no car is present). It has one entry per simulation time step.

required
time_delta_seconds int

The resolution of the simulation

required
ev_charge_power_limit float

the charging power limit of the EV. The ev battery is assumed to be an one-hour battery

-50
ev_discharge_power_limit float

the discharging power limit of the EV

50

nrgise.components.ChargePoint.get_state

get_state() -> dict[str, Any]

Return the current connection state and properties of the EV.

Returns:

Type Description
dict[str, Any]

A dictionary containing the following keys:

  • ev_connected: Whether an electric vehicle is connected.
  • ev_soc: The connected EV's state of charge, or None if no EV is connected.
  • ev_capacity: The connected EV's battery capacity, or None if no EV is connected.

nrgise.components.ChargePoint.handle_time_step_update

handle_time_step_update(time_step: int) -> None

Updates the EV connection state for the given simulation time step.

A vehicle is connected when soc_arrival contains a value at the current time step. A connected vehicle is disconnected when soc_arrival is NaN. A connected vehicle is represented by a Battery with a P/E ratio of 1.

Parameters:

Name Type Description Default
time_step int

Positional index of the current time step in the charge_event_data profile.

required

Raises:

Type Description
IndexError

If time_step is outside the available data profile.

nrgise.components.ChargePoint.reset

reset() -> None

Reset the ChargePoint to its initial simulation state.

Disconnects the currently connected EV, if any, and clears the stored time_step. The charge_event_data and configured power limits are kept.

nrgise.components.ChargePoint.set_power_contribution

set_power_contribution(power: float) -> float

Set the requested power contribution of the connected EV.

Negative power values represent EV charging, while positive values represent EV discharging. The requested power is limited to the configured charging and discharging bounds before it is forwarded to the EV battery.

Parameters:

Name Type Description Default
power float

Requested power contribution.

required

Returns:

Type Description
float

The actual power contribution accepted by the EV battery, or 0

float

if no EV is connected.