3#include <boost/optional.hpp>
14template<
typename ValueType, storm::OptimizationDirection Dir,
bool TrivialRowGrouping>
18 : schedulerStorage(schedulerStorage), robustIndices(robustIndices), applyUpdates(applyUpdates) {
25 void processRobustRow(ValueType&& value, uint64_t row, std::vector<std::pair<ValueType, std::pair<ValueType, uint64_t>>>
const& info) {
26 currStart = robustIndices[row];
27 for (uint64_t i = 0; i < info.size(); ++i) {
28 isConverged &= schedulerStorage[currStart + i] == info[i].second.second;
29 schedulerStorage[currStart + i] = info[i].second.second;
51 std::vector<uint64_t>& schedulerStorage;
52 std::vector<uint64_t>
const& robustIndices;
58 bool const applyUpdates;
62 std::vector<std::pair<uint64_t, ValueType>> currValues;
68template<
typename ValueType,
typename SolutionType = ValueType,
bool TrivialRowGrouping = false>
92 std::vector<SolutionType>* operandOut =
nullptr, boost::optional<std::vector<uint64_t>>
const& robustIndices = boost::none)
const;
98 template<storm::OptimizationDirection Dir, storm::OptimizationDirection RobustDir>
99 bool computeScheduler(std::vector<SolutionType>& operandIn, std::vector<ValueType>
const& offsets, std::vector<uint64_t>& schedulerStorage,
100 std::vector<SolutionType>* operandOut, boost::optional<std::vector<uint64_t>>
const& robustIndices = boost::none)
const;
103 std::shared_ptr<ValueIterationOperator<ValueType, TrivialRowGrouping, SolutionType>> viOperator;
void endOfIteration() const
RobustSchedulerTrackingBackend(std::vector< uint64_t > &schedulerStorage, std::vector< uint64_t > const &robustIndices, bool applyUpdates)
bool constexpr abort() const
void processRobustRow(ValueType &&value, uint64_t row, std::vector< std::pair< ValueType, std::pair< ValueType, uint64_t > > > const &info)
void applyUpdate(ValueType &currValue, uint64_t)
bool computeScheduler(std::vector< SolutionType > &operandIn, std::vector< ValueType > const &offsets, storm::OptimizationDirection const &dir, std::vector< uint64_t > &schedulerStorage, UncertaintyResolutionMode uncertaintyResolutionMode, std::vector< SolutionType > *operandOut=nullptr, boost::optional< std::vector< uint64_t > > const &robustIndices=boost::none) const
Computes the optimal choices from the given solution.
SchedulerTrackingHelper(std::shared_ptr< ValueIterationOperator< ValueType, TrivialRowGrouping, SolutionType > > viOperator)
Initializes this helper with the given value iteration operator.
This class represents the Value Iteration Operator (also known as Bellman operator).
UncertaintyResolutionMode
solver::OptimizationDirection OptimizationDirection