18template<
typename ValueType,
typename RewardValueType>
19std::shared_ptr<storm::models::sparse::Model<ValueType, storm::models::sparse::StandardRewardModel<RewardValueType>>>
21 std::string
const& stateRewardFilename, std::string
const& transitionRewardFilename,
22 std::string
const& choiceLabelingFilename) {
27 std::shared_ptr<storm::models::sparse::Model<ValueType, storm::models::sparse::StandardRewardModel<RewardValueType>>> model;
30 model = std::shared_ptr<storm::models::sparse::Model<ValueType, storm::models::sparse::StandardRewardModel<RewardValueType>>>(
33 transitionRewardFilename, choiceLabelingFilename))));
37 model = std::shared_ptr<storm::models::sparse::Model<ValueType, storm::models::sparse::StandardRewardModel<RewardValueType>>>(
40 transitionRewardFilename, choiceLabelingFilename))));
44 model = std::shared_ptr<storm::models::sparse::Model<ValueType, storm::models::sparse::StandardRewardModel<RewardValueType>>>(
47 transitionRewardFilename, choiceLabelingFilename))));
51 model = std::shared_ptr<storm::models::sparse::Model<ValueType, storm::models::sparse::StandardRewardModel<RewardValueType>>>(
54 transitionsFilename, labelingFilename, stateRewardFilename, transitionRewardFilename, choiceLabelingFilename))));
58 STORM_LOG_WARN(
"Unknown/Unhandled Model Type which cannot be parsed.");
64template<
typename ValueType,
typename RewardValueType>
72 char const* fileData = file.getData();
82 sscanf(filehintBuffer, formatString.c_str(), hint);
84 for (
char* c = hint; *c !=
'\0'; c++) {
89 if (strcmp(hint,
"DTMC") == 0)
91 else if (strcmp(hint,
"CTMC") == 0)
93 else if (strcmp(hint,
"MDP") == 0)
95 else if (strcmp(hint,
"MA") == 0)
98 STORM_LOG_THROW(
false, storm::exceptions::WrongFormatException,
"Unable to find model hint in explicit input.");
104template class AutoParser<double, double>;
106template class AutoParser<double, storm::Interval>;
#define STORM_PARSER_AUTOPARSER_HINT_LENGTH
This class represents a continuous-time Markov chain.
This class represents a discrete-time Markov chain.
This class represents a Markov automaton.
This class represents a (discrete-time) Markov decision process.
This class automatically chooses the correct parser for the given files and returns the corresponding...
static std::shared_ptr< storm::models::sparse::Model< ValueType, storm::models::sparse::StandardRewardModel< RewardValueType > > > parseModel(std::string const &transitionsFilename, std::string const &labelingFilename, std::string const &stateRewardFilename="", std::string const &transitionRewardFilename="", std::string const &choiceLabelingFilename="")
Checks the given files and parses the model within these files.
Loads a deterministic model (Dtmc or Ctmc) from files.
Opens a file and maps it to memory providing a char* containing the file content.
Loads a labeled Markov automaton from files.
Loads a nondeterministic model (Mdp or Ctmdp) from files.
#define STORM_LOG_WARN(message)
#define STORM_LOG_THROW(cond, exception, message)