Skip to main content

Type Alias: ObjectiveEntry

ObjectiveEntry: { objective: ObjectiveValue; solveTime: number; valid: true; }

Single entry in the objective value history.

Type declaration

objective

objective: ObjectiveValue

The objective value of this solution.

Returns

The objective value, or None if not applicable.

Remarks

The value is None when:

  • No objective was specified in the model (no Model.minimize or Model.maximize call).
  • The objective expression has an absent value in this solution.

solveTime

solveTime: number

Duration of the solve when this solution was found, in seconds.

Returns

Seconds elapsed.

valid?

optional valid: true

Whether this solution was verified (if verification is enabled).

Returns

True if verified, None if not verified.

Remarks

When parameter Parameters.verifySolutions is set to True (the default), the solver verifies all solutions found. The verification checks that all constraints in the model are satisfied and that the objective value is computed correctly.

The verification is done using separate code (not used during the search). The point is to independently verify the correctness of the solution.

Possible values are:

  • None - the solution was not verified (because the parameter Parameters.verifySolutions was not set).
  • True - the solution was verified and correct.

The value can never be False because, in this case, the solver would stop with an error.

Remarks

Tracks when each improving solution was found during the solve, along with its objective value and validation status.

There is one entry for each solution found. The entries are ordered by solve time.

See

SolveResult.objectiveHistory for accessing the history.