Skip to main content

MIP model gets stuck at very specific variable bound values

Answered

Comments

4 comments

  • Jaromił Najman
    • Gurobi Staff Gurobi Staff

    Hi Natalie,

    There could be many explanations for the behavior you observe.

    Could you try providing finite bounds for all variables participating in nonlinear terms and general constraints. In your case, this would mean to provide good bounds for \(\texttt{tw_s}\) and \(\texttt{tw_e}\).

    Please note that the code you provided is not reproducible, because definitions of several objects and variables, e.g., \(\texttt{arm}\), are missing. You could share an MPS or LP file instead, see Posting to the Community Forum. This way, we can be sure which exact model you are using and talking about.

    You said, that there is kind of a hard gap when the model jumps from solvable within minutes to unsolvable within hours. Could you please provide both models? This should make the investigation easier.

    Best regards, 
    Jaromił

    0
  • Natalie Pueyo
    • Gurobi-versary
    • Conversationalist
    • First Question

    Hi Jaromil,

    Thanks for the reply!

    The gap isn't between solving quickly and solving after hours. It's between getting a solution (usually within 300 seconds) or not getting anything (after more than four hours stopped manually). I've been trying to get more information, and it seems that the best objective gets stuck on one value, say 64.08 (stays there all four hours). By changing the v_vy upper bound, \(\texttt{v_vy_ub}\), or the \(\texttt{M}\) value, I can get the starting best bound value closer say 63.23 (or further 59.28) to this stuck best objective value which can lead to the solver getting a result (or not). I also got slightly better results after switching \(\texttt{v_vy}\) to cm/s and set it as an integer variable. It increased the best objective value at which the solver got stuck.

    When I lowered \(\texttt{K}\) (number of arms/machines) from 3 to 2 the solver has been unable to solve any of the same problems that were being solved for \(\texttt{K}\) = 3.

    I also tried giving the solver a starting \(\texttt{v_vy}\) value I know worked since I got it from solving for a smaller number of fruit (\(\texttt{N}\) = 40) with all the same settings. At too high a number of fruit (\(\texttt{N}\) = ~70 to 80), the solver gives a "no new incumbent solution" and it gets stuck on the same place as before. At \(\texttt{N}\) = 60, the solver finds a solution that is higher than the first best bound, but then increases the best bound to match the solution.

    The current .mps model with velocity in cm/s and set as integers, with settings that produce a solution:

    https://drive.google.com/file/d/1vObD78pNAXrCnwAbIBCvcxdLUbY0Dhsz/view?usp=sharing 

    The same model stops working if the \(\texttt{v_vy_ub}\) is set to 90 cm/s or if \(\texttt{M}\) = 80 and \(\texttt{v_vy_ub}\) = 75 cm/s (this one was weird because it can be solved if \(\texttt{v_vy_ub}\) goes to 80 cm/s, though back to unsolvable at 90 cm/s).

    I'll try adding good bounds to \(\texttt{tw_s}\) and \(\texttt{tw_e}\) next.

    Thank you,

    Natalie

    0
  • Jaromił Najman
    • Gurobi Staff Gurobi Staff

    Hi Natalie,

    It looks like finding feasible solutions for you model is very hard and depends on variable bounds. Could you try experimenting with the NoRelHeurTime parameter which controls the time spent in the no relaxation heuristic? For example, set it to 600 seconds.

    Please let me know whether providing tight finite bounds for your \(\texttt{tw_e}\) and \(\texttt{tw_s}\) variables helps.

    Best regards, 
    Jaromił

    0
  • Natalie Pueyo
    • Gurobi-versary
    • Conversationalist
    • First Question

    Hi Jaromił,

    Adding the bounds to tw_s and tw_e sped up solving for three arms below 0.9 m/s v_vy upper bound. Adding NoRelTime = 800s, led to finding solutions very quickly (all, except one, below 30s when before it could take hundreds of seconds) for 3 arms and all v_vy upper bounds up to 0.9 m/s. I then tested it on 2 arms and it can solve it if I set NoRelTime to 1000s, it just takes over 13.5 hours if the v_vy upper bound is 0.9 m/s. I also tested NoRelTime = 3000s with no change. Still, adding the bounds and NoRel was a huge step forward.

    Thank you so much!

    Natalie

    0

Please sign in to leave a comment.