Package org.planit.trafficassignment
Class TrafficAssignmentComponent<T extends TrafficAssignmentComponent<T> & Serializable>
- java.lang.Object
-
- org.djutils.event.EventProducer
-
- org.planit.trafficassignment.TrafficAssignmentComponent<T>
-
- All Implemented Interfaces:
Serializable,org.djutils.event.EventProducerInterface
- Direct Known Subclasses:
Demands,FundamentalDiagram,InitialPhysicalCost,LogitChoiceModel,NetworkLoading,NodeModel,ODRouteSets,PhysicalCost,PhysicalNetwork,RouteChoice,Smoothing,VirtualCost,Zoning
public abstract class TrafficAssignmentComponent<T extends TrafficAssignmentComponent<T> & Serializable> extends org.djutils.event.EventProducerTraffic assignment components are the main building blocks to conduct traffic assignment on- Author:
- markr
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected IdGroupingTokengroupIdid generation using this token will be contiguous and unique for each instance of this classprotected longidunique identifier for this traffic componentprotected StringtrafficComponentTypeTraffic component type used to identify the component uniquely.
-
Constructor Summary
Constructors Modifier Constructor Description protectedTrafficAssignmentComponent(IdGroupingToken groupId, Class<?> classType)Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description longgetId()All traffic components must have a unique idIdGroupingTokengetIdGroupingtoken()Collect the id grouping token used to generate ids for entities of this class.SerializablegetSourceId()the source id whenever this instance fires an event is simply thisStringgetTrafficComponentType()-
Methods inherited from class org.djutils.event.EventProducer
addListener, addListener, addListener, addListener, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, getEventTypesWithListeners, hasListeners, numberOfListeners, removeAllListeners, removeAllListeners, removeListener
-
-
-
-
Field Detail
-
id
protected final long id
unique identifier for this traffic component
-
groupId
protected IdGroupingToken groupId
id generation using this token will be contiguous and unique for each instance of this class
-
trafficComponentType
protected final String trafficComponentType
Traffic component type used to identify the component uniquely. If not provided to the constructor the class name is used
-
-
Constructor Detail
-
TrafficAssignmentComponent
protected TrafficAssignmentComponent(IdGroupingToken groupId, Class<?> classType)
Constructor- Parameters:
groupId- , contiguous id generation within this group for instances of this classclassType- , the class type this instance belongs to and we are generating an id for
-
-
Method Detail
-
getTrafficComponentType
public String getTrafficComponentType()
-
getId
public long getId()
All traffic components must have a unique id- Returns:
- id of traffic assignment component
-
getIdGroupingtoken
public IdGroupingToken getIdGroupingtoken()
Collect the id grouping token used to generate ids for entities of this class.- Returns:
- id grouping token
-
getSourceId
public Serializable getSourceId()
the source id whenever this instance fires an event is simply this- Specified by:
getSourceIdin interfaceorg.djutils.event.EventProducerInterface- Specified by:
getSourceIdin classorg.djutils.event.EventProducer- Returns:
- this instance as source id
-
-