Browse Source

added some statistics output

tempestpy_adaptions
TimQu 8 years ago
parent
commit
29687ca5d5
  1. 18
      src/storm/modelchecker/multiobjective/constraintBased/SparseCbAchievabilityQuery.cpp

18
src/storm/modelchecker/multiobjective/constraintBased/SparseCbAchievabilityQuery.cpp

@ -8,8 +8,10 @@
#include "storm/utility/constants.h" #include "storm/utility/constants.h"
#include "storm/utility/vector.h" #include "storm/utility/vector.h"
#include "storm/utility/solver.h" #include "storm/utility/solver.h"
#include "storm/utility/Stopwatch.h"
#include "storm/settings/SettingsManager.h" #include "storm/settings/SettingsManager.h"
#include "storm/settings/modules/GeneralSettings.h" #include "storm/settings/modules/GeneralSettings.h"
#include "storm/settings/modules/CoreSettings.h"
#include "storm/settings/modules/MultiObjectiveSettings.h" #include "storm/settings/modules/MultiObjectiveSettings.h"
#include "storm/storage/expressions/Expressions.h" #include "storm/storage/expressions/Expressions.h"
@ -39,15 +41,23 @@ namespace storm {
template <class SparseModelType> template <class SparseModelType>
bool SparseCbAchievabilityQuery<SparseModelType>::checkAchievability() { bool SparseCbAchievabilityQuery<SparseModelType>::checkAchievability() {
STORM_LOG_INFO("Building constraint system to check achievability.");
//this->preprocessedModel.writeDotToStream(std::cout); //this->preprocessedModel.writeDotToStream(std::cout);
storm::utility::Stopwatch swInitialization(true);
initializeConstraintSystem(); initializeConstraintSystem();
solver->push();
STORM_LOG_INFO("Constraint system consists of " << expectedChoiceVariables.size() << " + " << bottomStateVariables.size() << " variables");
addObjectiveConstraints(); addObjectiveConstraints();
solver->push();
swInitialization.stop();
storm::utility::Stopwatch swCheck(true);
STORM_LOG_INFO("Invoking SMT Solver.");
storm::solver::SmtSolver::CheckResult result = solver->check(); storm::solver::SmtSolver::CheckResult result = solver->check();
swCheck.stop();
if (storm::settings::getModule<storm::settings::modules::CoreSettings>().isShowStatisticsSet()) {
STORM_PRINT_AND_LOG("Building the constraintsystem took " << swInitialization << " seconds and checking the SMT formula took " << swCheck << " seconds." << std::endl);
}
switch(result) { switch(result) {
case storm::solver::SmtSolver::CheckResult::Sat: case storm::solver::SmtSolver::CheckResult::Sat:
// std::cout << std::endl << "Satisfying assignment: " << std::endl << solver->getModelAsValuation().toString(true) << std::endl; // std::cout << std::endl << "Satisfying assignment: " << std::endl << solver->getModelAsValuation().toString(true) << std::endl;

Loading…
Cancel
Save