Documentation of UrbanFireXDT
Documentation of UrbanFireXDT
Loading...
Searching...
No Matches
Enumerations | Functions | Variables
global Namespace Reference

Enumerations

enum struct  OutputModePerCU : short { IndividualFile , SingleFile , NoOutput }
 
enum struct  ExpansionProfileAllocationMode : short { Uninitialized , AsInData , Random }
 
enum struct  CUSModeFCA {
  Uninitialized , OrderAsInData , RandomSelection , BestSSR ,
  BestNPV , UseList
}
 
enum struct  BatteryPowerComputationMode { AsDefinedByConfigVar , UseEOverPRatio }
 
enum struct  BatteryCapacityComputationMode {
  Constant , BasedOnNominalPVPower , BasedOnAnnualConsumption , BasedOnAnnualConsumptionWithHeatPump ,
  Optimized
}
 
enum struct  PVSizingMode : short { MaxAvailableRoofArea , StaticPVSize , Optimized }
 
enum struct  ControllerMode { RuleBased , OptimizedWithPerfectForecast }
 
enum struct  ControllerBSGridChargingMode { NoGridCharging , OnlyGridCharging , GridChargingAndDischarging }
 
enum struct  ControllerOptimizationTarget { ElectricityCosts , PeakLoad , Emissions }
 

Functions

bool all_variables_initialized ()
 Checks if all variables are initialized.
 
void vacuum ()
 Deletes all global variables in the end.
 
void print_uninitialized_variables ()
 Prints all variable names to stdout, that are not initialized.
 

Variables

unsigned long * time_timestep_id = NULL
 Reference to the list of time steps.
 
std::vector< struct tm * > * time_localtime_r = NULL
 Reference to the list of right-aligned time stamps as struct tm. Right-aligned means the time at time step ts denotes the time at the ending of the interval - alignment fits to time_timestep_id.
 
std::vector< struct tm * > * time_localtime_l = NULL
 Reference to the list of left-aligned time stamps as struct tm. Left-aligned means the time at time step ts denotes the time at the start of the interval - alignment fits to time_timestep_id.
 
std::vector< std::string > * time_localtimezone_str = NULL
 Reference to the list of the time zone as string - alignment fits to time_timestep_id.
 
std::map< std::string, size_t > pv_profiles_information
 Map (orientation, number of time series) where the number of pv-profiles per orientation are given.
 
std::map< std::string, std::vector< const float * > > pv_profiles_per_ori
 Map (orientation, vector of references to the time series) where the available time series per orientation are given - same ordering as in data.
 
const float *const * pv_profiles_data = NULL
 Reference to the list of global PV profiles (Two dimensional array with [n_pv_profiles, n_timesteps])
 
const float *const * hp_profiles = NULL
 Reference to the list of global heat pump profiles (Two dimensional array with [n_heatpump_profiles, n_timesteps])
 
const double *const * hp_profiles_cumsum = NULL
 Reference to the list of cumulated global heat pump profiles (Two dimensional array with [n_heatpump_profiles, n_timesteps])
 
const float * residual_gridload_kW = NULL
 Residual netload, i.e. amount of load that has to be added to the final netload, this is a load that is not measured by smart meters occuring in this simulation.
 
const float * wind_profile = NULL
 Reference to the list of the global wind profile values.
 
OpenSpacePVOrWindunit_open_space_pv = NULL
 Reference to the global open space pv unit.
 
OpenSpacePVOrWindunit_open_space_wind = NULL
 Reference to the global open space wind unit.
 
unsigned long n_ts_between_flushs = 1000
 Number of timesteps between the flush of the output buffers.
 
std::map< unsigned long, float > annual_heat_demand_kWh
 Map storing the annaul heat demand for the buildings in kWh (thermal) [per location id].
 
std::map< unsigned long, float > building_volumes_m3
 Map storing the volume of the biggest building at a given location in cubic-meters (m^3)
 
