![]() |
Documentation of UrbanFireXDT
Documentation of UrbanFireXDT
|
#include <components.h>

Public Member Functions | |
| EVFSM (unsigned long carID, ComponentCS *homeStation) | |
| ~EVFSM () | |
| EVState | get_current_state () const |
| const std::vector< double > * | get_future_max_power_kW () const |
| Returns the maximum power of this EV per time step in the controller horizon. Attention: Returned object will be overwritten after calling EVFSM::setCarStateForTimeStep(). | |
| double | get_currentDemand_kW () const |
| Gets the current charging power in kW; Only valid after calling EVFSM::setDemandToProfileData() or EVFSM::setDemandToGivenValue() | |
| std::string * | get_metrics_string_annual () |
| Returns some metrics as string (useful for the output). Header see EVFSM::MetricsStringHeaderAnnual. Call this function only if simulation run is finished! | |
| const ComponentBS * | get_battery () const |
| Returns a reference to the battery component of the EV. | |
| void | set_horizon_in_ts (unsigned int new_horizon) |
| void | add_weekly_tour (short weekday, unsigned long departure_ts_of_day, unsigned long ts_duration, double tour_length_km, bool with_work) |
| This method adds a home-centered car tour to the current car. All parameters that represent a time must have the same alignment as the global time information. | |
| void | preprocessTourInformation () |
| Transforms the list of weekly tours into a list of tours for the complete simulation time span and computes upper and lower cumlulative energy required (i.e., fill variables BaseComponentSemiFlexible::future_maxE_storage and BaseComponentSemiFlexible::future_minE_storage from upper class). THis method MUST be called before the main simulation run starts, but it MUST be called after EVFSM::add_weekly_tour() is called for the last time, i.e., all tours have been added. | |
| void | resetInternalState () |
| Resets the internal state. | |
| void | setCarStateForTimeStep (unsigned long ts) |
| Sets the car state for a new time step 'ts'. This method must be called with strictly consecutive values of parameter 'ts'. It uses the precomputed vectors for internal processing. | |
| void | setDemandToProfileData (unsigned long ts) |
| bool | setDemandToGivenValue (double new_demand_kW) |
| void | resetWeeklyCounter () |
| Do nothing. The EV has no weekly metrics. | |
| const std::vector< double > * | get_future_max_consumption_kWh () const |
| const std::vector< double > * | get_future_min_consumption_kWh () const |
| virtual double | get_currentDemand_kW () const=0 |
| void | set_horizon_in_ts (unsigned int new_horizon) |
| virtual void | setDemandToProfileData (unsigned long ts)=0 |
| virtual bool | setDemandToGivenValue (double new_demand_kW)=0 |
Public Member Functions inherited from BaseComponentSemiFlexible | |
| BaseComponentSemiFlexible () | |
| ~BaseComponentSemiFlexible () | |
| const std::vector< double > * | get_future_max_consumption_kWh () const |
| const std::vector< double > * | get_future_min_consumption_kWh () const |
| void | set_horizon_in_ts (unsigned int new_horizon) |
Public Member Functions inherited from BaseComponent | |
| virtual | ~BaseComponent () |
Static Public Member Functions | |
| static const std::map< unsigned long, EVFSM * > & | GetArrayOfInstances () |
| Returns the map of all existing instances. The objects itself are mutable, but the map reference is const. | |
| static unsigned long | GetNumberOfEVs () |
| static void | AddWeeklyTour (unsigned long carID, short weekday, unsigned long departure_ts_of_day, unsigned long ts_duration, double tour_length_km, bool with_work) |
| This class method adds a home-centered car tour to the car with ID carID. All parameters that represent a time must have the same alignment as the global time information. | |
| static void | VacuumStaticVariables () |
| static void | SetSeed (unsigned int seed) |
| Sets the seed for the EVFSM-class random number generator. | |
Static Public Attributes | |
| static const std::string | MetricsStringHeaderAnnual = "CarID,HomeControlUnitID,Driving distance [km],E used for driving [kWh],Home-charged E [kWh],Home-discharged E [kWh],n ts home-connected" |
The header for the output string produced by EVFSM::get_metrics_string_annual() | |
Additional Inherited Members | |
Protected Attributes inherited from BaseComponentSemiFlexible | |
| std::vector< double > | future_maxE_storage |
| std::vector< double > | future_minE_storage |
This class represents a EV (electric vehicle) modeled as a finite-state machine.
It is a finite-state machine with the states:
Moreover, it has a battery component (the same as it is used for simulating the residential batteries).
Finally, it holds an attached driving profile.
| EVFSM::EVFSM | ( | unsigned long | carID, |
| ComponentCS * | homeStation | ||
| ) |
| EVFSM::~EVFSM | ( | ) |
| void EVFSM::add_weekly_tour | ( | short | weekday, |
| unsigned long | departure_ts_of_day, | ||
| unsigned long | ts_duration, | ||
| double | tour_length_km, | ||
| bool | with_work | ||
| ) |
This method adds a home-centered car tour to the current car. All parameters that represent a time must have the same alignment as the global time information.
|
static |
This class method adds a home-centered car tour to the car with ID carID. All parameters that represent a time must have the same alignment as the global time information.
|
inline |
Returns a reference to the battery component of the EV.
|
inline |
|
inlinevirtual |
Gets the current charging power in kW; Only valid after calling EVFSM::setDemandToProfileData() or EVFSM::setDemandToGivenValue()
Implements BaseComponentSemiFlexible.
|
virtual |
Implements BaseComponentSemiFlexible.
|
inline |
Returns the maximum electricity consumption of a 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 BaseComponentSemiFlexible::set_horizon_in_ts(). Attention: The object the returned pointer referes to is overwritten on subsequent calls!
|
inline |
Returns the maximum power of this EV per time step in the controller horizon. Attention: Returned object will be overwritten after calling EVFSM::setCarStateForTimeStep().
|
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 BaseComponentSemiFlexible::set_horizon_in_ts(). Attention: The object the returned pointer referes to is overwritten on subsequent calls!
| std::string * EVFSM::get_metrics_string_annual | ( | ) |
Returns some metrics as string (useful for the output). Header see EVFSM::MetricsStringHeaderAnnual. Call this function only if simulation run is finished!
|
inlinestatic |
Returns the map of all existing instances. The objects itself are mutable, but the map reference is const.
|
inlinestatic |
| void EVFSM::preprocessTourInformation | ( | ) |
Transforms the list of weekly tours into a list of tours for the complete simulation time span and computes upper and lower cumlulative energy required (i.e., fill variables BaseComponentSemiFlexible::future_maxE_storage and BaseComponentSemiFlexible::future_minE_storage from upper class). THis method MUST be called before the main simulation run starts, but it MUST be called after EVFSM::add_weekly_tour() is called for the last time, i.e., all tours have been added.
< Reference to the current weekly tour
|
virtual |
Resets the internal state.
Implements BaseComponent.
|
inlinevirtual |
Do nothing. The EV has no weekly metrics.
Implements BaseComponent.
| void BaseComponentSemiFlexible::set_horizon_in_ts | ( | unsigned int | new_horizon | ) |
Sets another horizon for the number of time steps returned by BaseComponentSemiFlexible::get_future_min_max_demand()
| void EVFSM::set_horizon_in_ts | ( | unsigned int | new_horizon | ) |
| void EVFSM::setCarStateForTimeStep | ( | unsigned long | ts | ) |
Sets the car state for a new time step 'ts'. This method must be called with strictly consecutive values of parameter 'ts'. It uses the precomputed vectors for internal processing.
|
virtual |
Changes the (shiftable) demand of the component for the current time step. It must be called before the current demand and total consumption values are set correctly. If this function is called, BaseComponentSemiFlexible::setDemandToProfileData() must not be called anymore.
| new_demand_kW | The new power for this time step in kW. |
Implements BaseComponentSemiFlexible.
|
virtual |
Changes the (shiftable) demand of the component for the current time step. It must be called before the current demand and total consumption values are set correctly. If this function is called, BaseComponentSemiFlexible::setDemandToProfileData() must not be called anymore.
| new_demand_kW | The new power for this time step in kW. |
Implements BaseComponentSemiFlexible.
|
virtual |
Sets the demand value to the value as given in the data. If this function is called, BaseComponentSemiFlexible::setDemandToGivenValues() must not be called anymore.
Implements BaseComponentSemiFlexible.
|
virtual |
Sets the demand value to the value as given in the data. If this function is called, BaseComponentSemiFlexible::setDemandToGivenValues() must not be called anymore.
Implements BaseComponentSemiFlexible.
|
static |
Sets the seed for the EVFSM-class random number generator.
|
static |
|
static |
The header for the output string produced by EVFSM::get_metrics_string_annual()