Simulation Data Editor for Re:sim

SEdit
Manual Part 1: Basic Operation
May, 2020
Revised: July, 2020

Misaki design LLC

1

Contents

1. The Graphical User Interface (GUI )4

5. Creating Node and Shaping Lanes

28

1.1 Main Window

5

5.1 Creating Node28

1.2 Control Window

6

5.2 Merging Terminal Nodes

34

1.3 Object Property Window

7

5.3 Shaping Lanes

35

5.4 Changing Height of Lane-Edge

37

5.5 Changing Speed Information of Lanes

39

5.6 Duplicate Selected Nodes and Lanes

42

2. Basic Mouse and Keyboard Operation

9

2.1 Normal Mouse Operation

9

2.2 Popup Menus

10

2.3 Road Object Selection

11

2.4 Road Object Move and Rotation

16

2.5 Add Traffic Signal and Stop Line to Node21

6. Traffic Signals

3. System Setting

22

4. Use Map Image File

24

44

2

7. Route and Traffic Volume Setting

45

7.1 Origin and Destination Node45

7.2 OD & Route Editor

46

7.3 Add Route Data47

7.4 Traffic Volume

53

8. Pedestrian Lanes

54

8.1 Creating pedestrian lanes

54

8.2 Changing pedestrian lane property

55

8.3 Traffic Volume of Pedestrian57

9. Output Re:sim Simulation Data Files

58

3

1. The Graphical User Interface (GUI )The GUI of SEdit consists of Main Window and several sub-windows.

Main Window

Control Window

Object Property Window

Console Window41.1 Main Window
Main Window is where you view and edit the simulation data.
The right figure show the visualized sample data available fromhttps://github.com/Reisim/Reisim/tree/master/Resim-Simulation-Sample

Menu bars:

Important

The extension of SEdit data file is .se.txt, the text file of original format.

The Tool Menu is used to show the dialogs for managing map-image file,
making re:sim simulation data files, re:sim config file, and setting of Sedit. The
detail of these dialogs is explained later, at this stage, the relationship between
re:sim simulation data file and config file is illustrated as follow.
Config file

Important*.rc.txt

simulation data
Scenario file*.rs.txt

Road data file*.rr.txt
Traffic Signal data file*.ts.txt

5

1.2 Control Window
Control Window provides control of view and edit functionality of Main Window.
The meanings of each items are almost clear, except some items like Lane List, Related Lanes, etc.
Detail of such items will be explained when it is necessary.

The main elements to express road network data in SEdit is the Node, Lane, Traffic Signal, Stop Line, andPedestrian Lane. They are illustrated as the figure below.

Lane

Traffic Signal

Node

Stop Line

Important

The Node is the abstraction of the intersection, to represent road network.
Actual road shape is given by the Lanes, which correspond to the center of road lanes.

The Lanes are referenced by steering control of driver-agent in Re:sim to calculate the deviation of
the vehicle, so that the lanes should be given inside the intersection.

6

1.3 Object Property Window
Object Property Window show the data of selected road object.
Some data can be set on this window.
The content displayed in this window will different from the kind of selected road object as follows.

78

2. Basic Mouse and Keyboard Operation
2.1 Normal Mouse Operation
Normal mouse operation is show below. With the “SHIFT” modifier, speed of move and scaling will be larger.

Move

RotateScaling92.2 Popup Menus
Popup Menus can be shown by “ALT” modifier + alphabet key operation as follows.
Important

The popup menus would not be shown if any road object is selected. In that case, press “ESC” to release the selection before try again.

“ALT” + ‘n’ : show menus to create Node and pedestrian lane

“ALT” + ‘u’ : show Utility menus to calculate necessary information“ALT” + ‘s’ : show menus to search road objects

102.3 Road Object Selection
Important

The selection of road object is done by a left click of mouse with the “CTRL” key pressed.
Multiple selection is possible, which means sequential selection of the road object by a left click with the “CTRL”+”SHIFT” key pressed.
To deselect the road object, “CTRL” + left click the object again.
If “ESC” is pressed, all the selection is cleared.
If the state of the checkbox of the control window is off, the object is not selected by the left click. See the right figures.

