<< ispure MaxPlusAndPetrinet lightsguiext >>

MaxPlusAndPetrinet >> MaxPlusAndPetrinet > lightsgui

lightsgui

Traffic lights simulation in intersection

Calling Sequence

lightsgui(data,wsim,indlampu)

Parameters

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.
indlampu
: Vector represents indices of lanes whose it's traffic light is simulated.

Description

This function is used for traffic lights simulation in some lanes of intersection. This function has three inputs, that is a matrix that contains information needed to run the simulation, a scalar that represents simulation time and a vector represents indices of lanes whose it's traffic lights is simulated. The input matrix is denoted by data and has exactly 9 column. Every column contains same information. The information stored in every column can be seen in intersection. This function has no output.

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

lightsgui(data,wsim,1:2); // run the simulation

Authors

See Also


Report an issue
<< ispure MaxPlusAndPetrinet lightsguiext >>