<< intersection MaxPlusAndPetrinet intersectiongui >>

MaxPlusAndPetrinet >> MaxPlusAndPetrinet > intersectionext

intersectionext

Simulation in intersection

Calling Sequence

pgn = intersectionext(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 8 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 = [5 3;5 3]; // mean departure when green and yellow lights turned on

sigma2 = [2 1;2 1]; // variance departure when green and yellow lights turned on

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

dmaks = [4;4]; // maximum arrival at every lanes

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

wsim = 13; // simulation time

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

Authors

See Also


Report an issue
<< intersection MaxPlusAndPetrinet intersectiongui >>