Class MinimalQualityCriteriaValueConfig

  • All Implemented Interfaces:
    IConfiguration

    public class MinimalQualityCriteriaValueConfig
    extends AbstractConfiguration
    Configuration class for MinimalQualityCriteriaValue termination criterion.
    • Constructor Detail

      • MinimalQualityCriteriaValueConfig

        public MinimalQualityCriteriaValueConfig()
    • Method Detail

      • validateConfiguration

        public boolean validateConfiguration()
        Checks the configuration object for correctness. Should be called before accessing any of the data of the configuration object
        Returns:
        true - The configuration is correct false - The configuration is incomplete or wrong
      • setObjectiveMinimalValues

        public void setObjectiveMinimalValues​(Map<org.opt4j.core.Objective,​org.opt4j.core.Value<?>> configuredObjectives)
                                       throws InvalidConfigException
        Set the List of objective minimum values.
        Parameters:
        objectiveDescriptions - a Map of objective minimum values. The List should not be null or empty. The Map will not be copied by reference. But its Elements will.
        Throws:
        InvalidConfigException - if the supplied parameter do not conform to the required conditions.
      • getObjectiveMinimalValues

        public Map<org.opt4j.core.Objective,​org.opt4j.core.Value<?>> getObjectiveMinimalValues()
        Returns the List the configured Minimal Values for some or for all objectives of the optimization.
        Returns:
        the List the configured Minimal Values for some or for all objectives of the optimization.
      • setUnresolvedObjectiveMinimalValue

        public void setUnresolvedObjectiveMinimalValue​(Map<String,​org.opt4j.core.Value<?>> unresolvedObjectives)
        Configures the minimal values for the objectives without resolving them. The String keys of the objectives are used instead. The map can be later read for fully resolving the objectives. This must be done, before the configuration object is supplied to the TerminationCriteriaManager. The TerminationCriterion cannot work with unresolved Objectives and therefore the validation of the Configuration object is not influenced by this parameter at all.
        Parameters:
        unresolvedObjectives -
      • getUnresolvedObjectiveMinimalValue

        public Map<String,​org.opt4j.core.Value<?>> getUnresolvedObjectiveMinimalValue()
        Returns a map of String - Value items. The String is the key that can be used to resolve the object. The Map must be previously set or it will be empty.
        Returns:
        map of String, Value pairs.
      • setNumberOfCandidatesToConform

        public void setNumberOfCandidatesToConform​(int numberOfCandidates)
                                            throws InvalidConfigException
        Set the number of candidates that must have quality criteria values greater then the supplied minimum.
        Parameters:
        numberOfCandidates - the number of candidates that must have quality criteria values greater then the supplied minimum. Must be >=1.
        Throws:
        InvalidConfigException - if the supplied parameter do not conform to the required conditions.
      • getNumberOfCandidatesToConform

        public int getNumberOfCandidatesToConform()
        Get the number of candidates that must have quality criteria values greater then the supplied minimum.
        Returns:
        the number of candidates that must have quality criteria values greater then the supplied minimum.