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<SortedSet<SharedRiskGroup>> |
enumerateFailureStates(Collection<SharedRiskGroup> srgs,
boolean considerNoFailureState,
boolean considerDoubleFailureStates)
Returns the set of SRGs going down on each failure state.
|
static SortedSet<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 their backup paths defined.
|
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).
|
static boolean |
isSingleSRGFailureTolerant(NetPlan np,
NetworkLayer failureTolerantLayer)
Returns true if the given design is tolerant to single SRG failures at the given layer: that is, no traffic of any
unicast not multicast demand is blocked when such SRG fails
|
static boolean |
isSRGDisjoint(Collection<Link> path1,
Collection<Link> path2)
Returns true if the two collection of links in path1 and paths (not necessarily a
sequence of contiguous links forming a path), are srg disjoint
|
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<SortedSet<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 SortedSet<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 their backup paths defined.
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)public static boolean isSingleSRGFailureTolerant(NetPlan np, NetworkLayer failureTolerantLayer)
np
- the designfailureTolerantLayer
- the layer where we check tolerancepublic static boolean isSRGDisjoint(Collection<Link> path1, Collection<Link> path2)
path1
- the first collection of linkspath2
- the second collection of linksCopyright © 2018. All rights reserved.