From 6ef6b139c986da55ea7c0abd14e91ecedc946516 Mon Sep 17 00:00:00 2001 From: PBerger Date: Wed, 12 Jun 2013 21:02:15 +0200 Subject: [PATCH] Fixed a missing control path in the ExplicitModelAdapter.cpp Former-commit-id: db0dd838aa2f3bb635bc53ca3b0d5ff06c830a22 --- src/adapters/ExplicitModelAdapter.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/adapters/ExplicitModelAdapter.cpp b/src/adapters/ExplicitModelAdapter.cpp index af5dfe848..aee3208a7 100644 --- a/src/adapters/ExplicitModelAdapter.cpp +++ b/src/adapters/ExplicitModelAdapter.cpp @@ -13,6 +13,7 @@ #include "src/models/Dtmc.h" #include "src/models/Ctmc.h" #include "src/models/Mdp.h" +#include "src/models/Ctmdp.h" typedef std::pair, std::vector> StateType; @@ -80,9 +81,11 @@ namespace adapters { break; } case storm::ir::Program::CTMDP: - // Todo - //return std::shared_ptr>(new storm::models::Ctmdp(matrix, stateLabeling, stateRewards, transitionRewardMatrix)); + { + storm::storage::SparseMatrix matrix = this->buildNondeterministicMatrix(); + return std::shared_ptr>(new storm::models::Ctmdp(matrix, stateLabeling, this->choiceIndices, stateRewards, this->transitionRewards)); break; + } default: LOG4CPLUS_ERROR(logger, "Error while creating model from probabilistic program: We can't handle this model type."); throw storm::exceptions::WrongFormatException() << "Error while creating model from probabilistic program: We can't handle this model type."; @@ -453,7 +456,7 @@ namespace adapters { storm::storage::SparseMatrix result(allStates.size()); result.initialize(numberOfTransitions); if ((this->rewardModel != nullptr) && (this->rewardModel->hasTransitionRewards())) { - this->transitionRewards.reset(storm::storage::SparseMatrix(allStates.size())); + this->transitionRewards.reset(std::move(storm::storage::SparseMatrix(allStates.size()))); this->transitionRewards.get().initialize(numberOfTransitions); } for (uint_fast64_t state = 0; state < this->allStates.size(); state++) {