I’m trying to make a function with arguments that I can pass to the model if any, otherwise stay default.
function mymip(; verbose = true, timelimit=false, mipfocus=false, rins=false) model = Model(with_optimizer(Gurobi.Optimizer, TimeLimit=timelimit, MIPFocus=mipfocus, RINS=rins))
When I call
mymip(), if I give any value to the keywords then they pass on to gurobi model, otherwise they keep the default value, but I don’t know how to set those keywords with their own default values in the function arguments. I’ve tried that “fault” will pass “0” to the keywords and “nothing” doesn’t work either…
Does anyone know if this is possible? Thanks in advance.