
201Tutorial on Random Number Generators in Discrete Event Simulators
7.5.2 example: a simple ranDom Walk
Listing 10 simulates a simple random walk model that illustrates the simplicity of the SimPy simu-
lation framework. Although the example does not cover most of the features of SimPy, it provides
a gentle introduction to the SimPy beginners. Please note that for the sake of simplicity, the object-
oriented paradigm (OOP) was not followed in these examples. However, one should adhere to the
OOP in order to model more complex scenarios.
Suppose a node (i.e., any object) can move either right or left. At each move, it covers random
units of dista ...