To select the road object, where to click is important.
The following sections shows the tips for the object selection.

Node:
Click near center of the node ( yellow circle of left figure below ).
If the node is selected, the thickness of the circle is increased.

The object becomes unselectable
if the checkbox is unchecked.

11For the node, the “Area” selection is supported.
“CTRL” + mouse wheel-button drag will draw a rectangle, and the nodes inside of the Area can be selected.
This function is intended to use with “Duplicate Selected Nodes and Lanes” of Utility menu, see Section 5.6 for more detail.

“CTRL” + mouse wheel-button drag12

Lane:To select the lane, click around middle of the lane.
If the lane is selected, the color of the lane is changed as shown in the right figure below.

Lane-Edge

Lane-Edge:
The lane-edge is also selectable to reshape the lane.
To select the lane-edge, click around the lane edge.
If the lane-edge is selected, the green point is drawn at the selected lane-edge as shown in the right figure below.

13

Traffic Signal:
To select the traffic signal, click around the center of traffic signal.

If the traffic signal is selected, the size of the traffic signal become larger as shown in the right figure below.

Stop Line:To select the stop line, click around the edge of the stop line.
If the stop line is selected, the thickness of the line is increased.

14

Pedestrian Lane:
The pedestrian lane consists connected multiple lines.

Thus the selection of pedestrian lane have two option, one is the selection of all lines of the pedestrian lane and the other is the selection of one line from the member of pedestrian lane.
To select the whole lines as the pedestrian lane, click around the middle of the lines.
If the clicked point is near start point of the line, only the line of the pedestrian lane is selected as shown in right figure.
The selected pedestrian lane turn tolight blue color( all lines of the lane).

The selected line turn to violet color.

15

2.4 Road Object Move and Rotation
The selected road object can be moved or rotated.
Press “ALT” modifier and then drag the mouse.
The left click will move the object, and the right click will rotate the object.
The undo function has not fully supported yet.

Node:
The selected node and related lanes, traffic signals, stop lines are moved or rotated together.

“ALT” +

Move

“ALT” +

Rotate16

Lane:For the lane, only move function is supported.

“ALT” +

Move17

Lane-Edge:
For the lane-edge. move and rotate function is both supported.

“ALT” +

Move

“ALT” +

Rotate18

Traffic Signal:
For the traffic signal, only move function is supported.

“ALT” +

Move

19

Stop Line:For the stop line. move and length-adjustment functions are assigned with mouse operation.

“ALT” +

Move

“ALT” +

RotateImportant

The blue small point represent the cross point of the stop line and the lane.
If no blue small point is drawn, the stop line is not associated with the lane,
and the Re:sim driver agents can not determine where to stop at
intersection, thus they will ignore the traffic signal.

20

2.5 Add Traffic Signal and Stop Line to Node
To add traffic signal and stop line to the selected node, firstly the direction of node should be assigned by pressing number button.
The number of the button - 1 is the leg ID to be assigned.
Then mouse wheel button click to show popup menu to create traffic signals or stop line and select the command.
Select the node.

Press ‘1’ key to select leg ID = 0.

Click wheel button of mouse to show popup menu.

Mouse wheel
button click

Following is the result of selecting “Traffic Signal for Vehicle”

21

3. System Setting
Before starting making simulation data, the system setting should be checked.
From the tool menu, select “Show Setting Dialog”, then the dialog will be shown.

Currently, there are not so much items to be set.

22

Traffic Direction:

Select Left-Hand or Right-Hand
Use Relative Path:
This is the option to use relative path to the files, that will be written in SEdit data file and thesimulation data files.
The relative path option is useful when you move the data to different directory.
Vehicle Kind:

The vehicle category and its representative size is defined.
It should be noted that the such data as traffic volume and route selection are given to each vehicle
kinds defined here.
The name of category and subcategory are arbitrary, not used in the Re:sim simulation logic.
Pedestrian Kind;
The pedestrian category and its representative size is defined.

