|
|
@ -115,11 +115,8 @@ namespace storm { |
|
|
|
storm::storage::BitVector relevantStates = psiStates; |
|
|
|
|
|
|
|
// Initialize the solution vector.
|
|
|
|
//std::vector<ValueType> x = std::vector<ValueType>(transitionMatrix.getRowGroupCount() - psiStates.getNumberOfSetBits(), storm::utility::zero<ValueType>());
|
|
|
|
std::vector<ValueType> x = std::vector<ValueType>(relevantStates.getNumberOfSetBits(), storm::utility::one<ValueType>()); |
|
|
|
|
|
|
|
//std::vector<ValueType> b = transitionMatrix.getConstrainedRowGroupSumVector(relevantStates, relevantStates);
|
|
|
|
std::vector<ValueType> b = std::vector<ValueType>(relevantStates.getNumberOfSetBits(), storm::utility::zero<ValueType>()); |
|
|
|
// Reduce the matrix to relevant states
|
|
|
|
storm::storage::SparseMatrix<ValueType> submatrix = transitionMatrix.getSubmatrix(true, relevantStates, relevantStates, false); |
|
|
|
|
|
|
@ -134,22 +131,10 @@ namespace storm { |
|
|
|
viHelper.setProduceScheduler(true); |
|
|
|
} |
|
|
|
|
|
|
|
// TODO: the lower bounds are not used
|
|
|
|
if(lowerBound != 0) |
|
|
|
{ |
|
|
|
STORM_LOG_WARN("The use of lower bounds is not implemented for bounded globally formulas."); |
|
|
|
} |
|
|
|
|
|
|
|
STORM_LOG_DEBUG("upperBound = " << upperBound); |
|
|
|
|
|
|
|
// in case of 'G<1' or 'G<=0' the states with are initially 'safe' are filled with ones
|
|
|
|
// in case of upperBound = 0 the states which are initially "safe" are filled with ones
|
|
|
|
if(upperBound > 0) |
|
|
|
{ |
|
|
|
/* x = std::vector<ValueType>(relevantStates.size(), storm::utility::one<ValueType>());
|
|
|
|
} else {*/ |
|
|
|
STORM_LOG_DEBUG("b = " << b); |
|
|
|
STORM_LOG_DEBUG("x = " << x); |
|
|
|
viHelper.performValueIteration(env, x, b, goal.direction(), upperBound); |
|
|
|
viHelper.performValueIteration(env, x, goal.direction(), upperBound); |
|
|
|
} |
|
|
|
|
|
|
|
viHelper.fillResultVector(x, relevantStates); |
|
|
|