The railway network is defined by pairs of stations and


1. The network of railways.

The railway network is defined by pairs of stations and distance between each pair.

The distance between stations is an integer number.

The amount of stations and the topology is not limited.

2. Trains

There are several trains travelling the railway network.

Train speed is equal to 1.

3. The routes for trains

For every train there is a route defined by the sequence of stations.

Every leg between two stations is a single track.

4. Traffic

All trains start simultaneously.

At the end of the route the train disappears.

5. Configuration of the system

The network is defined in text file(s)

The trains and routes are defined in text files.

Task

The task is to write a C++ program that implements the described behavior.

Program reads configurations files, check for configuration errors, report errors to the log file.

Program starts the simulation. If collision between trains happens the collision event is reported to the log file.

The trains that collide are removed from the simulation.

Request for Solution File

Ask an Expert for Answer!!
C/C++ Programming: The railway network is defined by pairs of stations and
Reference No:- TGS02266266

Expected delivery within 24 Hours