celeration value from a virtual steering wheel (and
virtual acceleration pedal and brake) in a VM. The
driving simulator calculates its direction and veloc-
ity from the rotation angle and acceleration value re-
ceived, and sends them to the 3D map simulator to up-
date the vehicle’s location. Developers of self-driving
AI can execute any task they develop in a VM, their
own AI, and any libraries and runtimes. In Figure 1,
ROS (Quigley et al., 2009) is used at the runtime en-
vironment in a VM.
Figure 1: VM-based simulation environment.
The data transaction in the suggested type of self-
driving simulation has ”geographical locality”. The
geographical locality of a data transaction means that
the data transaction often occurs between objects that
are geographically close to each other in a simulation.
In the case of a traffic simulation that has two self-
driving vehicles that are about to encounter each other
at a blind corner, they would perform a data transac-
tion via a wireless ad hoc network to avoid a traffic
accident. At the point of computation, VMs that are
geographically close to each other in the simulation
should be placed on a same physical machine to elim-
inate the data transaction over a physical network in a
data center, otherwise network congestion would oc-
cur.
Figure 2 shows the VM deployment mechanism in
our environment(Kohiga and Shinoda, 2020). The left
side of the figure describes a traffic simulation, and
the right side describes a simulation cloud. In this
example, the simulation map is separated into sev-
eral segments and, at least one physical machine is
assigned to each segment of the map. A VM repre-
sents a self-driving vehicle.
For example, in Figure 2, there are two vehicles in
Area #1 and the Physical Machine 1(PM1) is assigned
to Area#1. Two VMs are executed on PM1. If a self-
driving vehicle moves over the boundary of the two
areas, the VM representing this self-driving vehicle
moves to another physical machine. In the case of
Figure 2, when a self-driving vehicle in Area#1 moves
to Area#2, the VM that represents its vehicle on PM1
also moves to PM2.
VM
(vehicle #1)
Area#1 Area#2
Area#3
Area#4
map
PM3
(Area #3)
PM1
(Area #1)
VM
(vehicle #1)
PM4
(Area #4)
PM2
(Area#2)
VM
(train #1)
VM
(vehicle #3)
VM
(vehicle #1)
VM
(vehicle #4)
(“PM” stands for “Physical Machine”)
Figure 2: Division of the simulation map into several areas
and assignment of them to each physical machine.
Our simulation environment has more scalability
and flexibility, compared with the previous works.
2 CHALLENGES
The biggest problem in our simulation environment is
how to maintain real-time processing when there are
several spontaneous increases of VMs in one segment
described in Figure 2.
The simulation clock synchronization of all simu-
lation objects is the most important task in a loosely
coupled simulation environment. All simulation ob-
jects must maintain a simulation clock that is syn-
chronized with the others, otherwise the simulation
would lose credibility. In the case of a traffic simu-
lation, a car crash that should occur does not occur
because of the clock skew. Several techniques exist
for the synchronization of the clock in an agent-based
simulation. The most obvious technique is to have
“global virtual time” (GVT) (Fujimoto, 2001). GVT
is a clock system that is shared by all processing ob-
jects that appear in a simulation. Once GVT is set, all
processes should obey this time.
There is a case in which the lack of CPUs spon-
taneously occurs during a simulation in our environ-
ment. Figure 3 shows a typical case in which a part
of the simulation in a VM is delayed. The left side
of the figure describes a simulation map and vehicles.
The right side of the figure describes task scheduling
with a timeline. We explained the deployment mech-
anism of our simulation environment in Figure 2. As
the simulation proceeds, the number of vehicles in an
area varies. At a certain moment, a number of vehi-
cles exceeds a number of CPUs assigned in the seg-
ment. There are four vehicles on the left-hand side
of the figure; hence, four VMs should be executed on
the physical machine assigned to this segment. This
physical machine has only two CPUs; hence, the ex-
ecution of these VMs are delayed because of the lack
of a CPU. In this case, the time lapse is twice as fast
as that for the clock inside the VMs (when the real
clock is T = 2, the VMs execute task A and task B at
SIMULTECH 2023 - 13th International Conference on Simulation and Modeling Methodologies, Technologies and Applications
288