Class 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 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