Documentation of UrbanFireXDT
Documentation of UrbanFireXDT
Loading...
Searching...
No Matches
Public Member Functions | List of all members
ComponentCS Class Reference

#include <components.h>

Inheritance diagram for ComponentCS:
Inheritance graph

Public Member Functions

 ComponentCS (ControlUnit *calling_control_unit, unsigned int number_of_flats)
 Constructs a new Charging Station component. There will be one charging point per flat.
 
 ~ComponentCS ()
 
bool is_enabled () const
 
double get_max_P_kW () const
 Returns the maximum available charging power for this station in kW (regardless if this is currently available, as some EVs might already be fully charged or not available)
 
double get_currentDemand_kW () const
 Returns the current power in kW for the current time step. Only valid after the call of set_charging_value(). This value might differ from the request set using set_charging_value().
 
double get_total_consumption_kWh () const
 Returns the total consumed energy in kWh after the current time step. Only valid after the call of set_charging_value()
 
double get_cweek_consumption_kWh () const
 Returns the total consumed energy in kWh after the current time step. Only valid after the call of set_charging_value()
 
unsigned long get_n_EVs_pc () const
 Returns the number of EVs that are currently at home AND connected with the station.
 
unsigned long get_n_EVs_pnc () const
 Returns the number of EVs that are currently at home AND NOT connected with the station.
 
unsigned long get_n_EVs () const
 Returns the number of connected EVs if the component is enabled, otherwise 0 is returned.
 
unsigned long get_possible_n_EVs () const
 Returns the number of possible connected EVs if the component would be enabled.
 
unsigned long get_control_unit_id () const
 Returns the control unit ID of the installation place.
 
std::vector< const EVFSM * > get_listOfEVs () const
 Returns a reference to the internal list of EVs.
 
unsigned long get_n_chargers () const
 Returns the number of chargers available at this charging station (typically the number of flats of the building)
 
const std::vector< const std::vector< double > * > * get_future_max_consumption_kWh () const
 
const std::vector< const std::vector< double > * > * get_future_min_consumption_kWh () const
 
const std::vector< const std::vector< double > * > * get_future_max_power_kW () const
 
void enable_station ()
 
void disable_station ()
 
void resetWeeklyCounter ()
 Resets the internal, weekly counters.
 
void resetInternalState ()
 Resets the internal simulation state (like counters), but retains the structural state like attached sub-components.
 
void add_ev (unsigned long carID)
 
void set_horizon_in_ts (unsigned int new_horizon)
 Sets another horizon for the number of time steps returned by ComponentCS::get_future_min_consumption_kWh() and ComponentCS::get_future_max_consumption_kWh()
 
void preprocess_ev_data ()
 Preprocesses EV data, calls EVFSM::preprocessTourInformation() for all attached EVs. Call this method only once right before the first simulation run.
 
void setCarStatesForTimeStep (unsigned long ts)
 Sets the car states for all attached EVs for a new time step 'ts'. This method must be called with strictly consecutive values ​​of parameter 'ts'.
 
void setDemandToProfileData (unsigned long ts)
 Sets the charging demand to the (immediate charging) profile value. If this method is called once during a simulation run, ComponentCS::setDemandToGivenValues() MUST NOT be called afterwards.
 
bool setDemandToGivenValues (std::vector< double > &charging_power_per_EV_kW)
 Sets the charging demand (in kW) per EV as given by any contoller. If this method is called once during a simulation run, ComponentCS::setDemandToProfileData() MUST NOT be called afterwards. Returns true if no error occured for all connected EVs or false otherwise.
 
- Public Member Functions inherited from BaseComponent
virtual ~BaseComponent ()
 

Detailed Description

This class represents a charging station. Every control unit holds a charging station by default, which is disabled. Enabling a station in the simulation represents to build such a station in the reality.

Constructor & Destructor Documentation

◆ ComponentCS()

ComponentCS::ComponentCS ( ControlUnit calling_control_unit,
unsigned int  number_of_flats 
)

Constructs a new Charging Station component. There will be one charging point per flat.

Parameters
calling_control_unitReference to the calling unit,
number_of_flatsThe number of flats connected to the charging station

◆ ~ComponentCS()

ComponentCS::~ComponentCS ( )

Member Function Documentation

◆ add_ev()

void ComponentCS::add_ev ( unsigned long  carID)

◆ disable_station()

void ComponentCS::disable_station ( )

◆ enable_station()

void ComponentCS::enable_station ( )

◆ get_control_unit_id()

unsigned long ComponentCS::get_control_unit_id ( ) const

Returns the control unit ID of the installation place.

◆ get_currentDemand_kW()

double ComponentCS::get_currentDemand_kW ( ) const
inline

Returns the current power in kW for the current time step. Only valid after the call of set_charging_value(). This value might differ from the request set using set_charging_value().

◆ get_cweek_consumption_kWh()

double ComponentCS::get_cweek_consumption_kWh ( ) const
inline

Returns the total consumed energy in kWh after the current time step. Only valid after the call of set_charging_value()

◆ get_future_max_consumption_kWh()

