Web License Service (WLS) licenses allow you to run Gurobi from any Internet-connected Windows, Linux, or macOS device. They may be configured to work in containers, outside of containers (in a physical or virtual machine running Windows, Linux or macOS), or in both types of environments.
To use a WLS license, your application will need to provide valid credentials, which can be done in a number of ways. When your application starts a Gurobi environment, it will communicate with the Gurobi WLS server over the Internet to retrieve a token that will allow it proceed.
Using a license file
The simplest way to use a WLS license is with an API key stored in a gurobi.lic license file. To retrieve an API key for your license, visit the Web License Manager site, log in to your account, click on the API Keys tab, and finally click CREATE API KEY to create and download an API key for that license. We recommend that you store the resulting gurobi.lic file in a default location. If you do need to store the license file somewhere other than the default location, please see Where do I place the Gurobi license file (gurobi.lic)? for important details.
The gurobi.lic file should contain three lines like this:
WLSACCESSID=203dec48-e3f8-46ac-0184-92d7d6ded944 WLSSECRET=a080cce8-4e01-4e36-955e-61592c5630db LICENSEID=12127
These provide the license ID, an access ID for that license, and the corresponding secret key. These credentials are private and should not be shared with anyone who is not entitled to use your license.
Using Gurobi parameters
If you are writing an application that calls Gurobi from a programming language API, you can provide your credentials through that API. You do this by retrieving an API key, as above, and setting the LICENSEID, WLSACCESSID, and WLSSECRET parameters to the values associated with that key.
For Python, this may look as follows:
import gurobipy as gp
env = gp.Env(empty=True)
env.setParam('WLSACCESSID',<access-id from gurobi.lic file>)
env.setParam('WLSSECRET', <secret from gurobi.lic file>)
env.setParam('LICENSEID', <your license id>)
I have followed this instruction on how to retrieve the WLS license in Python and put gurobi license file (gurobi.lic) in the default location (/Library/gurobi1001) per your recommendation, but when I try to optimize the model. This error "Model too large for size-limited Gurobi license" still occurred. Please let me know on what I can do to solve this
Please sign in to leave a comment.