46#include "tinycthread/tinycthread.h"
49#define snprintf _snprintf
52#if ( GRB_VERSION_MAJOR < 6 || ( GRB_VERSION_MAJOR == 7 && GRB_VERSION_MINOR == 0 && GRB_VERSION_TECHNICAL < 2 ) )
53#error "The Gurobi intreface only works for Gurobi versions at least 7.0.2"
57 #if defined(_Thread_local)
71#define CHECK_ZERO(messagehdlr, x) do { int _restat_; \
72 if( (_restat_ = (x)) != 0 ) \
74 SCIPmessagePrintWarning((messagehdlr), "Gurobi error %d: %s\n", _restat_, GRBgeterrormsg(lpi->grbenv)); \
75 return SCIP_LPERROR; \
80#define CHECK_ZERO_STAR(messagehdlr, x) do { int _restat_; \
81 if( (_restat_ = (x)) != 0 ) \
83 SCIPmessagePrintWarning((messagehdlr), "Gurobi error %d: %s\n", _restat_, GRBgeterrormsg((*lpi)->grbenv)); \
84 return SCIP_LPERROR; \
89#define SVECTOR GRBsvec
93#define SCIP_DUALPACKETSIZE (sizeof(SCIP_DUALPACKET)*4)
96#define COLS_PER_PACKET SCIP_DUALPACKETSIZE
98#define ROWS_PER_PACKET SCIP_DUALPACKETSIZE
104#define GRB_REFACTORMAXITERS 50
483 {0x00000000, 0x00000001, 0x00000002, 0x00000003},
484 {0x00000000, 0x00000004, 0x00000008, 0x0000000C},
485 {0x00000000, 0x00000010, 0x00000020, 0x00000030},
486 {0x00000000, 0x00000040, 0x00000080, 0x000000C0},
487 {0x00000000, 0x00000100, 0x00000200, 0x00000300},
488 {0x00000000, 0x00000400, 0x00000800, 0x00000C00},
489 {0x00000000, 0x00001000, 0x00002000, 0x00003000},
490 {0x00000000, 0x00004000, 0x00008000, 0x0000C000},
491 {0x00000000, 0x00010000, 0x00020000, 0x00030000},
492 {0x00000000, 0x00040000, 0x00080000, 0x000C0000},
493 {0x00000000, 0x00100000, 0x00200000, 0x00300000},
494 {0x00000000, 0x00400000, 0x00800000, 0x00C00000},
495 {0x00000000, 0x01000000, 0x02000000, 0x03000000},
496 {0x00000000, 0x04000000, 0x08000000, 0x0C000000},
497 {0x00000000, 0x10000000, 0x20000000, 0x30000000},
498 {0x00000000, 0x40000000, 0x80000000, 0xC0000000}
525 mask[0][-
inp[0]] | mask[1][-
inp[1]] | mask[2][-
inp[2]] | mask[3][-
inp[3]]
526 | mask[4][-
inp[4]] | mask[5][-
inp[5]] | mask[6][-
inp[6]]
527 | mask[7][-
inp[7]] | mask[8][-
inp[8]] | mask[9][-
inp[9]]
528 | mask[10][-
inp[10]] | mask[11][-
inp[11]] | mask[12][-
inp[12]]
529 | mask[13][-
inp[13]] | mask[14][-
inp[14]] | mask[15][-
inp[15]];
540 m |= mask[
i][-
inp[
i]];
573 *
out++ = -(int)(m & 3);
575 *
out++ = -(int)(m & 3);
577 *
out++ = -(int)(m & 3);
579 *
out++ = -(int)(m & 3);
581 *
out++ = -(int)(m & 3);
583 *
out++ = -(int)(m & 3);
585 *
out++ = -(int)(m & 3);
587 *
out++ = -(int)(m & 3);
589 *
out++ = -(int)(m & 3);
591 *
out++ = -(int)(m & 3);
593 *
out++ = -(int)(m & 3);
595 *
out++ = -(int)(m & 3);
597 *
out++ = -(int)(m & 3);
599 *
out++ = -(int)(m & 3);
601 *
out++ = -(int)(m & 3);
603 *
out++ = -(int)(m & 3);
615 *
out++ = -(int)(m & 3);
915 const SCIP_Real* lhs,
916 const SCIP_Real* rhs,
930 for(
i = 0;
i < nrows; ++
i )
934 if( lhs[
i] == rhs[
i] )
986 for (
i = 0;
i < nrows; ++
i)
1085 for (
i = 0;
i < nrows;
i++)
1102#define checkRangeInfo(lpi)
1120 double coeff = -1.0;
1211 for (
r = firstrow;
r < nrows;
r++)
1224 row = firstrow + pos;
1246static const char grbname[] = {
'G',
'u',
'r',
'o',
'b',
'i',
' ',
1247#if GRB_VERSION_MAJOR < 10
1270 return "Linear Programming Solver developed by Gurobi Optimization (www.gurobi.com)";
1295 SCIPerrorMessage(
"SCIPlpiSetIntegralityInformation() has not been implemented yet.\n");
1343 assert(
sizeof(SCIP_Real) ==
sizeof(
double));
1344 assert(
sizeof(SCIP_Bool) ==
sizeof(
int));
1369#if GRB_VERSION_MAJOR >= 8
1401 (*lpi)->grbenv =
GRBgetenv((*lpi)->grbmodel);
1404 (*lpi)->numlp = &
numlp;
1412#if GRB_VERSION_MAJOR >= 8
1435 (*lpi)->senarray =
NULL;
1436 (*lpi)->rhsarray =
NULL;
1437 (*lpi)->rngarray =
NULL;
1438 (*lpi)->rngidxarray =
NULL;
1439 (*lpi)->valarray =
NULL;
1440 (*lpi)->cstat =
NULL;
1441 (*lpi)->rstat =
NULL;
1442 (*lpi)->indarray =
NULL;
1443 (*lpi)->rngrowmap =
NULL;
1444 (*lpi)->rngrows =
NULL;
1445 (*lpi)->rngvals =
NULL;
1446 (*lpi)->sidechgsize = 0;
1447 (*lpi)->valsize = 0;
1448 (*lpi)->cstatsize = 0;
1449 (*lpi)->rstatsize = 0;
1450 (*lpi)->rngrowmapsize = 0;
1451 (*lpi)->nrngrows = 0;
1452 (*lpi)->rngrowssize = 0;
1453 (*lpi)->rngvarsadded =
FALSE;
1454 (*lpi)->iterations = 0;
1455 (*lpi)->solisbasic =
FALSE;
1456 (*lpi)->fromscratch =
FALSE;
1457 (*lpi)->conditionlimit = -1.0;
1458 (*lpi)->checkcondition =
FALSE;
1460 (*lpi)->messagehdlr = messagehdlr;
1509 assert(*(*lpi)->numlp > 0);
1512 if( *(*lpi)->numlp == 0 )
1516 *(*lpi)->reusegrbenv =
NULL;
1545 const SCIP_Real*
obj,
1546 const SCIP_Real* lb,
1547 const SCIP_Real* ub,
1550 const SCIP_Real* lhs,
1551 const SCIP_Real* rhs,
1556 const SCIP_Real* val
1567 for(
j = 0;
j < nnonz;
j++ )
1584 SCIPdebugMessage(
"loading LP in column format into Gurobi: %d cols, %d rows\n", ncols, nrows);
1598 for(
c = 0;
c < ncols-1; ++
c )
1603 cnt[ncols-1] = nnonz -
beg[ncols-1];
1604 assert(cnt[ncols-1] >= 0);
1608 lpi->
senarray, lpi->
rhsarray, (
int*)
beg, cnt, (
int*)
ind, (SCIP_Real*)val, (SCIP_Real*)lb, (SCIP_Real*)ub,
NULL, colnames, rownames) );
1645 const SCIP_Real*
obj,
1646 const SCIP_Real* lb,
1647 const SCIP_Real* ub,
1652 const SCIP_Real* val
1666 SCIPdebugMessage(
"adding %d columns with %d nonzeros to Gurobi\n", ncols, nnonz);
1678 for (
j = 0;
j < nnonz; ++
j)
1695 (SCIP_Real*)
obj, (SCIP_Real*)lb, (SCIP_Real*)ub,
NULL, colnames) );
1772 for(
j = 0;
j < ncols; ++
j )
1783 for(
j = 0;
j < ncols; ++
j )
1805 const SCIP_Real* lhs,
1806 const SCIP_Real* rhs,
1811 const SCIP_Real* val
1826 SCIPdebugMessage(
"adding %d rows with %d nonzeros to Gurobi\n", nrows, nnonz);
1838 for (
j = 0;
j < nnonz; ++
j) {
1960 if ( nrngrows == 0 )
1966 for (
i = firstrow;
i < nrows;
i++)
2002 for(
i = 0;
i < nrows; ++
i )
2012 for(
i = 0;
i < nrows; ++
i )
2056 if ( nrngrows == 0 )
2061 for (
i = 0;
i < nrows;
i++)
2109#ifdef SCIP_DISABLED_CODE
2129 const SCIP_Real* lb,
2143 for (
i = 0;
i < ncols; ++
i)
2176 const SCIP_Real* lhs,
2177 const SCIP_Real* rhs
2216 for (
i = 0;
i < nrows;
i++)
2297 if ( nrngrows == 0 )
2318 SCIPdebugMessage(
"changing coefficient row %d, column %d in Gurobi to %g\n", row, col, newval);
2359 const SCIP_Real*
obj
2395 SCIPdebugMessage(
"scaling row %d with factor %g in Gurobi\n", row, scaleval);
2406 for (
i = 0;
i < nnonz; ++
i )
2414 else if( scaleval < 0.0 )
2418 else if( scaleval < 0.0 )
2420 if( scaleval > 0.0 )
2455 SCIPdebugMessage(
"scaling column %d with factor %g in Gurobi\n", col, scaleval);
2469 for(
i = 0;
i < nnonz; ++
i )
2481 else if( scaleval < 0.0 )
2485 else if( scaleval < 0.0 )
2487 if( scaleval > 0.0 )
2911 SCIPdebugMessage(
"calling Gurobi primal simplex: %d cols, %d rows\n", ncols, nrows);
2951 SCIPdebugMessage(
"Gurobi primal simplex needed %d iterations to gain LP status %d\n", (
int) cnt, lpi->
solstat);
2963 SCIPdebugMessage(
"presolver may have solved the problem -> calling Gurobi primal simplex again without presolve\n");
2991 SCIPerrorMessage(
"Gurobi primal simplex returned GRB_INF_OR_UNBD after presolving was turned off\n");
3104 SCIPdebugMessage(
"calling Gurobi dual simplex: %d cols, %d rows\n", ncols, nrows);
3174 SCIPdebugMessage(
"presolver may have solved the problem -> calling Gurobi dual simplex again without presolve\n");
3203 SCIPerrorMessage(
"Gurobi dual simplex returned GRB_INF_OR_UNBD after presolving was turned off.\n");
3241 SCIPdebugMessage(
"calling Gurobi barrier: %d cols, %d rows\n", ncols, nrows);
3303 SCIPdebugMessage(
"presolver may have solved the problem -> calling Gurobi barrier again without presolve\n");
3332 SCIPerrorMessage(
"Gurobi barrier returned GRB_INF_OR_UNBD after presolving was turned off\n");
3601 for(
j = 0;
j < ncols; ++
j )
3664 for(
j = 0;
j < ncols; ++
j )
3708 SCIP_Bool* primalfeasible,
3709 SCIP_Bool* dualfeasible
3860 if ( consviol <=
eps && boundviol <=
eps )
4176#ifdef SCIP_DISABLED_CODE
4209 SCIP_Real* activity,
4224 assert( ncols >= 0 && nrows >= 0 );
4236 if( dualsol !=
NULL )
4241 if( activity !=
NULL )
4253 for(
i = 0;
i < nrows; ++
i )
4285 if( redcost !=
NULL )
4319 SCIP_Real* dualfarkas
4338 for (
i = 0;
i < nrows; ++
i)
4339 dualfarkas[
i] *= -1.0;
4426 SCIPdebugMessage(
"saving Gurobi basis into %p/%p\n", (
void*) cstat, (
void*) rstat);
4440 for(
i = 0;
i < nrows; ++
i )
4510 for(
j = 0;
j < ncols; ++
j )
4563 SCIPdebugMessage(
"loading basis %p/%p into Gurobi\n", (
void*) cstat, (
void*) rstat);
4570 for(
i = 0;
i < nrows; ++
i )
4625 for(
j = 0;
j < ncols; ++
j )
4699 for (
i = 0;
i < nrows; ++
i)
4775 val = (
x.ind)[
r] >= 0 ? 1.0 : -1.0;
4792 for (
i = 0;
i <
x.len; ++
i)
4795 assert( idx >= 0 && idx < nrows );
4797 coef[idx] = (
x.val)[
i];
4808 for (
i = 0;
i <
x.len; ++
i)
4811 assert( idx >= 0 && idx < nrows );
4812 coef[idx] = (
x.val)[
i];
4896 for (
i = 0;
i <
x.len; ++
i)
4899 assert( idx >= 0 && idx < nrows );
4901 coef[idx] = (
x.val)[
i];
4914 for (
i = 0;
i <
x.len; ++
i)
4917 assert( idx >= 0 && idx < nrows );
4918 coef[idx] = (
x.val)[
i];
5004 for (
j = 0;
j <
x.len; ++
j)
5011 coef[idx] = (
x.val)[
j];
5025 for (
j = 0;
j <
x.len; ++
j)
5031 coef[idx] = (
x.val)[
j];
5102 for (
j = 0;
j <
x.len; ++
j)
5105 assert( idx >= 0 && idx < nrows );
5107 coef[idx] = (
x.val)[
j];
5120 for (
j = 0;
j <
x.len; ++
j)
5123 assert( idx >= 0 && idx < nrows );
5124 coef[idx] = (
x.val)[
j];
5185 (*lpistate)->ncols = ncols;
5186 (*lpistate)->nrows = nrows;
5187 (*lpistate)->nrngrows = lpi->
nrngrows;
5189 SCIPdebugMessage(
"stored Gurobi LPI state in %p (%d cols, %d rows, %d ranged rows)\n",
5190 (
void*) *lpistate, ncols, nrows, lpi->
nrngrows);
5201 (*lpistate)->ncols = ncols;
5202 (*lpistate)->nrows = nrows;
5203 (*lpistate)->nrngrows = lpi->
nrngrows;
5204 (*lpistate)->packrstat =
NULL;
5205 (*lpistate)->packcstat =
NULL;
5238 SCIPdebugMessage(
"loading LPI state %p (%d cols, %d rows, %d ranged rows) into Gurobi LP with %d cols, %d rows, and %d ranged rows\n",
5241 if( lpistate->
ncols == 0 || lpistate->
nrows == 0 )
5258 for(
i = lpistate->
ncols;
i < ncols; ++
i )
5276 for(
i = lpistate->
nrows;
i < nrows; ++
i )
5309 if( *lpistate !=
NULL )
5347 SCIPerrorMessage(
"To read a basis with gurobi, the extension has to be '.bas'.\n");
5441 (*lpinorms)->ncols = ncols;
5442 (*lpinorms)->nrows = nrows;
5466 if( lpinorms ==
NULL )
5507 if ( *lpinorms !=
NULL )
5750 else if(
dval > 1
e-2 )
5760 else if(
dval > 1
e-2 )
5791 else if(
dval > 0.999 )
unsigned int SCIP_DUALPACKET
#define SCIP_CALL_QUIET(x)
#define SCIP_CALL_ABORT(x)
SCIP_RETCODE SCIPlpiChgSides(SCIP_LPI *lpi, int nrows, const int *ind, const SCIP_Real *lhs, const SCIP_Real *rhs)
SCIP_RETCODE SCIPlpiSetState(SCIP_LPI *lpi, BMS_BLKMEM *blkmem, const SCIP_LPISTATE *lpistate)
SCIP_RETCODE SCIPlpiGetBInvACol(SCIP_LPI *lpi, int c, SCIP_Real *coef, int *inds, int *ninds)
SCIP_RETCODE SCIPlpiGetRealpar(SCIP_LPI *lpi, SCIP_LPPARAM type, SCIP_Real *dval)
SCIP_Real SCIPlpiInfinity(SCIP_LPI *lpi)
SCIP_Bool SCIPlpiIsObjlimExc(SCIP_LPI *lpi)
SCIP_RETCODE SCIPlpiChgObjsen(SCIP_LPI *lpi, SCIP_OBJSEN objsen)
SCIP_Bool SCIPlpiIsInfinity(SCIP_LPI *lpi, SCIP_Real val)
SCIP_RETCODE SCIPlpiClear(SCIP_LPI *lpi)
SCIP_RETCODE SCIPlpiClearState(SCIP_LPI *lpi)
SCIP_Bool SCIPlpiExistsDualRay(SCIP_LPI *lpi)
SCIP_Bool SCIPlpiExistsPrimalRay(SCIP_LPI *lpi)
SCIP_RETCODE SCIPlpiGetBase(SCIP_LPI *lpi, int *cstat, int *rstat)
SCIP_RETCODE SCIPlpiReadState(SCIP_LPI *lpi, const char *fname)
SCIP_RETCODE SCIPlpiAddRows(SCIP_LPI *lpi, int nrows, const SCIP_Real *lhs, const SCIP_Real *rhs, char **rownames, int nnonz, const int *beg, const int *ind, const SCIP_Real *val)
SCIP_RETCODE SCIPlpiGetPrimalRay(SCIP_LPI *lpi, SCIP_Real *ray)
SCIP_RETCODE SCIPlpiGetIntpar(SCIP_LPI *lpi, SCIP_LPPARAM type, int *ival)
SCIP_RETCODE SCIPlpiWriteLP(SCIP_LPI *lpi, const char *fname)
SCIP_RETCODE SCIPlpiSetIntegralityInformation(SCIP_LPI *lpi, int ncols, int *intInfo)
SCIP_Bool SCIPlpiIsDualInfeasible(SCIP_LPI *lpi)
SCIP_RETCODE SCIPlpiSetRealpar(SCIP_LPI *lpi, SCIP_LPPARAM type, SCIP_Real dval)
SCIP_RETCODE SCIPlpiStrongbranchFrac(SCIP_LPI *lpi, int col, SCIP_Real psol, int itlim, SCIP_Real *down, SCIP_Real *up, SCIP_Bool *downvalid, SCIP_Bool *upvalid, int *iter)
SCIP_RETCODE SCIPlpiSetNorms(SCIP_LPI *lpi, BMS_BLKMEM *blkmem, const SCIP_LPINORMS *lpinorms)
SCIP_RETCODE SCIPlpiGetNNonz(SCIP_LPI *lpi, int *nnonz)
SCIP_Bool SCIPlpiHasPrimalSolve(void)
SCIP_RETCODE SCIPlpiStrongbranchInt(SCIP_LPI *lpi, int col, SCIP_Real psol, int itlim, SCIP_Real *down, SCIP_Real *up, SCIP_Bool *downvalid, SCIP_Bool *upvalid, int *iter)
SCIP_RETCODE SCIPlpiGetBounds(SCIP_LPI *lpi, int firstcol, int lastcol, SCIP_Real *lbs, SCIP_Real *ubs)
SCIP_Bool SCIPlpiHasBarrierSolve(void)
SCIP_RETCODE SCIPlpiGetDualfarkas(SCIP_LPI *lpi, SCIP_Real *dualfarkas)
SCIP_RETCODE SCIPlpiGetObjval(SCIP_LPI *lpi, SCIP_Real *objval)
SCIP_RETCODE SCIPlpiScaleCol(SCIP_LPI *lpi, int col, SCIP_Real scaleval)
int SCIPlpiGetInternalStatus(SCIP_LPI *lpi)
SCIP_RETCODE SCIPlpiStartStrongbranch(SCIP_LPI *lpi)
SCIP_RETCODE SCIPlpiGetSolFeasibility(SCIP_LPI *lpi, SCIP_Bool *primalfeasible, SCIP_Bool *dualfeasible)
SCIP_RETCODE SCIPlpiFreeNorms(SCIP_LPI *lpi, BMS_BLKMEM *blkmem, SCIP_LPINORMS **lpinorms)
SCIP_Bool SCIPlpiIsIterlimExc(SCIP_LPI *lpi)
SCIP_RETCODE SCIPlpiChgBounds(SCIP_LPI *lpi, int ncols, const int *ind, const SCIP_Real *lb, const SCIP_Real *ub)
SCIP_Bool SCIPlpiIsPrimalUnbounded(SCIP_LPI *lpi)
SCIP_RETCODE SCIPlpiIgnoreInstability(SCIP_LPI *lpi, SCIP_Bool *success)
SCIP_RETCODE SCIPlpiWriteState(SCIP_LPI *lpi, const char *fname)
SCIP_RETCODE SCIPlpiFree(SCIP_LPI **lpi)
SCIP_RETCODE SCIPlpiStrongbranchesFrac(SCIP_LPI *lpi, int *cols, int ncols, SCIP_Real *psols, int itlim, SCIP_Real *down, SCIP_Real *up, SCIP_Bool *downvalid, SCIP_Bool *upvalid, int *iter)
SCIP_RETCODE SCIPlpiGetCoef(SCIP_LPI *lpi, int row, int col, SCIP_Real *val)
SCIP_Bool SCIPlpiIsPrimalFeasible(SCIP_LPI *lpi)
SCIP_RETCODE SCIPlpiReadLP(SCIP_LPI *lpi, const char *fname)
SCIP_RETCODE SCIPlpiGetRealSolQuality(SCIP_LPI *lpi, SCIP_LPSOLQUALITY qualityindicator, SCIP_Real *quality)
SCIP_Bool SCIPlpiIsDualFeasible(SCIP_LPI *lpi)
static SCIP_RETCODE lpiStrongbranch(SCIP_LPI *lpi, int col, SCIP_Real psol, int itlim, SCIP_Real *down, SCIP_Real *up, SCIP_Bool *downvalid, SCIP_Bool *upvalid, int *iter)
SCIP_RETCODE SCIPlpiGetNorms(SCIP_LPI *lpi, BMS_BLKMEM *blkmem, SCIP_LPINORMS **lpinorms)
SCIP_Bool SCIPlpiIsTimelimExc(SCIP_LPI *lpi)
SCIP_Bool SCIPlpiHasStateBasis(SCIP_LPI *lpi, SCIP_LPISTATE *lpistate)
SCIP_RETCODE SCIPlpiSetIntpar(SCIP_LPI *lpi, SCIP_LPPARAM type, int ival)
const char * SCIPlpiGetSolverName(void)
SCIP_RETCODE SCIPlpiSetBase(SCIP_LPI *lpi, const int *cstat, const int *rstat)
SCIP_Bool SCIPlpiHasPrimalRay(SCIP_LPI *lpi)
SCIP_RETCODE SCIPlpiGetBInvRow(SCIP_LPI *lpi, int r, SCIP_Real *coef, int *inds, int *ninds)
SCIP_RETCODE SCIPlpiDelRows(SCIP_LPI *lpi, int firstrow, int lastrow)
SCIP_RETCODE SCIPlpiGetCols(SCIP_LPI *lpi, int firstcol, int lastcol, SCIP_Real *lb, SCIP_Real *ub, int *nnonz, int *beg, int *ind, SCIP_Real *val)
SCIP_RETCODE SCIPlpiGetBInvCol(SCIP_LPI *lpi, int c, SCIP_Real *coef, int *inds, int *ninds)
SCIP_RETCODE SCIPlpiGetColNames(SCIP_LPI *lpi, int firstcol, int lastcol, char **colnames, char *namestorage, int namestoragesize, int *storageleft)
SCIP_RETCODE SCIPlpiGetBInvARow(SCIP_LPI *lpi, int r, const SCIP_Real *binvrow, SCIP_Real *coef, int *inds, int *ninds)
SCIP_RETCODE SCIPlpiGetRows(SCIP_LPI *lpi, int firstrow, int lastrow, SCIP_Real *lhs, SCIP_Real *rhs, int *nnonz, int *beg, int *ind, SCIP_Real *val)
SCIP_Bool SCIPlpiWasSolved(SCIP_LPI *lpi)
const char * SCIPlpiGetSolverDesc(void)
SCIP_RETCODE SCIPlpiSolveBarrier(SCIP_LPI *lpi, SCIP_Bool crossover)
SCIP_Bool SCIPlpiIsOptimal(SCIP_LPI *lpi)
SCIP_RETCODE SCIPlpiGetRowNames(SCIP_LPI *lpi, int firstrow, int lastrow, char **rownames, char *namestorage, int namestoragesize, int *storageleft)
SCIP_Bool SCIPlpiHasDualSolve(void)
SCIP_RETCODE SCIPlpiEndStrongbranch(SCIP_LPI *lpi)
SCIP_RETCODE SCIPlpiGetSides(SCIP_LPI *lpi, int firstrow, int lastrow, SCIP_Real *lhss, SCIP_Real *rhss)
SCIP_RETCODE SCIPlpiStrongbranchesInt(SCIP_LPI *lpi, int *cols, int ncols, SCIP_Real *psols, int itlim, SCIP_Real *down, SCIP_Real *up, SCIP_Bool *downvalid, SCIP_Bool *upvalid, int *iter)
SCIP_RETCODE SCIPlpiGetSol(SCIP_LPI *lpi, SCIP_Real *objval, SCIP_Real *primsol, SCIP_Real *dualsol, SCIP_Real *activity, SCIP_Real *redcost)
SCIP_Bool SCIPlpiHasDualRay(SCIP_LPI *lpi)
SCIP_RETCODE SCIPlpiDelColset(SCIP_LPI *lpi, int *dstat)
SCIP_RETCODE SCIPlpiGetObj(SCIP_LPI *lpi, int firstcol, int lastcol, SCIP_Real *vals)
SCIP_RETCODE SCIPlpiFreeState(SCIP_LPI *lpi, BMS_BLKMEM *blkmem, SCIP_LPISTATE **lpistate)
SCIP_Bool SCIPlpiIsPrimalInfeasible(SCIP_LPI *lpi)
SCIP_RETCODE SCIPlpiSolveDual(SCIP_LPI *lpi)
SCIP_RETCODE SCIPlpiAddCols(SCIP_LPI *lpi, int ncols, const SCIP_Real *obj, const SCIP_Real *lb, const SCIP_Real *ub, char **colnames, int nnonz, const int *beg, const int *ind, const SCIP_Real *val)
SCIP_RETCODE SCIPlpiSolvePrimal(SCIP_LPI *lpi)
SCIP_RETCODE SCIPlpiLoadColLP(SCIP_LPI *lpi, SCIP_OBJSEN objsen, int ncols, const SCIP_Real *obj, const SCIP_Real *lb, const SCIP_Real *ub, char **colnames, int nrows, const SCIP_Real *lhs, const SCIP_Real *rhs, char **rownames, int nnonz, const int *beg, const int *ind, const SCIP_Real *val)
SCIP_Bool SCIPlpiIsDualUnbounded(SCIP_LPI *lpi)
SCIP_RETCODE SCIPlpiGetIterations(SCIP_LPI *lpi, int *iterations)
SCIP_RETCODE SCIPlpiGetBasisInd(SCIP_LPI *lpi, int *bind)
SCIP_RETCODE SCIPlpiCreate(SCIP_LPI **lpi, SCIP_MESSAGEHDLR *messagehdlr, const char *name, SCIP_OBJSEN objsen)
void * SCIPlpiGetSolverPointer(SCIP_LPI *lpi)
SCIP_RETCODE SCIPlpiChgObj(SCIP_LPI *lpi, int ncols, const int *ind, const SCIP_Real *obj)
SCIP_RETCODE SCIPlpiGetObjsen(SCIP_LPI *lpi, SCIP_OBJSEN *objsen)
SCIP_Bool SCIPlpiIsStable(SCIP_LPI *lpi)
SCIP_RETCODE SCIPlpiGetNCols(SCIP_LPI *lpi, int *ncols)
SCIP_RETCODE SCIPlpiInterrupt(SCIP_LPI *lpi, SCIP_Bool interrupt)
SCIP_RETCODE SCIPlpiDelCols(SCIP_LPI *lpi, int firstcol, int lastcol)
SCIP_RETCODE SCIPlpiDelRowset(SCIP_LPI *lpi, int *dstat)
SCIP_RETCODE SCIPlpiScaleRow(SCIP_LPI *lpi, int row, SCIP_Real scaleval)
SCIP_RETCODE SCIPlpiGetNRows(SCIP_LPI *lpi, int *nrows)
SCIP_RETCODE SCIPlpiGetState(SCIP_LPI *lpi, BMS_BLKMEM *blkmem, SCIP_LPISTATE **lpistate)
SCIP_RETCODE SCIPlpiChgCoef(SCIP_LPI *lpi, int row, int col, SCIP_Real newval)
void SCIPsortIntReal(int *intarray, SCIP_Real *realarray, int len)
assert(minobj< SCIPgetCutoffbound(scip))
interface methods for specific LP solvers
static void SCIPdecodeDualBitNeg(const SCIP_DUALPACKET *inp, int *out, int count)
static SCIP_RETCODE setBase(SCIP_LPI *lpi)
static void lpistatePack(SCIP_LPISTATE *lpistate, const int *cstat, const int *rstat)
static SCIP_RETCODE getDblParam(SCIP_LPI *lpi, const char *param, double *p)
static SCIP_RETCODE getBase(SCIP_LPI *lpi, SCIP_Bool *success)
static void lpistateUnpack(const SCIP_LPISTATE *lpistate, int *cstat, int *rstat)
static int rowpacketNum(int nrows)
static SCIP_RETCODE reconvertSides(SCIP_LPI *lpi, int firstrow, int lastrow, SCIP_Real *lhs, SCIP_Real *rhs)
static SCIP_RETCODE addRangeVars(SCIP_LPI *lpi)
static void copyParameterValues(GRBPARAM *dest, const GRBPARAM *source)
SCIP_DUALPACKET ROWPACKET
static SCIP_RETCODE ensureCstatMem(SCIP_LPI *lpi, int num)
static GRBenv * reusegrbenv
static SCIP_RETCODE getIntParam(SCIP_LPI *lpi, const char *param, int *p)
static void checkRangeInfo(SCIP_LPI *lpi)
static SCIP_RETCODE ensureRngrowmapMem(SCIP_LPI *lpi, int num)
static SCIP_RETCODE convertSides(SCIP_LPI *lpi, int nrows, const SCIP_Real *lhs, const SCIP_Real *rhs, int *rngcount)
static SCIP_RETCODE delRangeVars(SCIP_LPI *lpi)
static void lpistateFree(SCIP_LPISTATE **lpistate, BMS_BLKMEM *blkmem)
SCIP_DUALPACKET COLPACKET
static SCIP_RETCODE restoreLPData(SCIP_LPI *lpi)
static void SCIPencodeDualBitNeg(const int *inp, SCIP_DUALPACKET *out, int count)
#define CHECK_ZERO(messagehdlr, x)
static const double dblparammin[NUMDBLPARAM]
#define SCIP_DUALPACKETSIZE
static SCIP_RETCODE ensureRstatMem(SCIP_LPI *lpi, int num)
static int colpacketNum(int ncols)
static SCIP_RETCODE ensureRngrowsMem(SCIP_LPI *lpi, int num)
static SCIP_RETCODE setParameterValues(SCIP_LPI *lpi, GRBPARAM *grbparam)
static SCIP_RETCODE ensureSidechgMem(SCIP_LPI *lpi, int num)
static const char * dblparam[NUMDBLPARAM]
static SCIP_RETCODE getParameterValues(SCIP_LPI *lpi, GRBPARAM *grbparam)
static void clearRangeInfo(SCIP_LPI *lpi)
static const char grbname[]
static SCIP_RETCODE addRangeInfo(SCIP_LPI *lpi, int rngcount, int firstrow)
static const char * intparam[NUMINTPARAM]
#define CHECK_ZERO_STAR(messagehdlr, x)
static SCIP_RETCODE setIntParam(SCIP_LPI *lpi, const char *param, int parval)
static SCIP_RETCODE checkParameterValues(SCIP_LPI *lpi)
static SCIP_RETCODE lpistateCreate(SCIP_LPISTATE **lpistate, BMS_BLKMEM *blkmem, int ncols, int nrows, int nrngrows)
static SCIP_RETCODE setDblParam(SCIP_LPI *lpi, const char *param, double parval)
static void invalidateSolution(SCIP_LPI *lpi)
#define GRB_REFACTORMAXITERS
unsigned int SCIP_DUALPACKET
static SCIP_RETCODE ensureValMem(SCIP_LPI *lpi, int num)
SCIP_DUALPACKET ROWPACKET
SCIP_DUALPACKET COLPACKET
#define BMSfreeMemory(ptr)
#define BMSfreeBlockMemory(mem, ptr)
#define BMSallocBlockMemory(mem, ptr)
#define BMSreallocMemoryArray(ptr, num)
#define BMSfreeBlockMemoryArrayNull(mem, ptr, num)
#define BMSallocMemoryArray(ptr, num)
#define BMSfreeMemoryArray(ptr)
#define BMSallocBlockMemoryArray(mem, ptr, num)
#define BMSfreeBlockMemoryArray(mem, ptr, num)
#define BMSclearMemoryArray(ptr, num)
#define BMSallocClearMemoryArray(ptr, num)
struct BMS_BlkMem BMS_BLKMEM
#define BMSfreeMemoryArrayNull(ptr)
#define BMSallocMemory(ptr)
void SCIPmessagePrintWarning(SCIP_MESSAGEHDLR *messagehdlr, const char *formatstr,...)
public methods for message output
methods for sorting joint arrays of various types
static SCIP_RETCODE presolve(SCIP *scip, SCIP_Bool *unbounded, SCIP_Bool *infeasible, SCIP_Bool *vanished)
double dblparval[NUMDBLPARAM]
int intparval[NUMINTPARAM]
SCIP_MESSAGEHDLR * messagehdlr
@ SCIP_PRICING_STEEPQSTART
@ SCIP_PRICING_LPIDEFAULT
enum SCIP_Pricing SCIP_PRICING
enum SCIP_LPParam SCIP_LPPARAM
@ SCIP_LPSOLQUALITY_EXACTCONDITION
@ SCIP_LPSOLQUALITY_ESTIMCONDITION
@ SCIP_LPPAR_BARRIERCONVTOL
@ SCIP_LPPAR_CONDITIONLIMIT
enum SCIP_LPSolQuality SCIP_LPSOLQUALITY
enum SCIP_ObjSen SCIP_OBJSEN
enum SCIP_Retcode SCIP_RETCODE