Make sure git is installed git
git clone https://github.com/JunaithSM/Traffic-System.git
cd Traffic-SystemInstall Sumo then run this command. Start SUMO
- Open a terminal on your computer.
- Run SUMO in server mode on a specific port (e.g., 8813):
sumo -c osm.sumocfg --remote-port $PORT-cspecifies your SUMO config file.--remote-portis the port where TraCI listens. You can choose any free port.$PORTreplace with the port number (e.g., 8813)- This will start SUMO and wait for TraCI connections from your Python code.
⚠️ If you want to see the GUI, use sumo-gui instead of sumo.
Colab runs on a remote server, so it cannot directly connect to localhost on your PC. You need to expose your port:
We need to connect the local sumo to the web server by using ngrok
- Install ngrok locally: https://ngrok.com/
- Start an ngrok tunnel to your TraCI port:
ngrok tcp $PORT- ngrok will give you a public address like 0.tcp.ngrok.io:12345.
- Note down the hostname and port (12345 in this example).
In google Colab open the TrafficSystem.ipynb