Browse Source

fix guard for code that considers transient assignments to also consider only transient assignments

tempestpy_adaptions
Sebastian Junges 4 years ago
parent
commit
08f928456c
  1. 2
      src/storm/generator/JaniNextStateGenerator.cpp
  2. 5
      src/storm/storage/jani/OrderedAssignments.cpp
  3. 2
      src/storm/storage/jani/OrderedAssignments.h

2
src/storm/generator/JaniNextStateGenerator.cpp

@ -763,7 +763,7 @@ namespace storm {
storm::jani::Edge const& edge = *iteratorList[i]->second;
lowestDestinationAssignmentLevel = std::min(lowestDestinationAssignmentLevel, edge.getLowestAssignmentLevel());
highestDestinationAssignmentLevel = std::max(highestDestinationAssignmentLevel, edge.getHighestAssignmentLevel());
if (!edge.getAssignments().empty()) {
if (!edge.getAssignments().empty(true)) {
lowestEdgeAssignmentLevel = std::min(lowestEdgeAssignmentLevel, edge.getAssignments().getLowestLevel(true));
highestEdgeAssignmentLevel = std::max(highestEdgeAssignmentLevel, edge.getAssignments().getHighestLevel(true));
}

5
src/storm/storage/jani/OrderedAssignments.cpp

@ -87,7 +87,10 @@ namespace storm {
return getLowestLevel(onlyTransient) != 0 || getHighestLevel(onlyTransient) != 0;
}
bool OrderedAssignments::empty() const {
bool OrderedAssignments::empty(bool onlyTransient) const {
if (onlyTransient) {
return transientAssignments.empty();
}
return allAssignments.empty();
}

2
src/storm/storage/jani/OrderedAssignments.h

@ -57,7 +57,7 @@ namespace storm {
/*!
* Retrieves whether this set of assignments is empty.
*/
bool empty() const;
bool empty(bool onlyTransient = false) const;
/*!
* Removes all assignments from this set.

Loading…
Cancel
Save