The motorcycle is classified as vehicle kind, on the other hand, bicycle is classified as pedestriankind in Re:sim.
The difference of vehicle kind and pedestrian kind in Re:sim is:vehicle kind:

move along lanes

pedestrian kind: move along pedestrian lanes

23

4. Use Map Image File
SEdit can draw 2D image by reading image files of jpg, png format, which is used as the reference to make the road data.
Important

This is an option / support function to make it easy to shape the road data.
Not always required to read image files.

From the tool menu, select “Show Map Image Dialog”, then the dialog will be shown.

24

Press “Add” button to select the image file to read.
Current version of SEdit, “From File” function has not been implemented yet.

25

The position, rotation and scale of the image can be changed by the dialog shown by pressing “Edit” button.
If the adequate values are set, press “Accept” button of the dialog.
If the “Cancel” button of the dialog is pressed, the change of values will be discarded.

26

To insert many image files, you can use csv file.
The following figure shows an example of such csv file.

The columns of the file should be:
image filename, x-coordinate of the center of the image, y-coordinate of the center of the image, scaling factor
The rotation of the image is set 0.0.

27

5. Creating Node and Shaping Lanes
The main task of making road data consists of two part: creating node and shaping lanes.

5.1 Creating NodePopup menu:

To create node, click on the map where you want to make the node and show popup menu
by “ALT” + ‘n’, and select the type of the node to be created.

The most flexible way to create node is to select “Show Create Node Dialog”.

Create Node Dialog:

28

Following is the procedure to create a node using “Create Node Dialog”.
1. Determine number of in- and out-lane for each node legs.
Important

Node leg ID is started from 0, counter-clockwise.
For non-signalized 3-leg intersection, node leg ID = 1 means it is the yielding lane.

2. Determine to create turn lane for each legs.
3. If turn restriction exist, set allowed leg IDs go from that leg.

Example 1:
in-Lane = 2
Leg ID = 2
out-Lane = 3

out-Lane = 0
Leg ID = 1
in-Lane = 2

out-Lane = 2
in-Lane = 2 Leg ID = 0

no turn lane, no turn restriction

29

The node shown below is created.

Click twice (not double-click) to select all connected
node to move together.

Rotate the node.

“ALT” + right drag

“CTRL” + left click Twice

Select the Lane to remove.

Delete selected Lane by “ALT” + “Delete”.

Select Lanes to merge by “CTRL”+”SHIFT”+left click.

②“ALT” + ‘Delete’“CTRL”+”SHIFT”+left click①

30

Merge lanes by “ALT” + ‘m’

Select other lanes to merge by “CTRL”+”SHIFT”+left click.

②“ALT” + ‘m’“CTRL”+”SHIFT”+left click①

Adjust lanes, traffic signals, and stop lines position.

Important

To merge lanes, select lanes in order that vehicle moves.

31

Example 2:
turn restriction:
allowed leg = 2
out-Lane = 3

in-Lane = ３
Leg ID = 0

Leg ID = 2

out-Lane = 3

in-Lane = ３
turn restriction:
allowed leg = 01

in-Lane = 1
turn restriction:
allowed leg = 0

out-Lane = 1

Leg ID = 1

Important

The node shown below is created.

Select all nodes by left click twice the created 3-leg node andRotate.

Allowed leg data in turn restriction ishandled as string type, not integer.
Thus the data 01 means leg 0 and leg 1.

32

Example 3:

in-Lane = ３ turn restriction:
allowed leg = 01
Leg ID = 2
out-Lane = 1
out-Lane = 3
Leg ID = 1
in-Lane = 0

in-Lane = 1
Leg ID = 3
out-Lane = 0

out-Lane = 3
Leg ID = 0

in-Lane = 4
turn restriction: turn lane
allowed leg = 12

Important

In-Lane Number is counted at stop lineor entrance of intersection.

The node shown below is created.

Adjust lanes, traffic signals, and stop lines position.

33

5.2 Merging Terminal Nodes
The terminal node is the node that has only one leg.
The two terminal nodes can be merged by “ALT”+’m’ operation if those in-lane number and out-lane number are the same.
The order of the terminal node selection is not involved.

