Skip to content

How can I determine if a valid solution was found? #78

Closed

Description

@ufechner7

The named touple result has four fields, but none of it is a return code like OK or FAILURE.

How can I determine if a valid solution was found?

Activity

  1. salomonl commented on May 30, 2025

    @salomonl
    Collaborator

    @ufechner7 If result.x_best_feas and result.bbo_best_feas do not have a nothing value, it means that the solver has found a feasible solution (so, I suppose it is valid). Note that this solution may not satisfy the optimality conditions (the solver can stop after reaching a certain budget of evaluations), but it is the best solution found by the solver. Otherwise, the solver found an infeasible solution, contained in result.x_best_inf and result.bbo_best_inf which is the closest to feasibility.

  2. added
    question
    on May 30, 2025
  3. salomonl commented on Oct 22, 2026

    @salomonl
    Collaborator

    See solve method documentation, that now returns a flag indicating if a valid solution was found.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationquestion

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions