Support Topics
 Support topics UC-win/Road

Methods for measuring traffic volume

Maintenance and support service related information

This time, we will introduce how to measure traffic volume using UC-win/Road. While it is possible to measure the number of vehicles by analyzing logs, here we will introduce a method that uses user variables in scenarios to obtain this information, rather than analyzing logs. Regarding pedestrian flow, we will introduce a method for measuring density and flow rate using logs.

About user variables in the scenario

User variables can be modified at any time using the "event" feature within a scenario. There are 512 user variable arrays available for use in scenarios, ranging from 0 to 511.

To set user variables, open the "User Variables" tab in the edit screen for "Events," and then select a command. The commands available include the default "Do nothing," as well as "Assign" or "Clear."


Figure 1: "Scenario" - "Edit Event" - "User Variable" tab

In the "assignment" function, it assigns the specified value to the elements of an array where a checkmark has been placed.

In addition to setting specific values, it is also possible to perform operations such as adding to, multiplying by, or assigning random numbers to the specified value

"Clear" sets all values in the array to "0" during the execution of that event.

Please note that user variables can be confirmed by examining the output log data.


Counting using user-defined variables

1. (Preparation) A judging model is placed beneath the road surface at the designated passing point

2. (Preparation) Set the log output options

3. Scenario start

4. When a vehicle passes over Model 1, it is determined to have collided with the model

5. Determine the end of collision (passage completion) for object 3

6. Add 1 to the user variable

7. Repeat steps 4 through 6

8. The scenario ended with "stop," and I checked the logs

Now, let's take a look at the details of the settings.


>> 1. (Preparation) A judging model is placed beneath the road surface at the designated passing point

・Place the evaluation models at the measurement locations. You can use descriptive names to identify the locations and place multiple models. If you don't want the models to be visible, place them underground.

The judgment model will be marked with a checkmark under the "Control Target" category.


Figure 2 shows an example of a judgment model placed beneath the stop line

For the passing judgment, a thin plate-shaped model is used. It needs to be thinner than the inter-vehicle distance when stopped. Existing models can be used, but the UC-win/Road's new building model creation function allows you to create models of appropriate sizes that conform to lane widths and other specifications.


Figure 3: Newly added building models Figure 4: Example of creating a judgment model

>> 2. (Preparation) Set the log output options

・Menu: "Driving Simulation" - (Log Output) In the "Options" section, check the box next to "Vehicle Being Driven" under the log content options. Select the output items, set the log output interval, and if necessary, specify a radius centered around the camera position for outputting surrounding moving objects.


Figure 5: Configuring log output options

>> Scenario setting

To add a scenario, you will create a new one


No

Events

Editing

Transition

1

init

・"Start walking"
Starting point: Off-road location
・Extension "Log":
「Start Logs」
・User variable: var0
Allocation: "0"

・Go to "wait"
・Time > 0 seconds
・Event completion

2

wait

・None

・to over
・Collision: Regarding the evaluation model and..
If all traffic models were to collide in 2 dimensions
・Event completion

3

over

・None

・Go to "count"
・Collision: Regarding the evaluation model and..
If all traffic models become 2-dimensional and non-collision-based
・Event completion

4

count

・User variable: var0
Allocation: Add "1"

・Go to "wait"
・Time > 0.2 seconds
・Event completion


Figure 6: Configuration of the collision model for scenarios

User variables are output when the "type" of an output item is set to "uv" (own vehicle), so some form of driving or walking setting is required. If driving is not necessary, place a "off-road" start point near the measurement location, and in the scenario, configure it to "start walking" from that point; this will cause the user variable to be output to the file (without actually walking, just observing).


Figure 7: Example of user variable output within a log file

Figure 8: "Scenario" - "User Simulation" - "Start Walking"

Figure 9: An illustration of how to set up a scenario

Pedestrian flow simulation

Regarding pedestrian flow, it is possible to measure this using a logging output function. We can measure the flow density, which indicates how many pedestrians are present on a particular path within the pedestrian network, and the flow rate, which indicates how many pedestrians pass through that path.

For information on configuring the pedestrian network, please refer to past support topics: VR (Up&Coming issue 133).


● Measurement of fluid density and flow rate

The following procedure allows you to obtain pedestrian flow density and flow rate without using any predefined scenarios.


<Preparation for Measurement>

1. In the "Driving Simulation" menu, under "Options," check the boxes for "Pedestrian Density" and "Pedestrian Traffic."

2. In the "Select Output Items" section, confirm that pedestriansNumber, density, surface, and averageFlux are selected for output.


<Preparation for measuring fluid density>

1. From the "Edit" menu, select "Library," and then from the model panel, choose "New" followed by "Fluid Density Measurement Range."


Figure 10: Model panel "New Creation" - "Fluid Density Measurement Range"

2. Measurement objects will be added to the model panel.

3. With an object selected, click on the desired location in the scene to perform a measurement and place it there. When you click, you can adjust the width and depth of the flow density measurement range.


Figure 11: Setting the measurement range for fluid density

<Preparation for flow rate measurement>

1. From the model panel, select "New" and then "Flow Rate Measurement Range."

2. Measurement objects will be added to the model panel.

3. With an object selected, click on the desired location within the scene to perform measurements and place the object there.


<Measurement Execution>

1. Menu: "Driving Simulation" - (Log Output) Click "Start" to begin log output.

2. To start a traffic simulation, select "Home" from the menu and then click on "Start Traffic Flow."

3. By clicking the "Finish" button in the log output section, the fluid density logging process will end, and the results will be saved as a CSV file in the specified folder.

Output destination: [User data folder]\Log (default: C:\UCwinRoad Data 15.n\Log)

Output file name: LOG_yyyymmddhhmmss_.....csv


Output

Unit

Content

time

Seconds

Simulation start time

type

md: pedestrian density
mf: pedestrian traffic volume

pedestrians
Number

People

When the material type is set to "md" (density), measure the configured flow density
Number of pedestrians within the surveyed area
When the flow rate (Type) is mf, this indicates the number of pedestrians passing through the measurement area

density

People per square meter

The flow density when the type is md (density)

surface

㎡

Area of the measurement surface for pedestrian density

averageFlux

People per second

When the type is mf (flow rate), it refers to the amount that passes through per unit time
Number of pedestrians (flow rate)


Scenario plugins are included in the Advanced, Driving Sim, and Ultimate versions.

The Log export plugin is included with Driving Sim and Ultimate.

Each plugin can be purchased separately as an add-on.


(Featured in the Spring issue of Up&Coming '22)

FORUM8
<br class="sp_br">

LOADING