37#ifdef SCIP_WITH_EXACTSOLVE
38#include "rectlu/rectlu.h"
77 return (n > 0) && ((n & (n - 1)) == 0);
95 for(
i = 0;
i < lp->
ncols && feasible;
i++ )
116#ifdef SCIP_WITH_EXACTSOLVE
127 for(
int i = 0;
i < lpexact->
nrows; ++
i )
160 nrows = lpexact->
nrows;
161 ncols = lpexact->
ncols;
166 nextendedrows = projshiftdata->nextendedrows;
170 for(
i = 0;
i < nextendedrows;
i++ )
171 projshiftdata->includedrows[
i] = 0;
178 for(
i = 0;
i < nrows;
i++ )
181 projshiftdata->includedrows[
i] = 1;
183 projshiftdata->includedrows[nrows +
i] = 1;
185 for(
i = 0;
i < ncols;
i++ )
188 projshiftdata->includedrows[2*nrows +
i] = 1;
190 projshiftdata->includedrows[2*nrows + ncols +
i] = 1;
211 for(
i = 0;
i < nrows;
i++ )
214 projshiftdata->includedrows[
i] = 1;
216 projshiftdata->includedrows[nrows +
i] = 1;
218 for(
i = 0;
i < ncols;
i++ )
221 projshiftdata->includedrows[2*nrows +
i] = 1;
223 projshiftdata->includedrows[2*nrows + ncols +
i] = 1;
236 for(
i = 0;
i < nrows;
i++ )
239 projshiftdata->includedrows[
i] = 1;
241 projshiftdata->includedrows[nrows +
i] = 1;
245 for(
i = 0;
i < ncols;
i++ )
248 projshiftdata->includedrows[2*nrows +
i] = 1;
250 projshiftdata->includedrows[2*nrows + ncols +
i] = 1;
255 SCIPerrorMessage(
"Invalid value for parameter psfpdualcolwiseselection \n");
268#if defined(SCIP_WITH_GMP) && defined(SCIP_WITH_EXACTSOLVE)
288 nrows = lpexact->
nrows;
289 ncols = lpexact->
ncols;
290 nextendedrows = projshiftdata->nextendedrows;
291 nnonz = getNNonz(lpexact);
292 projindsize = 2*nnonz + 2*ncols;
309 for(
i = 0;
i < nextendedrows;
i++ )
311 if( projshiftdata->includedrows[
i] )
313 projshiftdata->projshiftbasis[pos] =
i;
317 projshiftdata->projshiftbasisdim = pos;
321 for(
i = 0;
i < nextendedrows;
i++ )
328 for( j = 0; j < projlen[
i]; j++ )
336 else if(
i < 2 * nrows )
338 projlen[
i] = lpexact->
rows[
i - nrows]->
len;
340 for(j = 0; j < projlen[
i]; j++)
348 else if(
i < 2*nrows + ncols )
352 projind[pos] =
i - 2*nrows;
361 projind[pos] =
i - (2*nrows + ncols);
367#ifdef SCIP_DEBUG_PS_OUT
368 printf(
"factoring matrix: ncols=%d, projshiftbasisdim=%d\n", ncols, projshiftdata->projshiftbasisdim);
369 for(
i = 0;
i < nextendedrows;
i++ )
370 printf(
" j=%d:\t projbeg=<%d>,\t projlen=<%d>\n",
i, projbeg[
i], projlen[
i]);
372 for(
i = 0;
i < projindsize;
i++ )
374 printf(
" i=%d:\t projind=<%d>,\t projval=<",
i, projind[
i]);
385 SCIPrationalSetGMPArray(projvalgmp, projval, projindsize);
388 if( RECTLUbuildFactorization(&projshiftdata->rectfactor, ncols, projshiftdata->projshiftbasisdim,
389 projshiftdata->projshiftbasis, projvalgmp, projind, projbeg, projlen) != 0 )
391 projshiftdata->projshiftdatafail =
TRUE;
392 SCIPdebugMessage(
"factorization of matrix for project-and-shift method failed.\n");
393#ifdef SCIP_DEBUG_PS_OUT
394 printf(
" matrix factorization complete: failed\n");
399#ifdef SCIP_DEBUG_PS_OUT
400 printf(
" matrix factorization complete: correct termination\n");
404 SCIPrationalClearArrayGMP(projvalgmp, projindsize);
413#ifdef SCIP_DEBUG_PS_OUT
414 printf(
" matrix factorization skipped: no GMP or EXACTSOLVE\n");
460 for(
i = 0;
i < nrows;
i++ )
462 if( dvarincidence[
i] )
468 for(
i = 0;
i < nrows;
i++ )
470 if( dvarincidence[nrows +
i] )
476 for(
i = 0;
i < ncols;
i++ )
478 if( dvarincidence[2*nrows +
i] )
484 for(
i = 0;
i < ncols;
i++ )
486 if( dvarincidence[2*nrows + ncols +
i])
515 for(
i = 0;
i < ndvarmap;
i ++ )
520 for(
i = 0;
i < ndvarmap;
i++ )
529 for(
i = 0;
i < ncols;
i++ )
534 for(
i = 0;
i < projshiftdata->projshiftbasisdim;
i++ )
543 for(
i = 0;
i < psnrows;
i++ )
545 for(
i = 0;
i < ndvarmap;
i++ )
552 for( j = 0; j < lpexact->
rows[indx]->
len; j++ )
559 if ( indx < 2*nrows + ncols )
562 indx -= (2*nrows + ncols);
566 for(
i = 0;
i < projshiftdata->projshiftbasisdim;
i++ )
568 pslen[ncols +
i] = 2;
572 for(
i = 0;
i < psnrows;
i++ )
580 for(
i = 0;
i < ncols;
i++ )
582 for(
i = 0;
i < ndvarmap;
i++ )
589 for(j = 0; j < lpexact->
rows[indx]->
len; j++)
602 if ( indx < 2*nrows + ncols )
605 indx -= (2*nrows + ncols);
606 pos = psbeg[indx] + pslen[indx];
608 if( dvarmap[
i] < 2*nrows + ncols)
617 for(
i = 0;
i < ndvarmap;
i++ )
620 if( projshiftdata->includedrows[indx] )
622 psind[psbeg[pos]] =
i;
624 psind[psbeg[pos] + 1] = psncols - 1;
636int computeProjectShiftNnonz(
643 int nrows = lpexact->
nrows;
644 int ncols = lpexact->
ncols;
646 for(
i = 0;
i < nrows;
i++ )
648 if( dvarincidence[
i] )
650 if( dvarincidence[nrows +
i] )
653 for(
i = 0;
i < ncols;
i++ )
655 if( dvarincidence[2*nrows +
i] )
657 if( dvarincidence[2*nrows + ncols +
i] )
692 pslpiexact = projshiftdata->lpiexact;
693 if( pslpiexact ==
NULL )
695 projshiftdata->projshiftdatafail =
TRUE;
699 ncols = lpexact->
ncols;
701 dvarmap = projshiftdata->dvarmap;
702 ndvarmap = projshiftdata->ndvarmap;
704 assert(psncols == ndvarmap + 1);
736 for(
i = 0;
i < ncols;
i++ )
754 if(
set->istimelimitfinite )
756 if( lptimelimit > 0.0 )
764 projshiftdata->projshiftdatafail =
TRUE;
784 SCIPdebugMessage(
" --> project-and-shift failed to find interior point/ray\n");
789 for(
i = 0;
i < ndvarmap;
i++ )
797 projshiftdata->projshifthaspoint =
TRUE;
799 projshiftdata->projshifthasray =
TRUE;
806 projshiftdata->projshiftdatafail =
TRUE;
808 if( findintpoint && projshiftdata->projshifthaspoint )
812 for(
i = 0;
i < ndvarmap;
i++ )
815 else if( !findintpoint && projshiftdata->projshifthasray )
819 for(
i = 0;
i < ndvarmap;
i++ )
825 if( projshiftdata->projshiftdatafail || (projshiftdata->projshifthaspoint && projshiftdata->projshifthasray) )
839 projshiftdata->lpiexact =
NULL;
897 char ** colnames =
NULL;
912 if( projshiftdata->lpiexact !=
NULL )
916 lpcols = lpexact->
cols;
917 nrows = lpexact->
nrows;
918 ncols = lpexact->
ncols;
920 nextendedrows = projshiftdata->nextendedrows;
934 for(
i = 0;
i < nextendedrows;
i++ )
935 dvarincidence[
i] = 0;
936 for(
i = 0;
i < nrows;
i++ )
939 dvarincidence[
i] = 1;
941 dvarincidence[nrows +
i] = 1;
943 for(
i = 0;
i < ncols;
i++ )
946 dvarincidence[2*nrows +
i] = 1;
948 dvarincidence[2*nrows + ncols +
i] = 1;
953 for(
i = 0;
i < nextendedrows;
i++ )
960 for(
i = 0;
i < nextendedrows;
i++ )
969 projshiftdata->dvarmap = dvarmap;
970 projshiftdata->ndvarmap = ndvarmap;
973 psncols = ndvarmap + 1;
974 psnrows = ncols + projshiftdata->projshiftbasisdim;
975 psnnonz = computeProjectShiftNnonz(lpexact, dvarincidence);
976 psnnonz += 2*projshiftdata->projshiftbasisdim;
990 for(
i = 0;
i < psncols;
i++ )
1009 SCIP_CALL( setupProjectShiftOpt(lp, lpexact,
set, prob, psobj, psub, pslb, pslhs, psrhs, psval,
1010 pslen, psind, psbeg, dvarincidence, dvarmap,
alpha, beta, tmp, psnrows, psnnonz,
1011 psncols, ndvarmap, nrows, ncols) );
1015 projshiftdata->lpiexact = pslpiexact;
1024 for(
i = psncols - 1;
i >= 0;
i-- )
1070 if( projshiftdata->lpiexact !=
NULL )
1082 projshiftdata->nextendedrows = 2*lpexact->
nrows + 2*lpexact->
ncols;
1083 assert(projshiftdata->nextendedrows > 1);
1086 SCIP_CALL( projectShiftChooseDualSubmatrix(lp, lpexact,
set, stat, messagehdlr, eventqueue, prob, blkmem) );
1089 SCIP_CALL( projectShiftFactorizeDualSubmatrix(lpexact,
set, blkmem) );
1091 SCIP_CALL( projectShiftConstructLP(lp, lpexact,
set, prob, blkmem) );
1132 if( projshiftdata->projshiftdatacon )
1136 projshiftdata->projshiftdatacon =
TRUE;
1144 if( !projshiftdata->projshiftdatafail )
1146 if( projshiftdata->projshiftuseintpoint )
1150 SCIP_CALL( projectShiftComputeSintPointRay(lpexact,
set, stat, blkmem,
TRUE) );
1155 SCIP_CALL( projectShiftComputeSintPointRay(lpexact,
set, stat, blkmem,
FALSE) );
1159 if( !projshiftdata->projshifthaspoint && !projshiftdata->projshifthasray )
1160 projshiftdata->projshiftdatafail =
TRUE;
1162 projshiftdata->projshiftdatafail =
FALSE;
1166 projshiftdata->violationsize = lpexact->
ncols;
1201 mpq_t* violationgmp =
NULL;
1202 mpq_t* correctiongmp =
NULL;
1234 if( !projshiftdata->projshiftdatacon )
1236 SCIP_CALL( constructProjectShiftData(lpexact,
set, stat, blkmem) );
1239 assert(projshiftdata->projshiftdatacon);
1242 if( projshiftdata->projshiftdatafail || (usefarkas && !projshiftdata->projshifthasray) )
1265 if( !usefarkas && projshiftdata->projshiftuseintpoint && projshiftdata->projshifthaspoint )
1266 useinteriorpoint =
TRUE;
1267 else if( projshiftdata->projshifthasray )
1269 useinteriorpoint =
FALSE;
1289 nextendedrows = projshiftdata->nextendedrows;
1290 nrows = lpexact->
nrows;
1291 ncols = lpexact->
ncols;
1292 nrowsps = projshiftdata->nextendedrows/2 - ncols;
1293 shift = nrows - nrowsps;
1295 assert(ncols == projshiftdata->violationsize);
1299 violation = projshiftdata->violation;
1300 correction = projshiftdata->correction;
1302 for(
i = 0;
i < nrows + ncols; ++
i )
1313 for(
i = 0;
i < nextendedrows; ++
i )
1324 for(
i = 0;
i < nrows;
i++ )
1352 for(
i = 0;
i < ncols;
i++ )
1374 isupper[
i+nrows] =
FALSE;
1376 isupper[
i+nrows] =
TRUE;
1380 for(
i = 0;
i < nrows + ncols;
i++ )
1393#ifdef SCIP_DEBUG_PS_OUT
1394 printf(
"approximate dual solution:\n");
1397 for(
i = 0;
i < nrows + ncols;
i++ )
1424 for(
i = 0;
i < ncols;
i++ )
1440 for(
i = 0;
i < nrows;
i++ )
1442 for( j = 0; j < lpexact->
rows[
i]->
len; j++)
1451#ifdef SCIP_DEBUG_PS_OUT
1452 printf(
"violation of solution:\n");
1453 for(
i = 0;
i < ncols;
i++ )
1455 printf(
" i=%d: ",
i);
1463 for(
i = 0;
i < ncols && isfeas;
i++ )
1475 SCIPrationalSetGMPArray(violationgmp, violation, ncols);
1477 for (
i = 0;
i < nextendedrows;
i++)
1479 mpq_init(correctiongmp[
i]);
1482#if defined SCIP_WITH_GMP && defined SCIP_WITH_EXACTSOLVE
1483 rval = RECTLUsolveSystem(projshiftdata->rectfactor, ncols, nextendedrows, violationgmp, correctiongmp);
1500 SCIPrationalSetArrayGMP(correction, correctiongmp, nextendedrows);
1502#ifdef SCIP_DEBUG_PS_OUT
1503 printf(
"correction of solution:\n");
1504 for(
i = 0;
i < projshiftdata->projshiftbasisdim;
i++ )
1506 printf(
" i=%d: ",
i);
1508 printf(
", position=%d\n", projshiftdata->projshiftbasis[
i]);
1515 for(
i = 0;
i < projshiftdata->projshiftbasisdim;
i++ )
1518 int map = projshiftdata->projshiftbasis[
i];
1529 else if( map < 2 * nrowsps )
1531 if( isupper[map - nrowsps] )
1538 else if( map < 2 * nrowsps + ncols )
1540 if( !isupper[map - nrowsps + shift] )
1549 if( isupper[map - nrowsps - ncols + shift] )
1551 SCIPrationalDiff(correction[
i], correction[
i], dualsol[map - nrowsps - ncols + shift]);
1557#ifdef SCIP_DEBUG_PS_OUT
1558 printf(
"updated dual solution:\n");
1559 for(
i = 0;
i < projshiftdata->projshiftbasisdim;
i++ )
1561 printf(
" i=%d: ",
i);
1563 printf(
", position=%d\n", projshiftdata->projshiftbasis[
i]);
1567 if( useinteriorpoint )
1578 for(
i = 0;
i < projshiftdata->projshiftbasisdim;
i++ )
1582 int map = projshiftdata->projshiftbasis[
i];
1598 for(
i = 0;
i < projshiftdata->projshiftbasisdim;
i++ )
1600 int map = projshiftdata->projshiftbasis[
i];
1610#ifdef SCIP_DEBUG_PS_OUT
1611 printf(
"transformed projected dual solution:\n");
1613 for(
i = 0;
i < nrows + ncols;
i++ )
1615 printf(
" i=%d: ",
i);
1620 printf(
" lambda1: ");
1626 for(
i = 0;
i < projshiftdata->projshiftbasisdim;
i++ )
1628 int map = projshiftdata->projshiftbasis[
i];
1631 else if( map < 2 * nrowsps )
1632 SCIPrationalDiff(dualsol[map - nrowsps], dualsol[map - nrowsps], correction[
i]);
1633 else if ( map < 2 * nrowsps + ncols )
1634 SCIPrationalAdd(dualsol[map - nrowsps + shift], dualsol[map - nrowsps + shift], correction[
i]);
1636 SCIPrationalDiff(dualsol[map - nrowsps - ncols + shift], dualsol[map - nrowsps - ncols + shift], correction[
i]);
1639#ifdef SCIP_DEBUG_PS_OUT
1640 printf(
"transformed projected dual solution:\n");
1642 for(
i = 0;
i < nrows + ncols;
i++ )
1644 printf(
" i=%d: ",
i);
1649 printf(
" lambda1: ");
1657 for(
i = 0;
i < nrows + ncols;
i++ )
1661 for(
i = 0;
i < nrows + ncols;
i++ )
1669 map = (
i < nrowsps) ?
i + nrowsps :
i + nrowsps + ncols - shift;
1670 SCIPrationalMult(tmp, useinteriorpoint ? projshiftdata->interiorpoint[map] : projshiftdata->interiorray[map], lambda2);
1672 map = (
i < nrowsps) ?
i :
i + nrowsps - shift;
1673 SCIPrationalMult(tmp, useinteriorpoint ? projshiftdata->interiorpoint[map] : projshiftdata->interiorray[map], lambda2);
1678#ifdef SCIP_DEBUG_PS_OUT
1679 printf(
"projected and shifted dual solution (should be an exact dual feasible solution)\n");
1680 for(
i = 0;
i < nrows+ncols;
i++ )
1692 for(
i = 0;
i < ncols;
i++ )
1699 for(
i = 0;
i < nrows;
i++ )
1706 for( j = 0; j < lpexact->
rows[
i]->
len; j++ )
1713 for(
i = 0;
i < ncols;
i++ )
1723 for(
i = 0;
i < ncols && rval == 0;
i++ )
1737 for(
i = 0;
i < nrows + ncols;
i++ )
1756 for(
i = nrows;
i < ncols + nrows;
i++ )
1769 *safebound = computedbound;
1778 *safebound = computedbound;
1804#ifdef SCIP_DEBUG_PS_OUT
1824 if( correctiongmp !=
NULL )
1826 SCIPrationalClearArrayGMP(correctiongmp, nextendedrows);
1829 if( violationgmp !=
NULL )
1831 SCIPrationalClearArrayGMP(violationgmp, ncols);
1856char chooseInitialBoundingMethod(
1863 char dualboundmethod;
1872 dualboundmethod =
'e';
1875 dualboundmethod =
'e';
1881 dualboundmethod =
'e';
1885 else if(
set->exact_safedbmethod !=
'a' )
1887 dualboundmethod =
set->exact_safedbmethod;
1897 interleavecutoff = (
set->exact_interleavedbstrat == 1 ||
set->exact_interleavedbstrat == 3)
1900 if( (interleavedepth || interleavecutoff) && lpexact->
allowexactsolve )
1902 if( interleavedepth )
1906 dualboundmethod =
'e';
1912 dualboundmethod =
'n';
1915 dualboundmethod =
'p';
1918 dualboundmethod =
'e';
1922 assert(dualboundmethod !=
'u');
1924 return dualboundmethod;
1929char chooseFallbackBoundingMethod(
1932 char lastboundmethod
1935 char dualboundmethod;
1940 switch( lastboundmethod )
1948 dualboundmethod =
'e';
1955 dualboundmethod =
'n';
1963 dualboundmethod =
't';
1967 return dualboundmethod;
1972char chooseBoundingMethod(
1977 char lastboundmethod
1983 if( lastboundmethod ==
'u' )
1984 return chooseInitialBoundingMethod(lpexact,
set, stat, prob);
1986 return chooseFallbackBoundingMethod(lpexact,
set, lastboundmethod);
2051 SCIPdebugMessage(
"calling proved bound for %s LP\n", usefarkas ?
"infeasible" :
"feasible");
2061 SCIPdebugMessage(
"productsidedualval interval computation with vectors:\n");
2064 for( j = 0; j < lp->
nrows; ++j )
2099 SCIPdebugMessage(
" j=%d: b=[%g,%g] (lhs=%g, rhs=%g, const=%g, fpdual=%g)\n", j, rhslhsrow[j].inf, rhslhsrow[j].sup, row->
lhs,
2109 for( j = 0; j < lp->
ncols; ++j )
2129 rowexact = colexact->
rows[
i];
2135 fpdualcolwise[
i] = fpdual[colexact->
rows[
i]->
lppos];
2137 productcoldualval[j].
inf = 0.0;
2138 productcoldualval[j].
sup = 0.0;
2152 for( j = 0; j < lp->
ncols; ++j )
2174 if( productcoldualval[j].inf +
obj[j].inf != 0 || productcoldualval[j].sup +
obj[j].sup != 0 )
2176 SCIPdebugMessage(
"trying bound shift with unbounded column variable. Column %d, lb: %e, ub %e \n",
2179 productcoldualval[j].inf +
obj[j].inf, productcoldualval[j].sup +
obj[j].sup);
2213 *safebound = computedbound;
2214 if( computedbound <= 0.0 )
2235 *safebound = computedbound;
2244 *safebound = computedbound;
2259 for( j = 0; j < lpexact->
nrows; j++ )
2267 for( j = 0; j < lpexact->
ncols; j++ )
2269 colexact = lpexact->
cols[j];
2320#ifdef SCIP_WITH_BOOST
2321 char dualboundmethod;
2322 char lastboundmethod;
2327 if( !
set->exact_enable )
2333 lastboundmethod =
'u';
2334 shouldabort =
FALSE;
2345 SCIP_CALL( constructProjectShiftDataLPIExact(lp, lpexact,
set, stat, messagehdlr, eventqueue, prob,
2352 dualboundmethod = chooseBoundingMethod(lpexact,
set, stat, prob, lastboundmethod);
2353 SCIPdebugMessage(
"Computing safe bound for LP with status %d using bounding method %c\n",
2364 switch( dualboundmethod )
2369 SCIP_CALL( boundShift(lp, lpexact,
set, blkmem, stat, eventqueue,
2370 prob, usefarkas, safebound) );
2372 #ifdef SCIP_WITH_GMP
2376 SCIP_CALL( projectShift(lp, lpexact,
set, stat, messagehdlr, eventqueue,
2377 prob, blkmem, usefarkas, safebound) );
2383 prob,
set->lp_iterlim,
lperror, usefarkas) );
2399 SCIPerrorMessage(
"bounding method %c not implemented yet \n", dualboundmethod);
2404 lastboundmethod = dualboundmethod;
2409 SCIPdebugMessage(
"failed safe bounding call after %d attempts to compute safe bound\n", nattempts);
2428 *dualfeasible =
TRUE;
void SCIPclockStop(SCIP_CLOCK *clck, SCIP_SET *set)
void SCIPclockStart(SCIP_CLOCK *clck, SCIP_SET *set)
SCIP_Real SCIPclockGetTime(SCIP_CLOCK *clck)
internal methods for clocks and timing issues
SCIP_RETCODE SCIPlpiExactSetRealpar(SCIP_LPIEXACT *lpi, SCIP_LPPARAM type, SCIP_Real dval)
SCIP_RETCODE SCIPlpiExactSolveDual(SCIP_LPIEXACT *lpi)
SCIP_RETCODE SCIPlpiExactSetIntpar(SCIP_LPIEXACT *lpi, SCIP_LPPARAM type, int ival)
SCIP_Real SCIPlpiExactInfinity(SCIP_LPIEXACT *lpi)
SCIP_RETCODE SCIPlpiExactAddRows(SCIP_LPIEXACT *lpi, int nrows, SCIP_RATIONAL **lhs, SCIP_RATIONAL **rhs, char **rownames, int nnonz, int *beg, int *ind, SCIP_RATIONAL **val)
SCIP_RETCODE SCIPlpiExactCreate(SCIP_LPIEXACT **lpi, SCIP_MESSAGEHDLR *messagehdlr, const char *name, SCIP_OBJSEN objsen)
SCIP_Bool SCIPlpiExactIsOptimal(SCIP_LPIEXACT *lpi)
SCIP_RETCODE SCIPlpiExactAddCols(SCIP_LPIEXACT *lpi, int ncols, SCIP_RATIONAL **obj, SCIP_RATIONAL **lb, SCIP_RATIONAL **ub, char **colnames, int nnonz, int *beg, int *ind, SCIP_RATIONAL **val)
SCIP_RETCODE SCIPlpiExactDelCols(SCIP_LPIEXACT *lpi, int firstcol, int lastcol)
SCIP_RETCODE SCIPlpiExactChgObj(SCIP_LPIEXACT *lpi, int ncols, int *ind, SCIP_RATIONAL **obj)
SCIP_RETCODE SCIPlpiExactClear(SCIP_LPIEXACT *lpi)
SCIP_RETCODE SCIPlpiExactFree(SCIP_LPIEXACT **lpi)
SCIP_RETCODE SCIPlpiExactGetNCols(SCIP_LPIEXACT *lpi, int *ncols)
SCIP_RETCODE SCIPlpiExactChgSides(SCIP_LPIEXACT *lpi, int nrows, int *ind, SCIP_RATIONAL **lhs, SCIP_RATIONAL **rhs)
SCIP_RETCODE SCIPlpiExactDelRows(SCIP_LPIEXACT *lpi, int firstrow, int lastrow)
SCIP_RETCODE SCIPlpiExactGetNRows(SCIP_LPIEXACT *lpi, int *nrows)
SCIP_RETCODE SCIPlpiExactChgBounds(SCIP_LPIEXACT *lpi, int ncols, int *ind, SCIP_RATIONAL **lb, SCIP_RATIONAL **ub)
SCIP_RETCODE SCIPlpiExactGetSol(SCIP_LPIEXACT *lpi, SCIP_RATIONAL *objval, SCIP_RATIONAL **primsol, SCIP_RATIONAL **dualsol, SCIP_RATIONAL **activity, SCIP_RATIONAL **redcost)
SCIP_Bool SCIPlpiIsInfinity(SCIP_LPI *lpi, SCIP_Real val)
void SCIPwarningMessage(SCIP *scip, const char *formatstr,...)
SCIP_Bool SCIPisCertified(SCIP *scip)
SCIP_VAR * SCIPcolGetVar(SCIP_COL *col)
int SCIPcolGetIndex(SCIP_COL *col)
SCIP_Real SCIPcolGetLb(SCIP_COL *col)
SCIP_Real SCIPcolGetPrimsol(SCIP_COL *col)
SCIP_Real SCIPcolGetUb(SCIP_COL *col)
SCIP_Real SCIPintervalGetInf(SCIP_INTERVAL interval)
void SCIPintervalScalprodScalars(SCIP_Real infinity, SCIP_INTERVAL *resultant, int length, SCIP_INTERVAL *operand1, SCIP_Real *operand2)
void SCIPintervalSet(SCIP_INTERVAL *resultant, SCIP_Real value)
void SCIPintervalSetBounds(SCIP_INTERVAL *resultant, SCIP_Real inf, SCIP_Real sup)
struct SCIP_Interval SCIP_INTERVAL
void SCIPintervalAddVectors(SCIP_Real infinity, SCIP_INTERVAL *resultant, int length, SCIP_INTERVAL *operand1, SCIP_INTERVAL *operand2)
SCIP_Real SCIPintervalGetSup(SCIP_INTERVAL interval)
void SCIPintervalAdd(SCIP_Real infinity, SCIP_INTERVAL *resultant, SCIP_INTERVAL operand1, SCIP_INTERVAL operand2)
void SCIPintervalScalprod(SCIP_Real infinity, SCIP_INTERVAL *resultant, int length, SCIP_INTERVAL *operand1, SCIP_INTERVAL *operand2)
void SCIPrationalMin(SCIP_RATIONAL *res, SCIP_RATIONAL *op1, SCIP_RATIONAL *op2)
SCIP_RETCODE SCIPrationalCreateBlock(BMS_BLKMEM *blkmem, SCIP_RATIONAL **rational)
void SCIPrationalMult(SCIP_RATIONAL *res, SCIP_RATIONAL *op1, SCIP_RATIONAL *op2)
void SCIPrationalPrint(SCIP_RATIONAL *rational)
void SCIPrationalSetInfinity(SCIP_RATIONAL *res)
void SCIPrationalAdd(SCIP_RATIONAL *res, SCIP_RATIONAL *op1, SCIP_RATIONAL *op2)
SCIP_Real SCIPrationalGetReal(SCIP_RATIONAL *rational)
void SCIPrationalFreeBlock(BMS_BLKMEM *mem, SCIP_RATIONAL **rational)
SCIP_RETCODE SCIPrationalCreateBlockArray(BMS_BLKMEM *mem, SCIP_RATIONAL ***rational, int size)
#define SCIPrationalDebugMessage
void SCIPrationalDiv(SCIP_RATIONAL *res, SCIP_RATIONAL *op1, SCIP_RATIONAL *op2)
SCIP_Bool SCIPrationalIsAbsInfinity(SCIP_RATIONAL *rational)
void SCIPrationalSetReal(SCIP_RATIONAL *res, SCIP_Real real)
void SCIPrationalFreeBuffer(BMS_BUFMEM *bufmem, SCIP_RATIONAL **rational)
void SCIPrationalDiff(SCIP_RATIONAL *res, SCIP_RATIONAL *op1, SCIP_RATIONAL *op2)
SCIP_Bool SCIPrationalIsLEReal(SCIP_RATIONAL *rat, SCIP_Real real)
SCIP_Bool SCIPrationalIsPositive(SCIP_RATIONAL *rational)
SCIP_RETCODE SCIPrationalCreateBuffer(BMS_BUFMEM *bufmem, SCIP_RATIONAL **rational)
SCIP_Bool SCIPrationalIsZero(SCIP_RATIONAL *rational)
void SCIPrationalSetRational(SCIP_RATIONAL *res, SCIP_RATIONAL *src)
SCIP_Bool SCIPrationalIsGEReal(SCIP_RATIONAL *rat, SCIP_Real real)
void SCIPrationalMax(SCIP_RATIONAL *res, SCIP_RATIONAL *op1, SCIP_RATIONAL *op2)
void SCIPrationalCanonicalize(SCIP_RATIONAL *rational)
void SCIPrationalSetFraction(SCIP_RATIONAL *res, SCIP_Longint nom, SCIP_Longint denom)
void SCIPrationalNegate(SCIP_RATIONAL *res, SCIP_RATIONAL *op)
SCIP_Bool SCIPrationalIsNegative(SCIP_RATIONAL *rational)
SCIP_Bool SCIPrationalIsInfinity(SCIP_RATIONAL *rational)
SCIP_Real SCIPrationalRoundReal(SCIP_RATIONAL *rational, SCIP_ROUNDMODE_RAT roundmode)
SCIP_RETCODE SCIPrationalCreateBufferArray(BMS_BUFMEM *mem, SCIP_RATIONAL ***rational, int size)
SCIP_Bool SCIPrationalIsNegInfinity(SCIP_RATIONAL *rational)
SCIP_Bool SCIPrationalIsGTReal(SCIP_RATIONAL *rat, SCIP_Real real)
SCIP_Bool SCIPrationalIsEQ(SCIP_RATIONAL *rat1, SCIP_RATIONAL *rat2)
void SCIPrationalPrintf(const char *formatstr,...)
void SCIPrationalFreeBufferArray(BMS_BUFMEM *mem, SCIP_RATIONAL ***ratbufarray, int size)
SCIP_Real SCIProwGetLhs(SCIP_ROW *row)
SCIP_Real SCIProwGetRhs(SCIP_ROW *row)
SCIP_Real SCIProwGetDualfarkas(SCIP_ROW *row)
SCIP_Real SCIProwGetDualsol(SCIP_ROW *row)
int SCIPgetDepth(SCIP *scip)
SCIP_VARTYPE SCIPvarGetType(SCIP_VAR *var)
SCIP_INTERVAL SCIPvarGetObjInterval(SCIP_VAR *var)
const char * SCIPvarGetName(SCIP_VAR *var)
SCIP_RATIONAL * SCIPvarGetUbLocalExact(SCIP_VAR *var)
SCIP_RATIONAL * SCIPvarGetLbLocalExact(SCIP_VAR *var)
int SCIPsnprintf(char *t, int len, const char *s,...)
assert(minobj< SCIPgetCutoffbound(scip))
SCIP_Real SCIPlpGetLooseObjval(SCIP_LP *lp, SCIP_SET *set, SCIP_PROB *prob)
SCIP_Real SCIProwGetLPActivity(SCIP_ROW *row, SCIP_SET *set, SCIP_STAT *stat, SCIP_LP *lp)
SCIP_LPSOLSTAT SCIPlpGetSolstat(SCIP_LP *lp)
SCIP_Real SCIPlpGetObjval(SCIP_LP *lp, SCIP_SET *set, SCIP_PROB *prob)
SCIP_Real SCIPcolGetRedcost(SCIP_COL *col, SCIP_STAT *stat, SCIP_LP *lp)
SCIP_Bool SCIPlpIsSolved(SCIP_LP *lp)
SCIP_Real SCIPcolGetFarkasCoef(SCIP_COL *col, SCIP_STAT *stat, SCIP_LP *lp)
SCIP_COL ** SCIPlpGetCols(SCIP_LP *lp)
SCIP_Real SCIPlpGetCutoffbound(SCIP_LP *lp)
internal methods for LP management
SCIP_Bool SCIPlpExactProjectShiftPossible(SCIP_LPEXACT *lpexact)
SCIP_RETCODE SCIPlpExactLink(SCIP_LPEXACT *lpexact, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_EVENTQUEUE *eventqueue)
SCIP_RETCODE SCIPlpExactSolveAndEval(SCIP_LPEXACT *lpexact, SCIP_LP *lp, SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr, BMS_BLKMEM *blkmem, SCIP_STAT *stat, SCIP_EVENTQUEUE *eventqueue, SCIP_PROB *prob, SCIP_Longint itlim, SCIP_Bool *lperror, SCIP_Bool usefarkas)
void SCIProwExactPrint(SCIP_ROWEXACT *row, SCIP_MESSAGEHDLR *messagehdlr, FILE *file)
SCIP_RETCODE SCIPlpExactSyncLPs(SCIP_LPEXACT *lpexact, BMS_BLKMEM *blkmem, SCIP_SET *set)
SCIP_COLEXACT * SCIPcolGetColExact(SCIP_COL *col)
SCIP_RETCODE SCIPcolExactCalcFarkasRedcostCoef(SCIP_COLEXACT *col, SCIP_SET *set, SCIP_RATIONAL *result, SCIP_RATIONAL **dual, SCIP_Bool usefarkas)
SCIP_Bool SCIPlpExactBoundShiftUseful(SCIP_LPEXACT *lpexact)
void SCIPlpExactAllowExactSolve(SCIP_LPEXACT *lpexact, SCIP_SET *set, SCIP_Bool allowexact)
SCIP_RATIONAL * SCIPcolExactGetObj(SCIP_COLEXACT *col)
SCIP_RETCODE SCIPlpExactFlush(SCIP_LPEXACT *lpexact, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_EVENTQUEUE *eventqueue)
internal methods for exact LP management
SCIP_RETCODE SCIPlpExactComputeSafeBound(SCIP_LP *lp, SCIP_LPEXACT *lpexact, SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr, BMS_BLKMEM *blkmem, SCIP_STAT *stat, SCIP_EVENTQUEUE *eventqueue, SCIP_PROB *prob, SCIP_Bool *lperror, SCIP_Bool usefarkas, SCIP_Real *safebound, SCIP_Bool *primalfeasible, SCIP_Bool *dualfeasible)
safe exact rational bounding methods
interface methods for specific LP solvers
interface methods for specific exact LP solvers
#define BMSfreeBlockMemoryArrayNull(mem, ptr, num)
#define BMSallocBlockMemoryArray(mem, ptr, num)
#define BMSclearMemoryArray(ptr, num)
struct BMS_BlkMem BMS_BLKMEM
internal methods for collecting primal CIP solutions and primal informations
internal methods for storing and manipulating the main problem
public methods for message output
public data structures and miscellaneous methods
public methods for problem variables
wrapper for rational number arithmetic
wrapper for rational number arithmetic that interacts with GMP
public methods for certified solving
public methods for message handling
public methods for global and local (sub)problems
public methods for the branch-and-bound tree
internal methods for storing separated exact cuts
SCIP_Bool SCIPsetIsFeasPositive(SCIP_SET *set, SCIP_Real val)
SCIP_Bool SCIPsetIsGE(SCIP_SET *set, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPsetIsFeasFracIntegral(SCIP_SET *set, SCIP_Real val)
SCIP_Bool SCIPsetIsFeasNegative(SCIP_SET *set, SCIP_Real val)
SCIP_Bool SCIPsetIsFeasEQ(SCIP_SET *set, SCIP_Real val1, SCIP_Real val2)
SCIP_Real SCIPsetInfinity(SCIP_SET *set)
SCIP_Bool SCIPsetIsInfinity(SCIP_SET *set, SCIP_Real val)
SCIP_Real SCIPsetFeasFrac(SCIP_SET *set, SCIP_Real val)
internal methods for global SCIP settings
#define SCIPsetFreeBufferArray(set, ptr)
#define SCIPsetAllocBufferArray(set, ptr, num)
internal methods for problem statistics
SCIP_RATIONAL * farkascoef
SCIP_PROJSHIFTDATA * projshiftdata
SCIP_Bool wasforcedsafebound
SCIP_Bool boundshiftuseful
SCIP_Bool allowexactsolve
SCIP_Bool forceexactsolve
SCIP_Bool strongbranchprobing
SCIP_RATIONAL * dualfarkas
SCIP_INTERVAL * valsinterval
SCIP_Longint nfailboundshiftinf
SCIP_Longint nboundshiftinf
SCIP_Longint nprojshiftinf
SCIP_Real boundingerrorps
SCIP_Longint nfailprojshiftinf
SCIP_Longint nboundshiftobjlimfail
SCIP_CLOCK * provedinfeaspstime
SCIP_Longint nprojshiftobjlimfail
SCIP_Longint nprojshiftobjlim
SCIP_CLOCK * provedinfeasbstime
SCIP_Longint nexlpintfeas
SCIP_Real boundingerrorbs
SCIP_Longint nboundshiftobjlim
SCIP_CLOCK * provedfeaspstime
SCIP_Longint nfailboundshift
SCIP_Longint nexlpboundexc
SCIP_Longint nfailexlpinf
SCIP_Longint nfailprojshift
SCIP_CLOCK * provedfeasbstime
data structures for exact LP management
SCIP main data structure.
datastructures for global SCIP settings
struct SCIP_EventQueue SCIP_EVENTQUEUE
@ SCIP_LPSOLSTAT_NOTSOLVED
@ SCIP_LPSOLSTAT_TIMELIMIT
@ SCIP_LPSOLSTAT_UNBOUNDEDRAY
@ SCIP_LPSOLSTAT_INFEASIBLE
@ SCIP_LPSOLSTAT_OBJLIMIT
@ SCIP_LPSOLSTAT_ITERLIMIT
@ PS_DUALCOSTSEL_ACTIVE_EXLP
@ PS_DUALCOSTSEL_ACTIVE_FPLP
struct SCIP_ProjShiftData SCIP_PROJSHIFTDATA
struct SCIP_LpExact SCIP_LPEXACT
struct SCIP_RowExact SCIP_ROWEXACT
struct SCIP_ColExact SCIP_COLEXACT
struct SCIP_LPiExact SCIP_LPIEXACT
struct SCIP_Messagehdlr SCIP_MESSAGEHDLR
struct SCIP_Prob SCIP_PROB
struct SCIP_Rational SCIP_RATIONAL
enum SCIP_Retcode SCIP_RETCODE
struct SCIP_Stat SCIP_STAT
@ SCIP_VARTYPE_CONTINUOUS