org.eclipse.viatra.dse.objectives.impl

## Class NeverSatisfiedDummyHardObjective

- java.lang.Object
- - org.eclipse.viatra.dse.objectives.impl.BaseObjective
  - - org.eclipse.viatra.dse.objectives.impl.NeverSatisfiedDummyHardObjective

- All Implemented Interfaces:
    IObjective

      public class NeverSatisfiedDummyHardObjective
      extends BaseObjective

  This hard objective is never fulfilled. Use it if all states should be regarded as an invalid solution.

- - ### Field Summary

    - ### Fields inherited from class org.eclipse.viatra.dse.objectives.impl.BaseObjective

      `comparator, fitnessConstraint, fitnessConstraintComparator, isThereFitnessConstraint, level, name`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `NeverSatisfiedDummyHardObjective()`
    `NeverSatisfiedDummyHardObjective(java.lang.String name)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `IObjective` | `createNew()` Returns an instance of the `IObjective`.
    `java.lang.Double` | `getFitness(ThreadContext context)` Calculates the value of the objective on a given solution (trajectory).
    `boolean` | `isHardObjective()` Returns true if the objective is a hard objective.
    `boolean` | `satisifiesHardObjective(java.lang.Double fitness)` Determines if the given fitness value satisfies the hard objective.

    - ### Methods inherited from class org.eclipse.viatra.dse.objectives.impl.BaseObjective

      `equals, getComparator, getLevel, getName, hashCode, init, setComparator, setLevel, toString, withComparator, withHardConstraintOnFitness, withHardConstraintOnFitness, withLevel`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### NeverSatisfiedDummyHardObjective

          public NeverSatisfiedDummyHardObjective()

    - #### NeverSatisfiedDummyHardObjective

          public NeverSatisfiedDummyHardObjective(java.lang.String name)

  - ### Method Detail

    - #### getFitness

          public java.lang.Double getFitness(ThreadContext context)

      Description copied from interface: `IObjective`
      Calculates the value of the objective on a given solution (trajectory).
      Parameters:
        `context` - The `ThreadContext`
      Returns:
        The objective value in double.

    - #### isHardObjective

          public boolean isHardObjective()

      Description copied from interface: `IObjective`
      Returns true if the objective is a hard objective. In such a case the method `IObjective.satisifiesHardObjective(Double)` is called.
      Specified by:
        `isHardObjective` in interface `IObjective`
      Overrides:
        `isHardObjective` in class `BaseObjective`
      Returns:
        True if the objective is a hard objective.
      See Also:
        `IObjective.satisifiesHardObjective(Double)`, `IObjective`

    - #### satisifiesHardObjective

          public boolean satisifiesHardObjective(java.lang.Double fitness)

      Description copied from interface: `IObjective`
      Determines if the given fitness value satisfies the hard objective.
      Specified by:
        `satisifiesHardObjective` in interface `IObjective`
      Overrides:
        `satisifiesHardObjective` in class `BaseObjective`
      Parameters:
        `fitness` - The fitness value of a solution.
      Returns:
        True if it satisfies the hard objective or it is a soft constraint.
      See Also:
        `IObjective`

    - #### createNew

          public IObjective createNew()

      Description copied from interface: `IObjective`
      Returns an instance of the `IObjective`. If it returns the same instance, all the methods has to be thread save as they are called concurrently.
      Returns:
        An instance of the objective.