Browse Source

lowest/highest assignment level of an edge now only consider the edge destinations

tempestpy_adaptions
TimQu 6 years ago
parent
commit
d875f8ba0d
  1. 4
      src/storm/storage/jani/Edge.h
  2. 5
      src/storm/storage/jani/TemplateEdge.cpp
  3. 4
      src/storm/storage/jani/TemplateEdge.h

4
src/storm/storage/jani/Edge.h

@ -121,13 +121,13 @@ namespace storm {
void setTemplateEdge(std::shared_ptr<TemplateEdge> const& newTe); void setTemplateEdge(std::shared_ptr<TemplateEdge> const& newTe);
/*! /*!
* Retrieves the lowest assignment level occurring in each assignment.
* Retrieves the lowest assignment level occurring in a destination assignment.
* If no assignment exists, this value is the highest possible integer * If no assignment exists, this value is the highest possible integer
*/ */
int64_t const& getLowestAssignmentLevel() const; int64_t const& getLowestAssignmentLevel() const;
/*! /*!
* Retrieves the highest assignment level occurring in each assignment
* Retrieves the highest assignment level occurring in a destination assignment
* If no assignment exists, this value is always zero * If no assignment exists, this value is always zero
*/ */
int64_t const& getHighestAssignmentLevel() const; int64_t const& getHighestAssignmentLevel() const;

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

@ -27,13 +27,8 @@ namespace storm {
} }
void TemplateEdge::finalize(Model const& containingModel) { void TemplateEdge::finalize(Model const& containingModel) {
if (assignments.empty()) {
lowestAssignmentLevel = std::numeric_limits<int64_t>::max(); lowestAssignmentLevel = std::numeric_limits<int64_t>::max();
highestAssignmentLevel = std::numeric_limits<int64_t>::min(); highestAssignmentLevel = std::numeric_limits<int64_t>::min();
} else {
lowestAssignmentLevel = assignments.getLowestLevel();
highestAssignmentLevel = assignments.getHighestLevel();
}
for (auto const& destination : getDestinations()) { for (auto const& destination : getDestinations()) {
if (!destination.getOrderedAssignments().empty()) { if (!destination.getOrderedAssignments().empty()) {
lowestAssignmentLevel = std::min(lowestAssignmentLevel, destination.getOrderedAssignments().getLowestLevel()); lowestAssignmentLevel = std::min(lowestAssignmentLevel, destination.getOrderedAssignments().getLowestLevel());

4
src/storm/storage/jani/TemplateEdge.h

@ -92,13 +92,13 @@ namespace storm {
bool usesAssignmentLevels(bool onlyTransient = false) const; bool usesAssignmentLevels(bool onlyTransient = false) const;
/*! /*!
* Retrieves the lowest assignment level occurring in each assignment.
* Retrieves the lowest assignment level occurring in a destination assignment.
* If no assignment exists, this value is the highest possible integer * If no assignment exists, this value is the highest possible integer
*/ */
int64_t const& getLowestAssignmentLevel() const; int64_t const& getLowestAssignmentLevel() const;
/*! /*!
* Retrieves the highest assignment level occurring in each assignment
* Retrieves the highest assignment level occurring in a destination assignment
* If no assignment exists, this value is always zero * If no assignment exists, this value is always zero
*/ */
int64_t const& getHighestAssignmentLevel() const; int64_t const& getHighestAssignmentLevel() const;

Loading…
Cancel
Save