Class ODRouteSets

  • All Implemented Interfaces:
    Serializable, org.djutils.event.EventProducerInterface

    public class ODRouteSets
    extends TrafficAssignmentComponent<ODRouteSets>
    Contains one or more origin-destination based route sets that can be used in assignment. For now each individual route 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

      • odRouteMatrices

        protected final TreeMap<Long,​ODRouteMatrix> odRouteMatrices
        map holding all registered od route matrices by their unique id
    • Constructor Detail

      • ODRouteSets

        public ODRouteSets​(IdGroupingToken groupId)
        Constructor
        Parameters:
        groupId - , contiguous id generation within this group for instances of this class
    • Method Detail

      • getNumberOfOdRouteSets

        public int getNumberOfOdRouteSets()
        Collect the number of registered od route sets
        Returns:
        number of od route sets
      • createAndRegisterOdRouteMatrix

        public ODRouteMatrix createAndRegisterOdRouteMatrix​(Zoning zoning)
        Create an empty od route matrix and register it on this od route sets
        Parameters:
        zoning - used to derive the size of the aquare zone based matrix
        Returns:
        newly created od route matrix
      • registerOdRouteMatrix

        public void registerOdRouteMatrix​(ODRouteMatrix odRouteMatrix)
        register the passed in route matrix (not copied)
        Parameters:
        odRouteMatrix - to register
      • hasRegisteredOdMatrices

        public Boolean hasRegisteredOdMatrices()
        verify if any od route matrices have been registered or not
        Returns:
        true if any are registered, false otherwise
      • getFirstODRouteMatrix

        public ODRouteMatrix getFirstODRouteMatrix()
        Collect the first od route matrix available
        Returns:
        the first od route matrix available, if not available null is returned