From 51bd689c96eaab8f2a00fd21edac55f32957a73c Mon Sep 17 00:00:00 2001 From: dehnert Date: Tue, 3 Nov 2015 17:41:01 +0100 Subject: [PATCH 1/2] fixed a bug in the reward model Former-commit-id: 5302a85d6f183031c3663cc49ee1de344d0750b4 --- src/models/sparse/StandardRewardModel.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/models/sparse/StandardRewardModel.cpp b/src/models/sparse/StandardRewardModel.cpp index 5788dae10..b00b6869c 100644 --- a/src/models/sparse/StandardRewardModel.cpp +++ b/src/models/sparse/StandardRewardModel.cpp @@ -111,6 +111,7 @@ namespace storm { if (this->hasTransitionRewards()) { if (this->hasStateActionRewards()) { storm::utility::vector::addVectors(this->getStateActionRewardVector(), transitionMatrix.getPointwiseProductRowSumVector(this->getTransitionRewardMatrix()), this->getStateActionRewardVector()); + this->optionalStateActionRewardVector = boost::none; } else { this->optionalStateActionRewardVector = transitionMatrix.getPointwiseProductRowSumVector(this->getTransitionRewardMatrix()); } @@ -121,8 +122,9 @@ namespace storm { STORM_LOG_THROW(this->getStateRewardVector().size() == this->getStateActionRewardVector().size(), storm::exceptions::InvalidOperationException, "The reduction to state rewards is only possible of both the state and the state-action rewards have the same dimension."); storm::utility::vector::addVectors(this->getStateActionRewardVector(), this->getStateRewardVector(), this->getStateRewardVector()); } else { - this->optionalStateRewardVector = std::move(this->optionalStateRewardVector); + this->optionalStateRewardVector = std::move(this->optionalStateActionRewardVector); } + this->optionalStateActionRewardVector = boost::none; } } From 9b7d4ec57b9ecfee21f1a65fbcea6cde66a4d985 Mon Sep 17 00:00:00 2001 From: dehnert Date: Tue, 3 Nov 2015 19:45:41 +0100 Subject: [PATCH 2/2] made rational functions use cln again Former-commit-id: a4b14f92712ab702255f77df71e4355e00f257fe --- src/adapters/CarlAdapter.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/adapters/CarlAdapter.h b/src/adapters/CarlAdapter.h index 99e01e575..2ed172cde 100644 --- a/src/adapters/CarlAdapter.h +++ b/src/adapters/CarlAdapter.h @@ -42,7 +42,7 @@ namespace carl { } namespace storm { - typedef mpq_class RationalNumber; + typedef cln::cl_RA RationalNumber; typedef carl::Variable Variable; typedef carl::MultivariatePolynomial RawPolynomial; typedef carl::FactorizedPolynomial Polynomial;