View on GitHub

EPCIS Events Generator Based On OpenTTD

Anes BENDIMERAD, Victor CODOCEDO, Jean-Francois BOULICAUT, Mehdi KAYTOUE

Université de Lyon, CNRS, INSA-Lyon, LIRIS, UMR5205, F-69621, France

Download this project as a .zip file Download this project as a tar.gz file

Introduction

This project is an EPCIS Events Generator based on the game OpenTTD version 1.5.0. It captures all the transportation and the manufacturing events that happen in the game and writes them into an output file using the EPCIS Format.

This project is free and open-source software licenced under the GNU General Public Licence 2.0.

For more details about OpenTTD, please go to this page

For more details about EPCIS, please go to this page

A great number of transportation and manufacturing events happen in the game OpenTTD. For example, one can cite the events that correspond to the creation of cargos (wood, mail, coal,...), the shipping of cargos using a vehicle, and the reception of cargos in a station. The current Project collects all these events and writes them into a file using the EPCIS standard.

For each game, two files are produced:

A bizLocation is a number that identifies a unique place in the game. This place can be a station, a town, or an industry. For each bizLocation, MasterData File specifies the name of the location, the geographic coordinates (latitude and longitude), and the type (whether the location is a station, a town, or an industry). In the listing below, the identifier "urn :epc :id :sgln :01000.0020935.0" is a bizLocation. An object class is a range of identifiers that correspond to objects of a specified type. In Listing 1, the object class "epc :id :sgtin :01000.0001.*" correspond to the type "coal". This means that all the identifiers that begin with "epc :id :sgtin :01000.0001." correspond to objects of type coal. An example of identifiers of objects of type coal is "epc :id :sgtin :01000.0001.2047122".

Types of events captured in the game

Several types of events are captured in this project:

Compilation and execution

We have already built this project on some Operating Systems. The folder "releases" contains executables that are ready to compile. This folder contains two repositories:

The script "compile-ubuntu.sh" allows to compile this project on Ubuntu. Otherwise, this project can be compiled in the same manner than the standard version of the game OpenTTD. The instructions of compilation are explained in the following links:

How to use this project

There are two ways to generate events using this project:

To launch a saved game without graphic interface, the following command line can be used:

name_of_executable -g path_of_saved_game -v null:ticks=number_of_iterations
The parameters are: For example, the following command can be executed on Windows in the folder "releases\windows32\OpenTTD Generator":
openttd.exe -g saves\autosave15.sav -v null:ticks=100000