/** * Create a new Gurobi hook with the specified environment. * * @param env An environment containing user-specified parameters. * @param v Setting for the {@link #verbosity} level. **/ public GurobiHook(GRBEnv env, int v) { environment = env; verbosity = v; reset(); }
/** * Create a new Gurobi hook with the specified environment. * * @param env An environment containing user-specified parameters. * @param v Setting for the {@link #verbosity} level. **/ public GurobiHook(GRBEnv env, int v) { environment = env; verbosity = v; reset(); }
/** * Create a new Gurobi hook with the default environment parameters. * * @param v Setting for the {@link #verbosity} level. **/ public GurobiHook(int v) { try { environment = new GRBEnv(); environment.set(GRB.IntParam.OutputFlag, 0); // no output // how many threads can we use? // environment.set(GRB.IntParam.Threads, // Math.min(8, Runtime.getRuntime().availableProcessors())); // dump big stuff to filespace // environment.set(GRB.DoubleParam.NodefileStart, 0.5); // environment.set(GRB.DoubleParam.MIPGap, 1e-10); // environment.set(GRB.IntParam.Presolve, 0); } catch (GRBException e) { handleException(e); } verbosity = v; reset(); }
/** * Create a new Gurobi hook with the default environment parameters. * * @param v Setting for the {@link #verbosity} level. **/ public GurobiHook(int v) { try { environment = new GRBEnv(); environment.set(GRB.IntParam.OutputFlag, 0); // no output // how many threads can we use? // environment.set(GRB.IntParam.Threads, // Math.min(8, Runtime.getRuntime().availableProcessors())); // dump big stuff to filespace // environment.set(GRB.DoubleParam.NodefileStart, 0.5); // environment.set(GRB.DoubleParam.MIPGap, 1e-10); // environment.set(GRB.IntParam.Presolve, 0); } catch (GRBException e) { handleException(e); } verbosity = v; reset(); }