I am currently using JuMP with the Gurobi Solver to optimise a tournament schedule. I use a local search heuristic to try and solve each round in a given time limit after having found a first feasible solution. The problem I now face is, that it takes quite a while to find a first initial solution. Therefore my time limit is quite high. I would like to lower it before reoptimizing each round, but I could not find any examples on how to modify this parameter from the Gurobi Solver in Julia. (E.g in Java I could do the following: m.set(“TimeLimit”, “100.0”); )

Below is a very simple example, where I would like to change the time limit before the second call to optimize!().

@blegat I happened to see your answer. I think you are an expert in this field. How do you add the solution time limit to the gurobi / CPLEX solver in jump, so as to finish earlier and get the value of the solution.

I tried to add this line of code to the bileveljump package, but I got an error

As you have a BilevelModel instead of a JuMP.Model, you should replace backend(m) by m.solver.
Note that the post above is outdated and you can now do MOI.set(m, MOI.TimeLimitSec(), 100.0) (you should probably replace m by m.solver if it is a BilevelModel)