<< lightsgui Min-Max-Plus And Petrinet lightsimulation >>

Min-Max-Plus And Petrinet >> Min-Max-Plus And Petrinet > lightsguiext

lightsguiext

Traffic lights simulation in intersection

Calling Sequence

lightsguiext(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 8 column. Every column contains same information. The information stored in every column can be seen in intersectionext. This function has no output.

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

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

Authors

See Also


Report an issue
<< lightsgui Min-Max-Plus And Petrinet lightsimulation >>