Terminal Node(Only 1-Leg)“ALT” + ‘m’“CTRL”+”SHIFT”+left click34

5.3 Shaping Lanes
The lane can be divided into two lanes.
By this operation, new lane edge is created at middle of the original lane.
You can move and rotate this lane-edge to fit to the road lane shape.

Select the lane to divide.

Press “ALT” + ‘d’ and new lane-edge appear at middleof selected lane.

Select created lane-edge and move, rotate the edge to fit
to road lane.

35

The other way to divide the lane is to use “ALT” + wheel-button drag.
The white line appears with this operation, and the lane is divided into two lanes at the cut point as shown below.
The multiple lanes can be divided by this function.

“ALT” + mouse wheel-button drag36

5.4 Changing Height of Lane-Edge

The height of the lane-edge can be changed by “ALT”+”SHIFT”+left drag operation.

Select the lane-edges to be changed their height .

Important“ALT”+”SHIFT”+left drag operation changes height of the lane-edges.

The selection of lane-edge is done by using their X and Y coordinate.
If the height is set, which means Z value is not 0, it is easy to select the lane-edge with Orthogonal View Mode.

37

End Point(x, y, z, f)Start Point(x, y, z, f)

You can directory assign the height data in the road object property of the lane.
The units are [m] and [deg] for coordinate values and tangential direction.
Important

The “Update Lane Shape” button should be pressed to reflect the changeof values of coordinates and angles.

38

5.5 Changing Speed Information of Lanes

The speed information should be given to the lane.
By selecting the lane, speed information is shown in the object property window as shown in the right figure.

Important

There are two speed information; Speed Limit and Actual Speed.
The driver agents of Re:sim use Actual Speed to determine their target speed.
It should be noted that the target speed varies among driver agents, randomly selected fromthe probability distribution whose parameter is calculated using the Actual Speed.
Speed Limit is provided for such purpose as kind of speed warning system and automatic

driving vehicle implementation by customizing Re:sim.

39

To set Speed Limit or Actual Speed to multiple lanes at the same time, show utility popup menu and select “Change Speed Limit of Selected Lanes” or“Change Actual Speed of Selected Lanes”

Then, the small dialog to input speed value will appear and set the value and press “OK” to apply.

Select the lanes to change speed information.

Press “ALT”+’u’ key to popup Utility menu and selectthe command.

The dialog to input speed information appears.

“ALT” + ‘u’

40Speed information can be visualized by checking “Colored by Speed Limit” or “Colored by Actual Speed” in Control Window.

“Colored by Speed Limit”“Colored by Actual Speed”

41

5.6 Duplicate Selected Nodes and Lanes
The duplication of selected nodes( and their related lanes) can be made using “Duplicate Selected Nodes and Lanes” function in Utility menu.
The procedure is as follows.

Step 1. Select the nodes to duplicate

Step 2. Show Utility menu by “ALT” + ‘u’ and execute “Duplicate Selected Nodes and Lanes.”

If the selection of duplicated nodes and lanes are released by mistake, use “Area” selection by“CTRL” + wheel-button drag.

42

Step 3. Move resultant nodes and lanes to proper location.

43

6. Traffic Signals
The signal display information of the traffic signal is set in object property window.

The meanings of the abbreviations are as followings:
G:

Green signal

A/Y :Amber or Yellow signal

R:

Red signal<:

Left arrow signal^:

Straight arrow signal>:

Right arrow signal

Start Offset is used to determine the signal display when simulation starts.
The traffic signal with the left setting firstly shows red signal for 72[s] when simulation starts as shown below.
144
55

3

10

2

74

→
Start Offset = 72
Signal display starts here
Important“Apply Data” button should be pressed when the data is changed, unless the changes
will be discarded when the different data is display in object property window.

447. Route and Traffic Volume Setting
The route means the list of nodes from the origin node to the destination node.
First procedure to set the route is to make the node Origin and/or Destination in the object property window.

7.1 Origin and Destination NodeSelect the node and check “Origin Node” and/or “Destination Node” in the object property window as shown in the left figure.
If the node is the Origin node, red circle is shown to normal green circle of the node.
If the node is the Destination node, yellow circle is displayed.

