Browse Source

ModelBase: added isDiscreteTimeModel(). and let isNondeterministicModel return true for POMDPs and PSGs.

tempestpy_adaptions
TimQu 6 years ago
parent
commit
bc3c0d1d55
  1. 16
      src/storm/models/ModelBase.cpp
  2. 5
      src/storm/models/ModelBase.h

16
src/storm/models/ModelBase.cpp

@ -19,7 +19,21 @@ namespace storm {
}
bool ModelBase::isNondeterministicModel() const {
return this->isOfType(storm::models::ModelType::Mdp) || this->isOfType(storm::models::ModelType::MarkovAutomaton);
for (auto const& type : {storm::models::ModelType::Mdp, storm::models::ModelType::Pomdp, storm::models::ModelType::S2pg, storm::models::ModelType::MarkovAutomaton}) {
if (this->isOfType(type)) {
return true;
}
}
return false;
}
bool ModelBase::isDiscreteTimeModel() const {
for (auto const& type : {storm::models::ModelType::Dtmc, storm::models::ModelType::Mdp, storm::models::ModelType::Pomdp, storm::models::ModelType::S2pg}) {
if (this->isOfType(type)) {
return true;
}
}
return false;
}
bool ModelBase::supportsParameters() const {

5
src/storm/models/ModelBase.h

@ -115,6 +115,11 @@ namespace storm {
*/
bool isNondeterministicModel() const;
/*!
* Returns true if the model is a descrete-time model.
*/
bool isDiscreteTimeModel() const;
/*!
* Checks whether the model supports parameters.
*

Loading…
Cancel
Save