Interface StochasticLabelledDataPetriNetSemantics
-
- All Superinterfaces:
java.lang.Cloneable
- All Known Implementing Classes:
StochasticLabelledDataPetrinetSemanticsDataUnaware,StochasticLabelledDataPetriNetSemanticsImpl,StochasticLabelledDataPetriNetSemanticsWeightsImpl
public interface StochasticLabelledDataPetriNetSemantics extends java.lang.CloneableSemantics considering the DataState as it is updated through visible transitions writing variables.- Author:
- Felix Mannhardt, Sander Leemans
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description StochasticLabelledDataPetriNetSemanticsclone()UtilitiesvoidexecuteTransition(int transition, DataState dataEffect)Update the state to reflect execution of the transition.DataStategetDataState()java.util.BitSetgetEnabledTransitions()intgetNumberOfVariables()byte[]getState()doublegetTotalWeightOfEnabledTransitions()java.lang.StringgetTransitionLabel(int transition)doublegetTransitionWeight(int transition)java.lang.StringgetVariableLabel(int variable)StochasticLabelledDataPetriNet.VariableTypegetVariableType(int variable)booleanisFinalState()booleanisTransitionSilent(int transition)DataStatenewDataState()voidsetDataState(DataState dataState)Set the data state to a copy of the supplied statevoidsetInitialState(DataState initialDataState)(Re)set the semantics to the initial statevoidsetState(byte[] state)Set a copy of the given state.
-
-
-
Method Detail
-
setInitialState
void setInitialState(DataState initialDataState)
(Re)set the semantics to the initial state
-
executeTransition
void executeTransition(int transition, DataState dataEffect)Update the state to reflect execution of the transition.- Parameters:
transition- index fireddataEffect- containing values for all (and only those) written variables
-
getEnabledTransitions
java.util.BitSet getEnabledTransitions()
- Parameters:
state-- Returns:
- an array of indices of the transitions that are enabled. May be changed and stored by the caller.
-
isFinalState
boolean isFinalState()
- Returns:
- whether the current state is a final state.
-
getState
byte[] getState()
- Returns:
- a copy of the current state.
-
setState
void setState(byte[] state)
Set a copy of the given state.- Parameters:
state-
-
getDataState
DataState getDataState()
- Returns:
- a copy of the current data state
-
setDataState
void setDataState(DataState dataState)
Set the data state to a copy of the supplied state- Parameters:
dataState-
-
newDataState
DataState newDataState()
-
getTransitionWeight
double getTransitionWeight(int transition)
- Parameters:
transition-- Returns:
- the weight of the transition. This might depend on the state.
-
getTotalWeightOfEnabledTransitions
double getTotalWeightOfEnabledTransitions()
- Parameters:
enabledTransitions-- Returns:
- the sum of the weight of the enabled transitions
-
clone
StochasticLabelledDataPetriNetSemantics clone()
Utilities
-
isTransitionSilent
boolean isTransitionSilent(int transition)
- Parameters:
transition- index- Returns:
- whether the transition is observable (false) or silent (true)
-
getTransitionLabel
java.lang.String getTransitionLabel(int transition)
-
getNumberOfVariables
int getNumberOfVariables()
-
getVariableLabel
java.lang.String getVariableLabel(int variable)
-
getVariableType
StochasticLabelledDataPetriNet.VariableType getVariableType(int variable)
-
-