Browse Source

Minor fixes to MinimalLabelSetGenerator and AbstractModel.

Former-commit-id: 83ee7ae262
main
dehnert 12 years ago
parent
commit
f1c800f382
  1. 4
      src/counterexamples/MinimalLabelSetGenerator.h
  2. 16
      src/models/AbstractModel.h

4
src/counterexamples/MinimalLabelSetGenerator.h

@ -30,6 +30,7 @@ namespace storm {
*/ */
template <class T> template <class T>
class MinimalLabelSetGenerator { class MinimalLabelSetGenerator {
#ifdef HAVE_GUROBI
private: private:
/*! /*!
* A helper class that provides the functionality to compute a hash value for pairs of state indices. * A helper class that provides the functionality to compute a hash value for pairs of state indices.
@ -1046,7 +1047,8 @@ namespace storm {
LOG4CPLUS_ERROR(logger, "Unable to get Gurobi solution from unoptimized model."); LOG4CPLUS_ERROR(logger, "Unable to get Gurobi solution from unoptimized model.");
throw storm::exceptions::InvalidStateException() << "Unable to get Gurobi solution from unoptimized model."; throw storm::exceptions::InvalidStateException() << "Unable to get Gurobi solution from unoptimized model.";
} }
#endif
public: public:
static std::unordered_set<uint_fast64_t> getMinimalLabelSet(storm::models::Mdp<T> const& labeledMdp, storm::storage::BitVector const& phiStates, storm::storage::BitVector const& psiStates, T probabilityThreshold, bool checkThresholdFeasible = false, bool includeSchedulerCuts = false) { static std::unordered_set<uint_fast64_t> getMinimalLabelSet(storm::models::Mdp<T> const& labeledMdp, storm::storage::BitVector const& phiStates, storm::storage::BitVector const& psiStates, T probabilityThreshold, bool checkThresholdFeasible = false, bool includeSchedulerCuts = false) {

16
src/models/AbstractModel.h

@ -54,11 +54,9 @@ class AbstractModel: public std::enable_shared_from_this<AbstractModel<T>> {
* @param other The Source Abstract Model * @param other The Source Abstract Model
*/ */
AbstractModel(AbstractModel<T>&& other) AbstractModel(AbstractModel<T>&& other)
: transitionMatrix(std::move(other.transitionMatrix)), : transitionMatrix(std::move(other.transitionMatrix)), choiceLabeling(std::move(other.choiceLabeling)),
stateLabeling(std::move(other.stateLabeling)), stateLabeling(std::move(other.stateLabeling)), stateRewardVector(std::move(other.stateRewardVector)),
stateRewardVector(std::move(other.stateRewardVector)), transitionRewardMatrix(std::move(other.transitionRewardMatrix)) {
transitionRewardMatrix(std::move(other.transitionRewardMatrix)),
choiceLabeling(std::move(other.choiceLabeling)) {
// Intentionally left empty. // Intentionally left empty.
} }
@ -98,9 +96,11 @@ class AbstractModel: public std::enable_shared_from_this<AbstractModel<T>> {
AbstractModel(storm::storage::SparseMatrix<T>&& transitionMatrix, storm::models::AtomicPropositionsLabeling&& stateLabeling, AbstractModel(storm::storage::SparseMatrix<T>&& transitionMatrix, storm::models::AtomicPropositionsLabeling&& stateLabeling,
boost::optional<std::vector<T>>&& optionalStateRewardVector, boost::optional<storm::storage::SparseMatrix<T>>&& optionalTransitionRewardMatrix, boost::optional<std::vector<T>>&& optionalStateRewardVector, boost::optional<storm::storage::SparseMatrix<T>>&& optionalTransitionRewardMatrix,
boost::optional<std::vector<std::list<uint_fast64_t>>>&& optionalChoiceLabeling) : boost::optional<std::vector<std::list<uint_fast64_t>>>&& optionalChoiceLabeling) :
transitionMatrix(std::move(transitionMatrix)), stateLabeling(std::move(stateLabeling)), transitionMatrix(std::move(transitionMatrix)), choiceLabeling(std::move(optionalChoiceLabeling)),
stateRewardVector(std::move(optionalStateRewardVector)), transitionRewardMatrix(std::move(optionalTransitionRewardMatrix)), stateLabeling(std::move(stateLabeling)), stateRewardVector(std::move(optionalStateRewardVector)),
choiceLabeling(std::move(optionalChoiceLabeling)) { } transitionRewardMatrix(std::move(optionalTransitionRewardMatrix)) {
// Intentionally left empty.
}
/*! /*!
* Destructor. * Destructor.

|||||||
100:0
Loading…
Cancel
Save