Record Class SolverTerminationConfig

java.lang.Object
java.lang.Record
ai.timefold.solver.service.definition.api.termination.SolverTerminationConfig

public record SolverTerminationConfig(Duration spentLimit, Duration unimprovedSpentLimit, Integer stepCountLimit, Long moveCountLimit, Duration slidingWindowDuration, Double minimumImprovementRatio) extends Record
  • Constructor Details

    • SolverTerminationConfig

      public SolverTerminationConfig(Duration spentLimit, Duration unimprovedSpentLimit, Integer stepCountLimit, Long moveCountLimit, Duration slidingWindowDuration, Double minimumImprovementRatio)
      Creates an instance of a SolverTerminationConfig record class.
      Parameters:
      spentLimit - the value for the spentLimit record component
      unimprovedSpentLimit - the value for the unimprovedSpentLimit record component
      stepCountLimit - the value for the stepCountLimit record component
      moveCountLimit - the value for the moveCountLimit record component
      slidingWindowDuration - the value for the slidingWindowDuration record component
      minimumImprovementRatio - the value for the minimumImprovementRatio record component
    • SolverTerminationConfig

      public SolverTerminationConfig(Duration spentLimit, Duration unimprovedSpentLimit, Integer stepCountLimit, Duration slidingWindowDuration, Double minimumImprovementRatio)
    • SolverTerminationConfig

      public SolverTerminationConfig(Duration spentLimit, Duration unimprovedSpentLimit, Integer stepCountLimit, Long moveCountLimit)
    • SolverTerminationConfig

      public SolverTerminationConfig(Duration spentLimit, Duration unimprovedSpentLimit, Integer stepCountLimit)
    • SolverTerminationConfig

      public SolverTerminationConfig(Duration spentLimit, Duration unimprovedSpentLimit)
  • Method Details

    • override

      public SolverTerminationConfig override(SolverTerminationConfig configuration)
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • spentLimit

      public Duration spentLimit()
      Returns the value of the spentLimit record component.
      Returns:
      the value of the spentLimit record component
    • unimprovedSpentLimit

      public Duration unimprovedSpentLimit()
      Returns the value of the unimprovedSpentLimit record component.
      Returns:
      the value of the unimprovedSpentLimit record component
    • stepCountLimit

      public Integer stepCountLimit()
      Returns the value of the stepCountLimit record component.
      Returns:
      the value of the stepCountLimit record component
    • moveCountLimit

      public Long moveCountLimit()
      Returns the value of the moveCountLimit record component.
      Returns:
      the value of the moveCountLimit record component
    • slidingWindowDuration

      public Duration slidingWindowDuration()
      Returns the value of the slidingWindowDuration record component.
      Returns:
      the value of the slidingWindowDuration record component
    • minimumImprovementRatio

      public Double minimumImprovementRatio()
      Returns the value of the minimumImprovementRatio record component.
      Returns:
      the value of the minimumImprovementRatio record component