![]() |
Documentation of UrbanFireXDT
Documentation of UrbanFireXDT
|
Classes | |
| struct | CurrentParamValues |
Functions | |
| void | initializeDirectoriesBase (unsigned long scenario_id) |
| void | initializeDirectoriesPerPVar () |
| void | initializeSubstationOutput (unsigned long scenario_id) |
| void | initializeCUOutput (unsigned long scenario_id) |
| void | closeOutputs () |
| void | flushBuffers () |
| void | outputCurrentParamVariCombi (CurrentParamValues &) |
| void | outputCurrentCUSettings () |
| This function outputs current settings of the control units (like PV kWp, BS capacity and power, ...) and also which roof sections exist per sim. added PV component. | |
| void | outputMetrics (bool alt_fname=false, string *fname_postfix=NULL) |
| This function computed metrics for all control units after the simulation has been finished; if. | |
| void | outputMetricsStrListSACPlanning (list< string * > &output_list) |
| void | outputWeeklyMetricsStrList (list< string * > *output_list, unsigned long week_number) |
| void | outputEVMetrics (bool alt_fname=false, string *fname_postfix=NULL) |
| void | outputRuntimeInformation (long seconds_setup, long seconds_main_run) |
| void | outputControlCommandDetails (unsigned long ts, unsigned long cuID, bool optimization_state_ok, double inp_max_p_bs_kW, double inp_max_e_bs_kWh, double inp_max_p_cs_kW, double inp_current_bs_charge_kWh, const std::vector< float > &inp_future_resid_demand_kW, const std::vector< double > &inp_future_pv_generation_kW, const std::vector< double > &inp_future_hp_shiftable_maxP, const std::vector< double > &inp_future_hp_shiftable_minP, const std::vector< double > &inp_future_hp_shiftable_maxE, const std::vector< double > &inp_future_hp_shiftable_minE, const std::vector< const std::vector< double > * > *inp_future_ev_shiftable_maxE, const std::vector< const std::vector< double > * > *inp_future_ev_shiftable_minE, const std::vector< const std::vector< double > * > *inp_future_ev_maxP, const std::vector< double > &out_future_bs_power_kW, const std::vector< double > &out_future_hp_power_kW, const std::vector< std::vector< double > > &out_future_ev_power_kW) |
| void | outputEVStateDetails (unsigned long ts, unsigned long carID, EVState ev_state, float p_charging_kW, float cumsum_E_ch_home, float cumsum_E_min, float cumsum_E_max, float ev_bs_SOE_kWh) |
Variables | |
| std::ofstream * | substation_output = NULL |
| The main file for the substation load time series. | |
| std::ofstream * | substation_output_details = NULL |
| The secondary file for additional information about the substations. | |
| std::ofstream * | cu_details_ccmd_output = NULL |
| Output file for command details per time step and control unit (if selected by –ccmd-output option) | |
| std::ofstream * | cu_details_ev_output = NULL |
| Output file for ev details per time step and control unit (if selected by –ev-output option) | |
| CUOutputSingleFile * | cu_single_output = NULL |
| Reference to the single_output object, if one output for all CUs is selected. | |
| CUOutputOneFilePerSubstation ** | cu_multi_outputs = NULL |
| Reference to the array of CU ouputs, if one output per CU is selected. | |
| size_t | n_cu_multi_outputs = 0 |
| Number of elements in cu_multi_ouputs. | |
| std::mutex | mtx_cu_details_ccmd |
| Mutex to ensure proper working in parallel processing for output::cu_details_ccmd_output. | |
| std::mutex | mtx_cu_details_ev |
| Mutex to ensure proper working in parallel processing for output::cu_details_ev_output. | |
| void output::closeOutputs | ( | ) |
This function closes all outputs that are opend by initializeCUOutput() or initializeSubstationOutput(). It further informs all instances of the class ControlUnit that the output object is deleted.
| void output::flushBuffers | ( | ) |
This function flushes all buffers that are currently opend and were opened by initializeCUOutput() or initializeSubstationOutput().
| void output::initializeCUOutput | ( | unsigned long | scenario_id | ) |
This method initializes the individual output files for the control units. Depending on the globally selected mode, one file per CU is created or some CUs share one output file. Moreover, it initializes the output files for the inidivudal control commands and the EV states per time step if selected by the command line arguments –ccmd-output and –ev-output.
| scenario_id | The current scenario ID |
| void output::initializeDirectoriesBase | ( | unsigned long | scenario_id | ) |
This function initializes the base direcory (or directories) for the output, for the current scenario but not for individual parameter variations. It has to be called once (or multiple times if repetition is selected as cmd-line argument). It must be called before initializeDirectoriesPerPVar().
| scenario_id | The current scenario ID |
| void output::initializeDirectoriesPerPVar | ( | ) |
This function initializes the direcory (or directories) for the current parameter variation (if selected). Thus, it has to be called for every parameter variation setting individually again. Even in the case of no parameter variation, it has to be called once. It MUST be called AFTER initializeDirectoriesBase().
| void output::initializeSubstationOutput | ( | unsigned long | scenario_id | ) |
This method initializes the substation output file.
| scenario_id | The current scenario ID |
| void output::outputControlCommandDetails | ( | unsigned long | ts, |
| unsigned long | cuID, | ||
| bool | optimization_state_ok, | ||
| double | inp_max_p_bs_kW, | ||
| double | inp_max_e_bs_kWh, | ||
| double | inp_max_p_cs_kW, | ||
| double | inp_current_bs_charge_kWh, | ||
| const std::vector< float > & | inp_future_resid_demand_kW, | ||
| const std::vector< double > & | inp_future_pv_generation_kW, | ||
| const std::vector< double > & | inp_future_hp_shiftable_maxP, | ||
| const std::vector< double > & | inp_future_hp_shiftable_minP, | ||
| const std::vector< double > & | inp_future_hp_shiftable_maxE, | ||
| const std::vector< double > & | inp_future_hp_shiftable_minE, | ||
| const std::vector< const std::vector< double > * > * | inp_future_ev_shiftable_maxE, | ||
| const std::vector< const std::vector< double > * > * | inp_future_ev_shiftable_minE, | ||
| const std::vector< const std::vector< double > * > * | inp_future_ev_maxP, | ||
| const std::vector< double > & | out_future_bs_power_kW, | ||
| const std::vector< double > & | out_future_hp_power_kW, | ||
| const std::vector< std::vector< double > > & | out_future_ev_power_kW | ||
| ) |
Output the optimization input and output for one time step and control unit. Call this method only if Global::get_create_control_cmd_output() == true. This function is thread safe. All parameters starting with "inp_" are the input parameters for the optimization as defined in BaseOptimizedController::updateController(). All parameters starting with "out_" denote the output parameters returned by the controller / optimization.
| void output::outputCurrentCUSettings | ( | ) |
This function outputs current settings of the control units (like PV kWp, BS capacity and power, ...) and also which roof sections exist per sim. added PV component.
| void output::outputCurrentParamVariCombi | ( | CurrentParamValues & | cParamVals | ) |
| void output::outputEVMetrics | ( | bool | alt_fname = false, |
| string * | fname_postfix = NULL |
||
| ) |
Outputs the computed metrics for all simulated EVs after the simulation has been finished, similar to output::outputMetrics(). Creates an output file only, if there is at least one EV.
| alt_fname | if true, the output file will have the file name 'metrics-per-ev-{fname_postfix}.csv' instead of 'metrics-per-ev.csv'. |
| fname_postfix | Alternative ending of the file name if required. |
| void output::outputEVStateDetails | ( | unsigned long | ts, |
| unsigned long | carID, | ||
| EVState | ev_state, | ||
| float | p_charging_kW, | ||
| float | cumsum_E_ch_home, | ||
| float | cumsum_E_min, | ||
| float | cumsum_E_max, | ||
| float | ev_bs_SOE_kWh | ||
| ) |
Outputs information about one EV for a given time step. Call this function only if Global::get_create_ev_detailed_output() == true. This function is thread safe.
| void output::outputMetrics | ( | bool | alt_fname = false, |
| string * | fname_postfix = NULL |
||
| ) |
This function computed metrics for all control units after the simulation has been finished; if.
| alt_fname | is set to true, the output file will have the file name 'metrics-{fname_postfix}.csv' instead of 'metrics-per-cu.csv' |
| void output::outputMetricsStrListSACPlanning | ( | list< string * > & | output_list | ) |
Outputs every line that is collected in 'output_list' to 'metrics-sac-planning-per-cu.csv'. The output holds an additional last column about the added components for computing the metrics.
| output_list | Reference to the list containing each line as string (lines must not end with a new line) |
| void output::outputRuntimeInformation | ( | long | seconds_setup, |
| long | seconds_main_run | ||
| ) |
Output information on the run time to a file. Thus function must not be called before initializeDirectoriesBase().
| seconds_setup | The duration of the setup and data loading in seconds |
| seconds_main_run | The duration of the main run in seconds |
| void output::outputWeeklyMetricsStrList | ( | list< string * > * | output_list, |
| unsigned long | week_number | ||
| ) |
Outputs every line that is collected in 'output_list' to 'weekly-metrics-per-cu.csv'. Attention: This methods deletes the output list!
| output_list | Reference to the list containing each line as string (lines must not end with a new line) |
| week_number | The week number of the output |
|
inline |
Output file for command details per time step and control unit (if selected by –ccmd-output option)
|
inline |
Output file for ev details per time step and control unit (if selected by –ev-output option)
|
inline |
Reference to the array of CU ouputs, if one output per CU is selected.
|
inline |
Reference to the single_output object, if one output for all CUs is selected.
|
inline |
Mutex to ensure proper working in parallel processing for output::cu_details_ccmd_output.
|
inline |
Mutex to ensure proper working in parallel processing for output::cu_details_ev_output.
|
inline |
Number of elements in cu_multi_ouputs.
|
inline |
The main file for the substation load time series.
|
inline |
The secondary file for additional information about the substations.