|
|
|
@ -932,6 +932,17 @@ public class SimulatorEngine extends PrismComponent |
|
|
|
return transitionList; |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* Get the state for which the simulator is currently supplying information about its transitions. |
|
|
|
* Usually, this is the current (final) state of the path. |
|
|
|
* But if the user called {@link #computeTransitionsForStep(int step)}, it will be this state instead. |
|
|
|
*/ |
|
|
|
public State getTransitionListState() |
|
|
|
{ |
|
|
|
return (transitionListState == null) ? path.getCurrentState() : transitionListState; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* Returns the current number of available choices. |
|
|
|
*/ |
|
|
|
@ -1053,10 +1064,7 @@ public class SimulatorEngine extends PrismComponent |
|
|
|
*/ |
|
|
|
public String getTransitionUpdateString(int index) throws PrismException |
|
|
|
{ |
|
|
|
// We need the state containing the transitions. Usually, this is the current (final) state |
|
|
|
// of the path. But if the user called computeTransitionsForStep(int step), this is not so. |
|
|
|
State state = (transitionListState == null) ? path.getCurrentState() : transitionListState; |
|
|
|
return getTransitionList().getTransitionUpdateString(index, state); |
|
|
|
return getTransitionList().getTransitionUpdateString(index, getTransitionListState()); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
@ -1076,10 +1084,7 @@ public class SimulatorEngine extends PrismComponent |
|
|
|
*/ |
|
|
|
public State computeTransitionTarget(int i, int offset) throws PrismException |
|
|
|
{ |
|
|
|
// We need the state containing the transitions. Usually, this is the current (final) state |
|
|
|
// of the path. But if the user called computeTransitionsForStep(int step), this is not so. |
|
|
|
State state = (transitionListState == null) ? path.getCurrentState() : transitionListState; |
|
|
|
return getTransitionList().getChoice(i).computeTarget(offset, state); |
|
|
|
return getTransitionList().getChoice(i).computeTarget(offset, getTransitionListState()); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
@ -1087,10 +1092,7 @@ public class SimulatorEngine extends PrismComponent |
|
|
|
*/ |
|
|
|
public State computeTransitionTarget(int index) throws PrismException |
|
|
|
{ |
|
|
|
// We need the state containing the transitions. Usually, this is the current (final) state |
|
|
|
// of the path. But if the user called computeTransitionsForStep(int step), this is not so. |
|
|
|
State state = (transitionListState == null) ? path.getCurrentState() : transitionListState; |
|
|
|
return getTransitionList().computeTransitionTarget(index, state); |
|
|
|
return getTransitionList().computeTransitionTarget(index, getTransitionListState()); |
|
|
|
} |
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------ |
|
|
|
|