Benchmarking

Submodules

Benchmarking base class

class fleetrl.benchmarking.benchmark.Benchmark[source]

Bases: object

Parent class for benchmark modules.

plot_benchmark(log)[source]
Parameters:

log (DataFrame) – Log dataframe

Return type:

None

Returns:

None, plots the benchmark

run_benchmark(use_case, env_kwargs, seed=None)[source]

This method contains the logic of the respective benchmarks, executes it on the given environment and returns a log.

Parameters:
  • use_case (str) – String that specifies use-case (“lmd”, “ct”, “ut”)

  • env_kwargs (dict) – Environment parameters

  • seed (int) – seed for RNG

Return type:

DataFrame

Returns:

Log Dataframe of the benchmark, can be saved as pickle

Distributed charging

class fleetrl.benchmarking.distributed_charging.DistributedCharging(n_steps, n_evs, n_episodes=1, n_envs=1, time_steps_per_hour=4)[source]

Bases: Benchmark

plot_benchmark(dist_log)[source]
Parameters:

log – Log dataframe

Return type:

None

Returns:

None, plots the benchmark

run_benchmark(use_case, env_kwargs, seed=None)[source]

This method contains the logic of the respective benchmarks, executes it on the given environment and returns a log.

Parameters:
  • use_case (str) – String that specifies use-case (“lmd”, “ct”, “ut”)

  • env_kwargs (dict) – Environment parameters

  • seed (int) – seed for RNG

Return type:

DataFrame

Returns:

Log Dataframe of the benchmark, can be saved as pickle

Linear optimisation

class fleetrl.benchmarking.linear_optimization.LinearOptimization(n_steps, n_evs, n_episodes=1, n_envs=1, time_steps_per_hour=4)[source]

Bases: Benchmark

plot_benchmark(lin_log)[source]
Parameters:

log – Log dataframe

Return type:

None

Returns:

None, plots the benchmark

run_benchmark(use_case, env_kwargs, seed=None)[source]

This method contains the logic of the respective benchmarks, executes it on the given environment and returns a log.

Parameters:
  • use_case (str) – String that specifies use-case (“lmd”, “ct”, “ut”)

  • env_kwargs (dict) – Environment parameters

  • seed (int) – seed for RNG

Return type:

DataFrame

Returns:

Log Dataframe of the benchmark, can be saved as pickle

Night charging

class fleetrl.benchmarking.night_charging.NightCharging(n_steps, n_evs, n_episodes=1, n_envs=1, time_steps_per_hour=4)[source]

Bases: Benchmark

plot_benchmark(night_log)[source]
Parameters:

log – Log dataframe

Return type:

None

Returns:

None, plots the benchmark

run_benchmark(use_case, env_kwargs, seed=None)[source]

This method contains the logic of the respective benchmarks, executes it on the given environment and returns a log.

Parameters:
  • use_case (str) – String that specifies use-case (“lmd”, “ct”, “ut”)

  • env_kwargs (dict) – Environment parameters

  • seed (int) – seed for RNG

Return type:

DataFrame

Returns:

Log Dataframe of the benchmark, can be saved as pickle

Uncontrolled charging

class fleetrl.benchmarking.uncontrolled_charging.Uncontrolled(n_steps, n_evs, n_episodes=1, n_envs=1, time_steps_per_hour=4)[source]

Bases: Benchmark

plot_benchmark(dumb_log)[source]
Parameters:

log – Log dataframe

Return type:

None

Returns:

None, plots the benchmark

run_benchmark(use_case, env_kwargs, seed=None)[source]

This method contains the logic of the respective benchmarks, executes it on the given environment and returns a log.

Parameters:
  • use_case (str) – String that specifies use-case (“lmd”, “ct”, “ut”)

  • env_kwargs (dict) – Environment parameters

  • seed (int) – seed for RNG

Return type:

DataFrame

Returns:

Log Dataframe of the benchmark, can be saved as pickle