Browse Source

more debug output

Former-commit-id: acb7f9ea2f
tempestpy_adaptions
dehnert 9 years ago
parent
commit
507331d8a9
  1. 4
      src/builder/DdPrismModelBuilder.cpp
  2. 8
      src/storage/dd/CuddAdd.cpp

4
src/builder/DdPrismModelBuilder.cpp

@ -623,6 +623,7 @@ namespace storm {
transitionMatrix.exportToDot("trans.dot"); transitionMatrix.exportToDot("trans.dot");
std::cout << "nnz: " << transitionMatrix.getNonZeroCount() << std::endl; std::cout << "nnz: " << transitionMatrix.getNonZeroCount() << std::endl;
std::cout << "node: " << transitionMatrix.getNodeCount() << std::endl; std::cout << "node: " << transitionMatrix.getNodeCount() << std::endl;
std::cout << "trans: " << transitionMatrix << std::endl;
ModuleDecisionDiagram const& globalModule = transitionMatrixModulePair.second; ModuleDecisionDiagram const& globalModule = transitionMatrixModulePair.second;
// Finally, we build the DDs for a reward structure, if requested. It is important to do this now, because // Finally, we build the DDs for a reward structure, if requested. It is important to do this now, because
@ -653,9 +654,6 @@ namespace storm {
transitionMatrixBdd = transitionMatrixBdd.existsAbstract(generationInfo.allNondeterminismVariables); transitionMatrixBdd = transitionMatrixBdd.existsAbstract(generationInfo.allNondeterminismVariables);
} }
storm::dd::Bdd<Type> reachableStates = computeReachableStates(generationInfo, initialStates, transitionMatrixBdd); storm::dd::Bdd<Type> reachableStates = computeReachableStates(generationInfo, initialStates, transitionMatrixBdd);
reachableStates.exportToDot("reach.dot");
std::cout << "reach nnz: " << reachableStates.getNonZeroCount() << std::endl;
std::cout << "reach node: " << reachableStates.getNodeCount() << std::endl;
storm::dd::Add<Type> reachableStatesAdd = reachableStates.toAdd(); storm::dd::Add<Type> reachableStatesAdd = reachableStates.toAdd();
transitionMatrix *= reachableStatesAdd; transitionMatrix *= reachableStatesAdd;
if (stateAndTransitionRewards) { if (stateAndTransitionRewards) {

8
src/storage/dd/CuddAdd.cpp

@ -1,5 +1,6 @@
#include <cstring> #include <cstring>
#include <algorithm> #include <algorithm>
#include <boost/algorithm/string/join.hpp>
#include "src/storage/dd/CuddAdd.h" #include "src/storage/dd/CuddAdd.h"
#include "src/storage/dd/CuddBdd.h" #include "src/storage/dd/CuddBdd.h"
@ -1055,7 +1056,12 @@ namespace storm {
} }
std::ostream& operator<<(std::ostream& out, const Add<DdType::CUDD>& add) { std::ostream& operator<<(std::ostream& out, const Add<DdType::CUDD>& add) {
add.exportToDot();
out << "ADD with " << add.getNonZeroCount() << " nnz, " << add.getNodeCount() << " nodes, " << add.getLeafCount() << " leaves" << std::endl;
std::vector<std::string> variableNames;
for (auto const& variable : add.getContainedMetaVariables()) {
variableNames.push_back(variable.getName());
}
out << "contained variables: " << boost::algorithm::join(variableNames, ", ") << std::endl;
return out; return out;
} }

Loading…
Cancel
Save