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

#include <optimization_unit_or_tools.hpp>

Inheritance diagram for ORToolsLPController:
Inheritance graph

Public Member Functions

 ORToolsLPController (unsigned long cuID, unsigned int time_horizon, unsigned long n_cars)
 
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)
 Executes the controller with all (future) states in the current horizon and stores the results the member variables BaseOptimizedController::bs_power, BaseOptimizedController::hp_power and BaseOptimizedController::ev_power.
 
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 member variables BaseOptimizedController::bs_power, BaseOptimizedController::hp_power and BaseOptimizedController::ev_power.
 
- Public Member Functions inherited from BaseOptimizedController
 BaseOptimizedController (unsigned long cuID, unsigned int time_horizon, unsigned long n_cars)
 
virtual ~BaseOptimizedController ()=default
 
const std::vector< double > & get_future_hp_power_kW ()
 
const std::vector< double > & get_future_bs_power_kW ()
 
const std::vector< std::vector< double > > & get_future_ev_power_kW ()
 
const std::list< double > & get_optimal_PV_size_per_section_kW ()
 
double get_optimal_BS_size_kWh ()
 
void reset (unsigned int new_horizon)
 
void shiftVectorsByOnePlace ()
 

Additional Inherited Members

- Protected Attributes inherited from BaseOptimizedController
const unsigned long controlUnitID
 ID of the connected control unit.
 
const unsigned long n_cars
 Number of EVs with the given control unit as home place.
 
unsigned long time_horizon
 
std::vector< double > bs_power
 The battery storage power for every time step in the time horizon.
 
std::vector< double > hp_power
 The heat pump power for every time step in the time horizon.
 
std::vector< std::vector< double > > ev_power
 The charging power per EV (index 0) for every time step (index 1) in the time horizon.
 
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.
 
double optimal_bs_size_kWh
 If the BS size should be optimized, this value contains the optimal BS size in kWh.
 

Constructor & Destructor Documentation

◆ ORToolsLPController()

ORToolsLPController::ORToolsLPController ( unsigned long  cuID,
unsigned int  time_horizon,
unsigned long  n_cars 
)
inline

Member Function Documentation

◆ updateController() [1/2]

bool ORToolsLPController::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 
)
inlinevirtual

Executes the controller with all (future) states in the current horizon and stores the results the member variables BaseOptimizedController::bs_power, BaseOptimizedController::hp_power and BaseOptimizedController::ev_power.

If parameter optimize_PV_size is set to true, the value of the parameter future_pv_generation_kW is ignored, and parameters total_PV_generation_per_section_kW and must be a valid reference. Otherwise, the last two parameters are ignored. If parameter optimize_BS_size is set to true, the value of max_e_bs_kWh and max_p_cs_kW are ignored. They are a result of the optimization. Moreover, in this case, current_bs_charge_kWh must be set to 0.0.

Parameters
tsThe current time step ID
max_p_bs_kWMaximum battery power in kW
max_e_bs_kWhBattery capacity in kWh
max_p_cs_kWMaximum charging station power in kW
current_bs_charge_kWhCurrent charge of the battery in kWh
future_resid_demand_kWVector with future residential energy demand in kW per time step in the horizon
future_pv_generation_kWVector with future PV generation power in kW per time step in the horizon
future_hp_shiftable_maxPVector with maximum power of the heat pump per time step
future_hp_shiftable_minPVector with minimum power of the heat pump per time step
future_hp_shiftable_maxEVector with maximum accumulated energy consumption of the heat pump in kWh until the end of each time step in the horizon
future_hp_shiftable_minEVector with minimum accumulated energy consumption of the heat pump in kWh until the end of each time step in the horizon
future_ev_shiftable_maxEVector with maximum accumulated energy consumption of the charging station in kWh for every step over the considered horizon (first index) and every EV (second index)
future_ev_shiftable_minEVector with minimum accumulated energy consumption of the charging station in kWh for every step over the considered horizon (first index) and every EV (second index)
future_ev_maxPVector with maximum charging power per EV in kW for every step over the considered horizon (first index) and every EV (second index)
optimize_PV_sizeFlag indicating if the PV size (per section) should be part of the optimization
optimize_BS_sizeFlag indicating if the BS size should be part of the optimization
total_PV_generation_per_section_kWTotal PV generation over the simulation horizon. Only required, if PV sizing (flag optimize_PV_size) is also a result of the optimization - otherwise, this parameter can be NULL
max_PV_power_per_section_kWpThe maximum installable power per roof section in kWp. Only required, if PV sizing (flag optimize_PV_size) is also a result of the optimization - otherwise, this parameter can be NULL
Returns
: Returns a boolean value, with true indicating if the optimization succeded, or false indicating an error (e.g., an unfeasable problem)

Implements BaseOptimizedController.

◆ updateController() [2/2]

virtual bool BaseOptimizedController::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 
)
virtual

Executes the controller with all (future) states in the current horizon and stores the results the member variables BaseOptimizedController::bs_power, BaseOptimizedController::hp_power and BaseOptimizedController::ev_power.

If parameter optimize_PV_size is set to true, the value of the parameter future_pv_generation_kW is ignored, and parameters total_PV_generation_per_section_kW and must be a valid reference. Otherwise, the last two parameters are ignored. If parameter optimize_BS_size is set to true, the value of max_e_bs_kWh and max_p_cs_kW are ignored. They are a result of the optimization. Moreover, in this case, current_bs_charge_kWh must be set to 0.0.

Parameters
tsThe current time step ID
max_p_bs_kWMaximum battery power in kW
max_e_bs_kWhBattery capacity in kWh
max_p_cs_kWMaximum charging station power in kW
current_bs_charge_kWhCurrent charge of the battery in kWh
future_resid_demand_kWVector with future residential energy demand in kW per time step in the horizon
future_pv_generation_kWVector with future PV generation power in kW per time step in the horizon
future_hp_shiftable_maxPVector with maximum power of the heat pump per time step
future_hp_shiftable_minPVector with minimum power of the heat pump per time step
future_hp_shiftable_maxEVector with maximum accumulated energy consumption of the heat pump in kWh until the end of each time step in the horizon
future_hp_shiftable_minEVector with minimum accumulated energy consumption of the heat pump in kWh until the end of each time step in the horizon
future_ev_shiftable_maxEVector with maximum accumulated energy consumption of the charging station in kWh for every step over the considered horizon (first index) and every EV (second index)
future_ev_shiftable_minEVector with minimum accumulated energy consumption of the charging station in kWh for every step over the considered horizon (first index) and every EV (second index)
future_ev_maxPVector with maximum charging power per EV in kW for every step over the considered horizon (first index) and every EV (second index)
optimize_PV_sizeFlag indicating if the PV size (per section) should be part of the optimization
optimize_BS_sizeFlag indicating if the BS size should be part of the optimization
total_PV_generation_per_section_kWTotal PV generation over the simulation horizon. Only required, if PV sizing (flag optimize_PV_size) is also a result of the optimization - otherwise, this parameter can be NULL
max_PV_power_per_section_kWpThe maximum installable power per roof section in kWp. Only required, if PV sizing (flag optimize_PV_size) is also a result of the optimization - otherwise, this parameter can be NULL
Returns
: Returns a boolean value, with true indicating if the optimization succeded, or false indicating an error (e.g., an unfeasable problem)

Implements BaseOptimizedController.


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