Try our new documentation site (beta).
Filter Content By
Version
Text Search
${sidebar_list_label} - Back
Filter by Language
Constants
The following list contains the set of constants needed by the Gurobi
.NET 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 const int LOADED = 1; public const int OPTIMAL = 2; public const int INFEASIBLE = 3; public const int INF_OR_UNBD = 4; public const int UNBOUNDED = 5; public const int CUTOFF = 6; public const int ITERATION_LIMIT = 7; public const int NODE_LIMIT = 8; public const int TIME_LIMIT = 9; public const int SOLUTION_LIMIT = 10; public const int INTERRUPTED = 11; public const int NUMERIC = 12; public const int SUBOPTIMAL = 13; public const int INPROGRESS = 14; public const int USER_OBJ_LIMIT = 15; } // Basis status info public const int BASIC = 0; public const int NONBASIC_LOWER = -1; public const int NONBASIC_UPPER = -2; public const int SUPERBASIC = -3; // Constraint senses public const char LESS_EQUAL = '<'; public const char GREATER_EQUAL = '>'; public const char EQUAL = '='; // Variable types public const char CONTINUOUS = 'C'; public const char BINARY = 'B'; public const char INTEGER = 'I'; public const char SEMICONT = 'S'; public const char SEMIINT = 'N'; // Objective sense public const int MINIMIZE = 1; public const int MAXIMIZE = -1; // SOS types public const int SOS_TYPE1 = 1; public const int SOS_TYPE2 = 2; // General constraint types public const int GENCONSTR_MAX = 0; public const int GENCONSTR_MIN = 1; public const int GENCONSTR_ABS = 2; public const int GENCONSTR_AND = 3; public const int GENCONSTR_OR = 4; public const int GENCONSTR_INDICATOR = 5; // Numeric constants public const double INFINITY = 1e100; public const double UNDEFINED = 1e101; // Limits public const int MAX_STRLEN = 512; // Callback constants public class Callback { public const int POLLING = 0; public const int PRESOLVE = 1; public const int SIMPLEX = 2; public const int MIP = 3; public const int MIPSOL = 4; public const int MIPNODE = 5; public const int MESSAGE = 6; public const int BARRIER = 7; public const int MULTIOBJ = 8; public const int PRE_COLDEL = 1000; public const int PRE_ROWDEL = 1001; public const int PRE_SENCHG = 1002; public const int PRE_BNDCHG = 1003; public const int PRE_COECHG = 1004; public const int SPX_ITRCNT = 2000; public const int SPX_OBJVAL = 2001; public const int SPX_PRIMINF = 2002; public const int SPX_DUALINF = 2003; public const int SPX_ISPERT = 2004; public const int MIP_OBJBST = 3000; public const int MIP_OBJBND = 3001; public const int MIP_NODCNT = 3002; public const int MIP_SOLCNT = 3003; public const int MIP_CUTCNT = 3004; public const int MIP_NODLFT = 3005; public const int MIP_ITRCNT = 3006; public const int MIPSOL_SOL = 4001; public const int MIPSOL_OBJ = 4002; public const int MIPSOL_OBJBST = 4003; public const int MIPSOL_OBJBND = 4004; public const int MIPSOL_NODCNT = 4005; public const int MIPSOL_SOLCNT = 4006; public const int MIPNODE_STATUS = 5001; public const int MIPNODE_REL = 5002; public const int MIPNODE_OBJBST = 5003; public const int MIPNODE_OBJBND = 5004; public const int MIPNODE_NODCNT = 5005; public const int MIPNODE_SOLCNT = 5006; public const int BARRIER_ITRCNT = 7001; public const int BARRIER_PRIMOBJ = 7002; public const int BARRIER_DUALOBJ = 7003; public const int BARRIER_PRIMINF = 7004; public const int BARRIER_DUALINF = 7005; public const int BARRIER_COMPL = 7006; public const int MULTIOBJ_OBJCNT = 8001; public const int MULTIOBJ_SOLCNT = 8002; public const int MULTIOBJ_SOL = 8003; public const int MSG_STRING = 6001; public const int RUNTIME = 6002; } // Errors public class Error { public const int OUT_OF_MEMORY = 10001; public const int NULL_ARGUMENT = 10002; public const int INVALID_ARGUMENT = 10003; public const int UNKNOWN_ATTRIBUTE = 10004; public const int DATA_NOT_AVAILABLE = 10005; public const int INDEX_OUT_OF_RANGE = 10006; public const int UNKNOWN_PARAMETER = 10007; public const int VALUE_OUT_OF_RANGE = 10008; public const int NO_LICENSE = 10009; public const int SIZE_LIMIT_EXCEEDED = 10010; public const int CALLBACK = 10011; public const int FILE_READ = 10012; public const int FILE_WRITE = 10013; public const int NUMERIC = 10014; public const int IIS_NOT_INFEASIBLE = 10015; public const int NOT_FOR_MIP = 10016; public const int OPTIMIZATION_IN_PROGRESS = 10017; public const int DUPLICATES = 10018; public const int NODEFILE = 10019; public const int Q_NOT_PSD = 10020; public const int QCP_EQUALITY_CONSTRAINT = 10021; public const int NETWORK = 10022; public const int JOB_REJECTED = 10023; public const int NOT_SUPPORTED = 10024; public const int EXCEED_2B_NONZEROS = 10025; public const int INVALID_PIECEWISE_OBJ = 10026; public const int UPDATEMODE_CHANGE = 10027; public const int CLOUD = 10028; public const int MODEL_MODIFICATION = 10029; public const int CSWORKER = 10030; public const int TUNE_MODEL_TYPES = 10031; public const int NOT_IN_MODEL = 20001; public const int FAILED_TO_CREATE_MODEL = 20002; public const int INTERNAL = 20003; } public const int METHOD_AUTO = -1; public const int METHOD_PRIMAL = 0; public const int METHOD_DUAL = 1; public const int METHOD_BARRIER = 2; public const int METHOD_CONCURRENT = 3; public const int METHOD_DETERMINISTIC_CONCURRENT = 4; public const int FEASRELAX_LINEAR = 0; public const int FEASRELAX_QUADRATIC = 1; public const int FEASRELAX_CARDINALITY = 2;