16template<
typename RM = storm::models::sparse::StandardRewardModel<
double>>
29 :
PermissiveScheduler(), mdp(refmdp), enabledChoices(refmdp.getNumberOfChoices(), allEnabled) {
35 enabledChoices.
set(choiceIndex,
false);
40 return *(cs.
transform(enabledChoices)->template as<storm::models::sparse::Mdp<double, RM>>());
45 std::map<uint_fast64_t, T> res;
46 uint_fast64_t last = 0;
47 uint_fast64_t curr = 0;
49 for (
auto const& entry : in) {
51 uint_fast64_t diff = last - curr;
53 res[*it] = entry.second;
60 std::map<uint_fast64_t, T>
remapChoiceIndices(std::map<storm::storage::StateActionPair, T>
const& in)
const {
61 std::map<uint_fast64_t, T> res;
62 uint_fast64_t last = 0;
63 uint_fast64_t curr = 0;
65 for (
auto const& entry : in) {
67 uint_fast64_t diff = curr - last;
69 res[*it] = entry.second;
76template<
typename RM = storm::models::sparse::StandardRewardModel<
double>>
This class represents a (discrete-time) Markov decision process.
uint_fast64_t getChoiceIndex(storm::storage::StateActionPair const &stateactPair) const
For a state/action pair, get the choice index referring to the state-action pair.
virtual ~PermissiveScheduler()=default
SubMDPPermissiveScheduler(SubMDPPermissiveScheduler &&)=default
SubMDPPermissiveScheduler(SubMDPPermissiveScheduler const &)=delete
storm::models::sparse::Mdp< double, RM > apply() const
void disable(uint_fast64_t choiceIndex)
SubMDPPermissiveScheduler(storm::models::sparse::Mdp< double, RM > const &refmdp, bool allEnabled)
std::map< uint_fast64_t, T > remapChoiceIndices(std::map< uint_fast64_t, T > const &in) const
virtual ~SubMDPPermissiveScheduler()=default
std::map< uint_fast64_t, T > remapChoiceIndices(std::map< storm::storage::StateActionPair, T > const &in) const
A class that enables iterating over the indices of the bit vector whose corresponding bits are set to...
A bit vector that is internally represented as a vector of 64-bit values.
const_iterator begin() const
Returns an iterator to the indices of the set bits in the bit vector.
void set(uint_fast64_t index, bool value=true)
Sets the given truth value at the given index.
size_t size() const
Retrieves the number of bits this bit vector can store.
#define STORM_LOG_ASSERT(cond, message)
boost::optional< SubMDPPermissiveScheduler< RM > > computePermissiveSchedulerViaSMT(storm::models::sparse::Mdp< double, RM > const &mdp, storm::logic::ProbabilityOperatorFormula const &safeProp)
boost::optional< SubMDPPermissiveScheduler< RM > > computePermissiveSchedulerViaMILP(storm::models::sparse::Mdp< double, RM > const &mdp, storm::logic::ProbabilityOperatorFormula const &safeProp)