-
Notifications
You must be signed in to change notification settings - Fork 0
City
The project aims to simulate a urban area, with a certain number of crossing streets, traffic lights and cars. The traffic lights are managed by a single traffic control task, cars are randomly generated by the user to enter and exit the area. Each car is autonomous and controlled by a periodic task on its local sensors. Every different execution of the program generates a random city map, in which vehicles can move. The city map consists of some blocks, streets and traffic lights placed at every crossing street. Cars can be inserted randomly in the surroundings of the city and deleted by the user, up until a maximum number of vehicles moving around is reached. Each car has its own randomly generated physics characteristics and is autonomous, controlled by a periodic task on its local sensors. Each of the traffic lights is managed instead by a single traffic control entity. The entire project is coded in the C language and requires the use of some standard libraries and the pthread library, used to manage the periodic tasks, and the version 4 of allegro library, used for the graphical representation. The source code of the project can be found at https://github.com/ckevar/city.
In order to be able to run the project on your computer, you will need the installation of: the pthread library; the allegro library, version 4.4.2. Since the internal management of periodic tasks is requiring special permissions, in order to be able to create a new periodic task, that is a car management task, the program shall be executed with privileges of the system administrator.