std::map< unsigned long, std::vector< std::pair< float, std::string > > > roof_section_orientations
 Map storing a complet list of roof sections per location ID. Roof sections are tuples/pairs with the information (roof section area, roof section orientation)
 
std::set< unsigned long > locations_with_geodata
 List / Set storing all locations for which geodata is available.
 
unsigned int current_repetition_counter = 0
 Repetition counter, if repetitions is set as a command line argument.
 
const float * emission_ts = NULL
 Reference to the emission time series for grid demanded energy (if present) in g CO2eq per kWh.
 
const float * eprices_local_ts = NULL
 Reference to the time series of the energy prices (for residential customers) for grid demanded energy (if present)
 
const float * eprices_spotm_ts = NULL
 Reference to the time series of the energy prices at the spot market (for non-residential customers, without vat or taxes) (if present)
 
std::vector< unsigned long > unitIDs_selected_for_output
 A vector containing a list of all unitIDs selected for output. If this vector is empty (as it is by default), all units will generate an output.
 
std::list< std::list< std::pair< std::string, float > > > * parameter_var_list = NULL
 List of parameters variation settings (i.e. the list contains a list of lists, where the inner lists represent a setting of ONE parameter variation setting (variable name, variable value))
 
unsigned int curr_param_vari_combi_index = 0
 The index of the current parameter variation combination, that is simulated (0, if no parameter variation is selected)
 
std::filesystem::path * current_output_dir = NULL
 Reference to the object holding the current output path (maybe changed due to different parameter variations)
 
std::filesystem::path * current_output_dir_prefix = NULL
 Reference to the path of the output path where all parameter variations can be found (i.e. the top level of current_output_dir if param vari is selected; i.e.2. one level below current_global_output_dir)
 
std::filesystem::path * current_global_output_dir = NULL
 Reference to the object holding the current output dir for global information (i.e. information that does not change during parameter variations)
 
bool time_info_init = false
 
std::chrono::time_point< std::chrono::system_clock > time_of_simulation_start
 The time of the simulation start.
 
std::string structure_db_column_name_energy_prices = "local_price"
 The name of the column containing the local energy prices in EUR/kWh.
 
const char *const output_section_delimiter = "*********************************************************************************"
 

Detailed Description

Namespace global

It contains all global attributes and variables that might change during simulation execution.

Attention: There is no access protection for these variables! For access protection use class Global.

Attention: Do not confuse with class Global (mind the capital "G")!

Enumeration Type Documentation

◆ BatteryCapacityComputationMode

This enum defines how the battery capacity sizing mode. There are the following options:

  1. by using the constant value given in config-variable 'expansion BS E in kWh'
  2. by using the following formula (only, if a simulated PV is present): E_BS = P_PV * config-variable 'expansion BS capacity sizing factor for PV'
  3. by using the annual electricity consumption - only of the connected measurement units
  4. by using the annual electricity consumption - only of the connected measurement units + the heat pump (but not the EVs!)
  5. determine the optimal size based on a optimization with a perfect forecast
Enumerator
Constant 
BasedOnNominalPVPower 
BasedOnAnnualConsumption 
BasedOnAnnualConsumptionWithHeatPump 
Optimized 

◆ BatteryPowerComputationMode

This enum defines how the battery storage power should be computet. There are two options:

  1. by setting a given value, i.e. config-variable 'expansion BS P in kW' will be used.
  2. by setting the E/P-ratio of the battery, i.e. battery P = E/P-ratio * selected E
Enumerator
AsDefinedByConfigVar 
UseEOverPRatio 

◆ ControllerBSGridChargingMode

This enum defines the possible battery storage (BS) charging and discharging options.

Enumerator
NoGridCharging 

Do not allow charging from the grid and discharging into the grid.

OnlyGridCharging 

Only allow charging from the grid, but no discharging into the grid.

GridChargingAndDischarging 

Allow both, charging from and discharging into the grid.

◆ ControllerMode

enum struct global::ControllerMode
strong

This enum defines the possible modes used inside the control units for making decissions.

Enumerator
RuleBased 

