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.