From e5f71aa851431aaa5bc414d2053be0b771c8b9c1 Mon Sep 17 00:00:00 2001 From: Timo Philipp Gros Date: Tue, 19 Dec 2017 10:30:09 +0100 Subject: [PATCH] prints for foxGlynn --- .../csl/helper/SparseMarkovAutomatonCslHelper.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/storm/modelchecker/csl/helper/SparseMarkovAutomatonCslHelper.cpp b/src/storm/modelchecker/csl/helper/SparseMarkovAutomatonCslHelper.cpp index b427bcfbd..ad8c44b0f 100644 --- a/src/storm/modelchecker/csl/helper/SparseMarkovAutomatonCslHelper.cpp +++ b/src/storm/modelchecker/csl/helper/SparseMarkovAutomatonCslHelper.cpp @@ -193,7 +193,8 @@ namespace storm { logfile << (~markovianStates)[i] << "\t\t" << markovianStates[i] << "\t\t" << psiStates[i] << "\t\t" << cycleStates[i] << "\t\t" << cycleGoalStates[i] << "\n"; } - logfile << "Iteration for N = " << N << "maximal difference was " << diff << "\n"; + logfile << "Iteration for N = " << N << " maximal difference was " << diff << "\n"; + logfile << "vd: \n"; for (uint64_t i =0 ; i foxGlynnResult = storm::utility::numerical::foxGlynn(lambda*T, epsilon*kappa); + storm::utility::numerical::FoxGlynnResult foxGlynnResult = storm::utility::numerical::foxGlynn(lambda*T, epsilon*kappa/100); // Scale the weights so they add up to one. for (auto& element : foxGlynnResult.weights) { @@ -660,6 +661,8 @@ namespace storm { ValueType sum = 0; for (auto i = foxGlynnResult.left ; i<=foxGlynnResult.right; i++){ sum+=foxGlynnResult.weights[i-foxGlynnResult.left]; + logfile << i << "\t" << foxGlynnResult.weights[i-foxGlynnResult.left]; + logfile << i << "\t" << sum; } std::cout << " left " << foxGlynnResult.left << " right " << foxGlynnResult.right << " size " << foxGlynnResult.weights.size() << " sum " << sum << "\n"; @@ -706,6 +709,7 @@ namespace storm { } } oldDiff = maxNorm; + std::cout << "Finished Iteration for N = " << N << " with difference " << maxNorm << "\n"; } while (maxNorm > epsilon * (1 - kappa)); logfile.close();