Class Zoning

    • Field Detail

      • virtualNetwork

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

        protected final ZoningModifier zoningModifier
        modifier that can be used to perform modifications to the zoning that comprise more than a single element of the zoning, e.g. updating of ids. It is also used by listeners that are needed to update the zoning components in case the referenced network gets modified
      • odConnectoids

        public final UndirectedConnectoids odConnectoids
        provide access to undirected connectoids (of od zones)
      • transferConnectoids

        public final DirectedConnectoids transferConnectoids
        provide access to directed connectoids (of transfer zones)
      • odZones

        public final OdZones odZones
        provide access to zones
      • transferZones

        public final TransferZones transferZones
        provide access to transfer zones (if any)
      • transferZoneGroups

        public final TransferZoneGroups transferZoneGroups
        provide access to transfer zone groups (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
      • Zoning

        public Zoning​(Zoning other)
        Copy constructor
        Parameters:
        other - to copy
    • Method Detail

      • logInfo

        public void logInfo​(String prefix)
        Log general information on this zoning to the user
        Parameters:
        prefix - to use
      • 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)
      • getOdZones

        public OdZones getOdZones()
        Access to the odZones container
        Returns:
        odZones
      • getTransferZones

        public TransferZones getTransferZones()
        Access to the odZones container
        Returns:
        odZones
      • getNumberOfCentroids

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

        public long getNumberOfConnectoids()
        collect the number of connectoids (od and transfer)
        Returns:
        total number of connectoids
      • getZoningModifier

        public ZoningModifier getZoningModifier()
        The zoning's modifier instance
        Returns:
        the zoning modifier
      • reset

        public void reset()
        All components should be able to reset going back to some representative initial state
        Specified by:
        reset in class PlanitComponent<Zoning>