There are two ways to connect a client machine to Gurobi Instant Cloud:
Environment parameters
You can start a Gurobi Cloud environment by using the Env constructor and supplying it with the respective Cloud parameters as follows:
import gurobipy as gp
connection_params = {
"CloudAccessID": "",
"CloudSecretKey": "",
"CloudPool": ""
}
with gp.Env(params=connection_params) as env:
m = gp.Model(env=env)
Please refer to our Documentation for further information and code examples for other APIs.
Note: The CloudEnv constructor has been deprecated with version 9.5 and is no longer available starting from version 10.
License file containing API key
Alternatively, you can also download the license file from the Cloud web interface and use it to specify the connection. This way, you do not have to set up the environment configuration explicitly and can just use the default constructor without any parameters. Please make sure to place the license file in one of the standard locations or specify its location using the GRB_LICENSE_FILE environment variable as explained in this article: Where do I place the Gurobi license file (gurobi.lic)?.
Further information:
Comments
0 comments
Article is closed for comments.