Browse Source

changed clippedStatesOfCoalition with size and values from relevantStates

tempestpy_adaptions
Lukas Posch 4 years ago
parent
commit
5473966cd1
  1. 4
      src/storm/modelchecker/rpatl/helper/SparseSmgRpatlHelper.cpp
  2. 7
      src/storm/storage/BitVector.cpp
  3. 2
      src/storm/storage/BitVector.h

4
src/storm/modelchecker/rpatl/helper/SparseSmgRpatlHelper.cpp

@ -32,8 +32,8 @@ namespace storm {
// Reduce the matrix to relevant states
storm::storage::SparseMatrix<ValueType> submatrix = transitionMatrix.getSubmatrix(true, relevantStates, relevantStates, false);
storm::storage::BitVector clippedStatesOfCoalition(statesOfCoalition.size() - psiStates.getNumberOfSetBits());
clippedStatesOfCoalition.setClippedStatesOfCoalition(psiStates, statesOfCoalition);
storm::storage::BitVector clippedStatesOfCoalition(relevantStates.getNumberOfSetBits());
clippedStatesOfCoalition.setClippedStatesOfCoalition(relevantStates, statesOfCoalition);
clippedStatesOfCoalition.complement();
storm::modelchecker::helper::internal::GameViHelper<ValueType> viHelper(submatrix, clippedStatesOfCoalition);

7
src/storm/storage/BitVector.cpp

@ -1026,12 +1026,11 @@ namespace storm {
}
}
void BitVector::setClippedStatesOfCoalition(BitVector psiStates, BitVector statesOfCoalition)
void BitVector::setClippedStatesOfCoalition(BitVector relevantStates, BitVector statesOfCoalition)
{
auto clippedStatesCounter = 0;
for(uint i = 0; i < psiStates.size(); i++) {
std::cout << i << " : " << psiStates.get(i) << " -> " << statesOfCoalition[i] << std::endl;
if(!psiStates.get(i)) {
for(uint i = 0; i < relevantStates.size(); i++) {
if(relevantStates.get(i)) {
this->set(clippedStatesCounter, statesOfCoalition[i]);
clippedStatesCounter++;
}

2
src/storm/storage/BitVector.h

@ -542,7 +542,7 @@ namespace storm {
* @param psiStates Bitvector of states which are in the winning region.
* @param statesOfCoalition Bitvector of states which belong to the coalition.
*/
void setClippedStatesOfCoalition(BitVector psiStates, BitVector statesOfCoalition);
void setClippedStatesOfCoalition(BitVector relevantStates, BitVector statesOfCoalition);
friend std::ostream& operator<<(std::ostream& out, BitVector const& bitVector);

Loading…
Cancel
Save