10template<
typename ValueType, storm::OptimizationDirection Dir,
bool TrivialRowGrouping>
14 : schedulerStorage(schedulerStorage), robustIndices(robustIndices), applyUpdates(applyUpdates) {
21 void processRobustRow(ValueType&& value, uint64_t row, std::vector<std::pair<ValueType, std::pair<ValueType, uint64_t>>>
const& info) {
22 currStart = robustIndices[row];
23 for (uint64_t i = 0; i < info.size(); ++i) {
24 isConverged &= schedulerStorage[currStart + i] == info[i].second.second;
25 schedulerStorage[currStart + i] = info[i].second.second;
47 std::vector<uint64_t>& schedulerStorage;
48 std::vector<uint64_t>
const& robustIndices;
54 bool const applyUpdates;
58 std::vector<std::pair<uint64_t, ValueType>> currValues;
64template<
typename ValueType,
typename SolutionType = ValueType,
bool TrivialRowGrouping = false>
87 std::vector<uint64_t>& schedulerStorage,
bool robust, std::vector<SolutionType>* operandOut =
nullptr,
88 boost::optional<std::vector<uint64_t>>
const& robustIndices = boost::none)
const;
94 template<storm::OptimizationDirection Dir, storm::OptimizationDirection RobustDir>
95 bool computeScheduler(std::vector<SolutionType>& operandIn, std::vector<ValueType>
const& offsets, std::vector<uint64_t>& schedulerStorage,
96 std::vector<SolutionType>* operandOut, boost::optional<std::vector<uint64_t>>
const& robustIndices = boost::none)
const;
99 std::shared_ptr<ValueIterationOperator<ValueType, TrivialRowGrouping, SolutionType>> viOperator;
void applyUpdate(ValueType &currValue, uint64_t rowGroup)
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)
Helper class to extract optimal scheduler choices from a MinMax equation system solution.
bool computeScheduler(std::vector< SolutionType > &operandIn, std::vector< ValueType > const &offsets, storm::OptimizationDirection const &dir, std::vector< uint64_t > &schedulerStorage, bool robust, std::vector< SolutionType > *operandOut=nullptr, boost::optional< std::vector< uint64_t > > const &robustIndices=boost::none) const
Computes the optimal choices from the given solution.
This class represents the Value Iteration Operator (also known as Bellman operator).