Class ConditionalParameterManager<T>

java.lang.Object
org.uma.evolver.parameter.ConditionalParameterManager<T>
Type Parameters:
T - the type of the main parameter's value used in the conditions

public class ConditionalParameterManager<T> extends Object
Manages a collection of ConditionalParameter objects associated with a main parameter in a multi-objective metaheuristic parameter space.

This class serves as a registry and coordinator for conditional parameters, enabling flexible and adaptive parameter configurations where certain parameters are only relevant when a parent parameter satisfies specific conditions. It supports both custom predicate-based conditions and common value-based equality conditions.

The manager handles the dynamic activation of parameters during parameter space processing, automatically parsing arguments only for parameters whose conditions are satisfied by the current value of the main parameter.

Example usage scenario:


 // For a categorical parameter "algorithmVariant" with values "basic" and "advanced"
 ConditionalParameterManager<String> manager = new ConditionalParameterManager<>();

 // Add parameters that only apply to "advanced" variant
 manager.addConditionalParameter("advanced", archiveSize);
 manager.addConditionalParameter("advanced", selectionPressure);

 // During processing, only parse arguments for active parameters
 manager.parseConditionalParameters("advanced", args);
 

This class is particularly useful for processing YAML configuration files where parameters have nested conditional structures, allowing for dynamic parameter space exploration based on parent parameter values.

Since:
1.0
Version:
1.0
Author:
[Author Name]
See Also: