Documentation

Constants


Constants

The following list contains the set of constants needed by the Gurobi Java interface. You would refer to them using a GRB. prefix (e.g., GRB.Status.OPTIMAL).

  // Model status codes (after call to optimize())

  public class Status {
    public static final int LOADED          = 1;
    public static final int OPTIMAL         = 2;
    public static final int INFEASIBLE      = 3;
    public static final int INF_OR_UNBD     = 4;
    public static final int UNBOUNDED       = 5;
    public static final int CUTOFF          = 6;
    public static final int ITERATION_LIMIT = 7;
    public static final int NODE_LIMIT      = 8;
    public static final int TIME_LIMIT      = 9;
    public static final int SOLUTION_LIMIT  = 10;
    public static final int INTERRUPTED     = 11;
    public static final int NUMERIC         = 12;
    public static final int SUBOPTIMAL      = 13;
    public static final int INPROGRESS      = 14;
    public static final int USER_OBJ_LIMIT  = 15;
  }

  // Basis status info

  public static final int BASIC           = 0;
  public static final int NONBASIC_LOWER  = -1;
  public static final int NONBASIC_UPPER  = -2;
  public static final int SUPERBASIC      = -3;

  // Constraint senses

  public static final char LESS_EQUAL    = '<';
  public static final char GREATER_EQUAL = '>';
  public static final char EQUAL         = '=';

  // Variable types

  public static final char CONTINUOUS   = 'C';
  public static final char BINARY       = 'B';
  public static final char INTEGER      = 'I';
  public static final char SEMICONT     = 'S';
  public static final char SEMIINT      = 'N';

  // Objective sense

  public static final int MINIMIZE = 1;
  public static final int MAXIMIZE = -1;

  // SOS types

  public static final int SOS_TYPE1      = 1;
  public static final int SOS_TYPE2      = 2;

  // General constraint types

  public static final int GENCONSTR_MAX       = 0;
  public static final int GENCONSTR_MIN       = 1;
  public static final int GENCONSTR_ABS       = 2;
  public static final int GENCONSTR_AND       = 3;
  public static final int GENCONSTR_OR        = 4;
  public static final int GENCONSTR_INDICATOR = 5;

  // Numeric constants

  public static final double INFINITY    = 1e100;
  public static final double UNDEFINED   = 1e101;

  // Callback constants

  public class Callback {
    public static final int POLLING       =     0;
    public static final int PRESOLVE      =     1;
    public static final int SIMPLEX       =     2;
    public static final int MIP           =     3;
    public static final int MIPSOL        =     4;
    public static final int MIPNODE       =     5;
    public static final int MESSAGE       =     6;
    public static final int BARRIER       =     7;
    public static final int MULTIOBJ      =     8;
    public static final int PRE_COLDEL    =  1000;
    public static final int PRE_ROWDEL    =  1001;
    public static final int PRE_SENCHG    =  1002;
    public static final int PRE_BNDCHG    =  1003;
    public static final int PRE_COECHG    =  1004;
    public static final int SPX_ITRCNT    =  2000;
    public static final int SPX_OBJVAL    =  2001;
    public static final int SPX_PRIMINF   =  2002;
    public static final int SPX_DUALINF   =  2003;
    public static final int SPX_ISPERT    =  2004;
    public static final int MIP_OBJBST    =  3000;
    public static final int MIP_OBJBND    =  3001;
    public static final int MIP_NODCNT    =  3002;
    public static final int MIP_SOLCNT    =  3003;
    public static final int MIP_CUTCNT    =  3004;
    public static final int MIP_NODLFT    =  3005;
    public static final int MIP_ITRCNT    =  3006;
    public static final int MIPSOL_SOL    =  4001;
    public static final int MIPSOL_OBJ    =  4002;
    public static final int MIPSOL_OBJBST =  4003;
    public static final int MIPSOL_OBJBND =  4004;
    public static final int MIPSOL_NODCNT =  4005;
    public static final int MIPSOL_SOLCNT =  4006;
    public static final int MIPNODE_STATUS=  5001;
    public static final int MIPNODE_REL   =  5002;
    public static final int MIPNODE_OBJBST=  5003;
    public static final int MIPNODE_OBJBND=  5004;
    public static final int MIPNODE_NODCNT=  5005;
    public static final int MIPNODE_SOLCNT=  5006;
    public static final int MSG_STRING    =  6001;
    public static final int RUNTIME       =  6002;
    public static final int BARRIER_ITRCNT  = 7001;
    public static final int BARRIER_PRIMOBJ = 7002;
    public static final int BARRIER_DUALOBJ = 7003;
    public static final int BARRIER_PRIMINF = 7004;
    public static final int BARRIER_DUALINF = 7005;
    public static final int BARRIER_COMPL   = 7006;
    public static final int MULTIOBJ_OBJCNT = 8001;
    public static final int MULTIOBJ_SOLCNT = 8002;
    public static final int MULTIOBJ_SOL    = 8003;
  }

  // Errors

  public class Error {
    public static final int OUT_OF_MEMORY               = 10001;
    public static final int NULL_ARGUMENT               = 10002;
    public static final int INVALID_ARGUMENT            = 10003;
    public static final int UNKNOWN_ATTRIBUTE           = 10004;
    public static final int DATA_NOT_AVAILABLE          = 10005;
    public static final int INDEX_OUT_OF_RANGE          = 10006;
    public static final int UNKNOWN_PARAMETER           = 10007;
    public static final int VALUE_OUT_OF_RANGE          = 10008;
    public static final int NO_LICENSE                  = 10009;
    public static final int SIZE_LIMIT_EXCEEDED         = 10010;
    public static final int CALLBACK                    = 10011;
    public static final int FILE_READ                   = 10012;
    public static final int FILE_WRITE                  = 10013;
    public static final int NUMERIC                     = 10014;
    public static final int IIS_NOT_INFEASIBLE          = 10015;
    public static final int NOT_FOR_MIP                 = 10016;
    public static final int OPTIMIZATION_IN_PROGRESS    = 10017;
    public static final int DUPLICATES                  = 10018;
    public static final int NODEFILE                    = 10019;
    public static final int Q_NOT_PSD                   = 10020;
    public static final int QCP_EQUALITY_CONSTRAINT     = 10021;
    public static final int NETWORK                     = 10022;
    public static final int JOB_REJECTED                = 10023;
    public static final int NOT_SUPPORTED               = 10024;
    public static final int EXCEED_2B_NONZEROS          = 10025;
    public static final int INVALID_PIECEWISE_OBJ       = 10026;
    public static final int UPDATEMODE_CHANGE           = 10027;
    public static final int CLOUD                       = 10028;
    public static final int MODEL_MODIFICATION          = 10029;
    public static final int CSWORKER                    = 10030;
    public static final int TUNE_MODEL_TYPES            = 10031;
    public static final int NOT_IN_MODEL                = 20001;
    public static final int FAILED_TO_CREATE_MODEL      = 20002;
    public static final int INTERNAL                    = 20003;
  }

  public static final int CUTS_AUTO           = -1;
  public static final int CUTS_OFF            = 0;
  public static final int CUTS_CONSERVATIVE   = 1;
  public static final int CUTS_AGGRESSIVE     = 2;
  public static final int CUTS_VERYAGGRESSIVE = 3;

  public static final int METHOD_AUTO                     = -1;
  public static final int METHOD_PRIMAL                   = 0;
  public static final int METHOD_DUAL                     = 1;
  public static final int METHOD_BARRIER                  = 2;
  public static final int METHOD_CONCURRENT               = 3;
  public static final int METHOD_DETERMINISTIC_CONCURRENT = 4;

  public static final int BARORDER_AUTOMATIC        = 0;
  public static final int BARORDER_AMD              = 1;
  public static final int BARORDER_NESTEDDISSECTION = 2;

  public static final int FEASRELAX_LINEAR      = 0;
  public static final int FEASRELAX_QUADRATIC   = 1;
  public static final int FEASRELAX_CARDINALITY = 2;