Next: Creating the model Up: Java Interface Previous: Example details
The first executable statement in our example obtains a Gurobi
environment (using the
// Create empty environment, set options, and start GRBEnv env = new GRBEnv(true); env.set("logFile", "mip1.log"); env.start();
In this call we requested an empty environment, choose a log file, and started the environment.
Later calls to create an optimization model will always require an environment, so environment creation is typically the first step in a Gurobi application. The constructor argument specifies the name of the log file.