org.processmining.models.graphbased.directed.petrinet.configurable.elements
Class ParameterizedPlaceMarking

java.lang.Object
  extended by org.processmining.models.graphbased.directed.petrinet.configurable.ConfigurableParameter<java.lang.Integer>
      extended by org.processmining.models.graphbased.directed.petrinet.configurable.impl.ConfigurableParameterInteger
          extended by org.processmining.models.graphbased.directed.petrinet.configurable.impl.ConfigurableIntegerFeature<T>
              extended by org.processmining.models.graphbased.directed.petrinet.configurable.impl.ParameterizedIntegerFeature<Place>
                  extended by org.processmining.models.graphbased.directed.petrinet.configurable.elements.ParameterizedPlaceMarking
All Implemented Interfaces:
ConfigurableFeature<Place,java.lang.Integer>, ParameterizedFeature<ConfigurableParameter<java.lang.Integer>>

public class ParameterizedPlaceMarking
extends ParameterizedIntegerFeature<Place>

Configures the number of tokens on a Place in the initial marking based on an expression.

Author:
dfahland

Constructor Summary
ParameterizedPlaceMarking(Place element, java.lang.Integer min, java.lang.Integer max, java.lang.String expression, java.util.List<ConfigurableParameter<java.lang.Integer>> inputParameters)
          Create a new parameterized marking of this place.
ParameterizedPlaceMarking(java.lang.String id, Place element, java.lang.Integer min, java.lang.Integer max, java.lang.String expression, java.util.List<ConfigurableParameter<java.lang.Integer>> inputParameters)
          Create a new parameterized marking of this place.
 
Method Summary
 void clearElementVisualization()
          Clear visual representation of ConfigurableFeature.getConfiguredElement() back to normal
 ConfigurableFeature<Place,java.lang.Integer> cloneFor(Place newElement)
          Create a clone of this feature using newElement as ConfigurableFeature.getConfiguredElement().
 void executeConfiguration(ConfigurablePetrinet<? extends PetrinetGraph> parent)
          Set initial marking of configurable place in its parent net to the configured value.
 boolean isStillExecutable(ConfigurablePetrinet<? extends PetrinetGraph> parent)
           
 void updateElementVisualization()
          Change visual representation of ConfigurableFeature.getConfiguredElement()
 
Methods inherited from class org.processmining.models.graphbased.directed.petrinet.configurable.impl.ParameterizedIntegerFeature
getExpression, getInputParameters, getInputParametersByName, getValue, setInputParameter, setValue, updateValue
 
Methods inherited from class org.processmining.models.graphbased.directed.petrinet.configurable.impl.ConfigurableIntegerFeature
getConfiguredElement, getId, getParameter
 
Methods inherited from class org.processmining.models.graphbased.directed.petrinet.configurable.impl.ConfigurableParameterInteger
isValidIntervalValue
 
Methods inherited from class org.processmining.models.graphbased.directed.petrinet.configurable.ConfigurableParameter
getDiscreteDomain, getIntervalMax, getIntervalMin, isIntervalDomain, isValidValue, setDiscreteDomain, setId, setIntervalDomain, updateParameter
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ParameterizedPlaceMarking

public ParameterizedPlaceMarking(java.lang.String id,
                                 Place element,
                                 java.lang.Integer min,
                                 java.lang.Integer max,
                                 java.lang.String expression,
                                 java.util.List<ConfigurableParameter<java.lang.Integer>> inputParameters)
                          throws InvalidConfigurationException,
                                 de.congrace.exp4j.UnknownFunctionException,
                                 de.congrace.exp4j.UnparsableExpressionException
Create a new parameterized marking of this place. The number of tokens on the place in the initial marking is computed from the given expression which contains the provided parameters with their default values. Values of variables may range between min and max.

Parameters:
id -
element -
min -
max -
expression -
inputParameters -
Throws:
InvalidConfigurationException
de.congrace.exp4j.UnknownFunctionException
de.congrace.exp4j.UnparsableExpressionException

ParameterizedPlaceMarking

public ParameterizedPlaceMarking(Place element,
                                 java.lang.Integer min,
                                 java.lang.Integer max,
                                 java.lang.String expression,
                                 java.util.List<ConfigurableParameter<java.lang.Integer>> inputParameters)
                          throws InvalidConfigurationException,
                                 de.congrace.exp4j.UnknownFunctionException,
                                 de.congrace.exp4j.UnparsableExpressionException
Create a new parameterized marking of this place. The number of tokens on the place in the initial marking is computed from the given expression which contains the provided parameters with their default values. Values of variables may range between min and max.

Parameters:
element -
min -
max -
expression -
inputParameters -
Throws:
InvalidConfigurationException
de.congrace.exp4j.UnknownFunctionException
de.congrace.exp4j.UnparsableExpressionException
Method Detail

isStillExecutable

public boolean isStillExecutable(ConfigurablePetrinet<? extends PetrinetGraph> parent)
Returns:
true iff this configuration can be executed on the parent, e.g. if ConfigurableFeature.getConfiguredElement() is still an element of parent

executeConfiguration

public void executeConfiguration(ConfigurablePetrinet<? extends PetrinetGraph> parent)
Set initial marking of configurable place in its parent net to the configured value.

Specified by:
executeConfiguration in interface ConfigurableFeature<Place,java.lang.Integer>
Specified by:
executeConfiguration in class ParameterizedIntegerFeature<Place>
Parameters:
parent -
See Also:
org.processmining.models.graphbased.directed.petrinet.configurable.ConfigurableFeature#executeConfiguration(org.processmining.models.graphbased.directed.petrinet.PetrinetGraph)

cloneFor

public ConfigurableFeature<Place,java.lang.Integer> cloneFor(Place newElement)
                                                      throws InvalidConfigurationException
Description copied from interface: ConfigurableFeature
Create a clone of this feature using newElement as ConfigurableFeature.getConfiguredElement().

Specified by:
cloneFor in interface ConfigurableFeature<Place,java.lang.Integer>
Specified by:
cloneFor in class ParameterizedIntegerFeature<Place>
Throws:
InvalidConfigurationException

updateElementVisualization

public void updateElementVisualization()
Description copied from interface: ConfigurableFeature
Change visual representation of ConfigurableFeature.getConfiguredElement()


clearElementVisualization

public void clearElementVisualization()
Description copied from interface: ConfigurableFeature
Clear visual representation of ConfigurableFeature.getConfiguredElement() back to normal