8#ifndef OPTIMIZATION_UNIT_GENERAL_HPP
9#define OPTIMIZATION_UNIT_GENERAL_HPP
72 void reset(
unsigned int new_horizon) {
73 this->time_horizon = new_horizon;
76 ev_power.assign(this->n_cars, std::vector<double>(new_horizon, 0.0));
88 for (
unsigned int evIdx = 0; evIdx <
n_cars; evIdx++) {
123 const unsigned long ts,
127 double current_bs_charge_kWh,
128 const std::vector<float>& future_resid_demand_kW,
129 const std::vector<double>& future_pv_generation_kW,
130 const std::vector<double>& future_hp_shiftable_maxP,
131 const std::vector<double>& future_hp_shiftable_minP,
132 const std::vector<double>& future_hp_shiftable_maxE,
133 const std::vector<double>& future_hp_shiftable_minE,
134 const std::vector<
const std::vector<double>*>* future_ev_shiftable_maxE,
135 const std::vector<
const std::vector<double>*>* future_ev_shiftable_minE,
136 const std::vector<
const std::vector<double>*>* future_ev_maxP,
137 const bool optimize_PV_size,
138 const bool optimize_BS_size,
139 const std::list<std::vector<double>>* total_PV_generation_per_section_kW,
140 const std::list<double>* max_PV_power_per_section_kWp
Definition optimization_unit_general.hpp:16
const std::list< double > & get_optimal_PV_size_per_section_kW()
Definition optimization_unit_general.hpp:62
const std::vector< double > & get_future_bs_power_kW()
Definition optimization_unit_general.hpp:51
double get_optimal_BS_size_kWh()
Definition optimization_unit_general.hpp:67
unsigned long time_horizon
Definition optimization_unit_general.hpp:20
void shiftVectorsByOnePlace()
Definition optimization_unit_general.hpp:83
const unsigned long n_cars
Number of EVs with the given control unit as home place.
Definition optimization_unit_general.hpp:19
const std::vector< std::vector< double > > & get_future_ev_power_kW()
Definition optimization_unit_general.hpp:57
std::vector< std::vector< double > > ev_power
The charging power per EV (index 0) for every time step (index 1) in the time horizon.
Definition optimization_unit_general.hpp:23
BaseOptimizedController(unsigned long cuID, unsigned int time_horizon, unsigned long n_cars)
Definition optimization_unit_general.hpp:31
void reset(unsigned int new_horizon)
Definition optimization_unit_general.hpp:72
std::list< double > optimal_pv_size_per_section_kW
If the PV size should be optimized, this value contains the optimal PV size per section in kW.
Definition optimization_unit_general.hpp:24
std::vector< double > hp_power
The heat pump power for every time step in the time horizon.
Definition optimization_unit_general.hpp:22
virtual bool updateController(const unsigned long ts, double max_p_bs_kW, double max_e_bs_kWh, double max_p_cs_kW, double current_bs_charge_kWh, const std::vector< float > &future_resid_demand_kW, const std::vector< double > &future_pv_generation_kW, const std::vector< double > &future_hp_shiftable_maxP, const std::vector< double > &future_hp_shiftable_minP, const std::vector< double > &future_hp_shiftable_maxE, const std::vector< double > &future_hp_shiftable_minE, const std::vector< const std::vector< double > * > *future_ev_shiftable_maxE, const std::vector< const std::vector< double > * > *future_ev_shiftable_minE, const std::vector< const std::vector< double > * > *future_ev_maxP, const bool optimize_PV_size, const bool optimize_BS_size, const std::list< std::vector< double > > *total_PV_generation_per_section_kW, const std::list< double > *max_PV_power_per_section_kWp)=0
Executes the controller with all (future) states in the current horizon and stores the results the me...
double optimal_bs_size_kWh
If the BS size should be optimized, this value contains the optimal BS size in kWh.
Definition optimization_unit_general.hpp:25
const std::vector< double > & get_future_hp_power_kW()
Definition optimization_unit_general.hpp:45
const unsigned long controlUnitID
ID of the connected control unit.
Definition optimization_unit_general.hpp:18
std::vector< double > bs_power
The battery storage power for every time step in the time horizon.
Definition optimization_unit_general.hpp:21
virtual ~BaseOptimizedController()=default