Skip to content

Provide a way to count or list local maxima in the solver's solution space #11304

@sebright

Description

@sebright

This idea was inspired by @georgefst's comment in #10470.

The solver currently stops searching as soon as it finds one solution. That solution maximizes each of the variables (package versions, flags, etc.) locally, but it may not be the user's most preferred solution overall. For example, the solver might choose the newest version of package A and a very old version of package B, when the user would rather use a slightly older version of package A in exchange for a newer version of package B.

It would be useful to sometimes have the solver look beyond the first solution. We could first experiment with finding all of the local maxima in order to measure performance and determine whether it is true that there is usually only one local maximum, as suggested in the comment above. If there are usually only one or a few maxima, then I think that we could turn this into a useful feature, similar to #2860. We could either apply some simple heuristics to find the best solution outside of the solver, like avoiding deprecated/non-preferred versions or extremely old versions, or list the solutions so that the user can choose one using their own criteria.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions