Skip to main content

Varible vector violates upper and lower bounds when I hit iteration limit

Answered

Comments

5 comments

  • Official comment
    Simranjit Kaur
    • Gurobi Staff
    This post is more than three years old. Some information may not be up to date. For current information, please check the Gurobi Documentation or Knowledge Base. If you need more help, please create a new post in the community forum. Or why not try our AI Gurobot?.
  • Eli Towle
    • Gurobi Staff

    Are you retrieving the variable values in a callback, or by querying the X variable attributes after the optimization completes? Can you please post a minimal working code example that reproduces the issue?

    0
  • Stetson Zirkelbach
    • Gurobi-versary
    • First Comment
    • First Question

    I am retrieving the variables with

    x = model.x

    a minimal working code example is tricky because I am looking at site assignment changes when I have the optimal assignment for one objective function and use that assignment as the initial feasible solution for a new objective function, so with the helper functions it can get quite large to generate all to constants and coefficients.

    Also, since I left it out of the origional post, I have an initial feasible cbasis and vbasis that I use to make sure that I am in the feasible region to start, and I am specifying the primal simplex method, so I am confused why I am leaving the feasible region after the first iteration.

    0
  • Eli Towle
    • Gurobi Staff

    I see, thanks for the clarification. If you set an iteration limit, Gurobi may terminate with an ITERATION_LIMIT status during phase 1 of the simplex algorithm, before a feasible solution is available. If this happens, Gurobi may return an infeasible solution. You can check whether the solution is feasible by querying the BoundVio and ConstrVio model attributes and comparing this to the feasibility tolerance.

    0
  • Stetson Zirkelbach
    • Gurobi-versary
    • First Comment
    • First Question

    Thank you for your help. I will implement this check to iterate around this. I was suprised that a primal simplex step with a feasible starting cbasis and vbasis and starting point could become infeasible during the simplex iterations.

    0

Post is closed for comments.