Acquiring Gurobi licence with timeout

94 Views Asked by At

Is there any time limit in gurobi token server to release the licence or api to check if i hold a valid licence. Because when we throw application exception, the licence is not relinquished and subsequently the next runs gets Gurobi licence limit exceeded error. We run it as a WCF windows service. so this process runs continuously. So thinking of api solution.

1

There are 1 best solutions below

1
On

The Gurobi license tokens are tied to Gurobi environments, so if you call the Dispose() method on all GRBModel objects and the Dispose() method on the GRBEnv object before throwing an application exception, the license token will be released.

Here are the links to the corresponding methods in the Gurobi .NET API: