Microscopic Traffic Simulator
|
Class representing cellular topology. More...
Public Member Functions | |||
CellularTopology (GeometricTopology geometricTopology, Parameters parameters) | |||
Constructor when the cellular topology is build and simulation is initialized. More... | |||
TimeSpan | GetTimeToNextAction (Random random) | ||
Method for getting the time to performing the next transition function. More... | |||
void | PerformAction (Random random) | ||
Method for performing transition function. More... | |||
void | Run (int?seed=null) | ||
Runs simulation.
| |||
void | StepForward (int?seed=null) | ||
Perform step in simulation.
| |||
void | Stop () | ||
Stops simulation. More... | |||
void | Pause () | ||
Pauses simulation. More... | |||
void | Dispose () | ||
Disposes cellular topology resources. More... | |||
Protected Member Functions | |
virtual void | Dispose (bool disposing) |
Dispose disposable fields. More... | |
Properties | |
CarsManager | CarsManager [get] |
Cars manager reference. More... | |
GeneratorsManager | GeneratorsManager [get] |
Generators manager reference. More... | |
GpsRecordsManager | GpsRecordsManager [get] |
Gps records manager reference. More... | |
Simulation | Simulation [get] |
Simulation object which controls the simulation on the cellular topology. More... | |
Mutex | CarsDictionariesMutex [get] |
Mutex ensuring that cars are not rendering when the transition function is performing and vice versa. More... | |
ulong | SimulationSteps [get] |
Number of simulation steps performed. More... | |
ulong | SimulationStepsToPause [get, set] |
Number of simulation steps after which the simulation control pauses simulation. More... | |
int | Priority [get] |
Cellular topology priority as the simulation action generator. More... | |
bool | IsPauseScheduled [get] |
Checks if the number of simulation steps is higher than the number of simulation steps to pause. More... | |
Parameters | Parameters [get] |
Reference to simulation parameters. More... | |
![]() | |
bool | IsPauseScheduled [get] |
Check whether the simulation action generator has the pause scheduled. More... | |
int | Priority [get] |
Priority determining the rank of the events which have the same time. More... | |
Events | |
EventHandler | SimulationStepsChanged |
Event handler of change of number of simulation steps. More... | |
EventHandler< DateTimeEventArgs > | NextTransitionFunctionStarted |
Event informing that next transition function already started. More... | |
Class representing cellular topology.
Definition at line 16 of file CellularTopology.cs.
Microscopic_Traffic_Simulator___Model.CellularTopologyObjects.CellularTopology.CellularTopology | ( | GeometricTopology | geometricTopology, |
Parameters | parameters | ||
) |
Constructor when the cellular topology is build and simulation is initialized.
geometricTopology | Geometric topology which the cellular topology is build from. |
parameters | Reference to simulation parameters. |
Definition at line 140 of file CellularTopology.cs.
|
protectedvirtual |
Dispose disposable fields.
disposing | Flag indicating whether to release managed resources. |
Definition at line 342 of file CellularTopology.cs.
void Microscopic_Traffic_Simulator___Model.CellularTopologyObjects.CellularTopology.Dispose | ( | ) |
Disposes cellular topology resources.
Definition at line 362 of file CellularTopology.cs.
TimeSpan Microscopic_Traffic_Simulator___Model.CellularTopologyObjects.CellularTopology.GetTimeToNextAction | ( | Random | random | ) |
Method for getting the time to performing the next transition function.
random | Random instance which is not used. |
Implements Microscopic_Traffic_Simulator___Model.SimulationControl.ISimulationEventsGenerator.
Definition at line 197 of file CellularTopology.cs.
void Microscopic_Traffic_Simulator___Model.CellularTopologyObjects.CellularTopology.Pause | ( | ) |
Pauses simulation.
Definition at line 323 of file CellularTopology.cs.
void Microscopic_Traffic_Simulator___Model.CellularTopologyObjects.CellularTopology.PerformAction | ( | Random | random | ) |
Method for performing transition function.
random | Random instance which is used by cars to perform their transition function. |
Implements Microscopic_Traffic_Simulator___Model.SimulationControl.ISimulationEventsGenerator.
Definition at line 214 of file CellularTopology.cs.
void Microscopic_Traffic_Simulator___Model.CellularTopologyObjects.CellularTopology.Run | ( | int? | seed = null | ) |
Runs simulation.
seed | Seed to be used in the simulation. |
Definition at line 289 of file CellularTopology.cs.
void Microscopic_Traffic_Simulator___Model.CellularTopologyObjects.CellularTopology.StepForward | ( | int? | seed = null | ) |
Perform step in simulation.
seed | Seed to be used in the simulation. |
Definition at line 299 of file CellularTopology.cs.
void Microscopic_Traffic_Simulator___Model.CellularTopologyObjects.CellularTopology.Stop | ( | ) |
Stops simulation.
Definition at line 308 of file CellularTopology.cs.
|
get |
Mutex ensuring that cars are not rendering when the transition function is performing and vice versa.
Definition at line 68 of file CellularTopology.cs.
|
get |
Cars manager reference.
Definition at line 25 of file CellularTopology.cs.
|
get |
Generators manager reference.
Definition at line 34 of file CellularTopology.cs.
|
get |
Gps records manager reference.
Definition at line 43 of file CellularTopology.cs.
|
get |
Checks if the number of simulation steps is higher than the number of simulation steps to pause.
Definition at line 123 of file CellularTopology.cs.
|
get |
Reference to simulation parameters.
Definition at line 132 of file CellularTopology.cs.
|
get |
Cellular topology priority as the simulation action generator.
Definition at line 118 of file CellularTopology.cs.
|
get |
Simulation object which controls the simulation on the cellular topology.
Definition at line 52 of file CellularTopology.cs.
|
get |
Number of simulation steps performed.
Definition at line 77 of file CellularTopology.cs.
|
getset |
Number of simulation steps after which the simulation control pauses simulation.
Definition at line 87 of file CellularTopology.cs.
EventHandler<DateTimeEventArgs> Microscopic_Traffic_Simulator___Model.CellularTopologyObjects.CellularTopology.NextTransitionFunctionStarted |
Event informing that next transition function already started.
Definition at line 108 of file CellularTopology.cs.
EventHandler Microscopic_Traffic_Simulator___Model.CellularTopologyObjects.CellularTopology.SimulationStepsChanged |
Event handler of change of number of simulation steps.
Definition at line 103 of file CellularTopology.cs.