public class ResilienceNetState
extends Object
| Constructor and Description |
|---|
ResilienceNetState(NetPlan netPlan)
Initializes a network state structure.
|
| Modifier and Type | Method and Description |
|---|---|
void |
check(Map<String,String> net2planParameters)
Checks the current network state.
|
NetPlan |
convertToNetPlan()
Converts the current network state to a network plan.
|
ResilienceNetState |
copy()
Returns a deep copy of the network state
|
double[] |
getDemandCarriedTrafficInErlangsVector() |
void |
getFailureEffects(ResilienceEvents event,
Set<Integer> nodesDown,
Set<Integer> linksDown,
Set<Integer> affectedRoutes,
Set<Integer> unrecoverableRoutes,
List<Double> currentLinkAvailableCapacity,
Set<Integer> segmentsDown,
List<Double> currentSegmentAvailableCapacity) |
int[] |
getFailureGroupsDown() |
int |
getFirstAvailableNodeDownstream(int routeId,
int[] nodesDown,
int[] linksDown) |
int |
getFirstAvailableNodeUpstream(int routeId,
int[] nodesDown,
int[] linksDown) |
double |
getLinkAvailableCapacityInErlangs(int linkId,
int[] linksDown) |
double[] |
getLinkAvailableCapacityInErlangsVector(int[] linksDown) |
double |
getLinkCurrentCarriedTrafficInErlangs(int linkId)
Returns the carried traffic by the specified link.
|
double[] |
getLinkCurrentCarriedTrafficInErlangsVector()
Returns a vector with the carried traffic per link.
|
int[] |
getLinksDown()
Returns the list of links which are down.
|
int[] |
getLinkTraversingRoutes(int linkId)
Returns the list of routes which are traversed by a given link.
|
double[] |
getNodeEgressTrafficInErlangsVector()
Returns the current egress traffic from each node.
|
double[] |
getNodeIngressTrafficInErlangsVector()
Returns the current ingress traffic to each node.
|
void |
getNodeLinkStateChanges(int[] newSRGsDown,
int[] newSRGsUp,
Set<Integer> nodesDown2Up,
Set<Integer> nodesUp2Down,
Set<Integer> linksDown2Up,
Set<Integer> linksUp2Down)
Returns the set of current state changes in the network.
|
int[] |
getNodesDown()
Returns the list of nodes which are down.
|
int[] |
getNodeTraversingRoutes(int nodeId) |
double[] |
getNodeTraversingTrafficInErlangsVector()
Returns the current traffic traversing each node.
|
int |
getNumberOfFailureGroups()
Returns the number of defined SRGs.
|
double[] |
getProtectionSegmentAvailableCapacityInErlangsVector(int[] segmentsDown) |
double |
getProtectionSegmentCurrentCarriedTrafficInErlangs(int segmentId)
Returns the traffic carried by the specified protection segment.
|
double[] |
getProtectionSegmentCurrentCarriedTrafficInErlangsVector()
Returns a vector with the carried traffic per protection segment.
|
int[] |
getProtectionSegmentsDown(int[] nodesDown,
int[] linksDown)
Returns the list of protection segments which are down.
|
void |
getReparationEffects(ResilienceEvents event,
Set<Integer> nodesDown,
Set<Integer> linksDown,
Set<Integer> reparableRoutes,
Set<Integer> unreparableRoutes,
List<Double> currentLinkAvailableCapacity,
Set<Integer> segmentsDown,
List<Double> currentSegmentAvailableCapacity) |
double |
getRouteCurrentCarriedTrafficInErlangs(int routeId)
Returns the current carried traffic by a route.
|
double[] |
getRouteCurrentCarriedTrafficInErlangsVector()
Returns a vector with the current carried traffic by the routes.
|
int[] |
getRouteCurrentSequenceOfLinksAndSegments(int routeId)
Returns the list of links and segments traversed by the route.
|
int[] |
getRouteCurrentSequenceOfNodes(int routeId) |
void |
setFailureGroups(int[][] N_f,
int[][] E_f) |
String |
toString() |
ResilienceNetState |
unmodifiableView()
Returns an unmodifiable view of the network state.
|
void |
update(ResilienceEvents event,
ProvisioningActions actions)
Update the network state.
|
public ResilienceNetState(NetPlan netPlan)
netPlan - Complete network design (including traffic routes)public NetPlan convertToNetPlan()
public ResilienceNetState copy()
public ResilienceNetState unmodifiableView()
public void setFailureGroups(int[][] N_f,
int[][] E_f)
public int[] getLinksDown()
public int[] getNodesDown()
public int[] getProtectionSegmentsDown(int[] nodesDown,
int[] linksDown)
public void getNodeLinkStateChanges(int[] newSRGsDown,
int[] newSRGsUp,
Set<Integer> nodesDown2Up,
Set<Integer> nodesUp2Down,
Set<Integer> linksDown2Up,
Set<Integer> linksUp2Down)
newSRGDown - List of SRGs changing from up to downnewSRGUp - List of SRGs changing from down to upnodesDown2Up - Set of nodes changing from down to upnodesUp2Down - Set of nodes changing from up to downlinksDown2Up - Set of links changing from down to uplinksUp2Down - Set of links changing from up to downpublic void getFailureEffects(ResilienceEvents event, Set<Integer> nodesDown, Set<Integer> linksDown, Set<Integer> affectedRoutes, Set<Integer> unrecoverableRoutes, List<Double> currentLinkAvailableCapacity, Set<Integer> segmentsDown, List<Double> currentSegmentAvailableCapacity)
public void getReparationEffects(ResilienceEvents event, Set<Integer> nodesDown, Set<Integer> linksDown, Set<Integer> reparableRoutes, Set<Integer> unreparableRoutes, List<Double> currentLinkAvailableCapacity, Set<Integer> segmentsDown, List<Double> currentSegmentAvailableCapacity)
public int getFirstAvailableNodeDownstream(int routeId,
int[] nodesDown,
int[] linksDown)
public int getFirstAvailableNodeUpstream(int routeId,
int[] nodesDown,
int[] linksDown)
public int[] getNodeTraversingRoutes(int nodeId)
public int[] getLinkTraversingRoutes(int linkId)
linkId - Link identifierpublic double[] getDemandCarriedTrafficInErlangsVector()
public double[] getNodeEgressTrafficInErlangsVector()
public double[] getProtectionSegmentAvailableCapacityInErlangsVector(int[] segmentsDown)
public double getLinkAvailableCapacityInErlangs(int linkId,
int[] linksDown)
public double[] getLinkAvailableCapacityInErlangsVector(int[] linksDown)
public double[] getNodeIngressTrafficInErlangsVector()
public double[] getNodeTraversingTrafficInErlangsVector()
public int[] getFailureGroupsDown()
public void check(Map<String,String> net2planParameters)
public double getLinkCurrentCarriedTrafficInErlangs(int linkId)
linkId - Link identifierpublic double[] getLinkCurrentCarriedTrafficInErlangsVector()
public double getRouteCurrentCarriedTrafficInErlangs(int routeId)
routeId - Route identifierpublic double[] getRouteCurrentCarriedTrafficInErlangsVector()
public int[] getRouteCurrentSequenceOfNodes(int routeId)
public int[] getRouteCurrentSequenceOfLinksAndSegments(int routeId)
routeId - Route identifierpublic double getProtectionSegmentCurrentCarriedTrafficInErlangs(int segmentId)
segmentId - Protection segment identifierpublic double[] getProtectionSegmentCurrentCarriedTrafficInErlangsVector()
public void update(ResilienceEvents event, ProvisioningActions actions)
event - Failure/reparationactions - List of action to performpublic int getNumberOfFailureGroups()
public String toString()
toString in class Object