-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun.py
More file actions
25 lines (21 loc) · 713 Bytes
/
Copy pathrun.py
File metadata and controls
25 lines (21 loc) · 713 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
# run.py
import os
from datetime import datetime
from pathlib import Path
import simpy
from viz_autovp import make_world, arrival, render_combined_gif
from props import SIM_TIME, DT
def main():
env = simpy.Environment()
floors, tower = make_world(env)
logs = []
print("=== Parking Simulation Start ===")
env.process(arrival(env, tower, logs))
env.run(until=SIM_TIME)
print("=== Simulation End ===")
out_dir = Path("output")
out_dir.mkdir(parents=True, exist_ok=True)
out_path = out_dir / f"combined_twofloors_{datetime.now():%Y%m%d_%H%M%S}.gif"
render_combined_gif(floors, tower.traj, tower.occ, env.now, DT, str(out_path))
if __name__ == "__main__":
main()