#pragma once #include #include "storm/modelchecker/multiobjective/preprocessing/SparseMultiObjectivePreprocessorResult.h" #include "storm/models/sparse/Mdp.h" namespace storm { class Environment; namespace storage { class BitVector; } namespace modelchecker { namespace multiobjective { template class MultiObjectiveSchedulerEvaluator { public: typedef typename ModelType::ValueType ValueType; MultiObjectiveSchedulerEvaluator(preprocessing::SparseMultiObjectivePreprocessorResult& preprocessorResult); /*! * Instantiates the given model with the provided scheduler and checks the objectives individually under that scheduler. */ void check(Environment const& env); // Retrieve the results after calling check. std::vector> const& getResults() const; std::vector const& getResultForObjective(uint64_t objIndex) const; storm::storage::BitVector const& getSchedulerIndependentStates(uint64_t objIndex) const; std::vector getInitialStateResults() const; ModelType const& getModel() const; std::vector> const& getObjectives() const; bool hasCurrentSchedulerBeenChecked() const; std::vector const& getScheduler() const; uint64_t const& getChoiceAtState(uint64_t state) const; void setChoiceAtState(uint64_t state, uint64_t choice); private: void initializeSchedulerIndependentStates(); ModelType const& model; // In case the model is a markov automaton, we transform it to an mdp std::shared_ptr> mdp; std::vector> const& objectives; // Indicates for each objective the set of states for which the result is fix (i.e. independent of the scheduler). std::vector schedulerIndependentStates; // Stores the results from the last call to check std::vector> results; std::vector currSched; bool currSchedHasBeenChecked; }; } } }