Class ConfigurableFeatureGroup
- java.lang.Object
-
- org.processmining.models.graphbased.directed.petrinet.configurable.ConfigurableFeatureGroup
-
- All Implemented Interfaces:
ParameterizedFeature<ConfigurableParameter<?>>
public class ConfigurableFeatureGroup extends java.lang.Object implements ParameterizedFeature<ConfigurableParameter<?>>
A group of features that shall be configured together. *- Author:
- dfahland
-
-
Field Summary
Fields Modifier and Type Field Description static java.util.Comparator<ConfigurableFeatureGroup>comparatorDefault comparator comparing groups by their ids
-
Constructor Summary
Constructors Constructor Description ConfigurableFeatureGroup(java.lang.String id)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddFeature(ConfigurableFeature<? extends org.processmining.models.graphbased.directed.DirectedGraphElement,? extends java.lang.Object> feature)Add feature to this group.ConfigurableFeatureGroupcloneFor(java.util.Map<org.processmining.models.graphbased.directed.DirectedGraphElement,org.processmining.models.graphbased.directed.DirectedGraphElement> copies)Clone this feature group and create a newConfigurableFeaturefor each feature in this group where theConfigurableFeature.getConfiguredElement()is updated according to copies.static ConfigurableFeatureGroupcreateDefaultFeatureGroup(Place p, Marking m)Create a configurable feature group for the presence of a place and its initial marking.static ConfigurableFeatureGroupcreateDefaultFeatureGroup(Transition t)Create a configurable feature group for the presence of a transition and the weights of its adjacent arcs.static java.util.List<ConfigurableFeatureGroup>createDefaultFeatureGroups(PetrinetGraph net, Marking m)Create default configurable feature groups for all nodes in the net.voidexecuteConfiguration(ConfigurablePetrinet<? extends PetrinetGraph> parent)Executes the configuration for this feature group.java.util.List<ConfigurableFeature<? extends org.processmining.models.graphbased.directed.DirectedGraphElement,? extends java.lang.Object>>getFeatures()java.util.List<ConfigurableFeature<? extends org.processmining.models.graphbased.directed.DirectedGraphElement,? extends java.lang.Object>>getFeatures(org.processmining.models.graphbased.directed.DirectedGraphElement element)java.lang.StringgetId()java.util.List<ConfigurableParameter<?>>getInputParameters()java.util.List<ConfigurableParameter<?>>getInputParametersByName()voidsetInputParameter(java.lang.String key, java.lang.Object value)Set value of an input parameter.
-
-
-
Field Detail
-
comparator
public static java.util.Comparator<ConfigurableFeatureGroup> comparator
Default comparator comparing groups by their ids
-
-
Method Detail
-
addFeature
public void addFeature(ConfigurableFeature<? extends org.processmining.models.graphbased.directed.DirectedGraphElement,? extends java.lang.Object> feature) throws InvalidConfigurationException
Add feature to this group.- Parameters:
feature-- Throws:
InvalidConfigurationException- if
-
getFeatures
public java.util.List<ConfigurableFeature<? extends org.processmining.models.graphbased.directed.DirectedGraphElement,? extends java.lang.Object>> getFeatures()
- Returns:
- all features of this group
-
getFeatures
public java.util.List<ConfigurableFeature<? extends org.processmining.models.graphbased.directed.DirectedGraphElement,? extends java.lang.Object>> getFeatures(org.processmining.models.graphbased.directed.DirectedGraphElement element)
- Parameters:
element-- Returns:
- list of features configuring the given element
-
executeConfiguration
public void executeConfiguration(ConfigurablePetrinet<? extends PetrinetGraph> parent)
Executes the configuration for this feature group. The configuration may require to change the parent object.- Parameters:
parent-
-
getId
public java.lang.String getId()
- Returns:
- ID of this feature
-
cloneFor
public ConfigurableFeatureGroup cloneFor(java.util.Map<org.processmining.models.graphbased.directed.DirectedGraphElement,org.processmining.models.graphbased.directed.DirectedGraphElement> copies) throws InvalidConfigurationException
Clone this feature group and create a newConfigurableFeaturefor each feature in this group where theConfigurableFeature.getConfiguredElement()is updated according to copies. Every subclass must override this method for proper cloning behavior.- Parameters:
copies-- Returns:
- the clone
- Throws:
InvalidConfigurationException
-
createDefaultFeatureGroup
public static ConfigurableFeatureGroup createDefaultFeatureGroup(Transition t) throws InvalidConfigurationException
Create a configurable feature group for the presence of a transition and the weights of its adjacent arcs.- Parameters:
t-- Returns:
- Throws:
InvalidConfigurationException
-
createDefaultFeatureGroup
public static ConfigurableFeatureGroup createDefaultFeatureGroup(Place p, Marking m) throws InvalidConfigurationException
Create a configurable feature group for the presence of a place and its initial marking.- Parameters:
p-m-- Returns:
- Throws:
InvalidConfigurationException
-
createDefaultFeatureGroups
public static java.util.List<ConfigurableFeatureGroup> createDefaultFeatureGroups(PetrinetGraph net, Marking m) throws InvalidConfigurationException
Create default configurable feature groups for all nodes in the net. Each node gets its own feature group. Arcs are added to the feature groups of their adjacent transitions.- Parameters:
net-m-- Returns:
- list of all default configurable feature groups, first the transition features, then the place features
- Throws:
InvalidConfigurationException
-
getInputParameters
public java.util.List<ConfigurableParameter<?>> getInputParameters()
- Specified by:
getInputParametersin interfaceParameterizedFeature<ConfigurableParameter<?>>- Returns:
- all parameters of this feature together with their chosen value
-
getInputParametersByName
public java.util.List<ConfigurableParameter<?>> getInputParametersByName()
- Specified by:
getInputParametersByNamein interfaceParameterizedFeature<ConfigurableParameter<?>>- Returns:
- input parameters that differ by their
ConfigurableParameter.getId(), i.e., from two input parameters with same id, only one will be included
-
setInputParameter
public void setInputParameter(java.lang.String key, java.lang.Object value) throws InvalidConfigurationExceptionDescription copied from interface:ParameterizedFeatureSet value of an input parameter.- Specified by:
setInputParameterin interfaceParameterizedFeature<ConfigurableParameter<?>>- Throws:
InvalidConfigurationException
-
-