Try our new documentation site (beta).

The env argument

The optional env argument is also a list. It allows you to solve your problem on a Gurobi Compute Server or the Gurobi Instant Cloud.

Using a Compute Server License

Gurobi Compute Server allows you to offload optimization jobs to a remote server. Servers are organized into clusters. By providing the name of any node within the cluster, your job will automatically be sent to the least heavily loaded node in the cluster. If all nodes are at capacity, your job will be placed in a queue, and will proceed once capacity becomes available. You can find additional information about Gurobi Compute Server in the Gurobi Remote Services Reference Manual.

The following is an enumeration of all of the named components of the env argument that Gurobi will take into account.

computeserver
A Compute Server. You can refer to the server using its name or its IP address. If you are using a non-default port, the server name should be followed by the port number (e.g., server1:61000).

password (optional)
User password on the Compute Server cluster. Obtain this from your Compute Server administrator.

priority (optional)
The priority of the job. Priorities must be between -100 and 100, with a default value of 0 (by convention). Higher priority jobs are chosen from the server job queue before lower priority jobs. A job with priority 100 runs immediately, bypassing the job queue and ignoring the job limit on the server. You should exercise caution with priority 100 jobs, since they can severely overload a server, which can cause jobs to fail, and in extreme cases can cause the server to crash.

router (optional)
The router for the Compute Server cluster. A router can be used to improve the robustness of a Compute Server deployment. You can refer to the router using either its name or its IP address. A typical Remote Services deployment won't use a router, so you typically won't need to set this.

CStlsinsecure (optional)
Indicates whether to use insecure mode in the TLS (Transport Layer Security). Set this to 0 unless your server administrator tells you otherwise.

Here is an example of how to use an env argument to connect to a Compute Server:

env <- list()
env$computeserver <- 'server1.mycompany.com:61000'
env$priority <- 5

Using a Gurobi Instant Cloud License

Gurobi Instant Cloud allows you to offload optimization jobs to a Gurobi Compute Server on the cloud. If an appropriate machine is already running, the job will run on that machine. It will automatically launch a new machine otherwise. Note that launching a new machine can take a few minutes. You can find additional information about the Gurobi Instant Cloud service here.

The following is an enumeration of all of the named components of the env argument that Gurobi will take into account.

accessid
The access ID for your Gurobi Instant Cloud license. This can be retrieved from the Gurobi Instant Cloud website. When used in combination with your secretkey, this allows you to launch Instant Cloud instances and submit jobs to them.

secretkey
The secret key for your Gurobi Instant Cloud license. This can be retrieved from the Gurobi Instant Cloud website. When used in combination with your accessid, this allows you to launch Instant Cloud instances and submit jobs to them. Note that you should keep your secret key private.

pool (optional)
The machine pool. Machine pools allow you to create fixed configurations on the Instant Cloud website (capturing things like type of machine, geographic region, etc.), and then launch and share machines from client programs without having to restate configuration information each time you launch a machine. If not provided, your job will be launched in the default pool associated with your cloud license.

priority (optional)
The priority of the job. Priorities must be between -100 and 100, with a default value of 0 (by convention). Higher priority jobs are chosen from the server job queue before lower priority jobs. A job with priority 100 runs immediately, bypassing the job queue and ignoring the job limit on the server. You should exercise caution with priority 100 jobs, since they can severely overload a server, which can cause jobs to fail, and in extreme cases can cause the server to crash.

Here is an example of how to use an env argument to launch a Gurobi Instant Cloud instance:

env <- list()
env$accessid <- '3d1ecef9-dfad-eff4-b3fa'
env$secretkey <- 'ae6L23alJe3+fas'

Note that when creating an environment variable, you need to choose to use either Compute Server or Instant Cloud. Populating named components for both will result in an error.

Try Gurobi for Free

Choose the evaluation license that fits you best, and start working with our Expert Team for technical guidance and support.

Evaluation License
Get a free, full-featured license of the Gurobi Optimizer to experience the performance, support, benchmarking and tuning services we provide as part of our product offering.
Academic License
Gurobi supports the teaching and use of optimization within academic institutions. We offer free, full-featured copies of Gurobi for use in class, and for research.
Cloud Trial

Request free trial hours, so you can see how quickly and easily a model can be solved on the cloud.

Search

Gurobi Optimization