Skip to main content

Type Alias: ObjectiveHistoryItem

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

An item in SolveResult.objectiveHistory array. There is one item for each solution found.

Type declaration

objective

objective: ObjectiveValue

Objective value of the solution.

solveTime

solveTime: number

Duration of the solve at the time the solution was found, in seconds.

valid?

optional valid: true

Result of the verification of the solution.

When parameter Parameters.verifySolutions is set to true (the default), then 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 by a separate code that is not used during the search. The point is to verify independently the correctness of the solution.

Possible values are:

  • undefined - the solution was not verified (because the parameter Parameters.verifySolutions was not set).
  • true - the solution was verified and it is correct.

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