Browse Source

Modeltype:

updated options
string to modeltype

Former-commit-id: 8f17a38d7a
tempestpy_adaptions
sjunges 9 years ago
parent
commit
39fc4f4f2f
  1. 28
      src/storage/jani/ModelType.cpp
  2. 5
      src/storage/jani/ModelType.h

28
src/storage/jani/ModelType.cpp

@ -20,9 +20,37 @@ namespace storm {
case ModelType::MA:
stream << "ma";
break;
case ModelType::PTA:
stream << "pta";
break;
case ModelType::STA:
stream << "sta";
break;
}
return stream;
}
ModelType getModelType(std::string const& input) {
if(input == "dtmc") {
return ModelType::DTMC;
}
if(input == "ctmc") {
return ModelType::CTMC;
}
if(input == "mdp") {
return ModelType::MDP;
}
if(input == "ma") {
return ModelType::MA;
}
if(input == "pta") {
return ModelType::PTA;
}
if(input == "sta") {
return ModelType::STA;
}
return ModelType::UNDEFINED;
}
}
}

5
src/storage/jani/ModelType.h

@ -5,8 +5,9 @@
namespace storm {
namespace jani {
enum class ModelType {UNDEFINED = 0, DTMC = 1, CTMC = 2, MDP = 3, MA = 4};
enum class ModelType {UNDEFINED = 0, DTMC = 1, CTMC = 2, MDP = 3, MA = 4, PTA = 5, STA = 6};
ModelType getModelType(std::string const& input);
std::ostream& operator<<(std::ostream& stream, ModelType const& type);
}
Loading…
Cancel
Save