Browse Source

Bugfix: GUI simulator now correctly recalls choices made in states.

git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@2813 bbc10eb1-c90d-0410-af57-cb519fbb1720
master
Dave Parker 15 years ago
parent
commit
adac14e1d8
  1. 4
      prism/src/simulator/TransitionList.java

4
prism/src/simulator/TransitionList.java

@ -34,7 +34,9 @@ import prism.*;
public class TransitionList
{
private ArrayList<Choice> choices = new ArrayList<Choice>();
/** The index of the choice containing each transition. */
private ArrayList<Integer> transitionIndices = new ArrayList<Integer>();
/** The offset with the choice containing each transition. */
private ArrayList<Integer> transitionOffsets = new ArrayList<Integer>();
private int numChoices = 0;
private int numTransitions = 0;
@ -140,7 +142,7 @@ public class TransitionList
*/
public int getTotalIndexOfTransition(int i, int offset)
{
return transitionOffsets.get(i);
return transitionIndices.indexOf(i) + offset;
}
// Random selection of a choice

Loading…
Cancel
Save