public class FailureNetState
extends Object
Constructor and Description |
---|
FailureNetState(FailureNetState netState,
boolean isModifiable) |
FailureNetState(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.
|
FailureNetState |
copy()
Returns a deep copy of the network state
|
double[] |
getDemandCarriedTrafficInErlangsVector() |
void |
getFailureEffects(ResilienceEvents event,
Set<Integer> nodesDown,
Set<Integer> linksDown,
Set<Integer> affectedRoutes,
List<Double> currentLinkAvailableCapacity,
Set<Integer> segmentsDown,
List<Double> currentSegmentAvailableCapacity) |
int |
getFirstAvailableNodeDownstream(int routeId,
int[] nodesDown,
int[] linksDown) |
int |
getLastAvailableNodeUpstream(int routeId,
int[] nodesDown,
int[] linksDown) |
double |
getLinkAvailableCapacityInErlangs(int linkId) |
double[] |
getLinkAvailableCapacityInErlangsVector() |
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.
|
Quadruple<int[],int[],int[],int[]> |
getNodeLinkStateChanges(int[] newSRGDown,
int[] newSRGUp)
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 |
getProtectionSegmentAvailableCapacityInErlangs(int segmentId) |
double[] |
getProtectionSegmentAvailableCapacityInErlangsVector() |
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()
Returns the list of protection segments which are down.
|
void |
getReparationEffects(ResilienceEvents event,
Set<Integer> nodesDown,
Set<Integer> linksDown,
Set<Integer> affectedRoutes,
List<Double> currentLinkAvailableCapacity) |
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) |
boolean |
isLinkDown(int linkId)
Checks whether the specified link is down.
|
boolean |
isNodeDown(int nodeId)
Checks whether the specified node is down.
|
void |
setFailureGroups(int[][] N_f,
int[][] E_f) |
void |
setRouteState(int routeId,
int[] sequenceOfLinksAndSegments,
double carriedTrafficInErlangs)
Modifies the state of the specified route.
|
FailureNetState |
unmodifiableView()
Returns an unmodifiable view of the network state.
|
void |
update(ResilienceEvents event,
ProvisioningActions actions)
Update the network state.
|
public FailureNetState(FailureNetState netState, boolean isModifiable)
netState
- isModifiable
- public FailureNetState(NetPlan netPlan)
netPlan
- Complete network design (including traffic routes)public void getReparationEffects(ResilienceEvents event, Set<Integer> nodesDown, Set<Integer> linksDown, Set<Integer> affectedRoutes, List<Double> currentLinkAvailableCapacity)
public void getFailureEffects(ResilienceEvents event, Set<Integer> nodesDown, Set<Integer> linksDown, Set<Integer> affectedRoutes, List<Double> currentLinkAvailableCapacity, Set<Integer> segmentsDown, List<Double> currentSegmentAvailableCapacity)
public int getFirstAvailableNodeDownstream(int routeId, int[] nodesDown, int[] linksDown)
public int getLastAvailableNodeUpstream(int routeId, int[] nodesDown, int[] linksDown)
public FailureNetState unmodifiableView()
public int[] getNodeTraversingRoutes(int nodeId)
public int[] getLinkTraversingRoutes(int linkId)
linkId
- Link identifierpublic double[] getDemandCarriedTrafficInErlangsVector()
public double[] getNodeEgressTrafficInErlangsVector()
public double getProtectionSegmentAvailableCapacityInErlangs(int segmentId)
public double[] getProtectionSegmentAvailableCapacityInErlangsVector()
public double getLinkAvailableCapacityInErlangs(int linkId)
public double[] getLinkAvailableCapacityInErlangsVector()
public double[] getNodeIngressTrafficInErlangsVector()
public double[] getNodeTraversingTrafficInErlangsVector()
public void setFailureGroups(int[][] N_f, int[][] E_f)
public Quadruple<int[],int[],int[],int[]> getNodeLinkStateChanges(int[] newSRGDown, int[] newSRGUp)
newSRGDown
- List of SRGs changing from up to downnewSRGUp
- List of SRGs changing from down to uppublic void check(Map<String,String> net2planParameters)
public void setRouteState(int routeId, int[] sequenceOfLinksAndSegments, double carriedTrafficInErlangs)
routeId
- Route identifiersequenceOfLinksAndSegments
- Sequence of links and segmentscarriedTrafficInErlangs
- Traffic volume carried by the new pathUnsupportedOperationException
- If network state is not modifiablepublic double getLinkCurrentCarriedTrafficInErlangs(int linkId)
linkId
- Link identifierpublic double[] getLinkCurrentCarriedTrafficInErlangsVector()
linkId
- Link identifierpublic int[] getProtectionSegmentsDown()
public int[] getLinksDown()
public int[] getNodesDown()
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 boolean isLinkDown(int linkId)
linkId
- Link identifiertrue
if link is down, and false
otherwisepublic boolean isNodeDown(int nodeId)
nodeId
- Node identifiertrue
if node is down, and false
otherwisepublic void update(ResilienceEvents event, ProvisioningActions actions)
event
- Failure/reparationactions
- List of action to performUnsupportedOperationException
- If network state is not modifiablepublic NetPlan convertToNetPlan()
public int getNumberOfFailureGroups()
public FailureNetState copy()