Open-source Multi-agent Traffic Simulation software

Re:simUser’s ManualMay, 2020

Misaki design LLC

1Contents

1. Purpose

3

2. The Graphical User Interface (GUI )4

3. Preparing Simulation Data Files5

4. Making configuration file6

5. How to run the simulation

8

5.1 Procedure

8

5.2 Control

95.3 Utility functions

10

6. Output Log file132

1. Purpose
Re:sim is an open-source multi-agent traffic simulation software.
The source files are available from the following GitHub repository:
https://github.com/Reisim

The purpose of opensource project of Re:sim is† to share research experience and the result for realizing more sophisticated transportation systems† to enhance the possibility of multi-agent traffic simulation by the interested people with various ideas† to transfer our technology to anyone who can make use of it

It should be noted that Re:sim only support execution of traffic simulation by using driver agent model implemented.
The evaluation of ADAS or Automatic Driving systems using Re:sim is possible if the user customize Re:sim under LGPL.v3 condition.
Also the analysis function of the simulation result should be developed by users depending on their aim of the simulation.

3

2. The Graphical User Interface (GUI )The GUI of Re:sim consists of Main Window and Configuration Dialog.

Main Window

Configuration Dialog

Console Window

4

3. Preparing Simulation Data Files
To run the simulation, the users should prepare the simulation data files, which are created by SEdit, Simulation Data Editor for Re:sim, also the opensource software
available from GitHub Re:sim repository.
Please see the SEdit manual(PDF) for the details, which can be download fromhttps://github.com/Reisim/SEdit

Re:sim firstly reads the configuration file.
The configuration file can be created both using Re:sim and SEdit.

If you use Re:sim, see the next section of this manual.
Then Re:sim reads scenario file, road data file and traffic signal data file in order.

The relationship among simulation data files is described below.
Config file*.rc.txt

Scenario file*.rs.txt

Road data filesimulation data*.rr.txt

Traffic Signal data fileSEdit*.ts.txt

5

4. Making configuration file
Using the configuration dialog shown below, user can make the configuration file easily.
Some of the items are not obvious, explained as follows.

Only Filename:If checked, the path to the scenario file which is described in the configuration file is omitted, only filename of the scenario file is outputted.
In that case, scenario file should be stored in the same folder in which the configuration file is stored.
This is useful to distribute the simulation data to anyone who will store the the data in a different folder.

Output Log File:If checked, Re:sim output the log data file in csv format. see Section 6 for more detail.

6

Work with Driving Simulator:
If checked, Re:sim works in DS-mode.
Re:sim is used as a scenario control engine of the driving simulator “Sirius“ developed by us.
Please see the Sirius website for more detail.
https://md-sirius.com/eng/

Restart File:
Restart file is used to start the simulation with the initial condition that the agents are located at where they were in the previous simulation run.
It is called “Snapshot” in Re:sim to save the data for restart to the file and how to get the snapshot is described in Section 5.2 in this manual.

Calculation Time Step:
The calculation interval of integration can be set 0.02～0.1[s] in Re:sim.

7

5. How to run the simulation
4

5.1 Procedure1

1. Select the configuration file to run.
2. Press start button.
3. Press stop button to stop.
4. Close the program.

Continuous execution (select other configuration fileand start simulation without closing the window)
have not been support yet.

238

5.2 Control
Following interface is supplied to control the simulation execution.

Slower

2. Pause Button
1. Start Button

4. Stop Button

Faster

5. Speed Adjust Bar
7. Snapshot Button

3. Resume Button

6. Speed Reset

7. Display Information Checkboxes

9. Font Scale Adjust Bar

8. Graphic Update Stop Checkbox
SmallerLarger

During the simulation is running, pressing the “Snapshot” button show the dialog to input the file name and save the data for restart of the simulation.
The resultant file can be used as “restart file” at configuration setting.

95.3 Utility functions
1. Auto simulation stop (pause)
The dialog to set simulation stop time is shown by “ALT” + ‘t’ button.
The format to set the time is H:M:S.
For example, 2:0 mean the simulation will stop at 2 [min] in simulation time.
The simulation start again by pressing resume button and the stop time can be set again in the same simulation run.

10

2. Search Agent

The dialog to set the ID of the agent to find is shown by “ALT” + ‘f’ button.
If the agent exist, view of the Re:sim is changed so that the agent comes to the center.
The simulation process is paused by this, and not resumed automatically.

113. Dump Agent’s Processing Data
The agent’s processing data during the simulation can be display in the console window of the Re:sim by “CTRL”+left click of the target agent.
It is recommended to pause the simulation before showing the data in the console.
The contents shown in the console can be customized the code by the user.

“CTRL”+left click12

6. Output Log file

If the “Output Log File” setting is enabled in the configuration, Re:sim makes the log file during the simulation run.

The sample setting of the configuration is shown below.

The logfile is csv-format text file of extension vbf.csv.
The sample of the file contents is shown in the next page.

13

In the logfile, the simulation time, traffic signal display data, and agent’s state data are stored in a row.
The details of the row format is given in next page.

14

Log File Row Format:
Time[sec]
FE1~

Reserved for DS-work mode

TS032→

・・・

Traffic Signal Display

16

84

21→

FE4→

R

A/YG

The signal display is 6-bit value, each bits correspond to the state of lights( 0: OFF, 1:ON) as shown in the left figure. For example, when the signal is red, the value is 4.

TS_M
IDStatus

ID: 0 ~ Max agent number

Kind

Status: 0 - not appear, 1 : appear

Accel[m/s2]

Kind: < 100 - vehicle, 100 ≧ pedestrianBrake[m/s2]

Accel : Acceleration in [[m/s2]

Steer[deg]Brake: Deceleration in [m/s2]

X[m]
Y[m]

Steer : Steering-wheel angle in [deg]Agent Data

X, Y : Coordinate of agent position

Yaw[deg]

Yaw : Orientation angle in [deg]V[km/h]V : Speed of agent in [km/h]

WKWK : winker state , 0 - off, 1 - left, 2 - right, 3 - hazard

BL

HL : headlight state, 0 - off, 1 - low beam, 2 - high beam

HLCollision : Flag for collision with other agentCollision

Warp : Flag for position warp (This is for DS-work mode)

Max Agent Number×Agent Data

Warp・・・

It should be noted that this is only a sample, the data outputted to the CSV file can be customized the code by the user.

15