public class StochasticDistractionModel extends Object implements EventListenerInterface
 Copyright (c) 2013-2019 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved. 
 BSD-style license. See OpenTrafficSim License.
 
| Constructor and Description | 
|---|
StochasticDistractionModel(boolean allowMultiTasking,
                          List<Distraction> distractions,
                          DEVSSimulatorInterface.TimeDoubleUnit simulator,
                          OTSNetwork network)
Constructor. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
void | 
notify(EventInterface event) | 
void | 
startDistraction(LaneBasedGTU gtu,
                Distraction distraction,
                boolean scheduleNext)
Start a distraction. 
 | 
void | 
stopDistraction(LaneBasedGTU gtu,
               Task task)
Stops a distraction task. 
 | 
public StochasticDistractionModel(boolean allowMultiTasking,
                                  List<Distraction> distractions,
                                  DEVSSimulatorInterface.TimeDoubleUnit simulator,
                                  OTSNetwork network)
allowMultiTasking - boolean; whether to allow multi-taskingdistractions - List<Distraction>; list of distractionssimulator - DEVSSimulatorInterface.TimeDoubleUnit; simulatornetwork - OTSNetwork; networkpublic void startDistraction(LaneBasedGTU gtu, Distraction distraction, boolean scheduleNext) throws SimRuntimeException
gtu - LaneBasedGTU; gtu to start the distraction ondistraction - Distraction; distractionscheduleNext - boolean; whether to schedule the next distraction (not if starting from queue)SimRuntimeException - on time errorpublic void stopDistraction(LaneBasedGTU gtu, Task task) throws SimRuntimeException
gtu - LaneBasedGTU; gtu to stop the task fortask - Task; task to stopSimRuntimeException - on time errorpublic void notify(EventInterface event) throws RemoteException
notify in interface EventListenerInterfaceRemoteExceptionCopyright © 2014–2019 Delft University of Technology. All rights reserved.