Package org.planit.zoning
Class Zoning
- java.lang.Object
-
- org.djutils.event.EventProducer
-
- org.planit.assignment.TrafficAssignmentComponent<Zoning>
-
- org.planit.zoning.Zoning
-
- All Implemented Interfaces:
Serializable
,Comparable<Idable>
,org.djutils.event.EventProducerInterface
,Idable
public class Zoning extends TrafficAssignmentComponent<Zoning> implements Serializable
Zoning class which holds a particular zoning- Author:
- markr
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description Connectoids
connectoids
provide access to connectoidsZones<OdZone>
odZones
provide access to zonesZones<TransferZone>
transferZones
provide access to transger zones (if any)protected VirtualNetwork
virtualNetwork
Virtual network holds all the virtual connections to the physical network (layers)-
Fields inherited from class org.planit.assignment.TrafficAssignmentComponent
id, tokenId, trafficComponentType
-
-
Constructor Summary
Constructors Constructor Description 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.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long
getNumberOfCentroids()
collect the number of centroids across all zones (od and transfer zones)VirtualNetwork
getVirtualNetwork()
Get the virtual network for this zoningZone
getZone(long id)
find a zone by over arching id regardless if it is a transfer or Od zoneboolean
isCompatibleWithDemands(Demands demands, Modes modes)
Verify if passed in demands are compatible with the zoning structure.-
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
-
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
-
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 classnetworkGroupId
- 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 againstmodes
- 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
-
-