Package org.planit.assignment
Class TrafficAssignmentComponent<T extends TrafficAssignmentComponent<T> & Serializable>
- java.lang.Object
-
- org.djutils.event.EventProducer
-
- org.planit.assignment.TrafficAssignmentComponent<T>
-
- All Implemented Interfaces:
Serializable
,Comparable<Idable>
,org.djutils.event.EventProducerInterface
,Idable
- Direct Known Subclasses:
AbstractPhysicalCost
,AbstractVirtualCost
,Demands
,FundamentalDiagram
,InitialPhysicalCost
,LogitChoiceModel
,Network
,NetworkLoading
,NodeModel
,ODPathSets
,PathChoice
,Smoothing
,Zoning
public abstract class TrafficAssignmentComponent<T extends TrafficAssignmentComponent<T> & Serializable> extends org.djutils.event.EventProducer implements Idable
Traffic 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 long
id
unique identifier for this traffic componentprotected IdGroupingToken
tokenId
id generation using this token will be contiguous and unique for each instance of this classprotected String
trafficComponentType
Traffic component type used to identify the component uniquely.
-
Constructor Summary
Constructors Modifier Constructor Description protected
TrafficAssignmentComponent(IdGroupingToken tokenId, Class<?> classType)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object obj)
long
getId()
All traffic components must have a unique idIdGroupingToken
getIdGroupingToken()
Collect the id grouping token used to generate ids for entities of this class.Serializable
getSourceId()
the source id whenever this instance fires an event is simply thisString
getTrafficComponentType()
int
hashCode()
-
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
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.planit.utils.id.Idable
compareTo, idEquals, idHashCode
-
-
-
-
Field Detail
-
id
protected final long id
unique identifier for this traffic component
-
tokenId
protected IdGroupingToken tokenId
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 tokenId, Class<?> classType)
Constructor- Parameters:
tokenId
- , contiguous id generation using this same token 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
-
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:
getSourceId
in interfaceorg.djutils.event.EventProducerInterface
- Specified by:
getSourceId
in classorg.djutils.event.EventProducer
- Returns:
- this instance as source id
-
-