|
|
@ -6,13 +6,14 @@ |
|
|
|
#include "storm/models/sparse/Mdp.h"
|
|
|
|
#include "storm/models/sparse/Pomdp.h"
|
|
|
|
#include "storm/models/sparse/MarkovAutomaton.h"
|
|
|
|
#include "storm/models/sparse/Smg.h"
|
|
|
|
|
|
|
|
#include "storm/exceptions/InvalidModelException.h"
|
|
|
|
|
|
|
|
namespace storm { |
|
|
|
namespace utility { |
|
|
|
namespace builder { |
|
|
|
|
|
|
|
|
|
|
|
template<typename ValueType, typename RewardModelType> |
|
|
|
std::shared_ptr<storm::models::sparse::Model<ValueType, RewardModelType>> buildModelFromComponents(storm::models::ModelType modelType, storm::storage::sparse::ModelComponents<ValueType, RewardModelType>&& components) { |
|
|
|
switch (modelType) { |
|
|
@ -28,10 +29,12 @@ namespace storm { |
|
|
|
return std::make_shared<storm::models::sparse::MarkovAutomaton<ValueType, RewardModelType>>(std::move(components)); |
|
|
|
case storm::models::ModelType::S2pg: |
|
|
|
return std::make_shared<storm::models::sparse::StochasticTwoPlayerGame<ValueType, RewardModelType>>(std::move(components)); |
|
|
|
case storm::models::ModelType::Smg: |
|
|
|
return std::make_shared<storm::models::sparse::Smg<ValueType, RewardModelType>>(std::move(components)); |
|
|
|
} |
|
|
|
STORM_LOG_THROW(false, storm::exceptions::InvalidModelException, "Unknown model type"); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
template std::shared_ptr<storm::models::sparse::Model<double>> buildModelFromComponents(storm::models::ModelType modelType, storm::storage::sparse::ModelComponents<double>&& components); |
|
|
|
template std::shared_ptr<storm::models::sparse::Model<double, storm::models::sparse::StandardRewardModel<storm::Interval>>> buildModelFromComponents(storm::models::ModelType modelType, storm::storage::sparse::ModelComponents<double, storm::models::sparse::StandardRewardModel<storm::Interval>>&& components); |
|
|
|
template std::shared_ptr<storm::models::sparse::Model<storm::RationalNumber>> buildModelFromComponents(storm::models::ModelType modelType, storm::storage::sparse::ModelComponents<storm::RationalNumber>&& components); |
|
|
|