1 #ifndef COMMAND_LINE_OPTIONS_HH_
2 #define COMMAND_LINE_OPTIONS_HH_
46 #include <boost/program_options.hpp>
75 boost::program_options::variables_map &
options() {
return varMap; }
77 boost::program_options::variables_map
const &
options()
const
83 std::string
const &
inputFile()
const {
return inputFileName; }
88 Verbosity::Level
verbosity()
const {
return (Verbosity::Level) verbosityLevel;
91 ModelOptions::ReachType reachSolver()
const {
92 if (varMap[
"reach-with"].as<std::string>() == std::string(
"glop"))
93 return ModelOptions::ReachType::glop;
94 if (varMap[
"reach-with"].as<std::string>() == std::string(
"iter"))
95 return ModelOptions::ReachType::iter;
96 throw std::out_of_range(
"Invalid solver type");
99 ModelOptions::SSPType sspSolver()
const {
100 if (varMap[
"ssp-with"].as<std::string>() == std::string(
"glop"))
101 return ModelOptions::SSPType::glop;
102 if (varMap[
"ssp-with"].as<std::string>() == std::string(
"iter"))
103 return ModelOptions::SSPType::iter;
104 if (varMap[
"ssp-with"].as<std::string>() == std::string(
"poly"))
105 return ModelOptions::SSPType::poly;
106 throw std::out_of_range(
"Invalid solver type");
111 bool learnEnabled()
const {
112 if (varMap[
"learn"].as<std::string>() != std::string(
"none"))
118 bool QEnabled()
const {
119 if (varMap[
"learn"].as<std::string>() == std::string(
"Q"))
125 bool DQEnabled()
const {
126 if (varMap[
"learn"].as<std::string>() == std::string(
"DQ"))
132 bool SLEnabled()
const {
133 if (varMap[
"learn"].as<std::string>() == std::string(
"SL"))
139 bool AQEnabled()
const {
140 if (varMap[
"learn"].as<std::string>() == std::string(
"AQ"))
147 if (varMap[
"reward-type"].as<std::string>() == std::string(
"default-type"))
149 else if (varMap[
"reward-type"].as<std::string>() == std::string(
"prism"))
151 else if (varMap[
"reward-type"].as<std::string>() == std::string(
"zeta-reach"))
153 else if (varMap[
"reward-type"].as<std::string>() == std::string(
"zeta-acc"))
155 else if (varMap[
"reward-type"].as<std::string>() == std::string(
"zeta-discount"))
157 else if (varMap[
"reward-type"].as<std::string>() == std::string(
"reward-on-acc"))
159 else if (varMap[
"reward-type"].as<std::string>() == std::string(
"multi-discount"))
161 else if (varMap[
"reward-type"].as<std::string>() == std::string(
"parity"))
163 else if (varMap[
"reward-type"].as<std::string>() == std::string(
"pri-tracker"))
165 else if (varMap[
"reward-type"].as<std::string>() == std::string(
"lexo"))
167 else if (varMap[
"reward-type"].as<std::string>() == std::string(
"avg"))
170 throw(std::runtime_error(
"Reward type invalid."));
174 boost::program_options::options_description visible;
175 boost::program_options::options_description hidden;
176 boost::program_options::options_description cmdline_options;
177 boost::program_options::positional_options_description posOpt;
178 boost::program_options::variables_map varMap;
185 std::string inputFileName;