17template<
typename ValueType>
26 Scheduler(uint_fast64_t numberOfModelStates, boost::optional<storm::storage::MemoryStructure>
const& memoryStructure = boost::none);
27 Scheduler(uint_fast64_t numberOfModelStates, boost::optional<storm::storage::MemoryStructure>&& memoryStructure);
49 void clearChoice(uint_fast64_t modelState, uint_fast64_t memoryState = 0);
68 void setDontCare(uint_fast64_t modelState, uint_fast64_t memoryState = 0,
bool setArbitraryChoice =
true);
76 void unSetDontCare(uint_fast64_t modelState, uint_fast64_t memoryState = 0);
81 bool isDontCare(uint_fast64_t modelState, uint64_t memoryState = 0)
const;
116 template<
typename NewValueType>
118 uint_fast64_t numModelStates = schedulerChoices.front().size();
121 for (uint_fast64_t modelState = 0; modelState < numModelStates; ++modelState) {
122 newScheduler.
setChoice(
getChoice(modelState, memState).template toValueType<NewValueType>(), modelState, memState);
138 bool skipDontCareStates =
false)
const;
150 bool skipDontCareStates =
false)
const;
153 boost::optional<storm::storage::MemoryStructure> memoryStructure;
154 std::vector<std::vector<SchedulerChoice<ValueType>>> schedulerChoices;
155 std::vector<storm::storage::BitVector> dontCareStates;
156 uint_fast64_t numOfUndefinedChoices;
157 uint_fast64_t numOfDeterministicChoices;
158 uint_fast64_t numOfDontCareStates;
Base class for all sparse models.
A bit vector that is internally represented as a vector of 64-bit values.
This class defines which action is chosen in a particular state of a non-deterministic model.
bool isDeterministicScheduler() const
Retrieves whether all defined choices are deterministic.
storm::storage::BitVector computeActionSupport(std::vector< uint64_t > const &nondeterministicChoiceIndicies) const
Compute the Action Support: A bit vector that indicates all actions that are selected with positive p...
void unSetDontCare(uint_fast64_t modelState, uint_fast64_t memoryState=0)
Unset the combination of model state and memoryStructure state to dontCare.
bool isPartialScheduler() const
Retrieves whether there is a reachable pair of model and memory state for which the choice is undefin...
SchedulerChoice< ValueType > const & getChoice(uint_fast64_t modelState, uint_fast64_t memoryState=0) const
Gets the choice defined by the scheduler for the given model and memory state.
void clearChoice(uint_fast64_t modelState, uint_fast64_t memoryState=0)
Clears the choice defined by the scheduler for the given state.
bool isDontCare(uint_fast64_t modelState, uint64_t memoryState=0) const
Is the combination of model state and memoryStructure state to reachable?
void setChoice(SchedulerChoice< ValueType > const &choice, uint_fast64_t modelState, uint_fast64_t memoryState=0)
Sets the choice defined by the scheduler for the given state.
void printJsonToStream(std::ostream &out, std::shared_ptr< storm::models::sparse::Model< ValueType > > model=nullptr, bool skipUniqueChoices=false, bool skipDontCareStates=false) const
Prints the scheduler in json format to the given output stream.
boost::optional< storm::storage::MemoryStructure > const & getMemoryStructure() const
Retrieves the memory structure associated with this scheduler.
uint_fast64_t getNumberOfMemoryStates() const
Retrieves the number of memory states this scheduler considers.
void printToStream(std::ostream &out, std::shared_ptr< storm::models::sparse::Model< ValueType > > model=nullptr, bool skipUniqueChoices=false, bool skipDontCareStates=false) const
Prints the scheduler to the given output stream.
Scheduler< NewValueType > toValueType() const
Returns a copy of this scheduler with the new value type.
void setDontCare(uint_fast64_t modelState, uint_fast64_t memoryState=0, bool setArbitraryChoice=true)
Set the combination of model state and memoryStructure state to dontCare.
bool isChoiceSelected(BitVector const &selectedStates, uint64_t memoryState=0) const
Is the scheduler defined on the states indicated by the selected-states bitvector?
bool isMemorylessScheduler() const
Retrieves whether the scheduler considers a trivial memory structure (i.e., a memory structure with j...