Skip to content

Commit

Permalink
Merge pull request #50 from tand00/main
Browse files Browse the repository at this point in the history
Fixed inhibitors when a transition have no input arcs preset
  • Loading branch information
srba authored Oct 17, 2024
2 parents 30494fd + 2336fbc commit 0b7619c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion include/Core/TAPN/TimedTransition.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,9 @@ namespace VerifyTAPN {

inline unsigned int getNumberOfInputArcs() const { return preset.size(); };

inline unsigned int getNumberOfTransportArcs() const { return transportArcs.size(); };
inline unsigned int getNumberOfTransportArcs() const { return transportArcs.size(); }

inline unsigned int getNumberOfInhibitorArcs() const { return inhibitorArcs.size(); }

inline bool isConservative() const { return preset.size() == postset.size(); }

Expand Down
4 changes: 2 additions & 2 deletions src/DiscreteVerification/Generators/SMCRunGenerator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ namespace VerifyTAPN {
double originMaxDelay = _origin->availableDelay();
std::vector<interval<double>> invInterval = { interval<double>(0, originMaxDelay) };
for(auto transi : _tapn.getTransitions()) {
if(transi->getPresetSize() == 0) {
if(transi->getPresetSize() == 0 && transi->getNumberOfInhibitorArcs() == 0) {
_defaultTransitionIntervals[transi->getIndex()] = invInterval;
} else {
std::vector<interval<double>> firingDates = transitionFiringDates(transi);
Expand Down Expand Up @@ -87,7 +87,7 @@ namespace VerifyTAPN {
bool deadlocked = true;
for(auto transi : _tapn.getTransitions()) {
int i = transi->getIndex();
if(transi->getPresetSize() == 0) {
if(transi->getPresetSize() == 0 && transi->getNumberOfInhibitorArcs() == 0) {
_transitionIntervals[i] = invInterval;
} else {
std::vector<interval<double>> firingDates = transitionFiringDates(transi);
Expand Down

0 comments on commit 0b7619c

Please sign in to comment.