Class Zoning

    • Field Detail

      • virtualNetwork

        protected final VirtualNetwork virtualNetwork
        Virtual network holds all the virtual connections to the physical network (layers)
      • connectoids

        public final Connectoids connectoids
        provide access to connectoids
      • odZones

        public final Zones<OdZone> odZones
        provide access to zones
      • transferZones

        public final Zones<TransferZone> transferZones
        provide access to transger zones (if any)
    • Constructor Detail

      • Zoning

        public Zoning​(IdGroupingToken groupId,
                      IdGroupingToken networkGroupId)
        Constructor The second id generation token should be the token used by the physical network to create physical network entities such as links, nodes, etc. The virtual network should register connectoids, centroids, etc. with ids compatible under this same network. For example, a centroid is a vertex, like a node, so the vertex ids should be contiguous and unique throughout the combination of the virtual and physical network. Hence, they should use the same network id token
        Parameters:
        groupId - contiguous id generation within this group for instances of this class
        networkGroupId - contiguous id generation for all instances created by the virtual network
    • Method Detail

      • getVirtualNetwork

        public VirtualNetwork getVirtualNetwork()
        Get the virtual network for this zoning
        Returns:
        the virtual network for this zoning
      • isCompatibleWithDemands

        public boolean isCompatibleWithDemands​(Demands demands,
                                               Modes modes)
        Verify if passed in demands are compatible with the zoning structure. Compatibility is ensured when the number of zones matches the number of origins/destinations in the demands.
        Parameters:
        demands - to verify against
        modes - to check
        Returns:
        true when compatible, false otherwise
      • getZone

        public Zone getZone​(long id)
        find a zone by over arching id regardless if it is a transfer or Od zone
        Parameters:
        id - to find the zone by
        Returns:
        zone found (if any)
      • getNumberOfCentroids

        public long getNumberOfCentroids()
        collect the number of centroids across all zones (od and transfer zones)
        Returns:
        total number of centroids