Getting Started

There are many ways to get started with Travel Simulator and this page is here to give you all the information you need to do so easily.

Choosing which flavor is the right for you is pretty easy. If you are looking to use Travel Simulator as soon as possible in a preconfigured environment you can go to the online version or download the preconfigured virtual machine and import it into Virtual Box. If your goal is to have the most amount of fun, start contributing or simply dig deep into Travel Simulator, you can get the source code on Github.

Travel Simulator comes in different flavors :

Pre-installed in a downloadable virtual machine

You want a quick start to get Travel Simulator working localy, this is for you!
First download the latest version of VirtualBox here.
Then download the VirtualBox Appliance here.

When you finished installing VirtualBox follow these steps:
- File
- Import Appliance
- Open Appliance...

Select the .OVA file you just downloaded and import the machine.
Once Virtual Box finished the setup simply run it.

From Linux distribution packages

All simulator modules are available as RPM packages. Do not hesitate to check for the needed packages on the linux packages search page. Follow the steps below to learn how to download and install those packages within one of the following Linux environment:

  • CentOS, Red Hat
  • Fedora

Linux users take advantage of the 'yum' command to search, install or update RPM packages:

yum search <module_name>
yum install <module_name>
yum update <module_name>

For instance, let's install the trademgen module in charge of the demand generation. Here is a list of the available trademgen packages. Try:

yum search trademgen
yum install trademgen

Good to notice! All trademgen dependencies (i.e. stdair and sevmgr) have been automatically installed too.

Finally, check that the installation has been successful by displaying the help of the trademgen module:

trademgen -h

From the source code repositories

First of all, you need to install and set up git within your working Linux/Unix environment.

If you are only interested by a specific module, or by individual component packages, you can find the module by module installation guide below.

Metasim installation

Enter the chosen working directory, for instance:

mkdir -p ~/dev/sim
cd ~/dev/sim

Clone the metasim project from the github environment:

git clone git@github.com:airsim/metasim.git metasimgit
cd metasimgit

Copy and edit the metasim.yaml file with your own details (check you firewall settings if necessary):

cp metasim.yaml.sample metasim.yaml
Adapt metasim.yaml to your environment. In particular, you may turn off the 64bit library option as well as the generation of the GCOV/LCOV tests and of the documentation:
cmake_args: '-DCMAKE_BUILD_TYPE:STRING=Debug -DINSTALL_DOC:BOOL=OFF \ 
-DENABLE_TEST:BOOL=ON -DRUN_GCOV:BOOL=OFF'
The avlcal and simlfs are not currently used; so they can be dropped without any other consequence.

After editing the metasim.yaml file, it should look like:

# MetaSim configuration file
default_base_repo: 'git@github.com:airsim'
default_branch: trunk
cmake_args: '-DCMAKE_BUILD_TYPE:STRING=Debug -DINSTALL_DOC:BOOL=OFF \ 
-DENABLE_TEST:BOOL=ON -DRUN_GCOV:BOOL=OFF' publish_path: /dev/sim/metasimgit components: - name: tvlsim repo: 'https://github.com/airsim/tvlsim.git' deps: [stdair, airrac, rmol, airinv, simfqt, airsched, simcrs, trademgen, sevmgr, travelccm] - name: simcrs repo: 'https://github.com/airsim/simcrs.git' deps: [stdair, airrac, rmol, sevmgr, airinv, simfqt, airsched] - name: simlfs repo: 'https://github.com/airsim/simlfs.git' deps: [stdair, airrac, rmol, sevmgr, airinv, simfqt] - name: avlcal repo: 'https://github.com/airsim/avlcal.git' deps: [stdair, airrac, rmol, airinv] - name: airinv repo: 'https://github.com/airsim/airinv.git' deps: [stdair, airrac, rmol, sevmgr] - name: trademgen repo: 'https://github.com/airsim/trademgen.git' deps: [stdair, sevmgr] - name: rmol repo: 'https://github.com/airsim/rmol.git' deps: [stdair, airrac] - name: simfqt repo: 'https://github.com/airsim/simfqt.git' deps: [stdair] - name: airsched repo: 'https://github.com/airsim/airsched.git' deps: [stdair] - name: travelccm repo: 'https://github.com/airsim/travelccm.git' deps: [stdair] - name: sevmgr repo: 'https://github.com/airsim/sevmgr.git' deps: [stdair] - name: airrac repo: 'https://github.com/airsim/airrac.git' deps: [stdair] - name: stdair repo: 'https://github.com/airsim/stdair.git' deps: {}

Good to know: if you are focusing on one specific module, you can remove everything else from the metasim file. Just be careful to check dependencies first!

For instance, if you are working on Travel-CCM only, you can keep only 'travelccm' and 'stdair'. In this case the metasim file should look like:

# MetaSim configuration file
default_base_repo: 'git@github.com:airsim'
default_branch: trunk
cmake_args: '-DCMAKE_BUILD_TYPE:STRING=Debug -DINSTALL_DOC:BOOL=OFF \ 
-DENABLE_TEST:BOOL=ON -DRUN_GCOV:BOOL=OFF' publish_path: /dev/sim/metasimgit components: - name: travelccm repo: 'https://github.com/airsim/travelccm.git' deps: [stdair] - name: stdair repo: 'https://github.com/airsim/stdair.git' deps: {}

Then, you will need a minimum of development tools, including Ruby-gem based Rake, CMake, g++, Boost:

