From 5c1de03d145b497239a05f231ad680b913bb88fd Mon Sep 17 00:00:00 2001 From: TimQu Date: Sun, 15 Oct 2017 11:43:41 +0200 Subject: [PATCH] fixed min prob computation for single objective case --- .../prctl/helper/SparseMdpPrctlHelper.cpp | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/storm/modelchecker/prctl/helper/SparseMdpPrctlHelper.cpp b/src/storm/modelchecker/prctl/helper/SparseMdpPrctlHelper.cpp index 1840263d8..42cc33adc 100644 --- a/src/storm/modelchecker/prctl/helper/SparseMdpPrctlHelper.cpp +++ b/src/storm/modelchecker/prctl/helper/SparseMdpPrctlHelper.cpp @@ -128,9 +128,19 @@ namespace storm { choiceValue += *stepSolutionIt; } - if (isFirstChoice || choiceValue > bestValue) { + if (isFirstChoice) { bestValue = std::move(choiceValue); isFirstChoice = false; + } else { + if (storm::solver::minimize(dir)) { + if (choiceValue < bestValue) { + bestValue = std::move(choiceValue); + } + } else { + if (choiceValue > bestValue) { + bestValue = std::move(choiceValue); + } + } } } // Insert the solution w.r.t. this choice @@ -196,7 +206,7 @@ namespace storm { std::cout << " #checked epochs: " << epochOrder.size() << "." << std::endl; std::cout << " overall Time: " << swAll << "." << std::endl; std::cout << "Epoch Model building Time: " << swBuild << "." << std::endl; - std::cout << "Epoch Model checking Time: " << swBuild << "." << std::endl; + std::cout << "Epoch Model checking Time: " << swCheck << "." << std::endl; std::cout << "---------------------------------" << std::endl; return result;