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.EventProducer
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 IdGroupingToken
groupId
id generation using this token will be contiguous and unique for each instance of this classprotected long
id
unique identifier for this traffic componentprotected String
trafficComponentType
Traffic component type used to identify the component uniquely.
-
Constructor Summary
Constructors Modifier Constructor Description protected
TrafficAssignmentComponent(IdGroupingToken groupId, Class<?> classType)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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()
-
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:
getSourceId
in interfaceorg.djutils.event.EventProducerInterface
- Specified by:
getSourceId
in classorg.djutils.event.EventProducer
- Returns:
- this instance as source id
-
-