A bank wants to deliver cash to ATMs across the city via truck. The program should create a map of nodes and edges that represent ATMs and the paths between them. The goal is to design and implement an algorithm that finds the shortest path to fill the machines.
First, you need to create a random (chance) map. The nodes are the ATMs and the edges are the paths between them.
The number of ATMs in each run is a random number between 5 and 15, and the paths are between 1 and 20 km apart, which should be represented numerically on the edge or by the intensity of the edge color (longer paths are shown in bold). Also, each machine should have at least 2 and at most 4 paths. Then, randomly select 2 to 4 ATMs as the finished and prioritized machines and distinguish them by a different color or icon.
After building the platform from the initial node, the money truck starts moving and dispensing money at a constant speed of 60 km/h, filling priority nodes first and then visiting other nodes (only all priority nodes must be filled first). Regular nodes are visited and the order of visiting two nodes of the same type does not differ.) Note that filling each machine takes half an hour, but if you pass that node, no time is wasted.
As you fill each ATM, you should display the filling time, its attribute (which machine is it?), and the nodes passed to reach this machine. (Store the machines being serviced in a list and finally display them in order)
##The program ends when all the ATMs are filled.
Finally, display the average time taken to fill each machine (total time taken divided by the number of machines) and the list of machines in order of filling.
