Skip to content

Commit

Permalink
Merge pull request #156 from NicEastvillage/fix-col-red-relevance
Browse files Browse the repository at this point in the history
Fix bug in colored reduction rule Relevance
  • Loading branch information
srba authored Nov 15, 2023
2 parents 8853068 + 5a766a0 commit 9217b34
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/PetriEngine/Colored/Reduction/RedRuleRelevance.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,13 @@ namespace PetriEngine::Colored::Reduction {
// Loops that do not alter the marking in the place are not considered relevant to the place.
const auto& prtIn = red.getInArc(arc.place, potentiallyRelevantTrans);
if (prtIn != potentiallyRelevantTrans.input_arcs.end()) {
if (const auto ms1 = PetriEngine::Colored::extractVarMultiset(*prtIn->expr)){
if (const auto ms2 = PetriEngine::Colored::extractVarMultiset(*prtIn->expr)) {
if (ms1 == ms2){
continue;
const auto& prtOut = red.getOutArc(potentiallyRelevantTrans, arc.place);
if (prtOut != potentiallyRelevantTrans.output_arcs.end()) {
if (const auto ms1 = PetriEngine::Colored::extractVarMultiset(*prtIn->expr)) {
if (const auto ms2 = PetriEngine::Colored::extractVarMultiset(*prtOut->expr)) {
if (ms1 == ms2) {
continue;
}
}
}
}
Expand Down

0 comments on commit 9217b34

Please sign in to comment.