Class Objective

  • All Implemented Interfaces:
    java.lang.Comparable<Objective>

    public class Objective
    extends java.lang.Object
    implements java.lang.Comparable<Objective>

    The Objective is the identifier for a single objective in the Objectives. It is specified by the following properties:

    • Name
    • Minimization or Maximization

    Each Evaluator sets a specific amount of Objective-Value pairs. Moreover, each Evaluator has to set the same Objectives for all phenotypes.

    See Also:
    Objectives
    • Field Detail

      • INFEASIBLE

        public static final Value<?> INFEASIBLE
        Identifier for infeasible results (null).
      • name

        protected final java.lang.String name
    • Constructor Detail

      • Objective

        public Objective​(java.lang.String name)
        Constructs an Objective with a given name, sign=MIN, and rank=RANK_OBJECTIVE(0).
        Parameters:
        name - the name
      • Objective

        public Objective​(java.lang.String name,
                         Objective.Sign sign)
        Constructs an Objective with a given name, sign, and rank=RANK_OBJECTIVE(0).
        Parameters:
        name - the name
        sign - the sign of the objective
    • Method Detail

      • getSign

        public Objective.Sign getSign()
        Returns the sign.
        Returns:
        the sign
      • getName

        public java.lang.String getName()
        Returns the name.
        Returns:
        the name
      • compareTo

        public int compareTo​(Objective other)
        Specified by:
        compareTo in interface java.lang.Comparable<Objective>
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object