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

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<Arc>
                  extended by org.processmining.models.graphbased.directed.petrinet.configurable.elements.ParameterizedArc
All Implemented Interfaces:
ConfigurableFeature<Arc,java.lang.Integer>, ParameterizedFeature<ConfigurableParameter<java.lang.Integer>>

public class ParameterizedArc
extends ParameterizedIntegerFeature<Arc>

Configurable arc to determine arc weights based on an expression.

Author:
dfahland

Constructor Summary
ParameterizedArc(Arc 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.
ParameterizedArc(java.lang.String id, Arc 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<Arc,java.lang.Integer> cloneFor(Arc newElement)
          Create a clone of this feature using newElement as ConfigurableFeature.getConfiguredElement().
 void executeConfiguration(ConfigurablePetrinet<? extends PetrinetGraph> parent)
          Set the weight of the configurable arc to ParameterizedIntegerFeature.getValue() (if > 0) and remove arc from parent (if == 0)
 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

ParameterizedArc

public ParameterizedArc(java.lang.String id,
                        Arc 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

ParameterizedArc

public ParameterizedArc(Arc 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 the weight of the configurable arc to ParameterizedIntegerFeature.getValue() (if > 0) and remove arc from parent (if == 0)

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

cloneFor

public ConfigurableFeature<Arc,java.lang.Integer> cloneFor(Arc 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<Arc,java.lang.Integer>
Specified by:
cloneFor in class ParameterizedIntegerFeature<Arc>
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