Skip to content

Running SimMobility

Kakali Basak edited this page Jul 29, 2020 · 22 revisions

To build SimMobility, please refer to the New Developer's Guide.

Might be also useful to have a look at the following page: SimMobility Configuration.

Tu run SimMobility from Eclipse, refer to this pahe: Running SimMobility in Eclipse

Short Term

Scenario Configuration
1 With AMOD In the amodcontroller section in the short-term specific configuration file, set enabled="true"
2 Without AMOD In the amodcontroller section in the short-term specific configuration file, set enabled="false"
3 With FMOD In the fmodcontroller section in the short-term specific configuration file, set enabled="true". Also specify the path of map file and requests files in the respective value attributes.
4 Without FMOD In the fmodcontroller section in the short-term specific configuration file, set enabled="false"
5 With Public Transport (Bus) In the short-term specific configuration file, set enabled="true" under the sections labelled 'busController' and 'public_transit'.
6 Without Public Transport (Bus) In the short-term specific configuration file, set enabled="false" under the sections labelled 'busController' and 'public_transit'.

Mid Term
The sequence of execution and steps to run various components of mid-term are explained in detail the the running mid-term page.

Scenario Configuration
1 With Public Transport (Bus) In the busController section in the mid-term specific configuration file, set enabled="true"
2 Without Public Transport (Bus) In the busController section in the mid-term specific configuration file, set enabled="false"
3 With incidents(MRT disruption) In the incidents section in the mid-term specific configuration file, set enabled=”true”
4 Without incidents(MRT disruption) In the incidents section in the mid-term specific configuration file, set enabled=”false”
5 PreDay Logsum Set run_modevalue="logsum" in preday section of Simrun_MidTerm.xml
6 Pathset generation https://github.com/smart-fm/simmobility-prod/wiki/Pathset-generation-how-to
7 Preday mid_term_run_mode value="preday" in simrun_MidTerm.xml
8 Withinday + supply mid_term_run_mode value="withinday" in simrun_MidTerm.xml
9 To capture specified Region's entry/exit nodes 1. In pathset_config.xml file configure pathset_without_banned_area="get_pvt_pathset" (In case you do not want to restrict the cars to enter the region you must provide the actual pathset table otherwise provide the new pathset table removing those banned area links)
2. In simrun_MidTerm.xml file Provide the following two stored procedure: get_cbd_nodes(), get_cbd_links()
3. Enable the following region_restriction enabled="true"
This setting will generate cbd entry and exit node in the subtrip_metrics.csv file and will also generate cbd.csv file

Running on a local machine
To run SimMobility ST or MT in local machine follow the steps:

  1. On the terminal:

    1.1. Clone SimMobility using:
    $ git clone https://github.com/smart-fm/simmobility-prod.git <folder>

      > Note: This will always set up the master branch. 
        If you need to use a different branch, you can do (under /dev/Basic folder): `git checkout <branch-name>`  
    

    1.2. Create a new folder named Release (under /dev/Basic folder) using $ mkdir Release
    1.3. Change the current directory to the newly created directory using $ cd Release
    1.4 Execute the command:
    cmake ../ -DCMAKE_BUILD_TYPE:STRING=Release -DBUILD_SHORT:BOOL=OFF -DBUILD_MEDIUM:BOOL=ON -DBUILD_LONG:BOOL=OFF -DBUILD_TESTS:BOOL=OFF -DBUILD_TESTS_LONG:BOOL=OFF
    1.5. Then build SimMobility using make -j20
    1.6. Change the current directory back to the dev/Basic folder using $ cd ..

    1.7. To run SimMobility, use ./Release/SimMobility_Medium data/simulation.xml data/simrun_MidTerm.xml

Using HPC (Singapore)
To run SimMobility ST or MT in HPC follow the steps:

  1. Get HPC account from Cecille Maquito (must be FM Staff).

  2. On the terminal:
    2.1. Login using ssh <user>@172.25.184.156. When prompted, enter your password.
    2.2. Clone SimMobility to HPC using:
    $ git clone https://github.com/smart-fm/simmobility-prod.git <folder>

      > Note: This will always set up the master branch. 
        If you need to use a different branch, you can do (under /dev/Basic folder): `git checkout <branch-name>`  
    

    2.3. Create a new folder named Release (under \dev\Basic folder) using $ mkdir Release
    2.4. Change the current directory to the newly created directory using $ cd Release
    2.5. Execute the command:
    cmake ../ -DCMAKE_BUILD_TYPE:STRING=Release -DBUILD_SHORT:BOOL=OFF -DBUILD_MEDIUM:BOOL=ON -DBUILD_LONG:BOOL=OFF -DBUILD_TESTS:BOOL=OFF -DBUILD_TESTS_LONG:BOOL=OFF
    2.6. Then build SimMobility using: make -j20
    2.7. Edit job script file: $ vi josbscript.sh (download here and put it in the "Basic" folder)
    **Please note that the number of cores should be one more than the number of workers you specified in the XML file
    2.8. To schedule the job, execute: $ qsub jobscript.sh
    2.9. To check the job status, use: $ qstat (or qstat -f) jobscript.sh

Clone this wiki locally