Browse Source

Extend ModelType with an entry for POMDPs

tempestpy_adaptions
sjunges 7 years ago
parent
commit
bc3646604d
  1. 5
      src/storm/models/ModelType.cpp
  2. 2
      src/storm/models/ModelType.h

5
src/storm/models/ModelType.cpp

@ -17,6 +17,8 @@ namespace storm {
return ModelType::MarkovAutomaton; return ModelType::MarkovAutomaton;
} else if (type == "S2PG") { } else if (type == "S2PG") {
return ModelType::S2pg; return ModelType::S2pg;
} else if (type == "Pomdp") {
return ModelType::Pomdp;
} else { } else {
STORM_LOG_THROW(false, storm::exceptions::InvalidTypeException, "Type " << type << "not known."); STORM_LOG_THROW(false, storm::exceptions::InvalidTypeException, "Type " << type << "not known.");
} }
@ -39,6 +41,9 @@ namespace storm {
case ModelType::S2pg: case ModelType::S2pg:
os << "S2PG"; os << "S2PG";
break; break;
case ModelType::Pomdp:
os << "POMDP";
break;
default: default:
STORM_LOG_THROW(false, storm::exceptions::InvalidTypeException, "Unknown model type."); STORM_LOG_THROW(false, storm::exceptions::InvalidTypeException, "Unknown model type.");
} }

2
src/storm/models/ModelType.h

@ -7,7 +7,7 @@ namespace storm {
namespace models { namespace models {
// All supported model types. // All supported model types.
enum class ModelType { enum class ModelType {
Dtmc, Ctmc, Mdp, MarkovAutomaton, S2pg
Dtmc, Ctmc, Mdp, MarkovAutomaton, S2pg, Pomdp
}; };
ModelType getModelType(std::string const& type); ModelType getModelType(std::string const& type);

Loading…
Cancel
Save