|
@ -155,7 +155,9 @@ namespace storm { |
|
|
formula.asProbabilityOperatorFormula()); |
|
|
formula.asProbabilityOperatorFormula()); |
|
|
pomdp.getTransitionMatrix().makeRowGroupsAbsorbing(surelyNotAlmostSurelyReachTarget); |
|
|
pomdp.getTransitionMatrix().makeRowGroupsAbsorbing(surelyNotAlmostSurelyReachTarget); |
|
|
storm::storage::BitVector targetStates = qualitativeAnalysis.analyseProb1(formula.asProbabilityOperatorFormula()); |
|
|
storm::storage::BitVector targetStates = qualitativeAnalysis.analyseProb1(formula.asProbabilityOperatorFormula()); |
|
|
|
|
|
bool computedSomething = false; |
|
|
if (qualSettings.isMemlessSearchSet()) { |
|
|
if (qualSettings.isMemlessSearchSet()) { |
|
|
|
|
|
computedSomething = true; |
|
|
storm::expressions::ExpressionManager expressionManager; |
|
|
storm::expressions::ExpressionManager expressionManager; |
|
|
std::shared_ptr<storm::utility::solver::SmtSolverFactory> smtSolverFactory = std::make_shared<storm::utility::solver::Z3SmtSolverFactory>(); |
|
|
std::shared_ptr<storm::utility::solver::SmtSolverFactory> smtSolverFactory = std::make_shared<storm::utility::solver::Z3SmtSolverFactory>(); |
|
|
storm::pomdp::MemlessSearchOptions options = fillMemlessSearchOptionsFromSettings(); |
|
|
storm::pomdp::MemlessSearchOptions options = fillMemlessSearchOptionsFromSettings(); |
|
@ -168,7 +170,7 @@ namespace storm { |
|
|
surelyNotAlmostSurelyReachTarget, |
|
|
surelyNotAlmostSurelyReachTarget, |
|
|
smtSolverFactory); |
|
|
smtSolverFactory); |
|
|
if (qualSettings.isWinningRegionSet()) { |
|
|
if (qualSettings.isWinningRegionSet()) { |
|
|
STORM_LOG_ERROR("Computing winning regions is not supported by ccd-memless."); |
|
|
|
|
|
|
|
|
STORM_LOG_ERROR("Computing winning regions is not supported by the one-shot method."); |
|
|
} else { |
|
|
} else { |
|
|
memlessSearch.analyzeForInitialStates(lookahead); |
|
|
memlessSearch.analyzeForInitialStates(lookahead); |
|
|
} |
|
|
} |
|
@ -206,21 +208,28 @@ namespace storm { |
|
|
++offset; |
|
|
++offset; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
STORM_PRINT_AND_LOG("Initial state is safe: " |
|
|
|
|
|
<< search.getLastWinningRegion().isWinning(initialObservation, |
|
|
|
|
|
offset)); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (search.getLastWinningRegion().isWinning(initialObservation, |
|
|
|
|
|
offset)) { |
|
|
|
|
|
STORM_PRINT_AND_LOG("Initial state is safe!" |
|
|
|
|
|
<< std::endl); |
|
|
|
|
|
} else { |
|
|
|
|
|
STORM_PRINT_AND_LOG("Initial state may not be safe." |
|
|
|
|
|
<< std::endl); |
|
|
|
|
|
} |
|
|
} else { |
|
|
} else { |
|
|
STORM_LOG_WARN("Output for multiple initial states is incomplete"); |
|
|
STORM_LOG_WARN("Output for multiple initial states is incomplete"); |
|
|
} |
|
|
} |
|
|
std::cout << "Number of belief support states: " |
|
|
|
|
|
<< search.getLastWinningRegion().beliefSupportStates() << std::endl; |
|
|
|
|
|
if (coreSettings.isShowStatisticsSet() && qualSettings.computeExpensiveStats()) { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (coreSettings.isShowStatisticsSet()) { |
|
|
|
|
|
STORM_PRINT_AND_LOG("#STATS Number of belief support states: " |
|
|
|
|
|
<< search.getLastWinningRegion().beliefSupportStates() << std::endl); |
|
|
|
|
|
if (qualSettings.computeExpensiveStats()) { |
|
|
auto wbss = search.getLastWinningRegion().computeNrWinningBeliefs(); |
|
|
auto wbss = search.getLastWinningRegion().computeNrWinningBeliefs(); |
|
|
STORM_PRINT_AND_LOG( |
|
|
STORM_PRINT_AND_LOG( |
|
|
"Number of winning belief support states: [" << wbss.first << "," << wbss.second |
|
|
|
|
|
|
|
|
"#STATS Number of winning belief support states: [" << wbss.first << "," << wbss.second |
|
|
<< "]"); |
|
|
<< "]"); |
|
|
} |
|
|
} |
|
|
if (coreSettings.isShowStatisticsSet()) { |
|
|
|
|
|
search.getStatistics().print(); |
|
|
search.getStatistics().print(); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -229,12 +238,15 @@ namespace storm { |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
if (qualSettings.isComputeOnBeliefSupportSet()) { |
|
|
if (qualSettings.isComputeOnBeliefSupportSet()) { |
|
|
|
|
|
computedSomething = true; |
|
|
storm::pomdp::qualitative::JaniBeliefSupportMdpGenerator<ValueType> janicreator(pomdp); |
|
|
storm::pomdp::qualitative::JaniBeliefSupportMdpGenerator<ValueType> janicreator(pomdp); |
|
|
janicreator.generate(targetStates, surelyNotAlmostSurelyReachTarget); |
|
|
janicreator.generate(targetStates, surelyNotAlmostSurelyReachTarget); |
|
|
bool initialOnly = !qualSettings.isWinningRegionSet(); |
|
|
bool initialOnly = !qualSettings.isWinningRegionSet(); |
|
|
janicreator.verifySymbolic(initialOnly); |
|
|
janicreator.verifySymbolic(initialOnly); |
|
|
STORM_PRINT_AND_LOG("Initial state is safe: " << janicreator.isInitialWinning() << "\n"); |
|
|
STORM_PRINT_AND_LOG("Initial state is safe: " << janicreator.isInitialWinning() << "\n"); |
|
|
} |
|
|
} |
|
|
|
|
|
STORM_LOG_THROW(computedSomething, storm::exceptions::InvalidSettingsException, "Nothing to be done, did you forget to set a method?"); |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
template<typename ValueType, storm::dd::DdType DdType> |
|
|
template<typename ValueType, storm::dd::DdType DdType> |
|
|