This Python program is a grid-like, cartoonish traffic simulation. It consists of a graphical user interface (GUI) where vehicles move from one grid to another while staying on the road and following a predetermined path. The vehicles yield to each other while obeying the Finnish traffic law and do their best not to hit others. The program, its algorithms, libraries, and everything closely related is discussed more in detail in the documentation. What's written here is the minimum you need to know. The documentation is only available in Finnish and can be found in the doc folder.
The program can either be run in an integrated development environment such as Eclipse or by simply double clicking on the executable. The executable is guaranteed to work on a Windows 8+ system only. When using an IDE, only the gui.py script should be run as a python run. Whether using the executable or an IDE, the program shouldn't be too demanding on your hardware. However, while using a "potato" system you can run into some issues when running the simulation at the maximum settings as there are quite a few graphical components. The maximum settings will be further discussed after the GUI has been explained. What each system should have though is Python as well as PyQt5, math, and random libraries installed. You can install the PyQt5 graphical interface by running "pip install PyQt5" in the command prompt. To do this successfully, you should have Python 3.7 at the minimum. If you don't have a suitable IDE for python, you can install Eclipse IDE for Java developers from https://www.eclipse.org/downloads/packages/installer and get the PyDev extension from https://www.pydev.org/manual_101_install.html. Make sure you follow the instructions thoroughly.
The program starts by the user inputting an integer from three to nine in the first field. After this, the map is created according to the given number. The simulation can be started at any moment by pressing the start/stop button. The new map command will let you start the simulation from the beginning and create another map. The new one can have the exact same dimensions as the previous one. Please note that certain map sizes only have a few possible configurations or maybe even just one. Pressing restart has the same effect without creating a new map. Erase will let you remove any vehicle with a left click while it has been selected. This can be handy if any of the vehicles get stuck. Sometimes a vehicle (or multiple) can end up in a position that it can't get out of, though this has only been documented in scenarios where the map is filled with vehicles.
Clicking on a vehicle while “erase” is not selected will show its path and view distance. Anything outside this will be ignored. Clicking on the rush hour button will make the vehicles drive more carelessly and raise the number of vehicles on the map. The maximum number of vehicles allowed goes up as well. The map size also affects this. Furthermore, you can increase or decrease the number of concurrent vehicles from the up/down counter on the bottom right. Pressing the rush hour button again will revert the changes. You can always see the state of the traffic simulation on the top left. The maximum settings that were mentioned earlier refer to creating a 9x9 grid with the maximum amount (18) of vehicles in it.