19template<
typename RM = storm::models::sparse::StandardRewardModel<
double>>
32 :
PermissiveScheduler(), mdp(refmdp), enabledChoices(refmdp.getNumberOfChoices(), allEnabled) {
37 STORM_LOG_ASSERT(choiceIndex < enabledChoices.size(),
"Invalid choiceIndex.");
38 enabledChoices.set(choiceIndex,
false);
48 std::map<uint_fast64_t, T> res;
49 uint_fast64_t last = 0;
50 uint_fast64_t curr = 0;
52 for (
auto const& entry : in) {
54 uint_fast64_t diff = last - curr;
56 res[*it] = entry.second;
63 std::map<uint_fast64_t, T>
remapChoiceIndices(std::map<storm::storage::StateActionPair, T>
const& in)
const {
64 std::map<uint_fast64_t, T> res;
65 uint_fast64_t last = 0;
66 uint_fast64_t curr = 0;
68 for (
auto const& entry : in) {
69 curr = mdp.getChoiceIndex(entry.first);
70 uint_fast64_t diff = curr - last;
72 res[*it] = entry.second;
79template<
typename RM = storm::models::sparse::StandardRewardModel<
double>>
This class represents a (discrete-time) Markov decision process.
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.
#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::Environment const &env, storm::models::sparse::Mdp< double, RM > const &mdp, storm::logic::ProbabilityOperatorFormula const &safeProp)