sudo yum -y install rake-rubygem cmake boost-devel gcc-c++ mysql-devel zeromq-devel soci-mysql-devel

(Git) check-out all the required components:

rake checkout
rake pull

Test the components:

rake offline=true check

Install the components:

rake offline=true install
ls -lhF workspace/install

Generate the tar-balls:

rake offline=true dist
ls -lhF /tmp/metasim

Run the local binary version to perform your first simulation:

cd workspace/build/tvlsim
./tvlsim/simulate
Have a look at the simulation logs:
less simulate.log
If encounter any problem while opening a database connection, run the following batch scripts (before launching again the simulate script):
cd ../stdair
./db/admin/create_tvlsim_db.sh
./db/admin/create_airinv_db.sh

Please go to the tutorial section to learn more about the simulation tools available and how to use them.


Module by module installation
StdAir, C++ Standard Airline IT library, is the first module you need whatever your objectives are. Indeed, all other simulation modules depend on it.
StdAir Installation

Follow the steps below to download, build and install StdAir. Get the StdAir library
Clone locally the full git project:

cd ~ 
mkdir dev
cd ~/dev/
git clone git@github.com:airsim/stdair.git stdairgit
cd stdairgit
git checkout trunk
Build the StdAir project
Configure, compile and install using the following commands:
cd ~/dev/stdairgit
rm -rf build && mkdir -p build
cd build
cmake -DCMAKE_INSTALL_PREFIX=/home/[user]/dev/deliveries/stdair-99.99.99 \
-DLIB_SUFFIX=64 -DCMAKE_BUILD_TYPE:STRING=Debug -DINSTALL_DOC:BOOL=ON ..
make install
Run the Tests
After building the StdAir project, the following commands run the tests:
cd ~/dev/stdairgit 
cd build
make check
As a result, you should obtain a similar report:

sc_test

Update the StdAir deliveries
Have the latest StdAir release 'tagged' as the stable one:
cd ~/dev/deliveries
rm -f stdair-stable
ln -s stdair-99.99.99 stdair-stable
Other module installation

In order to install another specific module, you need to check its dependencies in the dependencies diagram. For instance, we are going to focus on the demand generation module TraDemGen.

Clone locally the full git project:
cd ~/dev
git clone git@github.com:airsim/trademgen.git trademgengit
cd trademgengit
git checkout trunk
mkdir -p build && cd build

As illustrated in the dependencies diagram, the only dependencies of TraDemgen are the StdAir and SEvMgr libraries. That is why the StdAir and SEvMgr releases, which will be used to build the Trademgen component, need to be specified:

cmake -DCMAKE_INSTALL_PREFIX=/home/[user]/dev/deliveries/trademgen-99.99.99 \ 
-DWITH_STDAIR_PREFIX=/home/[user]/dev/deliveries/stdair-stable \
-DWITH_SEVMGR_PREFIX=/home/[user]/dev/deliveries/sevmgr-stable \
-DLIB_SUFFIX=64 -DCMAKE_BUILD_TYPE:STRING=Debug -DINSTALL_DOC:BOOL=ON ..
Of course, you are supposed to have previously cloned, built and installed the SEvMgr library following exactly the same process as for StdAir. Do not forget that SEvMgr depends on StdAir as well!

Build, install the demand generation library and perform tests:

make & make install && make check

Run the local binary version to generate your first booking requests:

./trademgen/trademgen_generateDemand -b
If encounter any problem while opening a database connection, run the following batch scripts (before launching again the generateDemand script):
./workspace/build/stdair/db/admin/create_tvlsim_db.sh
./workspace/build/stdair/db/admin/create_airinv_db.sh
Please go to the tutorial section to learn more about the simulation tools available and how to use them.



Learn how to launch the different simulation batches :

General knowledge

Whatever the flavour chosen, those tutorials will help. The only difference is the way to launch binaries. Let's take for instance the whole simulator component named TvlSim.

If you are working within the pre-configured Virtual Box, the command is independent from the current directory as the simulator libraries have been installed within the Fedora package:
tvlsim
If you chose to work within the packaged metasim component (where all simulation modules are available), the correct way to launch the binary is:
cd ~/dev/metasimgit/workspace/build/tvlsim/tvlsim
./tvlsim
Finally, when dealing with all the modules independently, you can choose:
  • to run the local binary version:
  • cd ~/dev/tvlsimgit/tvlsim
    ./simulate
  • or to run the installed version:
  • cd ~/dev/deliverie/tvlsim-99.99.99/bin/
    ./simulate
After running the script, you can check that a log file, named after the script, has been created in the current directory and have a look at it:
ls
less simulate.log

Common commands for basic batches

From here, we choose to work in the directory where the needed binary is present. Please refer to the General knowledge part if you are not sure where to find the binaries.
  • Display the help:
    ./simulate --help
  • Run the scenario corresponding to a default built-in BOM tree:
    ./simulate --builtin
  • Run the scenario corresponding to default input files:
    ./simulate

Common commands for interactive batches

In this part, we are working in the directory where the needed binary is present. Please refer to the General knowledge part part if you are not sure where to find the binaries.

The interactive scripts can be launched exactly as the non-interactive ones:
./tvlsim
At this step, you should see something similar to the following screen shot:
test_result
To display the help of the interactive scenario:
help
To quit the interactive scenario:
quit