Skip to main content

GRB update environment

Ongoing

Comments

3 comments

  • Eli Towle
    Gurobi Staff Gurobi Staff

    From the documentation for GRBnewmodel:

    Note that the new model will get a copy of this environment, so subsequent modifications to the original environment (e.g., parameter changes) won't affect the new model. Use GRBgetenv to modify the environment associated with a model.

    Have you tried setting the BarConvTol parameter for environment \(\texttt{GRBgetenv(model)}\) instead of \(\texttt{env}\)?

    error = GRBsetdblparam(GRBgetenv(model), "BarConvTol", toli);

    I'm also curious about the segfault. Do you have a minimal, self-contained code example that reproduces the segfault?

    1
  • jake roth
    Gurobi-versary
    Curious
    Conversationalist

    Ah thanks so much for the fast reply and info on correct usage. It seems that I didn't understand the relationship between \(\texttt{env}\) and \(\texttt{model}\). Your snippet is now working for me! It might be a moot point now, but let me see if I can get an MWE later today.

    0
  • jake roth
    Gurobi-versary
    Curious
    Conversationalist

    I have a (not-so minimal) MWE, but the code is a bit cumbersome to share here and the formatting is lost in the code block. Is there an alternative way to share it? Although, interestingly, it only seems to be failing for Gurobi v10.0

     

    0

Please sign in to leave a comment.