public class SRGUtils
extends Object
Modifier and Type | Class and Description |
---|---|
static class |
SRGUtils.SharedRiskModel
Type of shared-risk model.
|
Modifier and Type | Method and Description |
---|---|
static cern.colt.matrix.tdouble.DoubleMatrix2D |
computeFailureState2LinkUnavailabilityMatrix(NetPlan netPlan,
List<Set<Long>> F_s)
Given a network design with a set of shared-risk groups (SRGs) and a set
of failure states, each of them containing the associated set of simultaneous
SRG failures, the failure state-link unavailability matrix.
|
static cern.colt.matrix.tdouble.DoubleMatrix2D |
computeFailureState2LinkUnavailabilityMatrix(NetPlan netPlan,
long layerId,
List<Set<Long>> F_s)
Given a network design with a set of shared-risk groups (SRGs) and a set
of failure states, each of them containing the associated set of simultaneous
SRG failures, the failure state-link unavailability matrix.
|
static cern.colt.matrix.tdouble.DoubleMatrix2D |
computeSRG2LinkUnavailabilityMatrix(NetPlan netPlan)
Given a network design with a set of shared-risk groups (SRGs), it computes
the SRG-link unavailability matrix.
|
static cern.colt.matrix.tdouble.DoubleMatrix2D |
computeSRG2LinkUnavailabilityMatrix(NetPlan netPlan,
long layerId)
Given a network design with a set of shared-risk groups (SRGs), it computes
the SRG-link unavailability matrix.
|
static List<Double> |
computeStateProbabilities(List<Set<Long>> F_s,
Map<Long,Double> A_f)
Computes the probability to find the network on each failure state.
|
static void |
configureSRGs(NetPlan netPlan,
double defaultMTTF,
double defaultMTTR,
SRGUtils.SharedRiskModel sharedRiskModel,
boolean removeExistingSRGs)
Configures the SRGs into the network design at the first layer.
|
static void |
configureSRGs(NetPlan netPlan,
long layerId,
double defaultMTTF,
double defaultMTTR,
SRGUtils.SharedRiskModel sharedRiskModel,
boolean removeExistingSRGs)
Configures the SRGs into the network design at the given layer.
|
static List<Set<Long>> |
enumerateFailureStates(Set<Long> srgIds,
boolean considerNoFailureState,
boolean considerDoubleFailureStates)
Returns the set of SRGs going down on each failure state.
|
static Pair<Double,Double> |
getSRGDisjointnessPercentage(NetPlan netPlan)
Returns the percentage of SRG disjointness of traffic routes and
protection segments.
|
static Pair<Double,Double> |
getSRGDisjointnessPercentage(NetPlan netPlan,
long layerId)
Returns the percentage of SRG disjointness of traffic routes and
protection segments.
|
static String |
getSRGModel(NetPlan netPlan)
Indicates whether SRG definition follows one of the predefined models (per
node, per link...), or 'Mixed' otherwise (or 'None' if no SRGs are defined).
|
static String |
getSRGModel(NetPlan netPlan,
long layerId)
Indicates whether SRG definition follows one of the predefined models (per
node, per link...), or 'Mixed' otherwise (or 'None' if no SRGs are defined).
|
public static cern.colt.matrix.tdouble.DoubleMatrix2D computeFailureState2LinkUnavailabilityMatrix(NetPlan netPlan, List<Set<Long>> F_s)
Given a network design with a set of shared-risk groups (SRGs) and a set
of failure states, each of them containing the associated set of simultaneous
SRG failures, the failure state-link unavailability matrix. This is a matrix
with as many rows as failure states, and as many columns as links. Position
(f, e) has a 1 if link e (e = 0 refers to the
first link in linkMap.keySet()
, e = 1 refers to the second
one, and so on) is affected by failure state f (f = 0 refers
failure state, f = 1 refers to the second one, and so on), considering
either the link itself or some of the end nodes.
This method is an extended version of computeSRG2LinkUnavailabilityMatrix
,
since it allows to consider not only single SRG failures, but also simultaneous
SRG failures.
netPlan
- Network design containing a set of shared-risk groupsF_s
- List of failure states, each of them containing the associated set of simultaneous SRG failurespublic static cern.colt.matrix.tdouble.DoubleMatrix2D computeFailureState2LinkUnavailabilityMatrix(NetPlan netPlan, long layerId, List<Set<Long>> F_s)
Given a network design with a set of shared-risk groups (SRGs) and a set
of failure states, each of them containing the associated set of simultaneous
SRG failures, the failure state-link unavailability matrix. This is a matrix
with as many rows as failure states, and as many columns as links. Position
(f, e) has a 1 if link e (e = 0 refers to the
first link in linkMap.keySet()
, e = 1 refers to the second
one, and so on) is affected by failure state f (f = 0 refers
failure state, f = 1 refers to the second one, and so on), considering
either the link itself or some of the end nodes.
This method is an extended version of computeSRG2LinkUnavailabilityMatrix
,
since it allows to consider not only single SRG failures, but also simultaneous
SRG failures.
netPlan
- Network design containing a set of shared-risk groupslayerId
- Layer identifierF_s
- List of failure states, each of them containing the associated set of simultaneous SRG failurespublic static cern.colt.matrix.tdouble.DoubleMatrix2D computeSRG2LinkUnavailabilityMatrix(NetPlan netPlan)
Given a network design with a set of shared-risk groups (SRGs), it computes
the SRG-link unavailability matrix. This is a matrix with as many rows as SRGs,
and as many columns as links. Position (s, e) has a 1 if link
e (e = 0 refers to the first link in linkMap.keySet()
,
e = 1 refers to the second one, and so on) is affected by the failure
of SRG s (s = 0 refers to the first defined SRG, s = 1
refers to the second one, and so on), considering either the link itself or
some of the end nodes.
netPlan
- Network design containing a set of shared-risk groupspublic static cern.colt.matrix.tdouble.DoubleMatrix2D computeSRG2LinkUnavailabilityMatrix(NetPlan netPlan, long layerId)
Given a network design with a set of shared-risk groups (SRGs), it computes
the SRG-link unavailability matrix. This is a matrix with as many rows as SRGs,
and as many columns as links. Position (s, e) has a 1 if link
e (e = 0 refers to the first link in linkMap.keySet()
,
e = 1 refers to the second one, and so on) is affected by the failure
of SRG s (s = 0 refers to the first defined SRG, s = 1
refers to the second one, and so on), considering either the link itself or
some of the end nodes.
netPlan
- Network design containing a set of shared-risk groupslayerId
- Layer identifierpublic static List<Double> computeStateProbabilities(List<Set<Long>> F_s, Map<Long,Double> A_f)
F_s
- Set of SRGs failing per each failure stateA_f
- Availability value per SRGpublic static void configureSRGs(NetPlan netPlan, double defaultMTTF, double defaultMTTR, SRGUtils.SharedRiskModel sharedRiskModel, boolean removeExistingSRGs)
netPlan
- A network design containing a physical topologydefaultMTTF
- Default value for mean time to fail (in hours). Zero or negative value means Double.MAX_VALUE
defaultMTTR
- Default value for mean time to repair (in hours). Zero or negative value are not allowedsharedRiskModel
- Model defining SRGsremoveExistingSRGs
- Indicates whether or not existing SRGs should be removedpublic static void configureSRGs(NetPlan netPlan, long layerId, double defaultMTTF, double defaultMTTR, SRGUtils.SharedRiskModel sharedRiskModel, boolean removeExistingSRGs)
netPlan
- A network design containing a physical topologylayerId
- Layer identifierdefaultMTTF
- Default value for mean time to fail (in hours). Zero or negative value means Double.MAX_VALUE
defaultMTTR
- Default value for mean time to repair (in hours). Zero or negative value are not allowedsharedRiskModel
- Model defining SRGsremoveExistingSRGs
- Indicates whether or not existing SRGs should be removedpublic static List<Set<Long>> enumerateFailureStates(Set<Long> srgIds, boolean considerNoFailureState, boolean considerDoubleFailureStates)
srgIds
- SRG identifiersconsiderNoFailureState
- Flag to indicate whether or not no failure state is includedconsiderDoubleFailureStates
- Flag to indicate whether or not double failure states are includedpublic static Pair<Double,Double> getSRGDisjointnessPercentage(NetPlan netPlan)
netPlan
- Current network designnetPlan
objectpublic static Pair<Double,Double> getSRGDisjointnessPercentage(NetPlan netPlan, long layerId)
Returns the percentage of SRG disjointness of traffic routes and protection segments.
Important: In case there are no SRGs, then it will return zero.
netPlan
- Current network designlayerId
- Layer identifierpublic static String getSRGModel(NetPlan netPlan)
netPlan
- Current network designnetPlan
objectpublic static String getSRGModel(NetPlan netPlan, long layerId)
netPlan
- Current network designlayerId
- Layer identifier