public static class SimAction.Factory
extends Object
NetPlan
class is able
to collect state changes using the activateActionMonitoring
method.Constructor and Description |
---|
SimAction.Factory() |
Modifier and Type | Method and Description |
---|---|
static SimAction |
demandAdded(long demandId)
Creates a
DEMAND_ADDED action. |
static SimAction |
demandAdded(long layerId,
long demandId)
Creates a
DEMAND_ADDED action. |
static SimAction |
demandModified(long demandId)
Creates a
DEMAND_MODIFIED action. |
static SimAction |
demandModified(long layerId,
long demandId)
Creates a
DEMAND_MODIFIED action. |
static SimAction |
demandRemoved(long demandId,
long ingressNodeId,
long egressNodeId,
double offeredTraffic,
Map<String,String> attributes)
Creates a
DEMAND_REMOVED action. |
static SimAction |
demandRemoved(long layerId,
long demandId,
long ingressNodeId,
long egressNodeId,
double offeredTraffic,
Map<String,String> attributes)
Creates a
DEMAND_REMOVED action. |
static SimAction |
forwardingRuleAdded(long layerId,
Pair<Long,Long> demandLinkPair)
Creates a
FORWARDING_RULE_ADDED action. |
static SimAction |
forwardingRuleAdded(Pair<Long,Long> demandLinkPair)
Creates a
FORWARDING_RULE_ADDED action. |
static SimAction |
forwardingRuleModified(long layerId,
Pair<Long,Long> demandLinkPair)
Creates a
FORWARDING_RULE_MODIFIED action. |
static SimAction |
forwardingRuleModified(Pair<Long,Long> demandLinkPair)
Creates a
FORWARDING_RULE_MODIFIED action. |
static SimAction |
forwardingRuleRemoved(long layerId,
Pair<Long,Long> demandLinkPair,
double splittingRatio,
Map<String,String> attributes)
Creates a
FORWARDING_RULE_REMOVED action. |
static SimAction |
forwardingRuleRemoved(Pair<Long,Long> demandLinkPair,
double splittingRatio,
Map<String,String> attributes)
Creates a
FORWARDING_RULE_REMOVED action. |
static SimAction |
layerAdded(long layerId)
Creates a
LAYER_ADDED action. |
static SimAction |
layerModified(long layerId)
Creates a
LAYER_MODIFIED action. |
static SimAction |
layerRemoved(long layerId,
String name,
String description,
String linkCapacityUnitsName,
String demandTrafficUnitsName,
Map<String,String> attributes)
Creates a
LAYER_REMOVED action. |
static SimAction |
linkAdded(long linkId)
Creates a
LINK_ADDED action. |
static SimAction |
linkAdded(long layerId,
long linkId)
Creates a
LINK_ADDED action. |
static SimAction |
linkDown(long linkId)
Creates a
LINK_DOWN action. |
static SimAction |
linkDown(long layerId,
long linkId)
Creates a
LINK_DOWN action. |
static SimAction |
linkModified(long linkId)
Creates a
LINK_MODIFIED action. |
static SimAction |
linkModified(long layerId,
long linkId)
Creates a
LINK_MODIFIED action. |
static SimAction |
linkRemoved(long linkId,
long originNodeId,
long destinationNodeId,
double capacity,
double lengthInKm,
double propagationSpeedInKmPerSecond,
Map<String,String> attributes)
Creates a
LINK_REMOVED action. |
static SimAction |
linkRemoved(long layerId,
long linkId,
long originNodeId,
long destinationNodeId,
double capacity,
double lengthInKm,
double propagationSpeedInKmPerSecond,
Map<String,String> attributes)
Creates a
LINK_REMOVED action. |
static SimAction |
linkUp(long linkId)
Creates a
LINK_UP action. |
static SimAction |
linkUp(long layerId,
long linkId)
Creates a
LINK_UP action. |
static SimAction |
nodeAdded(long nodeId)
Creates a
NODE_ADDED action. |
static SimAction |
nodeDown(long nodeId)
Creates a
NODE_DOWN action. |
static SimAction |
nodeModified(long nodeId)
Creates a
NODE_MODIFIED action. |
static SimAction |
nodeRemoved(long nodeId,
Point2D xyPosition,
String name,
Map<String,String> attributes)
Creates a
NODE_REMOVED action. |
static SimAction |
nodeUp(long nodeId)
Creates a
NODE_UP action. |
static SimAction |
protectionSegmentAdded(long segmentId)
Creates a
PROTECTION_SEGMENT_ADDED action. |
static SimAction |
protectionSegmentAdded(long layerId,
long segmentId)
Creates a
PROTECTION_SEGMENT_ADDED action. |
static SimAction |
protectionSegmentModified(long segmentId)
Creates a
PROTECTION_SEGMENT_MODIFIED action. |
static SimAction |
protectionSegmentModified(long layerId,
long segmentId)
Creates a
PROTECTION_SEGMENT_MODIFIED action. |
static SimAction |
protectionSegmentRemoved(long segmentId,
double reservedCapacity,
List<Long> seqLinks,
Map<String,String> attributes)
Creates a
PROTECTION_SEGMENT_REMOVED action. |
static SimAction |
protectionSegmentRemoved(long layerId,
long segmentId,
double reservedCapacity,
List<Long> seqLinks,
Map<String,String> attributes)
Creates a
PROTECTION_SEGMENT_REMOVED action. |
static SimAction |
routeAdded(long routeId)
Creates a
ROUTE_ADDED action. |
static SimAction |
routeAdded(long layerId,
long routeId)
Creates a
ROUTE_ADDED action. |
static SimAction |
routeModified(long routeId)
Creates a
ROUTE_MODIFIED action. |
static SimAction |
routeModified(long layerId,
long routeId)
Creates a
ROUTE_MODIFIED action. |
static SimAction |
routeRemoved(long routeId,
long demandId,
long ingressNodeId,
long egressNodeId,
double carriedTraffic,
double occupiedCapacity,
List<Long> seqLinks,
List<Long> backupSegmentList,
Map<String,String> attributes)
Creates a
ROUTE_REMOVED action. |
static SimAction |
routeRemoved(long layerId,
long routeId,
long demandId,
long ingressNodeId,
long egressNodeId,
double carriedTraffic,
double occupiedCapacity,
List<Long> seqLinks,
List<Long> backupSegmentList,
Map<String,String> attributes)
Creates a
ROUTE_REMOVED action. |
static SimAction |
srgAdded(long srgId)
Creates a
SRG_ADDED action. |
static SimAction |
srgModified(long srgId)
Creates a
SRG_MODIFIED action. |
static SimAction |
srgRemoved(long srgId,
double mttfInHours,
double mttrInHours,
Map<String,String> attributes)
Creates a
SRG_REMOVED action. |
public static SimAction demandAdded(long demandId)
DEMAND_ADDED
action.demandId
- Demand identifierSimAction
public static SimAction demandAdded(long layerId, long demandId)
DEMAND_ADDED
action.layerId
- Layer identifierdemandId
- Demand identifierSimAction
public static SimAction demandModified(long demandId)
DEMAND_MODIFIED
action.demandId
- Demand identifierSimAction
public static SimAction demandModified(long layerId, long demandId)
DEMAND_MODIFIED
action.layerId
- Layer identifierdemandId
- Demand identifierSimAction
public static SimAction demandRemoved(long demandId, long ingressNodeId, long egressNodeId, double offeredTraffic, Map<String,String> attributes)
DEMAND_REMOVED
action.demandId
- Demand identifieringressNodeId
- Ingress node identifieregressNodeId
- Egress node identifierofferedTraffic
- Offered trafficattributes
- AttributesSimAction
public static SimAction demandRemoved(long layerId, long demandId, long ingressNodeId, long egressNodeId, double offeredTraffic, Map<String,String> attributes)
DEMAND_REMOVED
action.layerId
- Layer identifierdemandId
- Demand identifieringressNodeId
- Ingress node identifieregressNodeId
- Egress node identifierofferedTraffic
- Offered trafficattributes
- AttributesSimAction
public static SimAction forwardingRuleAdded(long layerId, Pair<Long,Long> demandLinkPair)
FORWARDING_RULE_ADDED
action.layerId
- Layer identifierdemandLinkPair
- Demand-outgoing link pairSimAction
public static SimAction forwardingRuleAdded(Pair<Long,Long> demandLinkPair)
FORWARDING_RULE_ADDED
action.demandLinkPair
- Demand-outgoing link pairSimAction
public static SimAction forwardingRuleModified(long layerId, Pair<Long,Long> demandLinkPair)
FORWARDING_RULE_MODIFIED
action.layerId
- Layer identifierdemandLinkPair
- Demand-outgoing link pairSimAction
public static SimAction forwardingRuleModified(Pair<Long,Long> demandLinkPair)
FORWARDING_RULE_MODIFIED
action.demandLinkPair
- Demand-outgoing link pairSimAction
public static SimAction forwardingRuleRemoved(long layerId, Pair<Long,Long> demandLinkPair, double splittingRatio, Map<String,String> attributes)
FORWARDING_RULE_REMOVED
action.layerId
- Layer identifierdemandLinkPair
- Demand-outgoing link pairsplittingRatio
- Splitting ratioattributes
- AttributesSimAction
public static SimAction forwardingRuleRemoved(Pair<Long,Long> demandLinkPair, double splittingRatio, Map<String,String> attributes)
FORWARDING_RULE_REMOVED
action.demandLinkPair
- Demand-outgoing link pairsplittingRatio
- Splitting ratioattributes
- AttributesSimAction
public static SimAction layerAdded(long layerId)
LAYER_ADDED
action.layerId
- Layer identifierSimAction
public static SimAction layerModified(long layerId)
LAYER_MODIFIED
action.layerId
- Layer identifierSimAction
public static SimAction layerRemoved(long layerId, String name, String description, String linkCapacityUnitsName, String demandTrafficUnitsName, Map<String,String> attributes)
LAYER_REMOVED
action.layerId
- Layer identifiername
- Namedescription
- DescriptionlinkCapacityUnitsName
- Link capacity units namedemandTrafficUnitsName
- Demand traffic units nameattributes
- AttributesSimAction
public static SimAction linkAdded(long linkId)
LINK_ADDED
action.linkId
- Link identifierSimAction
public static SimAction linkAdded(long layerId, long linkId)
LINK_ADDED
action.layerId
- Layer identifierlinkId
- Link identifierSimAction
public static SimAction linkDown(long linkId)
LINK_DOWN
action.linkId
- Link identifierSimAction
public static SimAction linkDown(long layerId, long linkId)
LINK_DOWN
action.layerId
- Layer identifierlinkId
- Link identifierSimAction
public static SimAction linkModified(long linkId)
LINK_MODIFIED
action.linkId
- Link identifierSimAction
public static SimAction linkModified(long layerId, long linkId)
LINK_MODIFIED
action.layerId
- Layer identifierlinkId
- Link identifierSimAction
public static SimAction linkRemoved(long linkId, long originNodeId, long destinationNodeId, double capacity, double lengthInKm, double propagationSpeedInKmPerSecond, Map<String,String> attributes)
LINK_REMOVED
action.linkId
- Link identifieroriginNodeId
- Origin node identifierdestinationNodeId
- Destination node identifiercapacity
- CapacitylengthInKm
- Length in kmpropagationSpeedInKmPerSecond
- Propagation speed in km per secondattributes
- AttributesSimAction
public static SimAction linkRemoved(long layerId, long linkId, long originNodeId, long destinationNodeId, double capacity, double lengthInKm, double propagationSpeedInKmPerSecond, Map<String,String> attributes)
LINK_REMOVED
action.layerId
- Layer identifierlinkId
- Link identifieroriginNodeId
- Origin node identifierdestinationNodeId
- Destination node identifiercapacity
- CapacitylengthInKm
- Length in kmpropagationSpeedInKmPerSecond
- Propagation speed in km per secondattributes
- AttributesSimAction
public static SimAction linkUp(long linkId)
LINK_UP
action.linkId
- Link identifierSimAction
public static SimAction linkUp(long layerId, long linkId)
LINK_UP
action.layerId
- Layer identifierlinkId
- Link identifierSimAction
public static SimAction nodeAdded(long nodeId)
NODE_ADDED
action.nodeId
- Node identifierSimAction
public static SimAction nodeDown(long nodeId)
NODE_DOWN
action.nodeId
- Node identifierSimAction
public static SimAction nodeModified(long nodeId)
NODE_MODIFIED
action.nodeId
- Node identifierSimAction
public static SimAction nodeRemoved(long nodeId, Point2D xyPosition, String name, Map<String,String> attributes)
NODE_REMOVED
action.nodeId
- Node identifierxyPosition
- Coordinatesname
- Nameattributes
- AttributesSimAction
public static SimAction nodeUp(long nodeId)
NODE_UP
action.nodeId
- Node identifierSimAction
public static SimAction protectionSegmentAdded(long segmentId)
PROTECTION_SEGMENT_ADDED
action.segmentId
- Protection segment identifierSimAction
public static SimAction protectionSegmentAdded(long layerId, long segmentId)
PROTECTION_SEGMENT_ADDED
action.layerId
- Layer identifiersegmentId
- Protection segment identifierSimAction
public static SimAction protectionSegmentModified(long segmentId)
PROTECTION_SEGMENT_MODIFIED
action.segmentId
- Protection segment identifierSimAction
public static SimAction protectionSegmentModified(long layerId, long segmentId)
PROTECTION_SEGMENT_MODIFIED
action.layerId
- Layer identifiersegmentId
- Protection segment identifierSimAction
public static SimAction protectionSegmentRemoved(long segmentId, double reservedCapacity, List<Long> seqLinks, Map<String,String> attributes)
PROTECTION_SEGMENT_REMOVED
action.segmentId
- Protection segment identifierreservedCapacity
- Reserved capacityseqLinks
- Sequence of linksattributes
- AttributesSimAction
public static SimAction protectionSegmentRemoved(long layerId, long segmentId, double reservedCapacity, List<Long> seqLinks, Map<String,String> attributes)
PROTECTION_SEGMENT_REMOVED
action.layerId
- Layer identifiersegmentId
- Protection segment identifierreservedCapacity
- Reserved capacityseqLinks
- Sequence of linksattributes
- AttributesSimAction
public static SimAction routeAdded(long routeId)
ROUTE_ADDED
action.routeId
- Route identifierSimAction
public static SimAction routeAdded(long layerId, long routeId)
ROUTE_ADDED
action.layerId
- Layer identifierrouteId
- Route identifierSimAction
public static SimAction routeModified(long routeId)
ROUTE_MODIFIED
action.routeId
- Route identifierSimAction
public static SimAction routeModified(long layerId, long routeId)
ROUTE_MODIFIED
action.layerId
- Layer identifierrouteId
- Route identifierSimAction
public static SimAction routeRemoved(long routeId, long demandId, long ingressNodeId, long egressNodeId, double carriedTraffic, double occupiedCapacity, List<Long> seqLinks, List<Long> backupSegmentList, Map<String,String> attributes)
ROUTE_REMOVED
action.routeId
- Route identifierdemandId
- Demand identifieringressNodeId
- Ingress node identifieregressNodeId
- Egress node identifiercarriedTraffic
- Carried traffic from the demandoccupiedCapacity
- Occupied capacity in the linksseqLinks
- Sequence of traversed links (and segments)backupSegmentList
- Backup segment listattributes
- AttributesSimAction
public static SimAction routeRemoved(long layerId, long routeId, long demandId, long ingressNodeId, long egressNodeId, double carriedTraffic, double occupiedCapacity, List<Long> seqLinks, List<Long> backupSegmentList, Map<String,String> attributes)
ROUTE_REMOVED
action.layerId
- Layer identifierrouteId
- Route identifierdemandId
- Demand identifieringressNodeId
- Ingress node identifieregressNodeId
- Egress node identifiercarriedTraffic
- Carried traffic from the demandoccupiedCapacity
- Occupied capacity in the linksseqLinks
- Sequence of traversed links (and segments)backupSegmentList
- Backup segment listattributes
- AttributesSimAction
public static SimAction srgAdded(long srgId)
SRG_ADDED
action.srgId
- SRG identifierSimAction
public static SimAction srgModified(long srgId)
SRG_MODIFIED
action.srgId
- SRG identifierSimAction
public static SimAction srgRemoved(long srgId, double mttfInHours, double mttrInHours, Map<String,String> attributes)
SRG_REMOVED
action.srgId
- SRG identifiermttfInHours
- Mean time to fail (in hours)mttrInHours
- Mean time to repair (in hours)attributes
- AttributesSimAction