<< generalscheduling MaxPlusAndPetrinet intersectionext >>

MaxPlusAndPetrinet >> MaxPlusAndPetrinet > intersection

intersection

Simulation in intersection

Calling Sequence

pgn = intersection(data,wsim)

Parameters

pgn
: Matrix that has rows equal with number of lanes in intersection and its column equal with simulation time.
data
: Matrix that contains information needed to run the simulation. This matrix has exactly 9 column and number of rows equal with number of lanes in intersection.
wsim
: Scalar represents simulation time.

Description

This function is used to simulate number of vehicle in every lanes of intersection. This function has two inputs, that is a matrix that contains information needed to run the simulation and a scalar that represents simulation time. The input matrix is denoted by data and has exactly 9 column. Every column contains same information. This is the information stored in every column of that matrix.

The output of this function is also a matrix. The number of rows equal with number of lanes in intersection. Number of columns of this matrix represents the simulation time. The element of this matrix is nonnegative integer that represents number of vehicle at every lanes in every time.

Examples

x0 = [15;15]; // initial condition

mu = [2 5 3;2 5 3]; // mean arrival, green and yellow lights

sigma2 = [1 2 1;1 2 1]; // variance arrival, green and yellow lights

maks = [6 4;6 4]; // maximum green and yellow lights turn on

data = [x0 mu sigma2 maks]; // collecting information

wsim = 13; // simulation time

pgn = intersection(data,wsim) // run the simulation

Authors

See Also


Report an issue
<< generalscheduling MaxPlusAndPetrinet intersectionext >>