spice_ev.generate.generate_from_csv.generate_from_csv

spice_ev.generate.generate_from_csv.generate_from_csv(args)

Generate a scenario JSON from CSV rotation schedule of fleets to/from one grid connector.

Only one grid connector supported. Each line in the csv represents one trip. Each vehicle_id represents one vehicle. If the column vehicle_id is not given, the trips are assigned to the vehicles by the principle: first in, first out. Note that in this case a minimum standing time can be assigned to control the minimum time a vehicle can charge at the depot.

Needed columns:

  • departure_time in YYYY-MM-DD HH:MM:SS

  • arrival_time in YYYY-MM-DD HH:MM:SS

  • vehicle_type (as in examples/data/vehicle_types.json)

  • soc (SoC at arrival) or delta_soc [0,1] (optional, if not given, the mileage is taken)

  • vehicle_id (optional, see explanation above)

  • distance in km (optional, needed if columns soc or delta_soc are not given)

Parameters:

args (argparse.Namespace) – input arguments

Returns:

scenario

Return type:

dict