The error message "Model too large for size-limited Gurobi license" or "Model too large for restricted Gurobi license" is displayed when Gurobi uses a restricted, size-limited license, and the model size exceeds these limits, i.e., 2000 variables, 2000 linear constraints, and 200 variables if quadratic terms are present.
This error typically occurs when Gurobi is installed using the pip or conda package distributors. These installations automatically include a size-limited license. This license also prints the message "Restricted license - for non-production use only" when running a Python program using Gurobi.
If you do not have an Academic or Commercial Gurobi license
Please see Obtaining a Gurobi license for more information.
If you have an Academic or Commercial Gurobi license
If you receive this error and you have an academic (TYPE="Free Academic"), commercial, or evaluation license, then Gurobi is not using the correct license. Please continue reading the sections below to learn how to get Gurobi to use the correct license.
Using a license file
If you already have a Gurobi license, please be sure the license file is in the default location. The default directories where Gurobi will search for a gurobi.lic license file are:
Windows: | C:\gurobi and your home directory (C:\Users\yourusername) |
Linux: | /opt/gurobi and your home directory (/home/yourusername) |
macOS: | /Library/gurobi and your home directory (/Users/yourusername) |
If you would like to store your license file in a non-default location, please follow the instructions here: Where do I place the Gurobi license file (gurobi.lic)?
Using parameters for license credentials
If you are using a client license for a floating site token server, Gurobi Instant Cloud, WLS (Web License Service), or a Compute Server/Cluster Manager, you may have chosen to pass the credentials via parameters to the Gurobi environment instead of using a gurobi.lic license file. This method is illustrated in the example mip1_remote.py. If this is the case, please check that you pass that environment as an argument when creating your model, such as:
with gp.Model(env=env) as model:
# Formulate problem
model.optimize()
Please refer to How do I manage Gurobi environments in gurobipy?
Further information
- Commercial users: Request an evaluation license
- How do I obtain a free academic license?
- How do I resolve common installation issues with the Gurobi Python Interface: gurobipy?
- How do I install Gurobi for Python?
- How do I resolve the error "grbgetkey: command not found" or "'grbgetkey' is not recognized"?
Comments
0 comments
Article is closed for comments.