const std::vector< const std::vector< double > * > * ComponentCS::get_future_max_consumption_kWh ( ) const
inline

Returns the maximum electricity consumption of this component for the next n time steps (given some flexibility). This means that the value at position 0 returns the maximum cummulated consumption AT THE END of the current time step. This method assumes to start in the current time step, i.e. the consumption up to the current time step is considered to be 0. The length of the resulting vector is set using ComponentCS::set_horizon_in_ts(). Attention: The object the returned pointer referes to is overwritten on subsequent calls!

Returns
: Returns a pointer to a vector storing min/max demand per car (index 0) and per future time step (index 0) - READ THE ATTENTION NOTICE

◆ get_future_max_power_kW()

const std::vector< const std::vector< double > * > * ComponentCS::get_future_max_power_kW ( ) const
inline

Returns the maximum power per time step and EV for the future horizon. Attention: The object the returned pointer referes to is overwritten on subsequent calls!

Returns
: Returns a pointer to a vector storing min/max demand per car (index 0) and per future time step (index 0) - READ THE ATTENTION NOTICE

◆ get_future_min_consumption_kWh()

const std::vector< const std::vector< double > * > * ComponentCS::get_future_min_consumption_kWh ( ) const
inline

Returns the minimum electricity consumption of a component for the next n time steps (given some flexibility). This means that the value at position 0 returns the minimum cummulated consumption AT THE END of the current time step. This method assumes to start in the current time step, i.e. the consumption up to the current time step is considered to be 0. The length of the resulting vector is set using ComponentCS::set_horizon_in_ts(). Attention: The object the returned pointer referes to is overwritten on subsequent calls!

Returns
: Returns a pointer to a vector storing min/max demand per car (index 0) and per future time step (index 0) - READ THE ATTENTION NOTICE

◆ get_listOfEVs()

std::vector< const EVFSM * > ComponentCS::get_listOfEVs ( ) const
inline

Returns a reference to the internal list of EVs.

◆ get_max_P_kW()

double ComponentCS::get_max_P_kW ( ) const

Returns the maximum available charging power for this station in kW (regardless if this is currently available, as some EVs might already be fully charged or not available)

◆ get_n_chargers()

unsigned long ComponentCS::get_n_chargers ( ) const
inline

Returns the number of chargers available at this charging station (typically the number of flats of the building)

◆ get_n_EVs()

unsigned long ComponentCS::get_n_EVs ( ) const

Returns the number of connected EVs if the component is enabled, otherwise 0 is returned.

◆ get_n_EVs_pc()

unsigned long ComponentCS::get_n_EVs_pc ( ) const

Returns the number of EVs that are currently at home AND connected with the station.

◆ get_n_EVs_pnc()

unsigned long ComponentCS::get_n_EVs_pnc ( ) const

Returns the number of EVs that are currently at home AND NOT connected with the station.

◆ get_possible_n_EVs()

unsigned long ComponentCS::get_possible_n_EVs ( ) const

Returns the number of possible connected EVs if the component would be enabled.

◆ get_total_consumption_kWh()

double ComponentCS::get_total_consumption_kWh ( ) const
inline

Returns the total consumed energy in kWh after the current time step. Only valid after the call of set_charging_value()

◆ is_enabled()

bool ComponentCS::is_enabled ( ) const
inline

◆ preprocess_ev_data()

void ComponentCS::preprocess_ev_data ( )

Preprocesses EV data, calls EVFSM::preprocessTourInformation() for all attached EVs. Call this method only once right before the first simulation run.

◆ resetInternalState()

void ComponentCS::resetInternalState ( )
virtual

Resets the internal simulation state (like counters), but retains the structural state like attached sub-components.

Implements BaseComponent.

◆ resetWeeklyCounter()

void ComponentCS::resetWeeklyCounter ( )
virtual

Resets the internal, weekly counters.

Implements BaseComponent.

◆ set_horizon_in_ts()

void ComponentCS::set_horizon_in_ts ( unsigned int  new_horizon)

Sets another horizon for the number of time steps returned by ComponentCS::get_future_min_consumption_kWh() and ComponentCS::get_future_max_consumption_kWh()

◆ setCarStatesForTimeStep()

void ComponentCS::setCarStatesForTimeStep ( unsigned long  ts)

Sets the car states for all attached EVs for a new time step 'ts'. This method must be called with strictly consecutive values ​​of parameter 'ts'.

◆ setDemandToGivenValues()

bool ComponentCS::setDemandToGivenValues ( std::vector< double > &  charging_power_per_EV_kW)

Sets the charging demand (in kW) per EV as given by any contoller. If this method is called once during a simulation run, ComponentCS::setDemandToProfileData() MUST NOT be called afterwards. Returns true if no error occured for all connected EVs or false otherwise.

◆ setDemandToProfileData()

void ComponentCS::setDemandToProfileData ( unsigned long  ts)

Sets the charging demand to the (immediate charging) profile value. If this method is called once during a simulation run, ComponentCS::setDemandToGivenValues() MUST NOT be called afterwards.


The documentation for this class was generated from the following files: