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 allInductionLoops configured for this traffic management center.Returns the lane segment, which provides various measurements, such as density.Returns allLaneAreaDetectors configured for this traffic management center.Returns the list of mapped lane area detector ids.voidprocessEvent(Event event) Processes the given event.Methods inherited from class org.eclipse.mosaic.fed.application.ambassador.simulation.ServerUnit
assembleCamMessage, getChargingStationsInArea, getRoutingModuleMethods 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, triggerOnSendMessageMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.eclipse.mosaic.fed.application.app.api.os.modules.CellCommunicative
getCellModuleMethods inherited from interface org.eclipse.mosaic.lib.util.scheduling.EventProcessor
canProcessEventMethods inherited from interface org.eclipse.mosaic.fed.application.app.api.os.OperatingSystem
getApplications, getApplicationsIterator, getConfigurationPath, getEventManager, getGroup, getId, getSimulationTime, getSimulationTimeMs, sendInteractionToRti, sendItefLogTuple, sendSumoTraciRequestMethods inherited from interface org.eclipse.mosaic.fed.application.app.api.os.modules.Routable
getRoutingModuleMethods 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:TrafficManagementCenterOperatingSystemReturns the lane detector, which provides various measurements, such as traffic flow.- Specified by:
getInductionLoopin interfaceTrafficManagementCenterOperatingSystem- Parameters:
id- The id of the lane detector- Returns:
- The
InductionLoopwith the given id.
-
getLaneAreaDetector
Description copied from interface:TrafficManagementCenterOperatingSystemReturns the lane segment, which provides various measurements, such as density.- Specified by:
getLaneAreaDetectorin interfaceTrafficManagementCenterOperatingSystem- Parameters:
id- The id of the lane segment.- Returns:
- The
LaneAreaDetectorwith the given id.
-
getInductionLoops
Description copied from interface:TrafficManagementCenterOperatingSystemReturns allInductionLoops configured for this traffic management center.- Specified by:
getInductionLoopsin interfaceTrafficManagementCenterOperatingSystem- Returns:
- A list of all configured
InductionLoops.
-
getLaneAreaDetectors
Description copied from interface:TrafficManagementCenterOperatingSystemReturns allLaneAreaDetectors configured for this traffic management center.- Specified by:
getLaneAreaDetectorsin interfaceTrafficManagementCenterOperatingSystem- Returns:
- A list of all configured
LaneAreaDetectors.
-
changeLaneState
public TrafficManagementCenterOperatingSystem.ChangeLaneState changeLaneState(String edge, int laneIndex) Description copied from interface:TrafficManagementCenterOperatingSystemProvides a facility to change the lane state of the given lane.- Specified by:
changeLaneStatein 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:TrafficManagementCenterOperatingSystemProvides a facility to change the lane state of a Variable Message Sign (VMS).- Specified by:
changeVariableMessageSignStatein 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:EventProcessorProcesses the given event.- Specified by:
processEventin interfaceEventProcessor- Overrides:
processEventin classServerUnit- Parameters:
event- the event to process- Throws:
Exception
-