 |
OR-Tools
8.1
|
Go to the documentation of this file.
14 #ifndef OR_TOOLS_LINEAR_SOLVER_GUROBI_ENVIRONMENT_H_
15 #define OR_TOOLS_LINEAR_SOLVER_GUROBI_ENVIRONMENT_H_
17 #include "absl/status/status.h"
23 #define STDCALL __stdcall
30 typedef struct _GRBenv
GRBenv;
36 #define CB_ARGS GRBmodel *model, void *cbdata, int where, void *usrdata
37 extern std::function<int(
GRBmodel*,
int,
int*,
double*,
double,
double,
41 extern std::function<int(
GRBmodel*
model,
int numnz,
int* vind,
double* vval,
42 double obj,
double lb,
double ub,
char vtype,
46 extern std::function<int(
GRBmodel*,
int,
int,
int*,
int*,
double*,
double*,
47 double*,
double*,
char*,
char**)>
50 extern std::function<int(
GRBmodel*
model,
int numchgs,
int* cind,
int* vind,
55 extern std::function<int(
GRBmodel*,
const char*,
int,
char*)>
58 extern std::function<int(
GRBmodel*,
const char*,
int,
int,
double*)>
60 extern std::function<int(
GRBmodel*,
const char*,
int,
double*)>
66 extern std::function<int(
GRBmodel*,
const char*,
int,
int*)>
69 extern std::function<int(
GRBenv*,
GRBmodel**,
const char*,
int numvars,
double*,
70 double*,
double*,
char*,
char**)>
75 extern std::function<int(
GRBmodel*,
const char*,
int,
char)>
78 extern std::function<int(
GRBmodel*,
const char*,
int,
double)>
85 extern std::function<void(
int*,
int*,
int*)>
GRBversion;
87 extern std::function<int(
void* cbdata,
int where,
int what,
void* resultP)>
89 extern std::function<int(
void* cbdata,
int cutlen,
const int* cutind,
90 const double* cutval,
char cutsense,
double cutrhs)>
92 extern std::function<int(
void* cbdata,
int lazylen,
const int* lazyind,
93 const double* lazyval,
char lazysense,
double lazyrhs)>
95 extern std::function<int(
void* cbdata,
const double* solution,
double* objvalP)>
97 extern std::function<int(
GRBmodel*
model,
int numnz,
int* cind,
double* cval,
98 char sense,
double rhs,
const char* constrname)>
101 int binval,
int nvars,
const int* vars,
102 const double* vals,
char sense,
double rhs)>
104 extern std::function<int(
GRBmodel*
model,
const char* attrname,
int element,
110 extern std::function<int(
GRBenv* env,
const char* paramname,
const char*
value)>
112 extern std::function<int(
GRBmodel*
model,
int numsos,
int nummembers,
113 int* types,
int* beg,
int* ind,
double*
weight)>
116 extern std::function<int(
GRBmodel*
model,
int numlnz,
int* lind,
double* lval,
117 int numqnz,
int* qrow,
int* qcol,
double* qval,
118 char sense,
double rhs,
const char* QCname)>
121 int nvars,
const int* vars,
double constant)>
124 int nvars,
const int* vars,
double constant)>
130 int nvars,
const int* vars)>
133 int nvars,
const int* vars)>
135 extern std::function<int(
GRBmodel*
model,
int numqnz,
int* qrow,
int* qcol,
139 #define GRB_VERSION_MAJOR 9
140 #define GRB_VERSION_MINOR 0
141 #define GRB_VERSION_TECHNICAL 2
142 #define GRB_ERROR_OUT_OF_MEMORY 10001
143 #define GRB_ERROR_NULL_ARGUMENT 10002
144 #define GRB_ERROR_INVALID_ARGUMENT 10003
145 #define GRB_ERROR_UNKNOWN_ATTRIBUTE 10004
146 #define GRB_ERROR_DATA_NOT_AVAILABLE 10005
147 #define GRB_ERROR_INDEX_OUT_OF_RANGE 10006
148 #define GRB_ERROR_UNKNOWN_PARAMETER 10007
149 #define GRB_ERROR_VALUE_OUT_OF_RANGE 10008
150 #define GRB_ERROR_NO_LICENSE 10009
151 #define GRB_ERROR_SIZE_LIMIT_EXCEEDED 10010
152 #define GRB_ERROR_CALLBACK 10011
153 #define GRB_ERROR_FILE_READ 10012
154 #define GRB_ERROR_FILE_WRITE 10013
155 #define GRB_ERROR_NUMERIC 10014
156 #define GRB_ERROR_IIS_NOT_INFEASIBLE 10015
157 #define GRB_ERROR_NOT_FOR_MIP 10016
158 #define GRB_ERROR_OPTIMIZATION_IN_PROGRESS 10017
159 #define GRB_ERROR_DUPLICATES 10018
160 #define GRB_ERROR_NODEFILE 10019
161 #define GRB_ERROR_Q_NOT_PSD 10020
162 #define GRB_ERROR_QCP_EQUALITY_CONSTRAINT 10021
163 #define GRB_ERROR_NETWORK 10022
164 #define GRB_ERROR_JOB_REJECTED 10023
165 #define GRB_ERROR_NOT_SUPPORTED 10024
166 #define GRB_ERROR_EXCEED_2B_NONZEROS 10025
167 #define GRB_ERROR_INVALID_PIECEWISE_OBJ 10026
168 #define GRB_ERROR_UPDATEMODE_CHANGE 10027
169 #define GRB_ERROR_CLOUD 10028
170 #define GRB_ERROR_MODEL_MODIFICATION 10029
171 #define GRB_ERROR_CSWORKER 10030
172 #define GRB_ERROR_TUNE_MODEL_TYPES 10031
173 #define GRB_ERROR_SECURITY 10032
174 #define GRB_LESS_EQUAL '<'
175 #define GRB_GREATER_EQUAL '>'
176 #define GRB_EQUAL '='
177 #define GRB_CONTINUOUS 'C'
178 #define GRB_BINARY 'B'
179 #define GRB_INTEGER 'I'
180 #define GRB_SEMICONT 'S'
181 #define GRB_SEMIINT 'N'
182 #define GRB_MINIMIZE 1
183 #define GRB_MAXIMIZE -1
184 #define GRB_SOS_TYPE1 1
185 #define GRB_SOS_TYPE2 2
186 #define GRB_INFINITY 1e100
187 #define GRB_UNDEFINED 1e101
188 #define GRB_MAXINT 2000000000
189 #define GRB_MAX_NAMELEN 255
190 #define GRB_MAX_STRLEN 512
191 #define GRB_MAX_TAGLEN 10240
192 #define GRB_MAX_CONCURRENT 64
193 #define GRB_INT_ATTR_NUMCONSTRS "NumConstrs"
194 #define GRB_INT_ATTR_NUMVARS "NumVars"
195 #define GRB_INT_ATTR_NUMSOS "NumSOS"
196 #define GRB_INT_ATTR_NUMQCONSTRS \
199 #define GRB_INT_ATTR_NUMGENCONSTRS \
201 #define GRB_INT_ATTR_NUMNZS "NumNZs"
202 #define GRB_DBL_ATTR_DNUMNZS "DNumNZs"
203 #define GRB_INT_ATTR_NUMQNZS "NumQNZs"
204 #define GRB_INT_ATTR_NUMQCNZS "NumQCNZs"
205 #define GRB_INT_ATTR_NUMINTVARS "NumIntVars"
206 #define GRB_INT_ATTR_NUMBINVARS "NumBinVars"
207 #define GRB_INT_ATTR_NUMPWLOBJVARS \
209 #define GRB_STR_ATTR_MODELNAME "ModelName"
210 #define GRB_INT_ATTR_MODELSENSE "ModelSense"
211 #define GRB_DBL_ATTR_OBJCON "ObjCon"
212 #define GRB_INT_ATTR_IS_MIP "IsMIP"
213 #define GRB_INT_ATTR_IS_QP "IsQP"
214 #define GRB_INT_ATTR_IS_QCP "IsQCP"
215 #define GRB_INT_ATTR_IS_MULTIOBJ \
217 #define GRB_STR_ATTR_SERVER "Server"
218 #define GRB_STR_ATTR_JOBID "JobID"
219 #define GRB_INT_ATTR_LICENSE_EXPIRATION \
221 #define GRB_INT_ATTR_NUMTAGGED \
223 #define GRB_INT_ATTR_BATCHERRORCODE "BatchErrorCode"
224 #define GRB_STR_ATTR_BATCHERRORMESSAGE "BatchErrorMessage"
225 #define GRB_STR_ATTR_BATCHID "BatchID"
226 #define GRB_INT_ATTR_BATCHSTATUS "BatchStatus"
227 #define GRB_DBL_ATTR_LB "LB"
228 #define GRB_DBL_ATTR_UB "UB"
229 #define GRB_DBL_ATTR_OBJ "Obj"
230 #define GRB_CHAR_ATTR_VTYPE "VType"
231 #define GRB_DBL_ATTR_START "Start"
232 #define GRB_DBL_ATTR_PSTART "PStart"
233 #define GRB_INT_ATTR_BRANCHPRIORITY "BranchPriority"
234 #define GRB_STR_ATTR_VARNAME "VarName"
235 #define GRB_INT_ATTR_PWLOBJCVX "PWLObjCvx"
236 #define GRB_DBL_ATTR_VARHINTVAL "VarHintVal"
237 #define GRB_INT_ATTR_VARHINTPRI "VarHintPri"
238 #define GRB_INT_ATTR_PARTITION "Partition"
239 #define GRB_STR_ATTR_VTAG "VTag"
240 #define GRB_STR_ATTR_CTAG "CTag"
241 #define GRB_DBL_ATTR_RHS "RHS"
242 #define GRB_DBL_ATTR_DSTART "DStart"
243 #define GRB_CHAR_ATTR_SENSE "Sense"
244 #define GRB_STR_ATTR_CONSTRNAME "ConstrName"
245 #define GRB_INT_ATTR_LAZY "Lazy"
246 #define GRB_STR_ATTR_QCTAG "QCTag"
247 #define GRB_DBL_ATTR_QCRHS "QCRHS"
248 #define GRB_CHAR_ATTR_QCSENSE "QCSense"
249 #define GRB_STR_ATTR_QCNAME "QCName"
250 #define GRB_INT_ATTR_GENCONSTRTYPE \
252 #define GRB_STR_ATTR_GENCONSTRNAME \
254 #define GRB_INT_ATTR_FUNCPIECES \
257 #define GRB_DBL_ATTR_FUNCPIECEERROR \
259 #define GRB_DBL_ATTR_FUNCPIECELENGTH \
261 #define GRB_DBL_ATTR_FUNCPIECERATIO \
263 #define GRB_DBL_ATTR_MAX_COEFF "MaxCoeff"
264 #define GRB_DBL_ATTR_MIN_COEFF "MinCoeff"
265 #define GRB_DBL_ATTR_MAX_BOUND "MaxBound"
266 #define GRB_DBL_ATTR_MIN_BOUND "MinBound"
267 #define GRB_DBL_ATTR_MAX_OBJ_COEFF "MaxObjCoeff"
268 #define GRB_DBL_ATTR_MIN_OBJ_COEFF "MinObjCoeff"
269 #define GRB_DBL_ATTR_MAX_RHS "MaxRHS"
270 #define GRB_DBL_ATTR_MIN_RHS "MinRHS"
271 #define GRB_DBL_ATTR_MAX_QCCOEFF "MaxQCCoeff"
272 #define GRB_DBL_ATTR_MIN_QCCOEFF "MinQCCoeff"
273 #define GRB_DBL_ATTR_MAX_QOBJ_COEFF \
275 #define GRB_DBL_ATTR_MIN_QOBJ_COEFF \
277 #define GRB_DBL_ATTR_MAX_QCLCOEFF \
279 #define GRB_DBL_ATTR_MIN_QCLCOEFF \
281 #define GRB_DBL_ATTR_MAX_QCRHS "MaxQCRHS"
282 #define GRB_DBL_ATTR_MIN_QCRHS "MinQCRHS"
283 #define GRB_DBL_ATTR_RUNTIME "Runtime"
284 #define GRB_INT_ATTR_STATUS "Status"
285 #define GRB_DBL_ATTR_OBJVAL "ObjVal"
286 #define GRB_DBL_ATTR_OBJBOUND "ObjBound"
287 #define GRB_DBL_ATTR_OBJBOUNDC "ObjBoundC"
288 #define GRB_DBL_ATTR_POOLOBJBOUND \
290 #define GRB_DBL_ATTR_POOLOBJVAL \
292 #define GRB_DBL_ATTR_MIPGAP "MIPGap"
293 #define GRB_INT_ATTR_SOLCOUNT "SolCount"
294 #define GRB_DBL_ATTR_ITERCOUNT "IterCount"
295 #define GRB_INT_ATTR_BARITERCOUNT \
298 #define GRB_DBL_ATTR_NODECOUNT "NodeCount"
299 #define GRB_DBL_ATTR_OPENNODECOUNT \
302 #define GRB_INT_ATTR_HASDUALNORM "HasDualNorm"
303 #define GRB_DBL_ATTR_X "X"
304 #define GRB_DBL_ATTR_XN "Xn"
305 #define GRB_DBL_ATTR_BARX "BarX"
306 #define GRB_DBL_ATTR_RC "RC"
307 #define GRB_DBL_ATTR_VDUALNORM "VDualNorm"
308 #define GRB_INT_ATTR_VBASIS "VBasis"
309 #define GRB_DBL_ATTR_PI "Pi"
310 #define GRB_DBL_ATTR_QCPI "QCPi"
311 #define GRB_DBL_ATTR_SLACK "Slack"
312 #define GRB_DBL_ATTR_QCSLACK "QCSlack"
313 #define GRB_DBL_ATTR_CDUALNORM "CDualNorm"
314 #define GRB_INT_ATTR_CBASIS "CBasis"
315 #define GRB_DBL_ATTR_BOUND_VIO "BoundVio"
316 #define GRB_DBL_ATTR_BOUND_SVIO "BoundSVio"
317 #define GRB_INT_ATTR_BOUND_VIO_INDEX "BoundVioIndex"
318 #define GRB_INT_ATTR_BOUND_SVIO_INDEX "BoundSVioIndex"
319 #define GRB_DBL_ATTR_BOUND_VIO_SUM "BoundVioSum"
320 #define GRB_DBL_ATTR_BOUND_SVIO_SUM "BoundSVioSum"
321 #define GRB_DBL_ATTR_CONSTR_VIO "ConstrVio"
322 #define GRB_DBL_ATTR_CONSTR_SVIO "ConstrSVio"
323 #define GRB_INT_ATTR_CONSTR_VIO_INDEX "ConstrVioIndex"
324 #define GRB_INT_ATTR_CONSTR_SVIO_INDEX "ConstrSVioIndex"
325 #define GRB_DBL_ATTR_CONSTR_VIO_SUM "ConstrVioSum"
326 #define GRB_DBL_ATTR_CONSTR_SVIO_SUM "ConstrSVioSum"
327 #define GRB_DBL_ATTR_CONSTR_RESIDUAL "ConstrResidual"
328 #define GRB_DBL_ATTR_CONSTR_SRESIDUAL "ConstrSResidual"
329 #define GRB_INT_ATTR_CONSTR_RESIDUAL_INDEX "ConstrResidualIndex"
330 #define GRB_INT_ATTR_CONSTR_SRESIDUAL_INDEX "ConstrSResidualIndex"
331 #define GRB_DBL_ATTR_CONSTR_RESIDUAL_SUM "ConstrResidualSum"
332 #define GRB_DBL_ATTR_CONSTR_SRESIDUAL_SUM "ConstrSResidualSum"
333 #define GRB_DBL_ATTR_DUAL_VIO "DualVio"
334 #define GRB_DBL_ATTR_DUAL_SVIO "DualSVio"
335 #define GRB_INT_ATTR_DUAL_VIO_INDEX "DualVioIndex"
336 #define GRB_INT_ATTR_DUAL_SVIO_INDEX "DualSVioIndex"
337 #define GRB_DBL_ATTR_DUAL_VIO_SUM "DualVioSum"
338 #define GRB_DBL_ATTR_DUAL_SVIO_SUM "DualSVioSum"
339 #define GRB_DBL_ATTR_DUAL_RESIDUAL "DualResidual"
340 #define GRB_DBL_ATTR_DUAL_SRESIDUAL "DualSResidual"
341 #define GRB_INT_ATTR_DUAL_RESIDUAL_INDEX "DualResidualIndex"
342 #define GRB_INT_ATTR_DUAL_SRESIDUAL_INDEX "DualSResidualIndex"
343 #define GRB_DBL_ATTR_DUAL_RESIDUAL_SUM "DualResidualSum"
344 #define GRB_DBL_ATTR_DUAL_SRESIDUAL_SUM "DualSResidualSum"
345 #define GRB_DBL_ATTR_INT_VIO "IntVio"
346 #define GRB_INT_ATTR_INT_VIO_INDEX "IntVioIndex"
347 #define GRB_DBL_ATTR_INT_VIO_SUM "IntVioSum"
348 #define GRB_DBL_ATTR_COMPL_VIO "ComplVio"
349 #define GRB_INT_ATTR_COMPL_VIO_INDEX "ComplVioIndex"
350 #define GRB_DBL_ATTR_COMPL_VIO_SUM "ComplVioSum"
351 #define GRB_DBL_ATTR_KAPPA "Kappa"
352 #define GRB_DBL_ATTR_KAPPA_EXACT "KappaExact"
353 #define GRB_DBL_ATTR_N2KAPPA "N2Kappa"
354 #define GRB_DBL_ATTR_SA_OBJLOW "SAObjLow"
355 #define GRB_DBL_ATTR_SA_OBJUP "SAObjUp"
356 #define GRB_DBL_ATTR_SA_LBLOW "SALBLow"
357 #define GRB_DBL_ATTR_SA_LBUP "SALBUp"
358 #define GRB_DBL_ATTR_SA_UBLOW "SAUBLow"
359 #define GRB_DBL_ATTR_SA_UBUP "SAUBUp"
360 #define GRB_DBL_ATTR_SA_RHSLOW "SARHSLow"
361 #define GRB_DBL_ATTR_SA_RHSUP "SARHSUp"
362 #define GRB_INT_ATTR_IIS_MINIMAL "IISMinimal"
363 #define GRB_INT_ATTR_IIS_LB "IISLB"
364 #define GRB_INT_ATTR_IIS_UB "IISUB"
365 #define GRB_INT_ATTR_IIS_CONSTR "IISConstr"
366 #define GRB_INT_ATTR_IIS_SOS "IISSOS"
367 #define GRB_INT_ATTR_IIS_QCONSTR \
370 #define GRB_INT_ATTR_IIS_GENCONSTR \
372 #define GRB_INT_ATTR_TUNE_RESULTCOUNT "TuneResultCount"
373 #define GRB_DBL_ATTR_FARKASDUAL "FarkasDual"
374 #define GRB_DBL_ATTR_FARKASPROOF "FarkasProof"
375 #define GRB_DBL_ATTR_UNBDRAY "UnbdRay"
376 #define GRB_INT_ATTR_INFEASVAR "InfeasVar"
377 #define GRB_INT_ATTR_UNBDVAR "UnbdVar"
378 #define GRB_INT_ATTR_VARPRESTAT "VarPreStat"
379 #define GRB_DBL_ATTR_PREFIXVAL "PreFixVal"
380 #define GRB_DBL_ATTR_OBJN "ObjN"
381 #define GRB_DBL_ATTR_OBJNVAL \
383 #define GRB_DBL_ATTR_OBJNCON "ObjNCon"
384 #define GRB_DBL_ATTR_OBJNWEIGHT "ObjNWeight"
385 #define GRB_INT_ATTR_OBJNPRIORITY "ObjNPriority"
386 #define GRB_DBL_ATTR_OBJNRELTOL "ObjNRelTol"
387 #define GRB_DBL_ATTR_OBJNABSTOL "ObjNAbsTol"
388 #define GRB_STR_ATTR_OBJNNAME "ObjNName"
389 #define GRB_DBL_ATTR_SCENNLB "ScenNLB"
390 #define GRB_DBL_ATTR_SCENNUB "ScenNUB"
391 #define GRB_DBL_ATTR_SCENNOBJ "ScenNObj"
392 #define GRB_DBL_ATTR_SCENNRHS "ScenNRHS"
393 #define GRB_STR_ATTR_SCENNNAME "ScenNName"
394 #define GRB_DBL_ATTR_SCENNX "ScenNX"
395 #define GRB_DBL_ATTR_SCENNOBJBOUND \
397 #define GRB_DBL_ATTR_SCENNOBJVAL \
399 #define GRB_INT_ATTR_NUMOBJ "NumObj"
400 #define GRB_INT_ATTR_NUMSCENARIOS "NumScenarios"
401 #define GRB_INT_ATTR_NUMSTART "NumStart"
402 #define GRB_DBL_ATTR_Xn "Xn"
403 #define GRB_GENCONSTR_MAX 0
404 #define GRB_GENCONSTR_MIN 1
405 #define GRB_GENCONSTR_ABS 2
406 #define GRB_GENCONSTR_AND 3
407 #define GRB_GENCONSTR_OR 4
408 #define GRB_GENCONSTR_INDICATOR 5
409 #define GRB_GENCONSTR_PWL 6
410 #define GRB_GENCONSTR_POLY 7
411 #define GRB_GENCONSTR_EXP 8
412 #define GRB_GENCONSTR_EXPA 9
413 #define GRB_GENCONSTR_LOG 10
414 #define GRB_GENCONSTR_LOGA 11
415 #define GRB_GENCONSTR_POW 12
416 #define GRB_GENCONSTR_SIN 13
417 #define GRB_GENCONSTR_COS 14
418 #define GRB_GENCONSTR_TAN 15
419 #define GRB_CB_POLLING 0
420 #define GRB_CB_PRESOLVE 1
421 #define GRB_CB_SIMPLEX 2
423 #define GRB_CB_MIPSOL 4
424 #define GRB_CB_MIPNODE 5
425 #define GRB_CB_MESSAGE 6
426 #define GRB_CB_BARRIER 7
427 #define GRB_CB_MULTIOBJ 8
428 #define GRB_CB_PRE_COLDEL 1000
429 #define GRB_CB_PRE_ROWDEL 1001
430 #define GRB_CB_PRE_SENCHG 1002
431 #define GRB_CB_PRE_BNDCHG 1003
432 #define GRB_CB_PRE_COECHG 1004
433 #define GRB_CB_SPX_ITRCNT 2000
434 #define GRB_CB_SPX_OBJVAL 2001
435 #define GRB_CB_SPX_PRIMINF 2002
436 #define GRB_CB_SPX_DUALINF 2003
437 #define GRB_CB_SPX_ISPERT 2004
438 #define GRB_CB_MIP_OBJBST 3000
439 #define GRB_CB_MIP_OBJBND 3001
440 #define GRB_CB_MIP_NODCNT 3002
441 #define GRB_CB_MIP_SOLCNT 3003
442 #define GRB_CB_MIP_CUTCNT 3004
443 #define GRB_CB_MIP_NODLFT 3005
444 #define GRB_CB_MIP_ITRCNT 3006
445 #define GRB_CB_MIP_OBJBNDC 3007
446 #define GRB_CB_MIPSOL_SOL 4001
447 #define GRB_CB_MIPSOL_OBJ 4002
448 #define GRB_CB_MIPSOL_OBJBST 4003
449 #define GRB_CB_MIPSOL_OBJBND 4004
450 #define GRB_CB_MIPSOL_NODCNT 4005
451 #define GRB_CB_MIPSOL_SOLCNT 4006
452 #define GRB_CB_MIPSOL_OBJBNDC 4007
453 #define GRB_CB_MIPNODE_STATUS 5001
454 #define GRB_CB_MIPNODE_REL 5002
455 #define GRB_CB_MIPNODE_OBJBST 5003
456 #define GRB_CB_MIPNODE_OBJBND 5004
457 #define GRB_CB_MIPNODE_NODCNT 5005
458 #define GRB_CB_MIPNODE_SOLCNT 5006
459 #define GRB_CB_MIPNODE_BRVAR 5007
460 #define GRB_CB_MIPNODE_OBJBNDC 5008
461 #define GRB_CB_MSG_STRING 6001
462 #define GRB_CB_RUNTIME 6002
463 #define GRB_CB_BARRIER_ITRCNT 7001
464 #define GRB_CB_BARRIER_PRIMOBJ 7002
465 #define GRB_CB_BARRIER_DUALOBJ 7003
466 #define GRB_CB_BARRIER_PRIMINF 7004
467 #define GRB_CB_BARRIER_DUALINF 7005
468 #define GRB_CB_BARRIER_COMPL 7006
469 #define GRB_CB_MULTIOBJ_OBJCNT 8001
470 #define GRB_CB_MULTIOBJ_SOLCNT 8002
471 #define GRB_CB_MULTIOBJ_SOL 8003
472 #define GRB_FEASRELAX_LINEAR 0
473 #define GRB_FEASRELAX_QUADRATIC 1
474 #define GRB_FEASRELAX_CARDINALITY 2
476 #define GRB_OPTIMAL 2
477 #define GRB_INFEASIBLE 3
478 #define GRB_INF_OR_UNBD 4
479 #define GRB_UNBOUNDED 5
481 #define GRB_ITERATION_LIMIT 7
482 #define GRB_NODE_LIMIT 8
483 #define GRB_TIME_LIMIT 9
484 #define GRB_SOLUTION_LIMIT 10
485 #define GRB_INTERRUPTED 11
486 #define GRB_NUMERIC 12
487 #define GRB_SUBOPTIMAL 13
488 #define GRB_INPROGRESS 14
489 #define GRB_USER_OBJ_LIMIT 15
491 #define GRB_NONBASIC_LOWER -1
492 #define GRB_NONBASIC_UPPER -2
493 #define GRB_SUPERBASIC -3
494 #define GRB_INT_PAR_BARITERLIMIT "BarIterLimit"
495 #define GRB_DBL_PAR_CUTOFF "Cutoff"
496 #define GRB_DBL_PAR_ITERATIONLIMIT "IterationLimit"
497 #define GRB_DBL_PAR_NODELIMIT "NodeLimit"
498 #define GRB_INT_PAR_SOLUTIONLIMIT "SolutionLimit"
499 #define GRB_DBL_PAR_TIMELIMIT "TimeLimit"
500 #define GRB_DBL_PAR_BESTOBJSTOP "BestObjStop"
501 #define GRB_DBL_PAR_BESTBDSTOP "BestBdStop"
502 #define GRB_DBL_PAR_FEASIBILITYTOL "FeasibilityTol"
503 #define GRB_DBL_PAR_INTFEASTOL "IntFeasTol"
504 #define GRB_DBL_PAR_MARKOWITZTOL "MarkowitzTol"
505 #define GRB_DBL_PAR_MIPGAP "MIPGap"
506 #define GRB_DBL_PAR_MIPGAPABS "MIPGapAbs"
507 #define GRB_DBL_PAR_OPTIMALITYTOL "OptimalityTol"
508 #define GRB_DBL_PAR_PSDTOL "PSDTol"
509 #define GRB_INT_PAR_METHOD "Method"
510 #define GRB_DBL_PAR_PERTURBVALUE "PerturbValue"
511 #define GRB_DBL_PAR_OBJSCALE "ObjScale"
512 #define GRB_INT_PAR_SCALEFLAG "ScaleFlag"
513 #define GRB_INT_PAR_SIMPLEXPRICING "SimplexPricing"
514 #define GRB_INT_PAR_QUAD "Quad"
515 #define GRB_INT_PAR_NORMADJUST "NormAdjust"
516 #define GRB_INT_PAR_SIFTING "Sifting"
517 #define GRB_INT_PAR_SIFTMETHOD "SiftMethod"
518 #define GRB_DBL_PAR_BARCONVTOL "BarConvTol"
519 #define GRB_INT_PAR_BARCORRECTORS "BarCorrectors"
520 #define GRB_INT_PAR_BARHOMOGENEOUS "BarHomogeneous"
521 #define GRB_INT_PAR_BARORDER "BarOrder"
522 #define GRB_DBL_PAR_BARQCPCONVTOL "BarQCPConvTol"
523 #define GRB_INT_PAR_CROSSOVER "Crossover"
524 #define GRB_INT_PAR_CROSSOVERBASIS "CrossoverBasis"
525 #define GRB_INT_PAR_BRANCHDIR "BranchDir"
526 #define GRB_INT_PAR_DEGENMOVES "DegenMoves"
527 #define GRB_INT_PAR_DISCONNECTED "Disconnected"
528 #define GRB_DBL_PAR_HEURISTICS "Heuristics"
529 #define GRB_DBL_PAR_IMPROVESTARTGAP "ImproveStartGap"
530 #define GRB_DBL_PAR_IMPROVESTARTTIME "ImproveStartTime"
531 #define GRB_DBL_PAR_IMPROVESTARTNODES "ImproveStartNodes"
532 #define GRB_INT_PAR_MINRELNODES "MinRelNodes"
533 #define GRB_INT_PAR_MIPFOCUS "MIPFocus"
534 #define GRB_STR_PAR_NODEFILEDIR "NodefileDir"
535 #define GRB_DBL_PAR_NODEFILESTART "NodefileStart"
536 #define GRB_INT_PAR_NODEMETHOD "NodeMethod"
537 #define GRB_INT_PAR_NORELHEURISTIC "NoRelHeuristic"
538 #define GRB_INT_PAR_PUMPPASSES "PumpPasses"
539 #define GRB_INT_PAR_RINS "RINS"
540 #define GRB_STR_PAR_SOLFILES "SolFiles"
541 #define GRB_INT_PAR_STARTNODELIMIT "StartNodeLimit"
542 #define GRB_INT_PAR_SUBMIPNODES "SubMIPNodes"
543 #define GRB_INT_PAR_SYMMETRY "Symmetry"
544 #define GRB_INT_PAR_VARBRANCH "VarBranch"
545 #define GRB_INT_PAR_SOLUTIONNUMBER "SolutionNumber"
546 #define GRB_INT_PAR_ZEROOBJNODES "ZeroObjNodes"
547 #define GRB_INT_PAR_CUTS "Cuts"
548 #define GRB_INT_PAR_CLIQUECUTS "CliqueCuts"
549 #define GRB_INT_PAR_COVERCUTS "CoverCuts"
550 #define GRB_INT_PAR_FLOWCOVERCUTS "FlowCoverCuts"
551 #define GRB_INT_PAR_FLOWPATHCUTS "FlowPathCuts"
552 #define GRB_INT_PAR_GUBCOVERCUTS "GUBCoverCuts"
553 #define GRB_INT_PAR_IMPLIEDCUTS "ImpliedCuts"
554 #define GRB_INT_PAR_PROJIMPLIEDCUTS "ProjImpliedCuts"
555 #define GRB_INT_PAR_MIPSEPCUTS "MIPSepCuts"
556 #define GRB_INT_PAR_MIRCUTS "MIRCuts"
557 #define GRB_INT_PAR_STRONGCGCUTS "StrongCGCuts"
558 #define GRB_INT_PAR_MODKCUTS "ModKCuts"
559 #define GRB_INT_PAR_ZEROHALFCUTS "ZeroHalfCuts"
560 #define GRB_INT_PAR_NETWORKCUTS "NetworkCuts"
561 #define GRB_INT_PAR_SUBMIPCUTS "SubMIPCuts"
562 #define GRB_INT_PAR_INFPROOFCUTS "InfProofCuts"
563 #define GRB_INT_PAR_RLTCUTS "RLTCuts"
564 #define GRB_INT_PAR_RELAXLIFTCUTS "RelaxLiftCuts"
565 #define GRB_INT_PAR_BQPCUTS "BQPCuts"
566 #define GRB_INT_PAR_CUTAGGPASSES "CutAggPasses"
567 #define GRB_INT_PAR_CUTPASSES "CutPasses"
568 #define GRB_INT_PAR_GOMORYPASSES "GomoryPasses"
569 #define GRB_STR_PAR_WORKERPOOL "WorkerPool"
570 #define GRB_STR_PAR_WORKERPASSWORD "WorkerPassword"
571 #define GRB_STR_PAR_COMPUTESERVER "ComputeServer"
572 #define GRB_STR_PAR_TOKENSERVER "TokenServer"
573 #define GRB_STR_PAR_SERVERPASSWORD "ServerPassword"
574 #define GRB_INT_PAR_SERVERTIMEOUT "ServerTimeout"
575 #define GRB_STR_PAR_CSROUTER "CSRouter"
576 #define GRB_STR_PAR_CSGROUP "CSGroup"
577 #define GRB_DBL_PAR_CSQUEUETIMEOUT "CSQueueTimeout"
578 #define GRB_INT_PAR_CSPRIORITY "CSPriority"
579 #define GRB_INT_PAR_CSIDLETIMEOUT "CSIdleTimeout"
580 #define GRB_INT_PAR_CSTLSINSECURE "CSTLSInsecure"
581 #define GRB_INT_PAR_TSPORT "TSPort"
582 #define GRB_STR_PAR_CLOUDACCESSID "CloudAccessID"
583 #define GRB_STR_PAR_CLOUDSECRETKEY "CloudSecretKey"
584 #define GRB_STR_PAR_CLOUDPOOL "CloudPool"
585 #define GRB_STR_PAR_CLOUDHOST "CloudHost"
586 #define GRB_STR_PAR_CSMANAGER "CSManager"
587 #define GRB_STR_PAR_CSAUTHTOKEN "CSAuthToken"
588 #define GRB_STR_PAR_CSAPIACCESSID "CSAPIAccessID"
589 #define GRB_STR_PAR_CSAPISECRET "CSAPISecret"
590 #define GRB_INT_PAR_CSBATCHMODE "CSBatchMode"
591 #define GRB_STR_PAR_USERNAME "Username"
592 #define GRB_STR_PAR_CSAPPNAME "CSAppName"
593 #define GRB_INT_PAR_CSCLIENTLOG "CSClientLog"
594 #define GRB_INT_PAR_AGGREGATE "Aggregate"
595 #define GRB_INT_PAR_AGGFILL "AggFill"
596 #define GRB_INT_PAR_CONCURRENTMIP "ConcurrentMIP"
597 #define GRB_INT_PAR_CONCURRENTJOBS "ConcurrentJobs"
598 #define GRB_INT_PAR_DISPLAYINTERVAL "DisplayInterval"
599 #define GRB_INT_PAR_DISTRIBUTEDMIPJOBS "DistributedMIPJobs"
600 #define GRB_INT_PAR_DUALREDUCTIONS "DualReductions"
601 #define GRB_DBL_PAR_FEASRELAXBIGM "FeasRelaxBigM"
602 #define GRB_INT_PAR_IISMETHOD "IISMethod"
603 #define GRB_INT_PAR_INFUNBDINFO "InfUnbdInfo"
604 #define GRB_INT_PAR_JSONSOLDETAIL "JSONSolDetail"
605 #define GRB_INT_PAR_LAZYCONSTRAINTS "LazyConstraints"
606 #define GRB_STR_PAR_LOGFILE "LogFile"
607 #define GRB_INT_PAR_LOGTOCONSOLE "LogToConsole"
608 #define GRB_INT_PAR_MIQCPMETHOD "MIQCPMethod"
609 #define GRB_INT_PAR_NONCONVEX "NonConvex"
610 #define GRB_INT_PAR_NUMERICFOCUS "NumericFocus"
611 #define GRB_INT_PAR_OUTPUTFLAG "OutputFlag"
612 #define GRB_INT_PAR_PRECRUSH "PreCrush"
613 #define GRB_INT_PAR_PREDEPROW "PreDepRow"
614 #define GRB_INT_PAR_PREDUAL "PreDual"
615 #define GRB_INT_PAR_PREPASSES "PrePasses"
616 #define GRB_INT_PAR_PREQLINEARIZE "PreQLinearize"
617 #define GRB_INT_PAR_PRESOLVE "Presolve"
618 #define GRB_DBL_PAR_PRESOS1BIGM "PreSOS1BigM"
619 #define GRB_DBL_PAR_PRESOS2BIGM "PreSOS2BigM"
620 #define GRB_INT_PAR_PRESPARSIFY "PreSparsify"
621 #define GRB_INT_PAR_PREMIQCPFORM "PreMIQCPForm"
622 #define GRB_INT_PAR_QCPDUAL "QCPDual"
623 #define GRB_INT_PAR_RECORD "Record"
624 #define GRB_STR_PAR_RESULTFILE "ResultFile"
625 #define GRB_INT_PAR_SEED "Seed"
626 #define GRB_INT_PAR_THREADS "Threads"
627 #define GRB_DBL_PAR_TUNETIMELIMIT "TuneTimeLimit"
628 #define GRB_INT_PAR_TUNERESULTS "TuneResults"
629 #define GRB_INT_PAR_TUNECRITERION "TuneCriterion"
630 #define GRB_INT_PAR_TUNETRIALS "TuneTrials"
631 #define GRB_INT_PAR_TUNEOUTPUT "TuneOutput"
632 #define GRB_INT_PAR_TUNEJOBS "TuneJobs"
633 #define GRB_INT_PAR_UPDATEMODE "UpdateMode"
634 #define GRB_INT_PAR_OBJNUMBER "ObjNumber"
635 #define GRB_INT_PAR_MULTIOBJMETHOD "MultiObjMethod"
636 #define GRB_INT_PAR_MULTIOBJPRE "MultiObjPre"
637 #define GRB_INT_PAR_SCENARIONUMBER "ScenarioNumber"
638 #define GRB_INT_PAR_POOLSOLUTIONS "PoolSolutions"
639 #define GRB_DBL_PAR_POOLGAP "PoolGap"
640 #define GRB_INT_PAR_POOLSEARCHMODE "PoolSearchMode"
641 #define GRB_INT_PAR_IGNORENAMES "IgnoreNames"
642 #define GRB_INT_PAR_STARTNUMBER "StartNumber"
643 #define GRB_INT_PAR_PARTITIONPLACE "PartitionPlace"
644 #define GRB_INT_PAR_FUNCPIECES "FuncPieces"
645 #define GRB_DBL_PAR_FUNCPIECELENGTH "FuncPieceLength"
646 #define GRB_DBL_PAR_FUNCPIECEERROR "FuncPieceError"
647 #define GRB_DBL_PAR_FUNCPIECERATIO "FuncPieceRatio"
648 #define GRB_DBL_PAR_FUNCMAXVAL "FuncMaxVal"
649 #define GRB_STR_PAR_DUMMY "Dummy"
650 #define GRB_STR_PAR_JOBID "JobID"
651 #define GRB_CUTS_AUTO -1
652 #define GRB_CUTS_OFF 0
653 #define GRB_CUTS_CONSERVATIVE 1
654 #define GRB_CUTS_AGGRESSIVE 2
655 #define GRB_CUTS_VERYAGGRESSIVE 3
656 #define GRB_PRESOLVE_AUTO -1
657 #define GRB_PRESOLVE_OFF 0
658 #define GRB_PRESOLVE_CONSERVATIVE 1
659 #define GRB_PRESOLVE_AGGRESSIVE 2
660 #define GRB_METHOD_AUTO -1
661 #define GRB_METHOD_PRIMAL 0
662 #define GRB_METHOD_DUAL 1
663 #define GRB_METHOD_BARRIER 2
664 #define GRB_METHOD_CONCURRENT 3
665 #define GRB_METHOD_DETERMINISTIC_CONCURRENT 4
666 #define GRB_METHOD_DETERMINISTIC_CONCURRENT_SIMPLEX 5
667 #define GRB_BARHOMOGENEOUS_AUTO -1
668 #define GRB_BARHOMOGENEOUS_OFF 0
669 #define GRB_BARHOMOGENEOUS_ON 1
670 #define GRB_MIPFOCUS_BALANCED 0
671 #define GRB_MIPFOCUS_FEASIBILITY 1
672 #define GRB_MIPFOCUS_OPTIMALITY 2
673 #define GRB_MIPFOCUS_BESTBOUND 3
674 #define GRB_BARORDER_AUTOMATIC -1
675 #define GRB_BARORDER_AMD 0
676 #define GRB_BARORDER_NESTEDDISSECTION 1
677 #define GRB_SIMPLEXPRICING_AUTO -1
678 #define GRB_SIMPLEXPRICING_PARTIAL 0
679 #define GRB_SIMPLEXPRICING_STEEPEST_EDGE 1
680 #define GRB_SIMPLEXPRICING_DEVEX 2
681 #define GRB_SIMPLEXPRICING_STEEPEST_QUICK 3
682 #define GRB_VARBRANCH_AUTO -1
683 #define GRB_VARBRANCH_PSEUDO_REDUCED 0
684 #define GRB_VARBRANCH_PSEUDO_SHADOW 1
685 #define GRB_VARBRANCH_MAX_INFEAS 2
686 #define GRB_VARBRANCH_STRONG 3
687 #define GRB_PARTITION_EARLY 16
688 #define GRB_PARTITION_ROOTSTART 8
689 #define GRB_PARTITION_ROOTEND 4
690 #define GRB_PARTITION_NODES 2
691 #define GRB_PARTITION_CLEANUP 1
692 #define GRB_BATCH_STATUS_UNKNOWN 0
693 #define GRB_BATCH_CREATED 1
694 #define GRB_BATCH_SUBMITTED 2
695 #define GRB_BATCH_ABORTED 3
696 #define GRB_BATCH_FAILED 4
697 #define GRB_BATCH_COMPLETED 5
700 #endif // OR_TOOLS_LINEAR_SOLVER_GUROBI_ENVIRONMENT_H_
std::function< int(GRBmodel *model, const char *name, int binvar, int binval, int nvars, const int *vars, const double *vals, char sense, double rhs)> GRBaddgenconstrIndicator
std::function< int(GRBenv **, const char *)> GRBloadenv
std::function< int(GRBmodel *model, int(STDCALL *cb)(CB_ARGS), void *usrdata)> GRBsetcallbackfunc
std::function< int(GRBenv *, const char *, int)> GRBsetintparam
std::function< int(void *cbdata, int where, int what, void *resultP)> GRBcbget
std::function< int(void *cbdata, int lazylen, const int *lazyind, const double *lazyval, char lazysense, double lazyrhs)> GRBcblazy
The vehicle routing library lets one model and solve generic vehicle routing problems ranging from th...
std::function< char *(GRBenv *)> GRBgeterrormsg
absl::Status LoadGurobiEnvironment(GRBenv **env)
std::function< int(GRBmodel *model, const char *name, int resvar, int nvars, const int *vars)> GRBaddgenconstrAnd
std::function< int(GRBmodel *model, const char *name, int resvar, int argvar)> GRBaddgenconstrAbs
std::function< int(GRBmodel *, const char *)> GRBwrite
std::function< int(GRBenv *, const char *)> GRBreadparams
std::function< int(GRBenv *, const char *, double *)> GRBgetdblparam
std::function< int(GRBenv *env, const char *paramname, const char *value)> GRBsetparam
std::function< int(GRBmodel *, const char *, double *)> GRBgetdblattr
std::function< int(GRBmodel *)> GRBfreemodel
std::function< int(GRBenv *, GRBmodel **, const char *, int numvars, double *, double *, double *, char *, char **)> GRBnewmodel
std::function< int(GRBmodel *, const char *, int)> GRBsetintattr
std::function< int(GRBenv *)> GRBresetparams
std::function< int(GRBmodel *, const char *, int, int, double *)> GRBgetdblattrarray
std::function< int(void *cbdata, int cutlen, const int *cutind, const double *cutval, char cutsense, double cutrhs)> GRBcbcut
std::function< int(GRBmodel *model, const char *name, int resvar, int nvars, const int *vars, double constant)> GRBaddgenconstrMax
std::function< int(GRBmodel *model, int numchgs, int *cind, int *vind, double *val)> GRBchgcoeffs
std::function< int(GRBmodel *model, const char *attrname, int element, int newvalue)> GRBsetintattrelement
std::function< int(GRBmodel *, const char *, int, char)> GRBsetcharattrelement
std::function< int(GRBmodel *, const char *, int, double)> GRBsetdblattrelement
std::function< void(int *, int *, int *)> GRBversion
std::function< int(GRBmodel *, const char *, double)> GRBsetdblattr
std::function< int(GRBmodel *model, int numsos, int nummembers, int *types, int *beg, int *ind, double *weight)> GRBaddsos
std::function< int(GRBmodel *, int, int *, double *, double, double, const char *)> GRBaddrangeconstr
std::function< int(void *cbdata, const double *solution, double *objvalP)> GRBcbsolution
std::function< int(GRBmodel *, const char *, int *)> GRBgetintattr
std::function< int(GRBmodel *model, const char *name, int resvar, int nvars, const int *vars, double constant)> GRBaddgenconstrMin
std::function< int(GRBmodel *)> GRBoptimize
std::function< int(GRBmodel *model, int numlnz, int *lind, double *lval, int numqnz, int *qrow, int *qcol, double *qval, char sense, double rhs, const char *QCname)> GRBaddqconstr
std::function< int(GRBmodel *model, int numnz, int *vind, double *vval, double obj, double lb, double ub, char vtype, const char *varname)> GRBaddvar
std::function< int(GRBmodel *model, const char *name, int resvar, int nvars, const int *vars)> GRBaddgenconstrOr
std::function< int(GRBmodel *model, int numqnz, int *qrow, int *qcol, double *qval)> GRBaddqpterms
std::function< GRBenv *(GRBmodel *)> GRBgetenv
std::function< int(GRBmodel *)> GRBupdatemodel
std::function< int(GRBmodel *, const char *, int, char *)> GRBgetcharattrelement
struct _GRBmodel GRBmodel
std::function< int(GRBenv *, const char *, double)> GRBsetdblparam
std::function< int(GRBmodel *, const char *, int, double *)> GRBgetdblattrelement
std::function< int(GRBmodel *, const char *, int, int *)> GRBgetintattrelement
std::function< void(GRBmodel *)> GRBterminate
std::function< void(GRBenv *)> GRBfreeenv
std::function< int(GRBmodel *model, int numnz, int *cind, double *cval, char sense, double rhs, const char *constrname)> GRBaddconstr
std::function< int(GRBmodel *, int, int, int *, int *, double *, double *, double *, double *, char *, char **)> GRBaddvars