Class TrafficManagementCenterUnit
java.lang.Object
org.eclipse.mosaic.fed.application.ambassador.simulation.AbstractSimulationUnit
org.eclipse.mosaic.fed.application.ambassador.simulation.ServerUnit
org.eclipse.mosaic.fed.application.ambassador.simulation.TrafficManagementCenterUnit
- All Implemented Interfaces:
CommunicationModuleOwner
,CellCommunicative
,Routable
,OperatingSystem
,ServerOperatingSystem
,TrafficManagementCenterOperatingSystem
,EventProcessor
public class TrafficManagementCenterUnit
extends ServerUnit
implements TrafficManagementCenterOperatingSystem
This class represents a Traffic Management Center in the application simulator.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.eclipse.mosaic.fed.application.app.api.os.TrafficManagementCenterOperatingSystem
TrafficManagementCenterOperatingSystem.ChangeLaneState
-
Constructor Summary
ConstructorsConstructorDescriptionTrafficManagementCenterUnit
(TmcMapping applicationTmc) Constructor forTrafficManagementCenterUnit
, sets operating system and traffic detectors. -
Method Summary
Modifier and TypeMethodDescriptionchangeLaneState
(String edge, int laneIndex) Provides a facility to change the lane state of the given lane.changeVariableMessageSignState
(String signId, int laneIndex) Provides a facility to change the lane state of a Variable Message Sign (VMS).Returns the lane detector, which provides various measurements, such as traffic flow.Returns the list of mapped induction loop ids.Returns allInductionLoop
s configured for this traffic management center.Returns the lane segment, which provides various measurements, such as density.Returns allLaneAreaDetector
s configured for this traffic management center.Returns the list of mapped lane area detector ids.void
processEvent
(Event event) Processes the given event.Methods inherited from class org.eclipse.mosaic.fed.application.ambassador.simulation.ServerUnit
assembleCamMessage, getChargingStationsInArea, getRoutingModule
Methods inherited from class org.eclipse.mosaic.fed.application.ambassador.simulation.AbstractSimulationUnit
getAdHocModule, getApplications, getApplicationsIterator, getCellModule, getConfigurationPath, getEventManager, getGroup, getId, getInitialPosition, getOsLog, getSimulationTime, loadApplications, preProcessEvent, processSumoTraciMessage, sendInteractionToRti, sendItefLogTuple, sendSumoTraciRequest, setGroup, setUp, tearDown, triggerOnSendMessage
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.eclipse.mosaic.fed.application.app.api.os.modules.CellCommunicative
getCellModule
Methods inherited from interface org.eclipse.mosaic.lib.util.scheduling.EventProcessor
canProcessEvent
Methods inherited from interface org.eclipse.mosaic.fed.application.app.api.os.OperatingSystem
getApplications, getApplicationsIterator, getConfigurationPath, getEventManager, getGroup, getId, getSimulationTime, getSimulationTimeMs, sendInteractionToRti, sendItefLogTuple, sendSumoTraciRequest
Methods inherited from interface org.eclipse.mosaic.fed.application.app.api.os.modules.Routable
getRoutingModule
Methods inherited from interface org.eclipse.mosaic.fed.application.app.api.os.ServerOperatingSystem
getChargingStationsInArea
-
Constructor Details
-
TrafficManagementCenterUnit
Constructor forTrafficManagementCenterUnit
, sets operating system and traffic detectors.- Parameters:
applicationTmc
- the configuration of the tmc including traffic detectors
-
-
Method Details
-
getInductionLoopIds
Returns the list of mapped induction loop ids.- Returns:
- The list of mapped induction loop ids.
-
getLaneAreaIds
Returns the list of mapped lane area detector ids.- Returns:
- The list of mapped lane area detector ids.
-
getInductionLoop
Description copied from interface:TrafficManagementCenterOperatingSystem
Returns the lane detector, which provides various measurements, such as traffic flow.- Specified by:
getInductionLoop
in interfaceTrafficManagementCenterOperatingSystem
- Parameters:
id
- The id of the lane detector- Returns:
- The
InductionLoop
with the given id.
-
getLaneAreaDetector
Description copied from interface:TrafficManagementCenterOperatingSystem
Returns the lane segment, which provides various measurements, such as density.- Specified by:
getLaneAreaDetector
in interfaceTrafficManagementCenterOperatingSystem
- Parameters:
id
- The id of the lane segment.- Returns:
- The
LaneAreaDetector
with the given id.
-
getInductionLoops
Description copied from interface:TrafficManagementCenterOperatingSystem
Returns allInductionLoop
s configured for this traffic management center.- Specified by:
getInductionLoops
in interfaceTrafficManagementCenterOperatingSystem
- Returns:
- A list of all configured
InductionLoop
s.
-
getLaneAreaDetectors
Description copied from interface:TrafficManagementCenterOperatingSystem
Returns allLaneAreaDetector
s configured for this traffic management center.- Specified by:
getLaneAreaDetectors
in interfaceTrafficManagementCenterOperatingSystem
- Returns:
- A list of all configured
LaneAreaDetector
s.
-
changeLaneState
public TrafficManagementCenterOperatingSystem.ChangeLaneState changeLaneState(String edge, int laneIndex) Description copied from interface:TrafficManagementCenterOperatingSystem
Provides a facility to change the lane state of the given lane.- Specified by:
changeLaneState
in interfaceTrafficManagementCenterOperatingSystem
- Parameters:
edge
- The ID of the edge.laneIndex
- The index of the lane (0 = right-most lane).
-
changeVariableMessageSignState
public TrafficManagementCenterOperatingSystem.ChangeLaneState changeVariableMessageSignState(String signId, int laneIndex) Description copied from interface:TrafficManagementCenterOperatingSystem
Provides a facility to change the lane state of a Variable Message Sign (VMS).- Specified by:
changeVariableMessageSignState
in interfaceTrafficManagementCenterOperatingSystem
- Parameters:
signId
- The ID of the sign.laneIndex
- The index of the lane (0 = right-most lane). For speed assignments a negative lane index is allowed, addressing all lanes.
-
processEvent
Description copied from interface:EventProcessor
Processes the given event.- Specified by:
processEvent
in interfaceEventProcessor
- Overrides:
processEvent
in classServerUnit
- Parameters:
event
- the event to process- Throws:
Exception
-