Skip to content

MaxDivSolution

MaxDivSolution dataclass

MaxDivSolution(
    i_selected: NDArray[int32],
    score_checkpoints: list[tuple[str, Elapsed, Score]],
    step_durations: dict[str, Elapsed],
    n_constraints: int = 0,
    n_constraints_satisfied: int = 0,
)

Result of solving a Maximum Diversity Problem.

Contains the selected vector indices, the final Score, timing information, and a history of score checkpoints recorded during the solve.

score property

score: Score

Return the final score of the solution.

duration property

duration: Elapsed

Return the total elapsed time and iterations taken to compute the solution.