Package org.planit.path
Class ODPathSets
- java.lang.Object
-
- org.djutils.event.EventProducer
-
- org.planit.assignment.TrafficAssignmentComponent<ODPathSets>
-
- org.planit.path.ODPathSets
-
- All Implemented Interfaces:
Serializable
,Comparable<Idable>
,org.djutils.event.EventProducerInterface
,Idable
public class ODPathSets extends TrafficAssignmentComponent<ODPathSets>
Contains one or more origin-destination based path sets that can be used in assignment. For now each individual path set takes on the form of the already available ODPathMatrix. In future versions more flexible implementation are planned- Author:
- markr
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected TreeMap<Long,ODPathMatrix>
odPathMatrices
map holding all registered od path matrices by their unique id-
Fields inherited from class org.planit.assignment.TrafficAssignmentComponent
id, tokenId, trafficComponentType
-
-
Constructor Summary
Constructors Constructor Description ODPathSets(IdGroupingToken groupId)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ODPathMatrix
createAndRegisterOdPathMatrix(Zoning zoning)
Create an empty od path matrix and register it on this od path setsODPathMatrix
getFirstOdPathMatrix()
Collect the first od path matrix availableint
getNumberOfOdPathSets()
Collect the number of registered od path setsBoolean
hasRegisteredOdMatrices()
verify if any od path matrices have been registered or notvoid
registerOdPathMatrix(ODPathMatrix odPathMatrix)
register the passed in path matrix (not copied)-
Methods inherited from class org.planit.assignment.TrafficAssignmentComponent
equals, getId, getIdGroupingToken, getSourceId, getTrafficComponentType, 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
-
odPathMatrices
protected final TreeMap<Long,ODPathMatrix> odPathMatrices
map holding all registered od path matrices by their unique id
-
-
Constructor Detail
-
ODPathSets
public ODPathSets(IdGroupingToken groupId)
Constructor- Parameters:
groupId
- , contiguous id generation within this group for instances of this class
-
-
Method Detail
-
getNumberOfOdPathSets
public int getNumberOfOdPathSets()
Collect the number of registered od path sets- Returns:
- number of od path sets
-
createAndRegisterOdPathMatrix
public ODPathMatrix createAndRegisterOdPathMatrix(Zoning zoning)
Create an empty od path matrix and register it on this od path sets- Parameters:
zoning
- used to derive the size of the aquare zone based matrix- Returns:
- newly created od path matrix
-
registerOdPathMatrix
public void registerOdPathMatrix(ODPathMatrix odPathMatrix)
register the passed in path matrix (not copied)- Parameters:
odPathMatrix
- to register
-
hasRegisteredOdMatrices
public Boolean hasRegisteredOdMatrices()
verify if any od path matrices have been registered or not- Returns:
- true if any are registered, false otherwise
-
getFirstOdPathMatrix
public ODPathMatrix getFirstOdPathMatrix()
Collect the first od path matrix available- Returns:
- the first od path matrix available, if not available null is returned
-
-