public class ConnectionNetState
extends Object
Constructor and Description |
---|
ConnectionNetState(NetPlan netPlan) |
Modifier and Type | Method and Description |
---|---|
int |
addConnection(int demandId,
int routeId,
int[] sequenceOfLinks,
double arrivalTime,
double duration,
double requestedTrafficVolume,
double currentTrafficVolume) |
NetPlan |
convertToNetPlan()
Converts the current network state to a network plan.
|
ConnectionNetState |
copy()
Returns a deep copy of the network state
|
double |
getConnectionArrivalTime(int connectionId)
Returns the arrival time of the specified connection.
|
double |
getConnectionCurrentTrafficInErlangs(int connectionId) |
double[] |
getConnectionCurrentTrafficInErlangsVector() |
int |
getConnectionDemand(int connectionId) |
double |
getConnectionDuration(int connectionId)
Returns the duration of the specified connection.
|
int[] |
getConnectionIds() |
int[] |
getConnectionIdsForDemand(int demandId)
Returns the Set of connection ids associated to a given demand.
|
double |
getConnectionRequestedTrafficInErlangs(int connectionId) |
double[] |
getConnectionRequestedTrafficInErlangsVector() |
int |
getConnectionRoute(int connectionId) |
int[] |
getConnectionSequenceOfLinks(int connectionId) |
int[] |
getConnectionsTraversedByLink(int linkId) |
int |
getLastAddedConnection() |
int |
getLastRemovedConnection() |
double |
getLinkCurrentCarriedTrafficInErlangs(int linkId) |
double[] |
getLinkCurrentCarriedTrafficInErlangsVector() |
double[] |
getNodeEgressTrafficInErlangsVector() |
double[] |
getNodeIngressTrafficInErlangsVector() |
double[] |
getNodeTraversingTrafficInErlangsVector() |
int |
getNumberOfActiveConnections()
Returns the number of active connections in the network.
|
boolean |
hasConnections()
Returns
true if the network has at least one active connection. |
void |
removeConnection(int connectionId) |
void |
setConnectionState(int connectionId,
double currentTrafficVolume,
int[] sequenceOfLinks) |
ConnectionNetState |
unmodifiableView()
Returns an unmodifiable view of the network state.
|
void |
updateConnections(ConnectionActions actions) |
public ConnectionNetState(NetPlan netPlan)
public void setConnectionState(int connectionId, double currentTrafficVolume, int[] sequenceOfLinks)
public void updateConnections(ConnectionActions actions)
public ConnectionNetState copy()
public ConnectionNetState unmodifiableView()
public double[] getConnectionCurrentTrafficInErlangsVector()
public double[] getConnectionRequestedTrafficInErlangsVector()
public int[] getConnectionsTraversedByLink(int linkId)
public boolean hasConnections()
true
if the network has at least one active connection. It is equivalent to getNumberOfActiveConnections()
> 0
.true
if there are active connections in the network, and false
otherwisepublic int addConnection(int demandId, int routeId, int[] sequenceOfLinks, double arrivalTime, double duration, double requestedTrafficVolume, double currentTrafficVolume)
public void removeConnection(int connectionId)
public int[] getConnectionSequenceOfLinks(int connectionId)
public double[] getNodeEgressTrafficInErlangsVector()
public double[] getNodeIngressTrafficInErlangsVector()
public double[] getNodeTraversingTrafficInErlangsVector()
public int getConnectionDemand(int connectionId)
public int[] getConnectionIds()
public int[] getConnectionIdsForDemand(int demandId)
demandId
- Demand identifierpublic double getConnectionCurrentTrafficInErlangs(int connectionId)
public double getConnectionRequestedTrafficInErlangs(int connectionId)
public double getLinkCurrentCarriedTrafficInErlangs(int linkId)
public int getConnectionRoute(int connectionId)
public NetPlan convertToNetPlan()
public double[] getLinkCurrentCarriedTrafficInErlangsVector()
public int getNumberOfActiveConnections()
public double getConnectionArrivalTime(int connectionId)
connectionId
- Connection identifierpublic double getConnectionDuration(int connectionId)
connectionId
- Connection identifierpublic int getLastAddedConnection()
public int getLastRemovedConnection()