Skip to content

railML Tutorial

<<This page is under construction and will be extended soon!>>

In the menu bar, select Advanced > Data Import > railML 3 or open a .railml/.railmlx directly. The railML 3 import dialogue should be visible now.

You can choose whether to save only the translated data, perform semantic checks and/or to create a visualisation. Then click on Start Import. You should see a progress bar while the translation and validation of the data is executed.

Once the import has finished, the validation results are displayed and can be exported (provided that semantic checks were enabled). You can then proceed to export the data as B machines and, if desired, export further machines for animation and validation.

If you selected Create visualisation at the beginning, the visualisation window will show up to configure the layout:

A jar file containing railML2B can be downloaded here. To run the tool at least Java 17 is required. Use the following command:

Terminal window
java -jar railml2b-1.0.0.jar <file> <options>
Options Description
-trans_mch generate machine with XML data translated
by XML2B
-data_mch save machine with generated data at output
location
-anim_mch generate data and animation machine at
output location
-valid_mch generate data and validation machine at
output location
-only_trans perform only raw translation of the data
-val activate rule validation and print results
to console
-no_inv do not check type invariants after import
(can take some time)
-version print the current version of railML2B
-silent makes output less verbose
-verbose makes output more verbose
-o <path> specify output location for generated files
-report <output format> save rule validation report as HTML or XML
at output location (sets -val)
-dep_graph <output format> save rule dependency graph at output
location - provide output format as
argument (e.g. PDF, DOT, SVG)
-vis <output format> save visualisation at output location
(SVG,PDF,PNG,DOT) - default: SVG
-vis_strategy <strategy> specify visualisation strategy
(DOT,RAILOSCOPE,D4R) - default: DOT

railML2B is available via Maven Central and can be easily added as a dependency in your JVM-based project.

Gradle:

dependencies {
implementation 'de.hhu.stups:railml2b:1.0.0'
}

Maven:

<dependency>
<groupId>de.hhu.stups</groupId>
<artifactId>railml2b</artifactId>
<version>1.0.0</version>
<scope>compile</scope>
</dependency>