Commit a33684aa authored by Kučera Petr RNDr. Ph.D.'s avatar Kučera Petr RNDr. Ph.D.
Browse files

Readme update

parent 9617d9e7
......@@ -44,6 +44,7 @@ default-directory = data
# Multipliers are floats
# Additive constants are unsigned integers
# See for more details
min-duration-multiplier = 0.1
min-duration-addition = 60
max-duration-multiplier = 1.0
# Compilation
# Compilation and running
## Compilation
To compile the project, run
......@@ -10,6 +12,79 @@ make
C++17 compiler is needed to compile the project, otherwise it does not have any
# Running on example data
## Running on example data
The binary can be run with at most one parameter which specifies the path to
the configuration file, the default path is just `deadlock.ini`. After the
compilation, run (from the main project directory).
build/bin/deadlock data/deadlock.ini
The result can be found in `data/out` directory. If the `[debug]` section of
the configuration file specifies also output files with the graphs describing
the tracks, these can be found in `data/graph`. The paths can be modified in
the configuration file.
## Output
For now, the program produces two files as the output (by default in directory
- `model.dat` - the model data file to be used with the model (which is
currently in the file `data/model.mod`).
- `places.ini` - the description of places used in the model data and their
mapping back to the groups of sections from the tracks descriptions.
The program also prints some information to the log file
(`data/out/deadlock.log` by default, can be changed in the configuration file).
Currently, not much is written to the log, only a few error messages.
# Model configuration
Section `[model]` of the configuration file (`deadlock.ini`) specifies
parameters which specify how the model data are created. There are two types of
activities used in the model data: Traverse and StopAt.
## Traverse
Activity for traversing a given place (or one of the track sections within the
place). The duration of this type of activity is determined based on its
(maximum length of a section within the place) and parameters
`min-duration-multiplier`, `min-duration-addition`, `max-duration-multiplier`,
and `max-duration-addition`. The multipliers are floats, additions are supposed
to be nonnegative integers.
- Minimum duration of a traversing activity is computed as
`min-duration-multiplier * length + min-duration-addition` (after rounding to
an integer).
- Maximum duration of a traversing activity is computed as
`max-duration-multiplier * length + max-duration-addition` (after rounding to
an integer).
## StopAt
Activity for making a stop at a given place (or passing it as a stop as part of the
train's schedule). The minimum duration of a StopAt activity is `0` for passing
the stop and `min-stop-duration` otherwise. The maximum duration is a large
number (it is not currently part of the configuration).
- Note that this is also modified based on the schedule together with other
parameters of an activity, namely minimum start and maximum end. In brief,
the max duration is set the difference of maximum end and minimum start.
- The maximum end of an activity and thus also its duration is also modified by
adding parameter `allowed-delay`.
Let us note that this approach has the following consequence (which may be
undesired): If a place is related to a stop activity and it is not included
(either directly or as a subplace) in any traverse activity, its length has no
role in setting the duration. This can change in future versions.
## Other parameters
It is possible to specify two additional (but important) parameters.
- `transition-time` - this is the transition time between the activities (for
now it is constant and the same for all activities.
- `current-time` - allows to specify the current time of the simulation with
respect to which the model data are constructed.
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment