Skip to content

Commit 3b63c67

Browse files
committed
Import sumolib
Code for importing sumolib. Instructions for setting the path to sumolib.
1 parent 31c5f77 commit 3b63c67

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
11
# Traffic Modelling
22

3+
## Development
4+
5+
`SUMO_HOME` must be set to the path of your SUMO installation, and `$SUMO_HOME/tools/sumolib` must exist.

main.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/usr/bin/env python3
2+
3+
import sys
4+
import os
5+
6+
if "SUMO_HOME" not in os.environ:
7+
print("SUMO_HOME is not set")
8+
sys.exit(1)
9+
10+
sumolib_path = os.path.join(os.environ.get("SUMO_HOME"), "tools")
11+
sys.path.append(sumolib_path)
12+
13+
import sumolib
14+
15+
# TODO

0 commit comments

Comments
 (0)