public class StochasticDistractionModel extends Object implements nl.tudelft.simulation.event.EventListenerInterface
 Copyright (c) 2013-2018 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,
                          nl.tudelft.simulation.dsol.simulators.DEVSSimulatorInterface.TimeDoubleUnit simulator,
                          org.opentrafficsim.core.network.OTSNetwork network)
Constructor. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
void | 
notify(nl.tudelft.simulation.event.EventInterface event) | 
void | 
startDistraction(LaneBasedGTU gtu,
                Distraction distraction,
                boolean scheduleNext)
Start a distraction. 
 | 
void | 
stopDistraction(LaneBasedGTU gtu,
               Fuller.Task task)
Stops a distraction task. 
 | 
public StochasticDistractionModel(boolean allowMultiTasking,
                                  List<Distraction> distractions,
                                  nl.tudelft.simulation.dsol.simulators.DEVSSimulatorInterface.TimeDoubleUnit simulator,
                                  org.opentrafficsim.core.network.OTSNetwork network)
allowMultiTasking - boolean; whether to allow multi-taskingdistractions - List; list of distractionssimulator - DEVSSimulatorInterface.TimeDoubleUnit; simulatornetwork - OTSNetwork; networkpublic void startDistraction(LaneBasedGTU gtu, Distraction distraction, boolean scheduleNext) throws nl.tudelft.simulation.dsol.SimRuntimeException
gtu - LaneBasedGTU; gtu to start the distraction ondistraction - Distraction; distractionscheduleNext - boolean; whether to schedule the next distraction (not if starting from queue)nl.tudelft.simulation.dsol.SimRuntimeException - on time errorpublic void stopDistraction(LaneBasedGTU gtu, Fuller.Task task) throws nl.tudelft.simulation.dsol.SimRuntimeException
gtu - LaneBasedGTU; gtu to stop the task fortask - Task; task to stopnl.tudelft.simulation.dsol.SimRuntimeException - on time errorpublic void notify(nl.tudelft.simulation.event.EventInterface event)
            throws RemoteException
notify in interface nl.tudelft.simulation.event.EventListenerInterfaceRemoteExceptionCopyright © 2014–2018 Delft University of Technology. All rights reserved.