OriginDestination

45

7.2 OD & Route Editor
If the selected node is the Origin node, the “OD & Route Editor” window is shown.
With this editor, route to the destination node and the traffic volume( given by [number of vehicle / hour] ) can be set.

Important“Apply Changes” button should be pressed when the data is changed, unless thechanges will be discarded when the different data is display in OD & Route Editor.

46

7.3 Add Route Data
Select the destination Node and Push “Add” button.

Selected Destination Node
(Filled with Green Color)

Selected Origin Node47

Enter node-pick mode for route setting.

Pick the node with “CTRL” modifier pressed.

Pick the nodes in order.

“CTRL” + left click

Finally pick the destination node, then the nodepick mode ends.

Node list from origin to destination is displayed in
the table. Push “Apply Change” button.

The Lane-list to the destination is calculated andshown by different color.

48

In this sample road, lane-change should be done once to reach destination by its lane structure.
Therefore, two lane lists are shown.
Re:sim driver agents can handle this information and change lane automatically.

49

Important

If you pick inadequate node, that is, the node is not connected to the previous node, then the red line is drawn.
Reselect the node will remove the node from the list, then pick correct node.

Inadequate
node picked

picked again
to remove
Invalid RouteNode skipped

50

Important

If you pick the destination node and the node list is invalid, following message is displayed.
Remove the last node list element by reselection and fix the node list or press “ESC” key to exit from node-pick mode.

51

More than two routes to the destination can be set.
Since the traffic volume is provided by each route, selection of the route do not appear in Re:sim.

52

7.4 Traffic Volume
As mentioned, the traffic volume data should be provided for each route.
Concretely, the number of vehicle appears in one hour is assigned for each vehicle kind defined in the setting dialog.
The time interval of vehicle appearance is calculated in Re:sim based on random selection from Exponential distribution.
The expected vehicle appearance interval would be 3600 /[total number of vehicle appear in one hour] sec.

53

8. Pedestrian Lanes
8.1 Creating pedestrian lanes
To create the pedestrian lanes, select “Pedest Lane” from create popup menu shown by “ALT”+’n’ key.
Select “Pedest Lane”.

Click the point on the map to define pedestrian lane.

Left click

Press “ESC” to end.

Left click

Start

Left click“ALT” + ‘n’

Left click

Important

Left click“CTRL” modifier is NOT necessary to
pick the point on the map to definepedestrian lane.

Important

The pedestrian lane is one-way. You
should define two pedestrian lanes,e.g., to let pedestrian walk on the
crosswalk from both direction.

54

8.2 Changing pedestrian lane property
The main properties that pedestrian lane hold are the width of the section and “Cross Walk” flag.
The section is the number assigned to the line segment of the pedestrian lane.
The Run-out probability and Run-out Direct has not been supported in Re:sim yet.

Section 6

Section 0

Section 1

Section 5

Section 4

Section 2
Section 3

Important“Apply” button should be pressed to reflect thechange of the data. Otherwise it would be lost.

55

The “Cross Walk” section is drawn different color as shown below.
Beside, corresponding traffic signal for pedestrian is assigned and shown in the object property window if it exist.

56

8.3 Traffic Volume of Pedestrian
The traffic volume data for pedestrian should be provided for each pedestrian lanes.
The number of pedestrian appears in one hour is assigned for each pedestrian kind defined in the setting dialog.
The time interval of pedestrian appearance is calculated in Re:sim based on random selection from Exponential distribution.

57

9. Output Re:sim Simulation Data Files

After all simulation data has been set, Re:sim simulation data files is created by following step.

Select Tool menu “Show Re:sim Files Output Dialog”

Set Output filename and folder and push “Output” button.

Important

Check created files.

You can assign SEdit Scenario data file here if you need it.
See “SEdit-Manual-Part2-Scenario_Data_Setting.pdf” for more detail.

Important

If “Only File Name” is checked, the path to the road data andtraffic signal data files described in scenario file are omitted.
This is convenient for the case these three files are in thesame directory and that directory will be moved frequently.

58