<jupyter_start><jupyter_text>import simulation broker and vehicle generator<jupyter_code>import sys
sys.path.append('../')
import components
import matplotlib.pyplot as plt

# simulation broker
path_Sim = "../test_data/beam1/beam1-0.csv"
dtype_Sim = {
       'time': 'int64', 'type': 'category', 'vehicle': 'int64', 'parkingTaz': 'category','chargingPointType': 'category', 
       'primaryFuelLevel': 'float64', 'mode': 'category', 'currentTourMode': 'category', 'vehicleType': 'category', 
       'arrivalTime': 'float64', 'departureTime': 'float64', 'linkTravelTime': 'string', 'primaryFuelType': 'category', 
       'parkingZoneId': 'category','duration': 'float64' 
        }
SimBroker = components.SimBroker(path_Sim, dtype_Sim)

# vehicle generator
path_DataBase = "../test_data/vehicleFiles/vehicletypes-Base_2035_20210204_updated.csv"
VehicleGenerator = components.VehicleGenerator(path_Sim, dtype_Sim, path_DataBase)<jupyter_output><empty_output><jupyter_text>set up simulation<jupyter_code>timestep = 5* 60
N = 10
SimBroker.reset()
i = 0
slice = []<jupyter_output><empty_output><jupyter_text>press this to load new timestep<jupyter_code>again = True
while again and i< len(slice):
    if slice.iloc[i]["type"] == "ChargingPlugInEvent":
        print('actual time: ', SimBroker.t_act)
        vehicle = VehicleGenerator.generateVehicleSO(slice.iloc[i])
        print(vehicle)
        again = False

        traj_lower, traj_upper = vehicle.getChargingTrajectories(SimBroker.t_act, timestep, N=N)
        plt.plot(traj_lower, label = "lower")
        plt.plot(traj_upper, label = "upper")
        plt.legend()
    i+=1
if i >= len(slice):
    slice = SimBroker.step(timestep)
    i = 0
    print("loaded new slice")
    print('actual time: ', SimBroker.t_act)
# calculate trajectory<jupyter_output>actual time:  19063
Vehicle with the following properties: 
VehicleId: 645747 VehicleType: ev-L1-0-to-50000-LowTech-2035-SUV-BEV_300_XFC Arrival: 19021 Desired End Time: 19870 Vehicle Energy: 31.770511582714573 Desired Energy: 67.14551158271458 SOC: 0.37842804588336876 Maximal Energy: 83.95390333333333 Max Charging Power: 400.0
{'fraction_non_alphanumeric': 0.12968164794007492, 'fraction_numerical': 0.06601123595505617, 'mean_word_length': 4.985994397759104, 'pattern_counts': {'":': 1, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 1, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '3', 'dir': 'jupyter-structured-clean-dedup', 'id': '595688', 'license': 'MIT', 'n_tokens_mistral': 841, 'n_tokens_neox': 736, 'n_words': 151, 'path': 'examples/vehicleChargingTrajectoryExample.ipynb', 'repo_name': 'juliusaka/xfc-btms-saev-controller', 'size': '2136'}