From 8cf91e700cd59c6bfa571e475041799ebf2312ec Mon Sep 17 00:00:00 2001 From: sp Date: Mon, 8 Jan 2024 13:42:16 +0100 Subject: [PATCH] WIP: changed probabilities in main for testing --- main.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/main.cpp b/main.cpp index 37b3a36..be33399 100644 --- a/main.cpp +++ b/main.cpp @@ -144,12 +144,13 @@ int main(int argc, char* argv[]) { pos_iterator_t backgroundIter = backgroundFirst; pos_iterator_t backgroundLast(background.end()); MinigridParser backgroundParser(backgroundFirst); - + cells contentCells; cells backgroundCells; std::vector configurations; std::map stateRewards; - double faultyProbability; + float faultyProbability = 0.0; + float probIntended = 0.9; try { bool ok = phrase_parse(contentIter, contentLast, contentParser, qi::space, contentCells); @@ -157,7 +158,7 @@ int main(int argc, char* argv[]) { ok &= phrase_parse(backgroundIter, backgroundLast, backgroundParser, qi::space, backgroundCells); // TODO } if (configFilename->is_set()) { - YamlConfigParser parser(configFilename->value(0)); + YamlConfigParser parser(configFilename->value(0)); configurations = parser.parseConfiguration(); } @@ -181,8 +182,9 @@ int main(int argc, char* argv[]) { } } if(ok) { - Grid grid(contentCells, backgroundCells, gridOptions, stateRewards, faultyProbability); - //grid.printToPrism(std::cout, prism::ModelType::MDP); + Grid grid(contentCells, backgroundCells, gridOptions, stateRewards, probIntended, faultyProbability); + + grid.printToPrism(std::cout, configurations , gridOptions.getModelType()); std::stringstream ss; // grid.printToPrism(file, configurations ,prism::ModelType::MDP); grid.printToPrism(ss, configurations , gridOptions.getModelType());