Class Objectives

    • Constructor Detail

      • Objectives

        @Deprecated
        public Objectives()
        Deprecated.
        Inject a Provider<Objectives> object instead and create Objectives objects with provider.get().
    • Method Detail

      • getConstraints

        public Constraints getConstraints()
        Returns the constraints.
        Returns:
        the constraints
      • setConstraints

        public void setConstraints​(Constraints constraints)
        Sets the constraints.
        Parameters:
        constraints - the constraints to set
      • getDominationStrategy

        public DominationStrategy getDominationStrategy()
        Returns the domination strategy of the Objective.
        Returns:
        the domination strategy of the Objective
      • isFeasible

        public boolean isFeasible()
        Returns the feasibility.
        Returns:
        the feasibility
      • setFeasible

        public void setFeasible​(boolean feasible)
        Sets the feasibility.
        Parameters:
        feasible - the feasibility to set
      • array

        public double[] array()
        Returns an array of all values which all have to be minimized. Do not call this method before all objectives were added!
        Specified by:
        array in class CriterionSet<Objective>
        Returns:
        an array containing values which have to be minimized
        See Also:
        Value.getDouble()
      • submit

        protected void submit()
        Calculates the array.
      • get

        public Value<?> get​(Objective objective)
        Returns the value that is assigned to the given objective. Returns null if the objective does not exist.
        Overrides:
        get in class CriterionSet<Objective>
        Parameters:
        objective - the given objective
        Returns:
        the value
      • get

        public Objective get​(Value<?> value)
        Returns the objective that is assigned to the given value. Returns null if the value does not exist.
        Overrides:
        get in class CriterionSet<Objective>
        Parameters:
        value - the given value
        Returns:
        the objective
      • add

        public void add​(Objective objective,
                        Value<?> value)
        Adds the objective with the specified value.
        Overrides:
        add in class CriterionSet<Objective>
        Parameters:
        objective - the objective
        value - the value
      • add

        public void add​(Objective objective,
                        double value)
        Adds the objective with the specified double value.
        Overrides:
        add in class CriterionSet<Objective>
        Parameters:
        objective - the objective
        value - the value
      • add

        public void add​(Objective objective,
                        int value)
        Adds the objective with the specified integer value.
        Overrides:
        add in class CriterionSet<Objective>
        Parameters:
        objective - the objective
        value - the value
      • addAll

        public void addAll​(Objectives objectives)
        Adds all objective with the specified value specified in Objectives.
        Parameters:
        objectives - the objectives
      • weaklyDominates

        public boolean weaklyDominates​(Objectives opponent)
        Returns true if this objectives weakly dominates the specified objectives. This comparison depends on the chosen DominationStrategy.
        Parameters:
        opponent - other objectives
        Returns:
        true if this objectives weakly dominate the opponent
      • dominates

        public boolean dominates​(Objectives opponent)
        Returns true if this objectives dominate the specified objectives. This comparison depends on the chosen DominationStrategy.
        Parameters:
        opponent - other objectives
        Returns:
        true if these objectives dominate the opponent
      • isEqual

        public boolean isEqual​(Objectives opponent)
        Returns true if this objectives are equal to the specified objectives. This comparison is based on the array() values.
        Parameters:
        opponent - other objectives
        Returns:
        true if these objectives dominate the opponent
      • distance

        public double distance​(Objectives other)
        Calculates the euclidean distance of two Objectives. This calculation is based on the array() values.
        Parameters:
        other - the second objectives
        Returns:
        the euclidean distance