Now aligns with the default implementation in explicit.MDP: If there is a choice consisting of a self-loop,
produces value 0 for zero-reward state/choice and infinite value for positive-reward state/choice
(should be catched before in precomputations).
The previous behaviour (self-loops have infinite value) messes with maximal total reward computations with
Gauss-Seidel, e.g.
prism functionality/verify/mdps/rewards/total-reward-2.nm functionality/verify/mdps/rewards/total-reward-2.nm.props -explicit -gs -test -prop 3
for the PRISM test suite fails.
Also, align comments in MDP.mvMultRewJacMinMaxSingle.
The getSuccessorsIterator provides an iterator over the set of successors,
i.e., deduplication is sometimes required (e.g. for MDPs).
We introduce here a SuccessorsIterator class that allows to make deduplication
optional, which may have benefits in performance. Additionally, SuccessorsIterator
implements a primitive OfInt iterator, which can avoid auto-boxing.
Subclasses of explicit.Model now have to provide an implementation for getSuccessors(int s),
getSuccessorsIterator(int s) is provided via a default method that automatically
requests deduplication.
Subclasses of explicit.NondetModel now have to provide an implementation for getSuccessors(int s, int).,
getSuccessorsIterator(int s, int i) is provided via a default method that automatically
requests deduplication.
Adapt the existing subclasses of explicit.Model.
Provides additional default methods and removes unneeded specializations in sub-classes:
boolean isSuccessor(int s1, int s2)
boolean allSuccessorsInSet(int s, BitSet set)
boolean someSuccessorsInSet(int s, BitSet set)
boolean allSuccessorsMatch(int s, IntPredicate p)
boolean someSuccessorsMatch(int s, IntPredicate p)
and for NondetModel:
boolean allSuccessorsInSet(int s, int i, BitSet set)
boolean someSuccessorsInSet(int s, int i, BitSet set)
boolean allSuccessorsMatch(int s, int i, IntPredicate p)
boolean someSuccessorsMatch(int s, int i, IntPredicate p)
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@12085 bbc10eb1-c90d-0410-af57-cb519fbb1720
- keeps track of model, builds when needed
- takes care of explicit engine stuff too
* Changes to deadlock handling:
- new option for "fix deadlocks" (defaults to *true*) (and new switch -fixdl)
- consistent deadlock handling everywhere, incl. GUI and experiments
- changes to model-level deadlock storage (symbolic and explicit)
* Explicit engine added as true engine, also available from GUI
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@4562 bbc10eb1-c90d-0410-af57-cb519fbb1720
* merge ModelSimple and ModelSparse as ModelExplicit
* add ModelSimple as separate interface
* created DTMCExplicit to capture some common methods for DTMC classes
* (still need to do same for other models)
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@3514 bbc10eb1-c90d-0410-af57-cb519fbb1720
* removed some old rewards code from explicit models
* (and temporarily disabled a few things in PrismSTPGAbstractRefine accordingly)
* added method addActionLabelledChoice to MDPSimple
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@3325 bbc10eb1-c90d-0410-af57-cb519fbb1720
* Explicit engine gets MDP rewards (transition rewards only) from the model
* Rewards detached from MDPs (but attached ones still available, e.g. for A-R)
* Various bug fixes in MDPSparse, especially wrt rewards
* Few code tidies
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@3215 bbc10eb1-c90d-0410-af57-cb519fbb1720