Browse Source

Moving some includes to the header file

main
Tim Quatmann 5 years ago
parent
commit
572e7ace9d
  1. 13
      src/storm/modelchecker/helper/infinitehorizon/internal/LraViHelper.cpp
  2. 8
      src/storm/modelchecker/helper/infinitehorizon/internal/LraViHelper.h

13
src/storm/modelchecker/helper/infinitehorizon/internal/LraViHelper.cpp

@ -2,9 +2,6 @@
#include "storm/modelchecker/helper/infinitehorizon/internal/ComponentUtility.h" #include "storm/modelchecker/helper/infinitehorizon/internal/ComponentUtility.h"
#include "storm/solver/LinearEquationSolver.h"
#include "storm/solver/MinMaxLinearEquationSolver.h"
#include "storm/solver/Multiplier.h"
#include "storm/storage/MaximalEndComponent.h" #include "storm/storage/MaximalEndComponent.h"
#include "storm/storage/StronglyConnectedComponent.h" #include "storm/storage/StronglyConnectedComponent.h"
@ -97,7 +94,7 @@ namespace storm {
} }
ValueType selfLoopProb = storm::utility::one<ValueType>() - uniformizationFactor; ValueType selfLoopProb = storm::utility::one<ValueType>() - uniformizationFactor;
uint64_t selfLoopColumn = toSubModelStateMapping[componentState]; uint64_t selfLoopColumn = toSubModelStateMapping[componentState];
for (auto componentChoiceIt = getComponentChoicesBegin(element); componentChoiceIt != getComponentChoicesEnd(element); ++componentChoiceIt) {
for (auto componentChoiceIt = getComponentElementChoicesBegin(element); componentChoiceIt != getComponentElementChoicesEnd(element); ++componentChoiceIt) {
bool insertedDiagElement = false; bool insertedDiagElement = false;
for (auto const& entry : this->_transitionMatrix.getRow(*componentChoiceIt)) { for (auto const& entry : this->_transitionMatrix.getRow(*componentChoiceIt)) {
uint64_t subModelColumn = toSubModelStateMapping[entry.getColumn()]; uint64_t subModelColumn = toSubModelStateMapping[entry.getColumn()];
@ -135,7 +132,7 @@ namespace storm {
isTransitionsBuilder.newRowGroup(currIsRow); isTransitionsBuilder.newRowGroup(currIsRow);
isToTsTransitionsBuilder.newRowGroup(currIsRow); isToTsTransitionsBuilder.newRowGroup(currIsRow);
} }
for (auto componentChoiceIt = getComponentChoicesBegin(element); componentChoiceIt != getComponentChoicesEnd(element); ++componentChoiceIt) {
for (auto componentChoiceIt = getComponentElementChoicesBegin(element); componentChoiceIt != getComponentElementChoicesEnd(element); ++componentChoiceIt) {
for (auto const& entry : this->_transitionMatrix.getRow(*componentChoiceIt)) { for (auto const& entry : this->_transitionMatrix.getRow(*componentChoiceIt)) {
uint64_t subModelColumn = toSubModelStateMapping[entry.getColumn()]; uint64_t subModelColumn = toSubModelStateMapping[entry.getColumn()];
if (isTimedState(entry.getColumn())) { if (isTimedState(entry.getColumn())) {
@ -226,12 +223,12 @@ namespace storm {
if (exitRates) { if (exitRates) {
actionRewardScalingFactor = (*exitRates)[componentState] / _uniformizationRate; actionRewardScalingFactor = (*exitRates)[componentState] / _uniformizationRate;
} }
for (auto componentChoiceIt = getComponentChoicesBegin(element); componentChoiceIt != getComponentChoicesEnd(element); ++componentChoiceIt) {
for (auto componentChoiceIt = getComponentElementChoicesBegin(element); componentChoiceIt != getComponentElementChoicesEnd(element); ++componentChoiceIt) {
// Compute the values obtained for this choice. // Compute the values obtained for this choice.
_TsChoiceValues.push_back(stateValueGetter(componentState) / _uniformizationRate + actionValueGetter(*componentChoiceIt) * actionRewardScalingFactor); _TsChoiceValues.push_back(stateValueGetter(componentState) / _uniformizationRate + actionValueGetter(*componentChoiceIt) * actionRewardScalingFactor);
} }
} else { } else {
for (auto componentChoiceIt = getComponentChoicesBegin(element); componentChoiceIt != getComponentChoicesEnd(element); ++componentChoiceIt) {
for (auto componentChoiceIt = getComponentElementChoicesBegin(element); componentChoiceIt != getComponentElementChoicesEnd(element); ++componentChoiceIt) {
// Compute the values obtained for this choice. // Compute the values obtained for this choice.
// State values do not count here since no time passes in instant states. // State values do not count here since no time passes in instant states.
_IsChoiceValues.push_back(actionValueGetter(*componentChoiceIt)); _IsChoiceValues.push_back(actionValueGetter(*componentChoiceIt));
@ -329,7 +326,7 @@ namespace storm {
} else { } else {
uint64_t choice = localMecChoices[localState]; uint64_t choice = localMecChoices[localState];
STORM_LOG_ASSERT(choice < getComponentElementChoiceCount(element), "The selected choice does not seem to exist."); STORM_LOG_ASSERT(choice < getComponentElementChoiceCount(element), "The selected choice does not seem to exist.");
uint64_t globalChoiceIndex = *(getComponentChoicesBegin(element) + choice);
uint64_t globalChoiceIndex = *(getComponentElementChoicesBegin(element) + choice);
choices[elementState] = globalChoiceIndex - _transitionMatrix.getRowGroupIndices()[elementState]; choices[elementState] = globalChoiceIndex - _transitionMatrix.getRowGroupIndices()[elementState];
++localState; ++localState;
} }

8
src/storm/modelchecker/helper/infinitehorizon/internal/LraViHelper.h

@ -2,15 +2,13 @@
#include "storm/storage/SparseMatrix.h" #include "storm/storage/SparseMatrix.h"
#include "storm/solver/LinearEquationSolver.h"
#include "storm/solver/MinMaxLinearEquationSolver.h"
#include "storm/solver/Multiplier.h"
namespace storm { namespace storm {
class Environment; class Environment;
namespace solver {
template<typename ValueType> class LinearEquationSolver;
template<typename ValueType> class MinMaxLinearEquationSolver;
template<typename ValueType> class Multiplier;
}
namespace modelchecker { namespace modelchecker {
namespace helper { namespace helper {

Loading…
Cancel
Save