How to set tolerance attributes of Gurobi inside Google Colab’s Julia environment

I am dealing with a multi-stage mixed-integer stochastic global supply chain optimization problem and want to solve the stage-wise problem instances using the Gurobi solver within SDDiP algorithm using the SDDP.jl package in Julia.

In this regard, I want to determine the default values of optimality, feasibility, and other tolerance parameters, and how I can set them to achieve good performance in solving the problem.

1 Like

You probably shouldn’t change the default tolerances. Please read Tolerances and numerical issues · JuMP and change the tolerances only if you understand the implications.

Setting options in SDDP.jl can be done like any JuMP model. See the JuMP documentation: Models · JuMP

For example:

using SDDP, Gurobi
GRB_ENV = Gurpbi.Env()
model = SDDP.LinearPolicyGraph(;
    optimizer = optimizer_with_attributes(
        () -> Gurobi.Optimizer(GRB_ENV),
        "TimeLimit" => 60.0,
    )
) do sp, t
end

or

using SDDP, Gurobi
GRB_ENV = Gurpbi.Env()
model = SDDP.LinearPolicyGraph(;
    optimizer = () -> Gurobi.Optimizer(GRB_ENV),
) do sp, t
    set_attribute(sp, "TimeLimit", 60.0)
end

The Gurobi options can be found here jump-dev/Gurobi.jl · JuMP

p.s., I assume this is what you meant by your other question: How to license Gurobi inside Google Colab's Julia environment - #7 by Engr_Moiz_Ahmad. Setting parameters in a gurobi environment (the Env()) object) is subtly different to settings parameters in a model. In general, you should prefer to set them in the model object. Use parameters in the Env only if needed by that particular parameter.

Got it! I may ask that what the default values are for these tolerance parameters (can you list down tolerance parameters along with their values?) in the context of SDDP.jl.

Are they the same regardless of which solver (e.g., Gurobi, GLPK, HiGHS, etc.) we use to solve stage-wise subproblems?

Responding to your postscript, yes, I did mean that from my question: How to license Gurobi inside Google Colab's Julia environment - #7 by Engr_Moiz_Ahmad.

All tolerances are solver dependent. SDDP.jl does not change them. You should read the documentation of each solver to find them.

In order to compare the performances of MILP solvers for solving subproblems in the SDDiP algorithm and extensive-form linear programs, should I use the default values of these tolerances specific to each solver?

If yes, why should I do so, and how can I report it in a manuscript, for example?

Thats a choice for you to make. Just describe what you did in the manuscript.

Re SDDiP, see Integrality · SDDP.jl?

Got it.