Enum Class SolveEventProducerId

java.lang.Object
java.lang.Enum<SolveEventProducerId>
ai.timefold.solver.core.impl.solver.event.SolveEventProducerId
All Implemented Interfaces:
EventProducerId, Serializable, Comparable<SolveEventProducerId>, Constable

@NullMarked public enum SolveEventProducerId extends Enum<SolveEventProducerId> implements EventProducerId
EventProducerId for when a BestSolutionChangedEvent is not caused by a phase.
  • Enum Constant Details

  • Method Details

    • values

      public static SolveEventProducerId[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static SolveEventProducerId valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • producerId

      public String producerId()
      Description copied from interface: EventProducerId
      An unique string identifying what produced the event, either of the form "Event" where "Event" is a string describing the event that cause the update (like "Solving started") or "Phase (index)", where "Phase" is a string identifying the type of phase (like "Construction Heuristics") and index is the index of the phase in the SolverConfig.getPhaseConfigList().
      Specified by:
      producerId in interface EventProducerId
      Returns:
      An unique string identifying what produced the event.
    • simpleProducerName

      public String simpleProducerName()
      Description copied from interface: EventProducerId
      A (non-unique) string describing what produced the event. Events from different phases of the same type (for example, when multiple Construction Heuristics are configured) will return the same value.
      Specified by:
      simpleProducerName in interface EventProducerId
      Returns:
      A (non-unique) string describing what produced the event.
    • phaseIndex

      public OptionalInt phaseIndex()
      Description copied from interface: EventProducerId
      If present, the index of the phase that produced the event in the SolverConfig.getPhaseConfigList(). Is absent when the producer does not correspond to a phase, for instance, an event triggered after ProblemChange were processed.
      Specified by:
      phaseIndex in interface EventProducerId
      Returns:
      The index of the corresponding phase in SolverConfig.getPhaseConfigList(), or OptionalInt.empty() if there is no corresponding phase.