public class ConcurrencyRelation extends Object
| Constructor and Description |
|---|
ConcurrencyRelation(NetSystem sys)
Create a concurrency relation for a given Petri net.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
addAllCombinations(Set<org.jbpt.petri.behavior.ConcurrencyRelation.NodePair> combinations,
List<Node> nodes) |
boolean |
areConcurrent(int i,
int j)
Returns whether there exists a state in which
both nodes are enabled / marked concurrently.
|
boolean |
areConcurrent(Node n1,
Node n2)
Returns whether there exists a state in which
both nodes are enabled / marked concurrently.
|
protected void |
calculateConcurrencyMatrix()
Calculates the concurrency relation using the
algorithm by Kovalyov and Esparza (1996).
|
boolean |
equals(ConcurrencyRelation relation)
Checks equality for two true concurrency matrices
Returns false, if both matrices are not based on the same
Petri net.
|
NetSystem |
getNet()
Get the Petri net.
|
protected boolean |
nodeConcurrentToNodes(Node n,
Collection<Node> nodes)
Checks whether a given node is concurrent to all nodes given in
a collection of nodes.
|
protected void |
processConcNodes(Set<org.jbpt.petri.behavior.ConcurrencyRelation.NodePair> concNodes,
boolean isFC)
Helper method for calculating the concurrency
relation (see Kovalyov and Esparza (1996)).
|
protected void |
setAllNodesConcurrent(Collection<Node> nodes)
Set all nodes pairwise concurrent in the concurrency matrix.
|
protected void |
setNodeConcurrentToNodes(Node n,
Collection<Node> nodes)
Set all a node and all nodes in a collection concurrent.
|
protected void |
setNodesConcurrent(Node n1,
Node n2)
Set two nodes concurrent in the concurrency matrix.s
|
String |
toString() |
public ConcurrencyRelation(NetSystem sys)
the - Petri netpublic boolean areConcurrent(Node n1, Node n2)
n1 - n2 - public boolean areConcurrent(int i,
int j)
n1 - n2 - protected boolean nodeConcurrentToNodes(Node n, Collection<Node> nodes)
a - single nodea - collection of nodesprotected void setAllNodesConcurrent(Collection<Node> nodes)
nodes - protected void setNodeConcurrentToNodes(Node n, Collection<Node> nodes)
a - single nodea - collection of nodesprotected void setNodesConcurrent(Node n1, Node n2)
n1 - n2 - protected void processConcNodes(Set<org.jbpt.petri.behavior.ConcurrencyRelation.NodePair> concNodes, boolean isFC)
protected void addAllCombinations(Set<org.jbpt.petri.behavior.ConcurrencyRelation.NodePair> combinations, List<Node> nodes)
protected void calculateConcurrencyMatrix()
public NetSystem getNet()
public boolean equals(ConcurrencyRelation relation)
relation - that should be comparedCopyright © 2017. All rights reserved.