storm icon indicating copy to clipboard operation
storm copied to clipboard

Move From Nondeterministic to Deterministic Model

Open sjunges opened this issue 4 years ago • 1 comments

What is the right way to force an MDP to being a DTMC, without much overhead? That is, if I have an MDP (e.g., after applyScheduler with a full scheduler) and I want to get an DTMC, how do I make the resulting MDP a DTMC? Is there any code doing that already?

This is related to https://github.com/moves-rwth/storm/issues/63 and https://github.com/moves-rwth/stormpy/issues/14

sjunges avatar Apr 14 '20 17:04 sjunges

AFAIK there currently is a getter for each model component, that retrieves it by (non-const) reference. It should be possible to do std::make_shared<DTMC<VT>>(std::move(mdp.getTransitionMatrix()), std::move(mdp.getStateLabeling()), std::move(mdp.getRewardModels); (this disregards other components like choice labels)

Another more elegant way could be to write the inverse of this guy. Then you could

  • get the model components
  • change the model type of the components
  • and then execute buildModelFromComponents

I'm not sure, but you might also need SparseMatrix.makeRowGroupingTrivial()

tquatmann avatar Apr 15 '20 04:04 tquatmann