Skip to content

Commit

Permalink
set max constant to 0 if negative
Browse files Browse the repository at this point in the history
  • Loading branch information
mtygesen committed Jun 13, 2024
1 parent 10e8f9b commit 4b87e60
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Core/TAPN/TimedArcPetriNet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,9 @@ namespace TAPN {
maxConstant = maxConstant < maxArc ? maxArc : maxConstant;
}
}

// If maxConstant is never set, set it to 0
maxConstant = maxConstant < 0 ? 0 : maxConstant;
place->setMaxConstant(maxConstant);

for (auto* inhibitorArc : inhibitorArcs) {
Expand Down

0 comments on commit 4b87e60

Please sign in to comment.