Hi all,
I use Gurobi to solve an optimization problem. I might need to try different Gurobi parameters.
Currently, I write parameters and their values inside the model directly, like
Expansion_Model = Model(optimizer_with_attributes(Gurobi.Optimizer, "MIPGap" => 0.01, "TimeLimit" => 91800, "Method" => 2))
I do not want to do this inside the model. Instead, I want to create a list of parameters and add this to the model with a for loop, or with something similar. For instance, by using the same example above,
paramname = ["MIPGap", "TimeLimit", "Method"]
paramvalue = [0,01, 91800, 2]
Expansion_Model = Model(optimizer_with_attributes(Gurobi.Optimizer, paramname => paramvalue))
Or, something like
Expansion_Model = Model(optimizer_with_attributes(Gurobi.Optimizer))
for (x,y) in zip(paramname, paramvalue)
Expansion_Model.params.add(x,y) # I just fabricate params and add functions. Not sure if we have such functions in Julia
end
Do we have such a flexibilty in Julia?
Thank you