trademgen

C++ Simulated Travel Demand Generation Library

Summary

TraDemGen aims at providing a clean API, and the corresponding C++ implementation, able to generate demand for travel solutions (e.g., from JFK to PEK on 25-05-2019) according to characteristics (e.g., Willingness-To-Pay, preferred airline, etc).

TraDemGen makes an extensive use of existing open-source libraries for increased functionality, speed and accuracy. In particular the Boost (C++ Standard Extensions: https://www.boost.org) library is used.

TraDemGen is the one of the components of the Travel Market Simulator (https://travel-sim.org). However, it may be used in a stand-alone mode.

Installation

On Fedora/CentOS/RedHat distribution

Just use DNF (or Yum on older distributions):

$ dnf -y install trademgen-devel trademgen-doc

You can also get the RPM packages (which may work on Linux distributions like Suse and Mandriva) from the Fedora repository (e.g., for Fedora Rawhide, https://fr2.rpmfind.net/linux/RPM/fedora/devel/rawhide/x86_64/)

Building the library and test binary from Git repository

The Git repository may be cloned as following:

$ git clone git@github.com:airsim/trademgen.git trademgengit # through SSH
$ git clone https://github.com/airsim/trademgen.git # if the firewall filters SSH
$ cd trademgengit

Then, you need the following packages (Fedora/RedHat/CentOS names here, but names may vary according to distributions):

Building the library and test binary from the tarball

The latest stable source tarball (trademgen*.tar.gz or .bz2) can be found on GitHub: https://github.com/airsim/trademgen/tags

As TraDemGen depends on other Travel Market Simulator (TvlSim/AirSim) modules, more specifically StdAir and SEvMgr, it may be convenient to use the MetaSim project, which pulls at once all the components of TvlSim in the same place, and then orchestrates the dependencies for the builds, installations and use of components.

If MetaSim is not used, in order to customise the following to your environment, you can alter the path to the installation directory:

export INSTALL_BASEDIR="/home/user/dev/deliveries"
export TDG_VER="1.00.11"
if [ -d /usr/lib64 ]; then LIBSUFFIX="64"; fi
export LIBSUFFIX_4_CMAKE="-DLIB_SUFFIX=${LIBSUFFIX}"

Then, as usual:

Python extension

The way to interact with a C++-based Python extension is extensively described in the OpenTREP project. Only a quick start is given here.

Python dependencies

Build the Python extension

Use the Python extension

0% 10 20 30 40 50 60 70 80 90 100% |—-|—-|—-|—-|—-|—-|—-|—-|—-|—-| *******************

quit() ```