From edcab9c0a34e8777c04691229f9370fc51162fd9 Mon Sep 17 00:00:00 2001 From: sp Date: Wed, 10 Jan 2024 18:55:15 +0100 Subject: [PATCH] removed unused options from cli option parsing Note: Some of these functionalities might return in the future --- main.cpp | 40 +--------------------------------------- 1 file changed, 1 insertion(+), 39 deletions(-) diff --git a/main.cpp b/main.cpp index be33399..4e7a95a 100644 --- a/main.cpp +++ b/main.cpp @@ -48,15 +48,6 @@ int main(int argc, char* argv[]) { auto helpOption = optionParser.add("h", "help", "Print this help message."); auto inputFilename = optionParser.add>("i", "input-file", "Filename of the input file."); auto outputFilename = optionParser.add>("o", "output-file", "Filename for the output file."); - - auto agentsToBeConsidered = optionParser.add, popl::Attribute::optional>("a", "agents", "Which parsed agents should be considered in the output. WIP."); - auto viewForAgents = optionParser.add, popl::Attribute::optional>("v", "view", "Agents for which the 'view'('direction') variable should be included. WIP."); - - auto probabilisticBehaviourAgents = optionParser.add, popl::Attribute::optional>("p", "prob-beh", "Agents for which we want to include probabilistic actions"); - auto probabilities = optionParser.add, popl::Attribute::optional>("q", "probs", "The probabilities for which probabilistic actions should be added. WIP"); - - auto enforceOneWays = optionParser.add("f", "force-oneways", "Enforce encoding of oneways. This entails that slippery tiles do not allow turning and have prob 1 to shift the agent by one and makes turning impossible if in a one tile wide section of the grid."); - auto configFilename = optionParser.add, popl::Attribute::optional>("c", "config-file", "Filename of the predicate configuration file."); @@ -75,35 +66,6 @@ int main(int argc, char* argv[]) { } GridOptions gridOptions = { {}, {} }; - if(agentsToBeConsidered->is_set()) { - gridOptions.agentsToBeConsidered = parseCommaSeparatedString(agentsToBeConsidered->value(0)); - } - if(viewForAgents->is_set()) { - gridOptions.agentsWithView = parseCommaSeparatedString(viewForAgents->value(0)); - } - if(enforceOneWays->is_set()) { - gridOptions.enforceOneWays = true; - } - if(probabilisticBehaviourAgents->is_set()) { - gridOptions.agentsWithProbabilisticBehaviour = parseCommaSeparatedString(probabilisticBehaviourAgents->value(0)); - for(auto const& a : gridOptions.agentsWithProbabilisticBehaviour) { - std::cout << a << std::endl; - } - if(probabilities->is_set()) { - std::vector parsedStrings = parseCommaSeparatedString(probabilities->value(0)); - - std::transform(parsedStrings.begin(), parsedStrings.end(), std::back_inserter(gridOptions.probabilitiesForActions), [](const std::string& string) { - return std::stof(string); - }); - for(auto const& a : gridOptions.probabilitiesForActions) { - std::cout << a << std::endl; - } - } else { - throw std::logic_error{ "When adding agents with probabilistic behaviour, you also need to specify a list of probabilities via --probs." }; - } - } - - std::fstream file {outputFilename->value(0), file.trunc | file.out}; std::fstream infile {inputFilename->value(0), infile.in}; std::string line, content, background, rewards, properties; @@ -149,7 +111,7 @@ int main(int argc, char* argv[]) { cells backgroundCells; std::vector configurations; std::map stateRewards; - float faultyProbability = 0.0; + float faultyProbability = 0.1; float probIntended = 0.9; try {