Rule-based control with the focus on maximizing PV self-consumption.

OptimizedWithPerfectForecast 

Controller using a linear optimization (gurobi) with perfect forecast.

◆ ControllerOptimizationTarget

This enum defines the possible optimization targets used inside the control units for making decissions if a optimized controller is used.

Enumerator
ElectricityCosts 

minimize the costs for electricity consumption (minus revenue for feedin) per control unit

PeakLoad 

minimize the peak load per control unit

Emissions 

minimize the CO2 emissions caused by grid demand

◆ CUSModeFCA

enum struct global::CUSModeFCA
strong

This struct defines the Control Unit Selection Mode For Component Addition i.e. it defines how the control units are selected, that get simulatively added components (like PV, BS, HP, ...)

Enumerator
Uninitialized 
OrderAsInData 
RandomSelection 
BestSSR 
BestNPV 
UseList 

◆ ExpansionProfileAllocationMode

enum struct global::ExpansionProfileAllocationMode : short
strong

This enum defines the different expansion profile allocation modes.

Enumerator
Uninitialized 
AsInData 
Random 

◆ OutputModePerCU

enum struct global::OutputModePerCU : short
strong

This enum defines different output modes per CU. It corresponds to the –cu-output cmd line parameter.

Enumerator
IndividualFile 
SingleFile 
NoOutput 

◆ PVSizingMode

enum struct global::PVSizingMode : short
strong

This enum defines the different PV sizing modes. This is the analogon to the enum struct BatteryCapacityComputationMode. There are the following options:

  1. use the maximum available roof area
  2. use a constant, i.e., static, PV size for all simulatively added PV installations with the same (configurable) orientation
  3. determine the optimal size based on a optimization with a perfect forecast
Enumerator
MaxAvailableRoofArea 
StaticPVSize 
Optimized 

Function Documentation

◆ all_variables_initialized()

bool global::all_variables_initialized ( )

Checks if all variables are initialized.

◆ print_uninitialized_variables()

void global::print_uninitialized_variables ( )

Prints all variable names to stdout, that are not initialized.

◆ vacuum()

void global::vacuum ( )

Deletes all global variables in the end.

Variable Documentation

◆ annual_heat_demand_kWh

std::map<unsigned long, float> global::annual_heat_demand_kWh
inline

Map storing the annaul heat demand for the buildings in kWh (thermal) [per location id].

◆ building_volumes_m3

std::map<unsigned long, float> global::building_volumes_m3
inline

Map storing the volume of the biggest building at a given location in cubic-meters (m^3)

◆ curr_param_vari_combi_index

unsigned int global::curr_param_vari_combi_index = 0
inline

The index of the current parameter variation combination, that is simulated (0, if no parameter variation is selected)

◆ current_global_output_dir

std::filesystem::path* global::current_global_output_dir = NULL
inline

Reference to the object holding the current output dir for global information (i.e. information that does not change during parameter variations)

◆ current_output_dir

std::filesystem::path* global::current_output_dir = NULL
inline

Reference to the object holding the current output path (maybe changed due to different parameter variations)

◆ current_output_dir_prefix

std::filesystem::path* global::current_output_dir_prefix = NULL
inline

Reference to the path of the output path where all parameter variations can be found (i.e. the top level of current_output_dir if param vari is selected; i.e.2. one level below current_global_output_dir)

◆ current_repetition_counter

unsigned int global::current_repetition_counter = 0
inline

Repetition counter, if repetitions is set as a command line argument.

◆ emission_ts

const float* global::emission_ts = NULL
inline

Reference to the emission time series for grid demanded energy (if present) in g CO2eq per kWh.

◆ eprices_local_ts

const float* global::eprices_local_ts = NULL
inline

Reference to the time series of the energy prices (for residential customers) for grid demanded energy (if present)

◆ eprices_spotm_ts

const float* global::eprices_spotm_ts = NULL
inline

Reference to the time series of the energy prices at the spot market (for non-residential customers, without vat or taxes) (if present)

