Skip to main content

Different best bounds for different python scripts that run precisely the same model for the same problem

Ongoing

Comments

4 comments

  • Marika Karbstein
    Gurobi Staff Gurobi Staff

    Hi Yaroslav,

    Since you noticed that the fingerprints are different, this is an indication that different models are solved.
    Did you try to export the model for both scripts to check if they indeed result in the same model formulation?

    Best regards,
    Marika

    0
  • Yaroslav Pylyavskyy
    Gurobi-versary
    Conversationalist
    First Question

    Hi Marika,

    Thank you for your quick reply!

    Checking both models would be extremely time-consuming as the model has 200k variables and 11k constraints. Maybe I will check when I find some free time. In the meantime, I decided to continue with the older version.

    However, what I am more curious about is why Gurobi produces different models since the function is identical in both scripts? It seems as some external factors, which have nothing to do with the model formulation, are actually affecting the model formulation. The most odd observation is the difference in best bounds.

    Anyway, thank you again, if I find what is wrong with it I will let you know.

    Best regards,

    Yaroslav

    0
  • Marika Karbstein
    Gurobi Staff Gurobi Staff

    Could it be that this "external factor" is some data you read and that this differs in both scripts?

    0
  • Yaroslav Pylyavskyy
    Gurobi-versary
    Conversationalist
    First Question

    The reading of data that are used to construct the model is the same. I read data from an Excel file, the latest version has two additional sheets compared to the older. These additional data are used to select which constraints to include in the model and for setting weight values.

    However, I use the function of the older version for which this new feature is not supported. As a result, these additional data are not used.

     

     

    0

Please sign in to leave a comment.