Class NormalizedObjective

All Implemented Interfaces:
Serializable, Comparable<Objective>, Copyable<Objective>, Defined, Named, Objective

public class NormalizedObjective extends Minimize
A normalized objective. By convention, normalized objectives are minimized. This implementation is distinct from Minimize since some methods are either redundant or unsupported on a normalized objective. Such methods will throw a UnsupportedOperationException if used.
See Also:
  • Constructor Details

    • NormalizedObjective

      public NormalizedObjective(String name)
      Constructs a new normalized objective.
      Parameters:
      name - the objective name
    • NormalizedObjective

      public NormalizedObjective(String name, double value)
      Constructs a new normalized objective.
      Parameters:
      name - the objective name
      value - the objective value
  • Method Details

    • copy

      public NormalizedObjective copy()
      Description copied from interface: Copyable
      Creates and returns a copy of this object. It is required that x.copy() is completely independent from x. This means any method invoked on x.copy() in no way alters the state of x and vice versa. It is typically the case that x.copy().getClass() == x.getClass() and x.copy().equals(x).
      Specified by:
      copy in interface Copyable<Objective>
      Overrides:
      copy in class Minimize
      Returns:
      the copy
    • normalize

      public NormalizedObjective normalize(double minimum, double maximum)
      This method is not supported for normalized objectives.
      Specified by:
      normalize in interface Objective
      Overrides:
      normalize in class Minimize
      Parameters:
      minimum - the minimum bound
      maximum - the maximum bound
      Returns:
      the normalized objective
      Throws:
      UnsupportedOperationException - as this operation is not permitted on normalized objectives
    • getEpsilonIndex

      public int getEpsilonIndex(double epsilon)
      This method is not supported for normalized objectives.
      Parameters:
      epsilon - the epsilon value
      Returns:
      the index
      Throws:
      UnsupportedOperationException - as this operation is not permitted on normalized objectives
    • getEpsilonDistance

      public double getEpsilonDistance(double epsilon)
      This method is not supported for normalized objectives.
      Parameters:
      epsilon - the epsilon value
      Returns:
      the distance
      Throws:
      UnsupportedOperationException - as this operation is not permitted on normalized objectives