Data logger
Submodules
Data logger
- class fleetrl.utils.data_logger.data_logger.DataLogger(episode_length)[source]
Bases:
object
Logs data to allow for postprocessing, graphs, etc. The log is a dataframe, where each row can be a float or an array. Deepcopy to avoid risk of mutability (logs pointing back to changing variables)
- log_data(time, obs, action, reward, cashflow, penalty, grid, soc_v, degradation, charge_log, soh)[source]
While the env object is the same, the episode counter will recognise different episodes. A dict is created with the required values, and then appended to the log dataframe
- Parameters:
time (
Timestamp
) – Current timestampobs (
ndarray
) – Observation arrayaction (
ndarray
) – Action arrayreward (
float
) – Reward floatcashflow (
float
) – in EURpenalty (
float
) – penalty floatgrid (
float
) – Grid connection in kWsoc_v (
float
) – Amount of SOC violated in # of batteriesdegradation (
float
) – Degradation in that timestepcharge_log (
ndarray
) – How much energy flowed into the batteries in kWhsoh (
ndarray
) – Current SoH, array
- Returns:
None