Class Delay<T extends Number & Comparable<T>>
java.lang.Object
org.djutils.event.LocalEventProducer
nl.tudelft.simulation.dsol.formalisms.flow.FlowObject<T>
nl.tudelft.simulation.dsol.formalisms.flow.Delay<T>
- Type Parameters:
T
- the time type
- All Implemented Interfaces:
Serializable
,Remote
,Identifiable
,EventProducer
The Delay object is a flow object that delays an entity for a given time. After the time delay, the entity is released to the
next flow object. During the time delay, the entity is held in the delay object.
Copyright (c) 2002-2024 Delft University of Technology, Jaffalaan 5, 2628 BX Delft, the Netherlands. All rights reserved. See for project information https://simulation.tudelft.nl. The DSOL project is distributed under a three-clause BSD-style license, which can be found at https://https://simulation.tudelft.nl/dsol/docs/latest/license.html.
- Author:
- Peter Jacobs , Alexander Verbraeck
- See Also:
-
Field Summary
Fields inherited from class nl.tudelft.simulation.dsol.formalisms.flow.FlowObject
RECEIVE_EVENT, RELEASE_EVENT
Fields inherited from interface org.djutils.event.EventProducer
FIRST_POSITION, LAST_POSITION
-
Constructor Summary
ConstructorDescriptionDelay
(String id, DevsSimulatorInterface<T> simulator, DistContinuousSimulationTime<T> delayDistribution) Construct a new Delay flow block. -
Method Summary
Modifier and TypeMethodDescriptionvoid
receiveEntity
(Entity<T> entity) Arrival of a new entity into the flow object.Methods inherited from class nl.tudelft.simulation.dsol.formalisms.flow.FlowObject
getDestination, getId, getSimulator, releaseEntity, setDestination, toString
Methods inherited from class org.djutils.event.LocalEventProducer
addListener, addListener, addListener, addListener, fireEvent, fireEvent, fireEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireUnverifiedEvent, fireUnverifiedEvent, fireUnverifiedTimedEvent, fireUnverifiedTimedEvent, getEventListenerMap, getEventTypesWithListeners, getListenerReferences, hasListeners, numberOfListeners, removeAllListeners, removeAllListeners, removeListener
-
Constructor Details
-
Delay
public Delay(String id, DevsSimulatorInterface<T> simulator, DistContinuousSimulationTime<T> delayDistribution) Construct a new Delay flow block.- Parameters:
id
- String; the id of the Delay flow objectsimulator
- DevsSimulatorInterface<T>; the simulatordelayDistribution
- DistContinuousSimulationTime<T>; the delay distribution
-
-
Method Details
-
receiveEntity
Arrival of a new entity into the flow object.- Overrides:
receiveEntity
in classFlowObject<T extends Number & Comparable<T>>
- Parameters:
entity
- Entity; the arriving entity
-