-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathmain.py
More file actions
27 lines (18 loc) · 739 Bytes
/
main.py
File metadata and controls
27 lines (18 loc) · 739 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import json
import pandas as pd
import time
import os
from src.SimulationEngine import SimulationEngine
from preprocessing.BikeGeneration import BikeGeneration
config_path = os.path.join("data", "config.json")
with open(config_path) as f:
config = json.load(f)
stations_path = os.path.join("data", "bluebikes_stations_07_2020.csv")
users_path = os.path.join("data", "user_trips_"+ str(config["USER_TRIPS_FILE"]) +".csv")
#users_path = os.path.join("data", "user_trips_0.csv")
stations_data = BikeGeneration(config["NUM_BIKES"], config["MODE"], stations_path)
users_data = pd.read_csv(users_path)
city = SimulationEngine(config, stations_data, users_data)
start = time.time()
city.run(until=1300000)
print(time.time() - start)