◆ hp_profiles

const float* const* global::hp_profiles = NULL
inline

Reference to the list of global heat pump profiles (Two dimensional array with [n_heatpump_profiles, n_timesteps])

◆ hp_profiles_cumsum

const double* const* global::hp_profiles_cumsum = NULL
inline

Reference to the list of cumulated global heat pump profiles (Two dimensional array with [n_heatpump_profiles, n_timesteps])

◆ locations_with_geodata

std::set<unsigned long> global::locations_with_geodata
inline

List / Set storing all locations for which geodata is available.

◆ n_ts_between_flushs

unsigned long global::n_ts_between_flushs = 1000
inline

Number of timesteps between the flush of the output buffers.

◆ output_section_delimiter

const char* const global::output_section_delimiter = "*********************************************************************************"

The string to delmitit output sections

◆ parameter_var_list

std::list<std::list<std::pair<std::string,float> > >* global::parameter_var_list = NULL
inline

List of parameters variation settings (i.e. the list contains a list of lists, where the inner lists represent a setting of ONE parameter variation setting (variable name, variable value))

◆ pv_profiles_data

const float* const* global::pv_profiles_data = NULL
inline

Reference to the list of global PV profiles (Two dimensional array with [n_pv_profiles, n_timesteps])

◆ pv_profiles_information

std::map<std::string, size_t> global::pv_profiles_information
inline

Map (orientation, number of time series) where the number of pv-profiles per orientation are given.

◆ pv_profiles_per_ori

std::map<std::string, std::vector<const float*> > global::pv_profiles_per_ori
inline

Map (orientation, vector of references to the time series) where the available time series per orientation are given - same ordering as in data.

◆ residual_gridload_kW

const float* global::residual_gridload_kW = NULL
inline

Residual netload, i.e. amount of load that has to be added to the final netload, this is a load that is not measured by smart meters occuring in this simulation.

◆ roof_section_orientations

std::map<unsigned long, std::vector<std::pair<float, std::string> > > global::roof_section_orientations
inline

Map storing a complet list of roof sections per location ID. Roof sections are tuples/pairs with the information (roof section area, roof section orientation)

◆ structure_db_column_name_energy_prices

std::string global::structure_db_column_name_energy_prices = "local_price"
inline

The name of the column containing the local energy prices in EUR/kWh.

◆ time_info_init

bool global::time_info_init = false
inline

◆ time_localtime_l

std::vector<struct tm*>* global::time_localtime_l = NULL
inline

Reference to the list of left-aligned time stamps as struct tm. Left-aligned means the time at time step ts denotes the time at the start of the interval - alignment fits to time_timestep_id.

◆ time_localtime_r

std::vector<struct tm*>* global::time_localtime_r = NULL
inline

Reference to the list of right-aligned time stamps as struct tm. Right-aligned means the time at time step ts denotes the time at the ending of the interval - alignment fits to time_timestep_id.

◆ time_localtimezone_str

std::vector<std::string>* global::time_localtimezone_str = NULL
inline

Reference to the list of the time zone as string - alignment fits to time_timestep_id.

◆ time_of_simulation_start

std::chrono::time_point<std::chrono::system_clock> global::time_of_simulation_start
inline

The time of the simulation start.

◆ time_timestep_id

unsigned long* global::time_timestep_id = NULL
inline

Reference to the list of time steps.

◆ unit_open_space_pv

OpenSpacePVOrWind* global::unit_open_space_pv = NULL
inline

Reference to the global open space pv unit.

◆ unit_open_space_wind

OpenSpacePVOrWind* global::unit_open_space_wind = NULL
inline

Reference to the global open space wind unit.

◆ unitIDs_selected_for_output

std::vector<unsigned long> global::unitIDs_selected_for_output
inline

A vector containing a list of all unitIDs selected for output. If this vector is empty (as it is by default), all units will generate an output.

◆ wind_profile

const float* global::wind_profile = NULL
inline

Reference to the list of the global wind profile values.