29template<
typename ModelType>
32 : model(model), objective(objective) {
36template<
typename ModelType>
39 auto checkResult = mc.
check(formula);
40 STORM_LOG_THROW(checkResult && checkResult->isExplicitQualitativeCheckResult(), storm::exceptions::UnexpectedException,
41 "Unexpected type of check result for subformula " << formula <<
".");
42 return checkResult->template asExplicitQualitativeCheckResult<typename ModelType::ValueType>().getTruthValuesVector();
45template<
typename ValueType>
57 return rewardModel.getTotalActionRewardVector(model.
getTransitionMatrix(), stateRewardWeights);
70template<
typename ValueType>
83template<
typename ModelType>
84void DeterministicSchedsObjectiveHelper<ModelType>::initialize() {
85 STORM_LOG_ASSERT(model.getInitialStates().getNumberOfSetBits() == 1,
"Expected a single initial state.");
86 uint64_t initialState = *model.getInitialStates().begin();
88 auto const& formula = *objective.formula;
89 if (formula.isProbabilityOperatorFormula() && formula.getSubformula().isUntilFormula()) {
92 auto backwardTransitions = model.getBackwardTransitions();
94 phiStates, psiStates);
96 if (prob0States.get(initialState)) {
98 }
else if (prob1States.get(initialState)) {
101 maybeStates = ~(prob0States | prob1States);
104 for (
auto const& state : maybeStates) {
105 for (
auto const& choice : model.getTransitionMatrix().getRowGroupIndices(state)) {
106 auto rowSum = model.getTransitionMatrix().getConstrainedRowSum(choice, prob1States);
108 relevantZeroRewardChoices.set(choice);
110 choiceRewards.emplace(choice, rowSum);
114 }
else if (formula.getSubformula().isEventuallyFormula() && (formula.isRewardOperatorFormula() || formula.isTimeOperatorFormula())) {
115 storm::storage::BitVector rew0States =
evaluatePropositionalFormula(model, formula.getSubformula().asEventuallyFormula().getSubformula());
116 if (formula.isRewardOperatorFormula()) {
117 auto const& baseRewardModel = formula.asRewardOperatorFormula().hasRewardModelName()
118 ? model.getRewardModel(formula.asRewardOperatorFormula().getRewardModelName())
119 : model.getUniqueRewardModel();
122 storm::storage::BitVector statesWithoutReward = rewardModel.get().getStatesWithZeroReward(model.getTransitionMatrix());
124 model.getBackwardTransitions(), statesWithoutReward, rew0States);
126 if (rew0States.
get(initialState)) {
129 maybeStates = ~rew0States;
133 for (
auto const& state : maybeStates) {
134 for (
auto const& choice : model.getTransitionMatrix().getRowGroupIndices(state)) {
135 auto const& value = choiceBasedRewards[choice];
137 relevantZeroRewardChoices.set(choice);
139 choiceRewards.emplace(choice, value);
143 }
else if (formula.isRewardOperatorFormula() && formula.getSubformula().isTotalRewardFormula()) {
144 auto const& baseRewardModel = formula.asRewardOperatorFormula().hasRewardModelName()
145 ? model.getRewardModel(formula.asRewardOperatorFormula().getRewardModelName())
146 : model.getUniqueRewardModel();
149 storm::storage::BitVector statesWithoutReward = rewardModel.
get().getStatesWithZeroReward(model.getTransitionMatrix());
150 storm::storage::BitVector rew0States =
153 if (rew0States.
get(initialState)) {
156 maybeStates = ~rew0States;
160 for (
auto const& state : maybeStates) {
161 for (
auto const& choice : model.getTransitionMatrix().getRowGroupIndices(state)) {
162 auto const& value = choiceBasedRewards[choice];
164 relevantZeroRewardChoices.set(choice);
166 choiceRewards.emplace(choice, value);
171 STORM_LOG_THROW(
false, storm::exceptions::NotSupportedException,
"The given formula " << formula <<
" is not supported.");
176 for (
auto& entry : choiceRewards) {
182 storm::storage::BitVector negativeRewardChoices(model.getNumberOfChoices(),
false);
183 storm::storage::BitVector positiveRewardChoices(model.getNumberOfChoices(),
false);
184 for (
auto const& rew : getChoiceRewards()) {
186 positiveRewardChoices.set(rew.first,
true);
189 negativeRewardChoices.set(rew.first,
true);
192 auto backwardTransitions = model.getBackwardTransitions();
197 STORM_LOG_THROW(!(hasNegativeEC && hasPositiveEc), storm::exceptions::NotSupportedException,
198 "Objective is not convergent: Infinite positive and infinite negative reward is possible.");
199 infinityCase = hasNegativeEC ? InfinityCase::HasNegativeInfinite : (hasPositiveEc ? InfinityCase::HasPositiveInfinite : InfinityCase::AlwaysFinite);
201 if (infinityCase == InfinityCase::HasNegativeInfinite) {
202 storm::storage::BitVector negativeEcStates(maybeStates.size(),
false);
203 storm::storage::MaximalEndComponentDecomposition<ValueType> mecs(model.getTransitionMatrix(), backwardTransitions, getMaybeStates());
204 for (
auto const& mec : mecs) {
205 if (std::any_of(mec.begin(), mec.end(), [&negativeRewardChoices](
auto const& sc) {
206 return std::any_of(sc.second.begin(), sc.second.end(), [&negativeRewardChoices](auto const& c) { return negativeRewardChoices.get(c); });
208 for (
auto const& sc : mec) {
209 negativeEcStates.set(sc.first);
215 STORM_LOG_ASSERT(model.getInitialStates().isSubsetOf(rewMinusInfEStates),
"Initial state does not reach all maybestates");
219template<
typename ModelType>
224template<
typename ModelType>
227 return rewMinusInfEStates;
230template<
typename ModelType>
232 return constantInitialStateValue.has_value();
235template<
typename ModelType>
238 return *constantInitialStateValue;
241template<
typename ModelType>
243 return choiceRewards;
246template<
typename ModelType>
248 return relevantZeroRewardChoices;
251template<
typename ModelType>
254 STORM_LOG_ASSERT(upperResultBounds.has_value(),
"requested upper value bounds but they were not computed.");
255 return upperResultBounds->at(state);
258template<
typename ModelType>
261 STORM_LOG_ASSERT(lowerResultBounds.has_value(),
"requested lower value bounds but they were not computed.");
262 return lowerResultBounds->at(state);
265template<
typename ModelType>
270template<
typename ModelType>
272 return objective.formula->isRewardOperatorFormula() && objective.formula->getSubformula().isTotalRewardFormula();
275template<
typename ModelType>
277 return objective.formula->hasBound();
280template<
typename ModelType>
284 "Objective " << *objective.originalFormula <<
": Strict objective thresholds are not supported.");
285 ValueType threshold = objective.formula->template getThresholdAs<ValueType>();
289 "Objective " << *objective.originalFormula <<
": Minimizing objective should specify an upper bound.");
292 "Objective " << *objective.originalFormula <<
": Maximizing objective should specify a lower bound.");
297template<
typename ModelType>
302template<
typename ValueType>
304 std::vector<ValueType>
const& rewards, std::vector<ValueType>
const& exitProbabilities,
305 std::optional<storm::OptimizationDirection> dir,
bool reqLower,
bool reqUpper) {
306 if (!reqLower && !reqUpper) {
311 auto [minIt, maxIt] = std::minmax_element(rewards.begin(), rewards.end());
312 bool const hasNegativeValues = *minIt < storm::utility::zero<ValueType>();
315 std::optional<ValueType> lowerBound, upperBound;
318 if (!hasNegativeValues) {
321 if (!hasPositiveValues) {
326 std::vector<ValueType> tmpRewards;
327 if (reqUpper && !upperBound.has_value()) {
328 if (dir.has_value() && maximize(*dir)) {
332 if (hasNegativeValues) {
333 tmpRewards.resize(rewards.size());
338 .computeUpperBounds());
341 if (reqLower && !lowerBound.has_value()) {
342 if (dir.has_value() && minimize(*dir)) {
347 tmpRewards.resize(rewards.size());
353 solver.setLowerBounds(std::move(lowerBounds));
358template<
typename ValueType>
360 std::vector<ValueType>
const& exitProbs, std::vector<ValueType>
const& rewards,
363 minMaxSolver->setHasUniqueSolution(
true);
364 minMaxSolver->setOptimizationDirection(dir);
365 auto req = minMaxSolver->getRequirements(env, dir);
368 if (req.validInitialScheduler()) {
370 auto backwardsTransitions = submatrix.
transpose(
true);
373 std::vector<uint64_t> stack;
374 for (uint64_t state = 0; state < initSched.size(); ++state) {
375 if (foundStates.
get(state)) {
381 statesWithChoice.
set(state);
382 foundStates.
set(state);
383 for (
auto const& predecessor : backwardsTransitions.getRow(state)) {
384 if (!foundStates.
get(predecessor.getColumn())) {
385 stack.push_back(predecessor.getColumn());
386 foundStates.
set(predecessor.getColumn());
393 while (!stack.empty()) {
394 auto state = stack.back();
397 auto row = submatrix.
getRow(choice);
398 if (std::any_of(row.begin(), row.end(), [&statesWithChoice](
auto const& entry) {
399 return !storm::utility::isZero(entry.getValue()) && statesWithChoice.get(entry.getColumn());
402 statesWithChoice.
set(state);
406 assert(statesWithChoice.
get(state));
407 for (
auto const& predecessor : backwardsTransitions.getRow(state)) {
408 if (!foundStates.
get(predecessor.getColumn())) {
409 stack.push_back(predecessor.getColumn());
410 foundStates.
set(predecessor.getColumn());
414 assert(statesWithChoice.
full());
415 minMaxSolver->setInitialScheduler(std::move(initSched));
416 req.clearValidInitialScheduler();
418 STORM_LOG_THROW(!req.hasEnabledCriticalRequirement(), storm::exceptions::UncheckedRequirementException,
419 "Solver requirements " + req.getEnabledRequirementsAsString() +
" not checked.");
420 minMaxSolver->setRequirementsChecked(
true);
423 minMaxSolver->solveEquations(env, result, rewards);
428template<
typename ValueType>
433 value += value * eps;
440template<
typename ValueType>
445 value -= value * eps;
452template<storm::OptimizationDirection Dir,
typename ValueType>
455 for (
auto const& stateChoices : mec) {
457 for (
auto const& choice : stateChoices.second) {
458 optimalStateValue &= rewards.at(choice);
460 sum += *optimalStateValue;
465template<
typename ValueType>
469 initialAsBitVector.
set(init,
true);
471 targetAsBitVector.
set(target,
true);
474 for (
auto state : relevantStates) {
475 if (state == target) {
479 for (
auto const& entry : transitions.
getRowGroup(state)) {
480 if (relevantStates.get(entry.getColumn())) {
481 minProb &= entry.getValue();
489template<
typename ModelType>
491 assert(!upperResultBounds.has_value() && !lowerResultBounds.has_value());
492 auto backwardTransitions = model.getBackwardTransitions();
493 auto nonMaybeStates = ~maybeStates;
498 auto backwardTransitions1 = quotient1.matrix.transpose(
true);
503 for (uint64_t choice = 0; choice < quotient1.matrix.getRowCount(); ++choice) {
504 auto const& oldChoice = quotient1.newToOldRowMapping[choice];
505 if (
auto findRes = choiceRewards.find(oldChoice); findRes != choiceRewards.end()) {
506 rewards1[choice] = findRes->second;
508 if (quotient1.sinkRows.get(choice)) {
509 subsystemChoices1.
set(choice,
false);
511 }
else if (
auto prob = model.getTransitionMatrix().getConstrainedRowSum(oldChoice, nonMaybeStates); !
storm::utility::isZero(prob)) {
512 exitProbs1[choice] = prob;
513 subsystemChoices1.
set(choice,
false);
517 auto exitStates1 = quotient1.matrix.getRowGroupFilter(~subsystemChoices1,
false);
519 storm::exceptions::InvalidOperationException,
"Objective " << *objective.originalFormula <<
" does not induce finite value.");
525 for (
auto const& state : maybeStates) {
526 ValueType val = result1.at(quotient1.oldToNewStateMapping.at(state));
528 (*lowerResultBounds)[state] = val;
534 for (
auto const& state : maybeStates) {
535 ValueType val = result1.at(quotient1.oldToNewStateMapping.at(state));
540 (*upperResultBounds)[state] = val;
547 "The upper bound for objective " << *objective.originalFormula <<
" is infinity at some state. This is only supported for thresholded objectives");
556 for (uint64_t choice = 0; choice < quotient2.matrix.getRowCount(); ++choice) {
557 auto const& oldChoice = quotient2.newToOldRowMapping[choice];
558 if (quotient2.sinkRows.get(choice)) {
561 rewards2[choice] = rewards1[oldChoice];
562 exitProbs2[choice] = exitProbs1[oldChoice];
567 auto initialState2 = quotient2.oldToNewStateMapping.at(quotient1.oldToNewStateMapping.at(*model.getInitialStates().begin()));
572 std::vector<ValueType> rewards2Negative;
573 rewards2Negative.reserve(rewards2.size());
574 for (
auto const& rew : rewards2) {
577 auto lower2 =
computeValuesOfReducedSystem(env, quotient2.matrix, exitProbs2, rewards2Negative, storm::OptimizationDirection::Minimize);
578 rewardValueForPosInfCase -= lower2.at(initialState2);
580 for (
auto const& mec : remainingMecs) {
581 auto mecState2 = quotient2.oldToNewStateMapping[mec.begin()->first];
586 auto groupIndices = quotient2.matrix.getRowGroupIndices(mecState2);
587 for (
auto const choice2 : groupIndices) {
588 rewards2[choice2] += mecReward;
591 auto sinkChoice = quotient2.sinkRows.getNextSetIndex(*groupIndices.begin());
592 STORM_LOG_ASSERT(sinkChoice < quotient2.matrix.getRowGroupIndices()[mecState2 + 1],
"EC state in quotient has no sink row.");
601 for (
auto const& state : maybeStates) {
602 ValueType val = result2.at(quotient2.oldToNewStateMapping.at(quotient1.oldToNewStateMapping.at(state)));
604 (*lowerResultBounds)[state] = val;
610 for (
auto const& state : maybeStates) {
611 ValueType val = result2.at(quotient2.oldToNewStateMapping.at(quotient1.oldToNewStateMapping.at(state)));
613 (*upperResultBounds)[state] = val;
618 std::all_of(maybeStates.begin(), maybeStates.end(), [
this](
auto const& s) { return this->lowerResultBounds->at(s) <= this->upperResultBounds->at(s); }),
619 storm::exceptions::UnexpectedException,
"Pre-computed lower bound exceeds upper bound.");
622template<
typename ModelType>
625 STORM_LOG_ASSERT(model.getInitialStates().getNumberOfSetBits() == 1u,
"Expected a single initial state.");
629 auto selectedMatrix = model.getTransitionMatrix().getSubmatrix(
false, selectedChoices, allStates);
630 assert(selectedMatrix.getRowCount() == selectedMatrix.getRowGroupCount());
631 selectedMatrix.makeRowGroupingTrivial();
632 auto subMaybeStates =
635 bsccCandidates.complement();
636 if (!bsccCandidates.empty()) {
640 for (
auto const& bscc : bsccs) {
641 for (
auto const& s : bscc) {
642 subMaybeStates.set(s,
false);
647 if (subMaybeStates.get(*model.getInitialStates().begin())) {
650 auto eqSysMatrix = selectedMatrix.getSubmatrix(
true, subMaybeStates, subMaybeStates, useEqSysFormat);
651 assert(eqSysMatrix.getRowCount() == eqSysMatrix.getRowGroupCount());
652 auto exitProbs = selectedMatrix.getConstrainedRowSumVector(subMaybeStates, ~subMaybeStates);
653 std::vector<ValueType> rewards;
654 rewards.reserve(exitProbs.size());
657 auto choice = selectedChoices.
getNextSetIndex(model.getTransitionMatrix().getRowGroupIndices()[state]);
658 STORM_LOG_ASSERT(choice < model.getTransitionMatrix().getRowGroupIndices()[state + 1],
" no choice selected at state" << state);
659 if (subMaybeStates.get(state)) {
660 if (
auto findRes = allRewards.find(choice); findRes != allRewards.end()) {
661 rewards.push_back(findRes->second);
666 STORM_LOG_ASSERT(!bsccCandidates.get(state) || allRewards.count(choice) == 0,
"Strategy selected a bscc with rewards");
669 if (useEqSysFormat) {
670 eqSysMatrix.convertToEquationSystem();
675 auto const initState = *init.
begin();
676 solver->setRelevantValues(std::move(init));
677 auto req =
solver->getRequirements(env);
678 if (!useEqSysFormat) {
680 req.clearUpperBounds();
681 req.clearLowerBounds();
683 STORM_LOG_THROW(!req.hasEnabledCriticalRequirement(), storm::exceptions::UncheckedRequirementException,
684 "Solver requirements " + req.getEnabledRequirementsAsString() +
" not checked.");
685 std::vector<ValueType> x(rewards.size());
686 solver->solveEquations(env, x, rewards);
SolverEnvironment & solver()
storm::RationalNumber const & getPrecision() const
bool const & getRelativeTerminationCriterion() const
MinMaxSolverEnvironment & minMax()
virtual std::unique_ptr< CheckResult > check(Environment const &env, CheckTask< storm::logic::Formula, SolutionType > const &checkTask)
Checks the provided formula.
std::vector< ValueType > computeUpperBounds()
Computes upper bounds on the expected rewards.
storm::storage::BitVector const & getRelevantZeroRewardChoices() const
Returns the choices that (i) originate from a maybestate and (ii) have zero value.
InfinityCase const & getInfinityCase() const
ModelType::ValueType ValueType
bool hasThreshold() const
Returns true, if this objective specifies a threshold.
ValueType const & getLowerValueBoundAtState(uint64_t state) const
storm::storage::BitVector const & getRewMinusInfEStates() const
Returns the set of states for which value -inf is possible.
storm::storage::BitVector const & getMaybeStates() const
Returns those states for which the scheduler potentially influences the value.
ValueType evaluateScheduler(Environment const &env, storm::storage::BitVector const &selectedChoices) const
Computes the value at the initial state under the given scheduler.
ValueType getConstantInitialStateValue() const
If hasConstantInitialStateValue is true, this returns that constant value.
bool isTotalRewardObjective() const
Returns true if this is a total reward objective.
DeterministicSchedsObjectiveHelper(ModelType const &model, Objective< ValueType > const &objective)
bool hasConstantInitialStateValue() const
Returns true iff the value at the (unique) initial state is a constant (that is independent of the sc...
void computeLowerUpperBounds(Environment const &env) const
ValueType getThreshold() const
Returns the threshold (if specified).
std::map< uint64_t, ValueType > const & getChoiceRewards() const
Returns the choice rewards if non-zero.
ValueType const & getUpperValueBoundAtState(uint64_t state) const
static ValueType computeMecTraversalLowerBound(storm::storage::MaximalEndComponent const &mec, storm::storage::SparseMatrix< ValueType > const &transitions, bool assumeOptimalTransitionProbabilities=false)
Computes value l in (0,1] such that for any pair of distinct states s,s' and deterministic,...
This class represents a Markov automaton.
storm::storage::BitVector const & getMarkovianStates() const
Retrieves the set of Markovian states of the model.
ValueType const & getExitRate(storm::storage::sparse::state_type state) const
Retrieves the exit rate of the given state.
This class represents a (discrete-time) Markov decision process.
RewardModelType const & getUniqueRewardModel() const
Retrieves the unique reward model, if there exists exactly one.
storm::storage::SparseMatrix< ValueType > const & getTransitionMatrix() const
Retrieves the matrix representing the transitions of the model.
CRewardModelType RewardModelType
virtual uint_fast64_t getNumberOfStates() const override
Returns the number of states of the model.
RewardModelType const & getRewardModel(std::string const &rewardModelName) const
Retrieves the reward model with the given name, if one exists.
uint_fast64_t getNumberOfChoices(uint_fast64_t state) const
virtual std::unique_ptr< LinearEquationSolver< ValueType > > create(Environment const &env) const override
Creates an equation solver with the current settings, but without a matrix.
virtual std::unique_ptr< MinMaxLinearEquationSolver< ValueType, SolutionType > > create(Environment const &env) const override
virtual LinearEquationSolverProblemFormat getEquationProblemFormat(Environment const &env) const
Retrieves the problem format that the solver expects if it was created with the current settings.
A bit vector that is internally represented as a vector of 64-bit values.
void complement()
Negates all bits in the bit vector.
uint64_t getNextSetIndex(uint64_t startingIndex) const
Retrieves the index of the bit that is the next bit set to true in the bit vector.
bool full() const
Retrieves whether all bits are set in this bit vector.
uint64_t getNumberOfSetBits() const
Returns the number of bits that are set to true in this bit vector.
void set(uint64_t index, bool value=true)
Sets the given truth value at the given index.
const_iterator begin() const
Returns an iterator to the indices of the set bits in the bit vector.
bool get(uint64_t index) const
Retrieves the truth value of the bit at the given index and performs a bound check.
bool empty() const
Checks if the decomposition is empty.
This class represents the decomposition of a nondeterministic model into its maximal end components.
This class represents a maximal end-component of a nondeterministic model.
A class that holds a possibly non-square matrix in the compressed row storage format.
const_rows getRow(index_type row) const
Returns an object representing the given row.
const_rows getRowGroup(index_type rowGroup) const
Returns an object representing the given row group.
index_type getRowGroupCount() const
Returns the number of row groups in the matrix.
std::vector< index_type > const & getRowGroupIndices() const
Returns the grouping of rows of this matrix.
storm::storage::SparseMatrix< value_type > transpose(bool joinGroups=false, bool keepZeros=false) const
Transposes the matrix.
This class represents the decomposition of a graph-like structure into its strongly connected compone...
Stores and manages an extremal (maximal or minimal) value.
#define STORM_LOG_ASSERT(cond, message)
#define STORM_LOG_THROW(cond, exception, message)
bool isLowerBound(ComparisonType t)
bool isStrict(ComparisonType t)
std::vector< ValueType > getTotalRewardVector(storm::models::sparse::MarkovAutomaton< ValueType > const &model, storm::logic::Formula const &formula)
storm::storage::BitVector evaluatePropositionalFormula(ModelType const &model, storm::logic::Formula const &formula)
void minusMinMaxSolverPrecision(Environment const &env, ValueType &value)
ValueType sumOfMecRewards(storm::storage::MaximalEndComponent const &mec, std::vector< ValueType > const &rewards)
void plusMinMaxSolverPrecision(Environment const &env, ValueType &value)
ValueType getLowerBoundForNonZeroReachProb(storm::storage::SparseMatrix< ValueType > const &transitions, uint64_t init, uint64_t target)
std::vector< ValueType > computeValuesOfReducedSystem(Environment const &env, storm::storage::SparseMatrix< ValueType > const &submatrix, std::vector< ValueType > const &exitProbs, std::vector< ValueType > const &rewards, storm::OptimizationDirection const &dir)
void setLowerUpperTotalRewardBoundsToSolver(storm::solver::AbstractEquationSolver< ValueType > &solver, storm::storage::SparseMatrix< ValueType > const &matrix, std::vector< ValueType > const &rewards, std::vector< ValueType > const &exitProbabilities, std::optional< storm::OptimizationDirection > dir, bool reqLower, bool reqUpper)
bool constexpr minimize(OptimizationDirection d)
storm::storage::BitVector getReachableStates(storm::storage::SparseMatrix< T > const &transitionMatrix, storm::storage::BitVector const &initialStates, storm::storage::BitVector const &constraintStates, storm::storage::BitVector const &targetStates, bool useStepBound, uint_fast64_t maximalSteps, boost::optional< storm::storage::BitVector > const &choiceFilter)
Performs a forward depth-first search through the underlying graph structure to identify the states t...
storm::storage::BitVector performProbGreater0(storm::storage::SparseMatrix< T > const &backwardTransitions, storm::storage::BitVector const &phiStates, storm::storage::BitVector const &psiStates, bool useStepBound, uint_fast64_t maximalSteps)
Performs a backward depth-first search trough the underlying graph structure of the given model to de...
storm::storage::BitVector performProb1A(storm::models::sparse::NondeterministicModel< T, RM > const &model, storm::storage::SparseMatrix< T > const &backwardTransitions, storm::storage::BitVector const &phiStates, storm::storage::BitVector const &psiStates)
Computes the sets of states that have probability 1 of satisfying phi until psi under all possible re...
storm::storage::BitVector performProbGreater0E(storm::storage::SparseMatrix< T > const &backwardTransitions, storm::storage::BitVector const &phiStates, storm::storage::BitVector const &psiStates, bool useStepBound, uint_fast64_t maximalSteps)
Computes the sets of states that have probability greater 0 of satisfying phi until psi under at leas...
storm::storage::BitVector performProb0A(storm::storage::SparseMatrix< T > const &backwardTransitions, storm::storage::BitVector const &phiStates, storm::storage::BitVector const &psiStates)
bool checkIfECWithChoiceExists(storm::storage::SparseMatrix< T > const &transitionMatrix, storm::storage::SparseMatrix< T > const &backwardTransitions, storm::storage::BitVector const &subsystem, storm::storage::BitVector const &choices)
Checks whether there is an End Component that.
void applyPointwise(std::vector< InValueType1 > const &firstOperand, std::vector< InValueType2 > const &secondOperand, std::vector< OutValueType > &target, Operation f=Operation())
Applies the given operation pointwise on the two given vectors and writes the result to the third vec...
Extremum< storm::OptimizationDirection::Minimize, ValueType > Minimum
FilteredRewardModel< RewardModelType > createFilteredRewardModel(RewardModelType const &baseRewardModel, storm::logic::RewardAccumulation const &acc, bool isDiscreteTimeModel)
bool isZero(ValueType const &a)
TargetType convertNumber(SourceType const &number)
solver::OptimizationDirection OptimizationDirection
static const bool IsExact
StronglyConnectedComponentDecompositionOptions & subsystem(storm::storage::BitVector const &subsystem)
Sets a bit vector indicating which subsystem to consider for the decomposition into SCCs.
StronglyConnectedComponentDecompositionOptions & onlyBottomSccs(bool value=true)
Sets if only bottom SCCs, i.e. SCCs in which all states have no way of leaving the SCC),...