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 DoubleMatrix1D |
computeStateProbabilities(DoubleMatrix2D A_sf,
DoubleMatrix1D 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,
NetworkLayer... optionalLayerParameter)
Configures the SRGs into the network design at the given layer.
|
static List<Set<SharedRiskGroup>> |
enumerateFailureStates(Collection<SharedRiskGroup> srgs,
boolean considerNoFailureState,
boolean considerDoubleFailureStates)
Returns the set of SRGs going down on each failure state.
|
static Set<SharedRiskGroup> |
getAffectingSRGs(Collection<Link> links)
Returns a set of SRGs that are affecting the given links.
|
static DoubleMatrix2D |
getMatrixFailureState2SRG(Collection<SharedRiskGroup> srgs,
boolean considerNoFailureState,
boolean considerDoubleFailureStates)
Returns a matrix indicating the SRGs going down (columns) on each failure state (rows).
|
static DoubleMatrix2D |
getMatrixFailureStates2SRG(Collection<SharedRiskGroup> srgs,
boolean considerNoFailureState,
boolean considerDoubleFailureStates)
Returns a matrix indicating the SRGs going down (columns) on each failure state (rows).
|
static Pair<Double,Double> |
getSRGDisjointnessPercentage(NetPlan netPlan,
NetworkLayer... optionalLayerParameter)
Returns the percentage of SRG disjointness of traffic routes and
protection segments.
|
static String |
getSRGModel(NetPlan netPlan,
NetworkLayer... optionalLayerParameter)
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 DoubleMatrix1D computeStateProbabilities(DoubleMatrix2D A_sf, DoubleMatrix1D A_f)
A_sf
- SRGs failing (columns) per each failure state (rows)A_f
- Availability value per SRGpublic static void configureSRGs(NetPlan netPlan, double defaultMTTF, double defaultMTTR, SRGUtils.SharedRiskModel sharedRiskModel, boolean removeExistingSRGs, NetworkLayer... optionalLayerParameter)
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
- Wheter or not to remove existing SRGsoptionalLayerParameter
- Network layer (optional)public static List<Set<SharedRiskGroup>> enumerateFailureStates(Collection<SharedRiskGroup> srgs, boolean considerNoFailureState, boolean considerDoubleFailureStates)
srgs
- SRGsconsiderNoFailureState
- Flag to indicate whether or not no failure state is includedconsiderDoubleFailureStates
- Flag to indicate whether or not double failure states are includedpublic static Set<SharedRiskGroup> getAffectingSRGs(Collection<Link> links)
links
- Collection of linkspublic static DoubleMatrix2D getMatrixFailureState2SRG(Collection<SharedRiskGroup> srgs, boolean considerNoFailureState, boolean considerDoubleFailureStates)
srgs
- SRGsconsiderNoFailureState
- Flag to indicate whether or not no failure state is includedconsiderDoubleFailureStates
- Flag to indicate whether or not double failure states are includedpublic static DoubleMatrix2D getMatrixFailureStates2SRG(Collection<SharedRiskGroup> srgs, boolean considerNoFailureState, boolean considerDoubleFailureStates)
srgs
- SRGsconsiderNoFailureState
- 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, NetworkLayer... optionalLayerParameter)
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 designoptionalLayerParameter
- Network layer (optional)public static String getSRGModel(NetPlan netPlan, NetworkLayer... optionalLayerParameter)
netPlan
- Current network designoptionalLayerParameter
- Network layer (optional)