39 #ifndef XPRS_LPQUICKPRESOLVE 40 #define XPRS_LPQUICKPRESOLVE 8207 44 #define XPRS_LP_OPTIMAL_SCALEDINFEAS 16 46 #define CHECK_ZERO(messagehdlr, x) { int _restat_; \ 47 if( (_restat_ = (x)) != 0 ) \ 49 SCIPmessagePrintWarning((messagehdlr), "LP Error: Xpress returned %d\n", _restat_); \ 50 return SCIP_LPERROR; \ 55 #define ABORT_ZERO(messagehdlr, retval, x) { int _restat_; \ 56 if( (_restat_ = (x)) != 0 ) \ 58 SCIPmessagePrintWarning((messagehdlr), "LP Error: Xpress returned %d\n", _restat_); \ 66 #define COLS_PER_PACKET SCIP_DUALPACKETSIZE 68 #define ROWS_PER_PACKET SCIP_DUALPACKETSIZE 136 (void)XPRSgetintattrib(lpi->
xprslp, XPRS_COLS, &ncols);
137 assert(0 <= firstcol && firstcol <= lastcol && lastcol < ncols);
150 (void)XPRSgetintattrib(lpi->
xprslp, XPRS_ROWS, &nrows);
151 assert(0 <= firstrow && firstrow <= lastrow && lastrow < nrows);
157 #define debugCheckColrang(lpi, firstcol, lastcol) 158 #define debugCheckRowrang(lpi, firstrow, lastrow) 325 assert(lpistate !=
NULL);
341 assert(lpistate !=
NULL);
358 assert(lpistate !=
NULL);
359 assert(blkmem !=
NULL);
377 assert(blkmem !=
NULL);
378 assert(lpistate !=
NULL);
379 assert(*lpistate !=
NULL);
403 return XPRS_OBJ_MAXIMIZE;
405 return XPRS_OBJ_MINIMIZE;
426 assert(lhss !=
NULL);
427 assert(rhss !=
NULL);
430 for( i = 0; i <
nrows; ++i )
432 assert(lhss[i] <= rhss[i]);
433 if( lhss[i] == rhss[i] )
435 assert(XPRS_MINUSINFINITY < rhss[i] && rhss[i] < XPRS_PLUSINFINITY);
440 else if( lhss[i] <= XPRS_MINUSINFINITY )
442 assert(XPRS_MINUSINFINITY < rhss[i] && rhss[i] < XPRS_PLUSINFINITY);
447 else if( rhss[i] >= XPRS_PLUSINFINITY )
449 assert(XPRS_MINUSINFINITY < lhss[i] && lhss[i] < XPRS_PLUSINFINITY);
459 lpi->
rngarray[i] = rhss[i] - lhss[i];
477 assert(lhss !=
NULL);
478 assert(rhss !=
NULL);
480 for( i = 0; i <
nrows; ++i )
490 lhss[i] = XPRS_MINUSINFINITY;
496 rhss[i] = XPRS_PLUSINFINITY;
509 assert(lhss[i] <= rhss[i]);
525 assert(lhss !=
NULL);
527 for( i = 0; i <
nrows; ++i )
538 lhss[i] = XPRS_MINUSINFINITY;
570 assert(rhss !=
NULL);
572 for( i = 0; i <
nrows; ++i )
588 rhss[i] = XPRS_PLUSINFINITY;
614 else if( lhs !=
NULL )
616 else if( rhs !=
NULL )
652 if( XPRSgetversion(version) == 0 )
653 sprintf(
xprsname,
"Xpress %s", version);
655 sprintf(
xprsname,
"Xpress %d", XPVERSION);
665 return "Linear Programming Solver developed by FICO (www.fico.com/xpress)";
676 return (
void*) lpi->
xprslp;
686 SCIPerrorMessage(
"SCIPlpiSetIntegralityInformation() has not been implemented yet.\n");
708 assert(
sizeof(
SCIP_Real) ==
sizeof(
double));
709 assert(
sizeof(
SCIP_Bool) ==
sizeof(
int));
728 strncpy((*lpi)->name, name, 200);
730 (*lpi)->larray =
NULL;
731 (*lpi)->uarray =
NULL;
732 (*lpi)->senarray =
NULL;
733 (*lpi)->rhsarray =
NULL;
734 (*lpi)->rngarray =
NULL;
735 (*lpi)->indarray =
NULL;
736 (*lpi)->valarray =
NULL;
737 (*lpi)->cstat =
NULL;
738 (*lpi)->rstat =
NULL;
739 (*lpi)->boundchgsize = 0;
740 (*lpi)->sidechgsize = 0;
742 (*lpi)->cstatsize = 0;
743 (*lpi)->rstatsize = 0;
744 (*lpi)->iterations = 0;
745 (*lpi)->solisbasic =
TRUE;
746 (*lpi)->clearstate =
FALSE;
747 (*lpi)->solmethod =
' ';
748 (*lpi)->par_lobjlim = -1e+40;
749 (*lpi)->par_uobjlim = +1e+40;
750 (*lpi)->par_fastlp = 0;
751 (*lpi)->par_presolve = 0;
754 CHECK_ZERO( messagehdlr, XPRScreateprob(&(*lpi)->xprslp) );
760 CHECK_ZERO( messagehdlr, XPRSsetintcontrol((*lpi)->xprslp, XPRS_OUTPUTLOG, 0) );
763 CHECK_ZERO( messagehdlr, XPRSloadlp((*lpi)->xprslp, (*lpi)->name, 0, 0,
NULL,
NULL,
NULL,
NULL, &zero,
NULL,
NULL,
NULL,
NULL,
NULL) );
777 assert(*lpi !=
NULL);
782 CHECK_ZERO( (*lpi)->messagehdlr, XPRSdestroyprob(((*lpi)->xprslp)) );
785 CHECK_ZERO( (*lpi)->messagehdlr, XPRSfree() );
834 SCIPdebugMessage(
"loading LP in column format into Xpress: %d cols, %d rows\n", ncols, nrows);
848 for( c = 0; c < ncols-1; ++c )
850 lpi->
indarray[c] = beg[c+1] - beg[c];
853 lpi->
indarray[ncols-1] = nnonz - beg[ncols-1];
854 assert(lpi->
indarray[ncols-1] >= 0);
889 assert(nnonz == 0 || beg !=
NULL);
890 assert(nnonz == 0 || ind !=
NULL);
891 assert(nnonz == 0 || val !=
NULL);
893 SCIPdebugMessage(
"adding %d columns with %d nonzeros to Xpress\n", ncols, nnonz);
907 for (j = 0; j < nnonz; ++j)
908 assert( 0 <= ind[j] && ind[j] < nrows );
916 for( c = 0; c <
ncols; c++ )
941 SCIPdebugMessage(
"deleting %d columns from Xpress\n", lastcol - firstcol + 1);
949 for( c = firstcol; c <= lastcol; c++ )
986 for( c = 0; c <
ncols; c++ )
996 dstat[c] = nkeptcols;
1021 assert(lpi !=
NULL);
1024 assert(lhs !=
NULL);
1025 assert(rhs !=
NULL);
1027 assert(nnonz == 0 || beg !=
NULL);
1028 assert(nnonz == 0 || ind !=
NULL);
1029 assert(nnonz == 0 || val !=
NULL);
1031 SCIPdebugMessage(
"adding %d rows with %d nonzeros to Xpress\n", nrows, nnonz);
1042 for (j = 0; j < nnonz; ++j)
1043 assert( 0 <= ind[j] && ind[j] < ncols );
1057 for( r = 0; r <
nrows; r++ )
1076 assert(lpi !=
NULL);
1081 SCIPdebugMessage(
"deleting %d rows from Xpress\n", lastrow - firstrow + 1);
1088 for( r = firstrow; r <= lastrow; r++ )
1109 assert(lpi !=
NULL);
1125 for( r = 0; r <
nrows; r++ )
1135 dstat[r] = nkeptrows;
1152 assert(lpi !=
NULL);
1157 CHECK_ZERO( lpi->
messagehdlr, XPRSloadlp(lpi->
xprslp, lpi->
name, 0, 0,
NULL,
NULL,
NULL,
NULL, &zero,
NULL,
NULL,
NULL,
NULL,
NULL) );
1173 assert(lpi !=
NULL);
1175 assert(ncols == 0 || (ind !=
NULL && lb !=
NULL && ub !=
NULL));
1181 for (j = 0; j <
ncols; ++j)
1185 SCIPerrorMessage(
"LP Error: fixing lower bound for variable %d to infinity.\n", ind[j]);
1190 SCIPerrorMessage(
"LP Error: fixing upper bound for variable %d to -infinity.\n", ind[j]);
1213 assert(lpi !=
NULL);
1242 assert(lpi !=
NULL);
1245 SCIPdebugMessage(
"changing coefficient row %d, column %d in Xpress to %g\n", row, col, newval);
1260 assert(lpi !=
NULL);
1280 assert(lpi !=
NULL);
1304 assert(lpi !=
NULL);
1306 assert(scaleval != 0.0);
1308 SCIPdebugMessage(
"scaling row %d with factor %g in Xpress\n", row, scaleval);
1319 for( i = 0; i < nnonz; ++i )
1325 if( lhs > XPRS_MINUSINFINITY )
1327 else if( scaleval < 0.0 )
1328 lhs = XPRS_PLUSINFINITY;
1329 if( rhs < XPRS_PLUSINFINITY )
1331 else if( scaleval < 0.0 )
1332 rhs = XPRS_MINUSINFINITY;
1334 if( scaleval > 0.0 )
1363 assert(lpi !=
NULL);
1365 assert(scaleval != 0.0);
1367 SCIPdebugMessage(
"scaling column %d with factor %g in Xpress\n", col, scaleval);
1381 for( i = 0; i < nnonz; ++i )
1391 if( lb > XPRS_MINUSINFINITY )
1393 else if( scaleval < 0.0 )
1394 lb = XPRS_PLUSINFINITY;
1395 if( ub < XPRS_PLUSINFINITY )
1397 else if( scaleval < 0.0 )
1398 ub = XPRS_MINUSINFINITY;
1400 if( scaleval > 0.0 )
1426 assert(lpi !=
NULL);
1428 assert(nrows !=
NULL);
1443 assert(lpi !=
NULL);
1445 assert(ncols !=
NULL);
1460 assert(lpi !=
NULL);
1462 assert(nnonz !=
NULL);
1487 assert(lpi !=
NULL);
1510 assert(beg !=
NULL);
1511 assert(ind !=
NULL);
1512 assert(val !=
NULL);
1525 assert(*nnonz <= ntotalnonz);
1526 assert(lpi->
indarray[lastcol-firstcol+1] == *nnonz);
1528 for( c = 0; c < lastcol-firstcol+1; c++ )
1533 assert(beg ==
NULL);
1534 assert(ind ==
NULL);
1535 assert(val ==
NULL);
1557 assert(lpi !=
NULL);
1566 assert(rhss !=
NULL);
1572 assert(rhss ==
NULL);
1579 assert(beg !=
NULL);
1580 assert(ind !=
NULL);
1581 assert(val !=
NULL);
1594 assert(*nnonz <= ntotalnonz);
1595 assert(lpi->
indarray[lastrow-firstrow+1] == *nnonz);
1597 for( r = 0; r < lastrow-firstrow+1; r++ )
1602 assert(beg ==
NULL);
1603 assert(ind ==
NULL);
1604 assert(val ==
NULL);
1617 int namestoragesize,
1632 int namestoragesize,
1652 if( xprsobjsen < 0.0 )
1668 assert(lpi !=
NULL);
1670 assert(firstcol <= lastcol);
1671 assert(vals !=
NULL);
1673 SCIPdebugMessage(
"getting objective values %d to %d\n", firstcol, lastcol);
1689 assert(lpi !=
NULL);
1691 assert(firstcol <= lastcol);
1717 assert(lpi !=
NULL);
1719 assert(firstrow <= lastrow);
1745 assert(lpi !=
NULL);
1768 int primalinfeasible;
1772 assert(lpi !=
NULL);
1805 if( lpi->
solstat == XPRS_LP_UNBOUNDED || lpi->
solstat == XPRS_LP_INFEAS )
1826 SCIPdebugMessage(
" -> Xpress returned solstat=%d, pinfeas=%d, dinfeas=%d (%d iterations)\n",
1829 if( (lpi->
solstat == XPRS_LP_OPTIMAL) && (primalinfeasible || dualinfeasible) )
1861 assert(lpi !=
NULL);
1916 assert(lpi !=
NULL);
1918 assert(down !=
NULL);
1920 assert(downvalid !=
NULL);
1921 assert(upvalid !=
NULL);
1923 SCIPdebugMessage(
"calling Xpress strong branching on variable %d (%d iterations)\n", col, itlim);
1939 dbndval[0] =
EPSCEIL(psol-1.0, 1e-06);
1942 dbndval[1] =
EPSFLOOR(psol+1.0, 1e-06);
1949 if( (mstatus[0] == XPRS_LP_INFEAS) || (mstatus[0] == XPRS_LP_CUTOFF_IN_DUAL) )
1951 else if( (mstatus[0] == XPRS_LP_OPTIMAL) || (mstatus[0] == XPRS_LP_UNFINISHED) )
1960 if( (mstatus[1] == XPRS_LP_INFEAS) || (mstatus[1] == XPRS_LP_CUTOFF_IN_DUAL) )
1962 else if( (mstatus[1] == XPRS_LP_OPTIMAL) || (mstatus[1] == XPRS_LP_UNFINISHED) )
2002 assert( lpi !=
NULL );
2004 assert( cols !=
NULL );
2005 assert( psols !=
NULL );
2006 assert( down !=
NULL );
2007 assert( up !=
NULL );
2008 assert( downvalid !=
NULL );
2009 assert( upvalid !=
NULL );
2011 SCIPdebugMessage(
"calling Xpress strong branching on %d variables (%d iterations)\n", ncols, itlim);
2027 for( j = 0; j <
ncols; ++j )
2029 mbndind[2*j] = cols[j];
2030 dbndval[2*j] =
EPSCEIL(psols[j] - 1.0, 1e-06);
2031 cbndtype[2*j] =
'U';
2033 mbndind[2*j+1] = cols[j];
2034 dbndval[2*j+1] =
EPSFLOOR(psols[j] + 1.0, 1e-06);
2035 cbndtype[2*j+1] =
'L';
2041 for( j = 0; j <
ncols; ++j )
2044 downvalid[j] =
TRUE;
2047 if( (mstatus[2*j] == XPRS_LP_INFEAS) || (mstatus[2*j] == XPRS_LP_CUTOFF_IN_DUAL) )
2049 else if( (mstatus[2*j] == XPRS_LP_OPTIMAL) || (mstatus[2*j] == XPRS_LP_UNFINISHED) )
2050 down[j] = dobjval[2*j];
2054 downvalid[j] =
FALSE;
2058 if( (mstatus[2*j+1] == XPRS_LP_INFEAS) || (mstatus[2*j+1] == XPRS_LP_CUTOFF_IN_DUAL) )
2060 else if( (mstatus[2*j+1] == XPRS_LP_OPTIMAL) || (mstatus[2*j+1] == XPRS_LP_UNFINISHED) )
2061 up[j] = dobjval[2*j+1];
2183 assert(lpi !=
NULL);
2198 assert(lpi !=
NULL);
2200 assert(primalfeasible !=
NULL);
2201 assert(dualfeasible !=
NULL);
2218 assert(lpi !=
NULL);
2222 return (lpi->
solstat == XPRS_LP_UNBOUNDED);
2234 assert(lpi !=
NULL);
2253 assert(lpi !=
NULL);
2272 assert(lpi !=
NULL);
2278 return (lpi->
solstat == XPRS_LP_INFEAS);
2288 assert(lpi !=
NULL);
2306 if (nInfeasible == 0)
2319 assert(lpi !=
NULL);
2323 return (lpi->
solstat == XPRS_LP_INFEAS);
2335 assert(lpi !=
NULL);
2349 assert(lpi !=
NULL);
2363 assert(lpi !=
NULL);
2369 return (lpi->
solstat == XPRS_LP_UNBOUNDED);
2379 assert(lpi !=
NULL);
2397 if (nInfeasible == 0)
2408 assert(lpi !=
NULL);
2420 assert(lpi !=
NULL);
2430 if( lpi->
solstat == XPRS_LP_UNBOUNDED )
2435 retcode = XPRSgetintattrib(lpi->
xprslp, XPRS_PRIMALINFEAS, &pinfeas);
2437 if( retcode != 0 || pinfeas )
2454 assert(lpi !=
NULL);
2458 return (lpi->
solstat == XPRS_LP_CUTOFF_IN_DUAL);
2469 assert(lpi !=
NULL);
2476 if( (lpi->
solstat == XPRS_LP_UNFINISHED) && (lpiter >= lpiterlimit) )
2490 assert(lpi !=
NULL);
2497 if( (lpi->
solstat == XPRS_LP_UNFINISHED) && (lpiter < lpiterlimit) )
2508 assert(lpi !=
NULL);
2520 assert(lpi !=
NULL);
2535 assert(lpi !=
NULL);
2555 assert(lpi !=
NULL);
2563 if( objval !=
NULL )
2568 if( activity !=
NULL )
2580 for( r = 0; r <
nrows; r++ )
2581 activity[r] = lpi->
rhsarray[r] - activity[r];
2595 assert(lpi !=
NULL);
2597 assert(ray !=
NULL);
2616 assert(lpi !=
NULL);
2619 assert(dualfarkas !=
NULL);
2635 assert(lpi !=
NULL);
2638 assert(iterations !=
NULL);
2656 assert(lpi !=
NULL);
2657 assert(quality !=
NULL);
2682 assert(lpi !=
NULL);
2689 SCIPdebugMessage(
"saving Xpress basis into %p/%p\n", (
void*)rstat, (
void*)cstat);
2700 for( r = 0; r <
nrows; ++r )
2722 assert(lpi !=
NULL);
2724 assert(cstat !=
NULL);
2725 assert(rstat !=
NULL);
2731 SCIPdebugMessage(
"loading basis %p/%p into Xpress\n", (
void*)rstat, (
void*)cstat);
2743 for( r = 0; r <
nrows; ++r )
2750 slackstats[r] = rstat[r];
2779 assert(lpi !=
NULL);
2781 assert(bind !=
NULL);
2792 for( r = 0; r <
nrows; r++ )
2794 if( bind[r] < nrows )
2795 bind[r] = -bind[r]-1;
2798 assert(bind[r] >= irspace);
2799 bind[r] = bind[r] - irspace;
2825 assert(lpi !=
NULL);
2831 if ( ninds !=
NULL )
2865 assert(lpi !=
NULL);
2871 if ( ninds !=
NULL )
2907 assert(lpi !=
NULL);
2913 if ( ninds !=
NULL )
2922 if( binvrow ==
NULL )
2931 binv = (
double*) binvrow;
2936 for( c = 0; c <
ncols; c++ )
2944 assert(nnonz <= nrows);
2947 for( i = 0; i < nnonz; i++ )
2980 assert(lpi !=
NULL);
2986 if ( ninds !=
NULL )
2996 assert(nnonz <= nrows);
3000 for( i = 0; i < nnonz; i++ )
3026 assert(blkmem !=
NULL);
3027 assert(lpi !=
NULL);
3029 assert(lpistate !=
NULL);
3048 SCIPdebugMessage(
"storing Xpress LPI state in %p (%d cols, %d rows)\n", (
void*)*lpistate, ncols, nrows);
3061 (*lpistate)->ncols =
ncols;
3062 (*lpistate)->nrows =
nrows;
3081 assert(blkmem !=
NULL);
3082 assert(lpi !=
NULL);
3086 if( lpistate ==
NULL )
3089 if( lpistate->
ncols == 0 || lpistate->
nrows == 0 )
3098 assert(lpistate->
ncols <= ncols);
3099 assert(lpistate->
nrows <= nrows);
3101 SCIPdebugMessage(
"loading LPI state %p (%d cols, %d rows) into Xpress\n", (
void*)lpistate, lpistate->
ncols, lpistate->nrows);
3114 for( i = lpistate->ncols; i < ncols; ++i )
3133 for( i = lpistate->nrows; i < nrows; ++i )
3152 assert(lpi !=
NULL);
3167 assert(lpi !=
NULL);
3168 assert(lpistate !=
NULL);
3170 if( *lpistate !=
NULL )
3184 assert(lpi !=
NULL);
3185 return (lpistate !=
NULL);
3194 assert(lpi !=
NULL);
3210 assert(lpi !=
NULL);
3237 assert(lpinorms !=
NULL);
3253 assert(lpinorms ==
NULL);
3266 assert(lpinorms ==
NULL);
3289 assert(lpi !=
NULL);
3291 assert(ival !=
NULL);
3305 *ival = (ictrlval == 0);
3312 else if( ictrlval == 16 )
3322 *ival = (ictrlval != 0);
3327 if( *ival >= XPRS_MAXINT )
3328 *ival = XPRS_MAXINT;
3348 assert(lpi !=
NULL);
3378 assert(ival >= 0 && ival <= 2);
3383 else if( ival == 1 )
3402 ival =
MIN(ival, XPRS_MAXINT);
3425 assert(lpi !=
NULL);
3427 assert(dval !=
NULL);
3447 *dval = (double) ictrlval;
3501 assert(lpi !=
NULL);
3522 if (dval >= INT_MAX)
3525 ival = (int) floor(dval);
3585 assert(lpi !=
NULL);
3586 return XPRS_PLUSINFINITY;
3595 assert(lpi !=
NULL);
3596 return (val >= XPRS_PLUSINFINITY);
3613 assert(lpi !=
NULL);
3629 assert(lpi !=
NULL);
static void convertSides(SCIP_LPI *lpi, int nrows, const SCIP_Real *lhss, const SCIP_Real *rhss)
enum SCIP_LPSolQuality SCIP_LPSOLQUALITY
SCIP_RETCODE SCIPlpiClearState(SCIP_LPI *lpi)
static void lpistateUnpack(const SCIP_LPISTATE *lpistate, int *cstat, int *rstat)
#define BMSfreeMemoryArrayNull(ptr)
SCIP_RETCODE SCIPlpiGetBase(SCIP_LPI *lpi, int *cstat, int *rstat)
SCIP_Bool SCIPlpiHasStateBasis(SCIP_LPI *lpi, SCIP_LPISTATE *lpistate)
SCIP_RETCODE SCIPlpiScaleCol(SCIP_LPI *lpi, int col, SCIP_Real scaleval)
#define CHECK_ZERO(messagehdlr, x)
SCIP_RETCODE SCIPlpiGetBounds(SCIP_LPI *lpi, int firstcol, int lastcol, SCIP_Real *lbs, SCIP_Real *ubs)
SCIP_RETCODE SCIPlpiSetBase(SCIP_LPI *lpi, const int *cstat, const int *rstat)
SCIP_RETCODE SCIPlpiGetDualfarkas(SCIP_LPI *lpi, SCIP_Real *dualfarkas)
SCIP_Bool SCIPlpiIsDualFeasible(SCIP_LPI *lpi)
static SCIP_RETCODE ensureSidechgMem(SCIP_LPI *lpi, int num)
SCIP_Bool SCIPlpiHasPrimalRay(SCIP_LPI *lpi)
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)
enum SCIP_ObjSen SCIP_OBJSEN
SCIP_RETCODE SCIPlpiGetIterations(SCIP_LPI *lpi, int *iterations)
SCIP_RETCODE SCIPlpiEndStrongbranch(SCIP_LPI *lpi)
void SCIPdecodeDualBit(const SCIP_DUALPACKET *inp, int *out, int count)
SCIP_RETCODE SCIPlpiSetNorms(SCIP_LPI *lpi, BMS_BLKMEM *blkmem, const SCIP_LPINORMS *lpinorms)
static void lpistatePack(SCIP_LPISTATE *lpistate, const int *cstat, const int *rstat)
interface methods for specific LP solvers
SCIP_Bool SCIPlpiExistsPrimalRay(SCIP_LPI *lpi)
static void reconvertSides(SCIP_LPI *lpi, int nrows, SCIP_Real *lhs, SCIP_Real *rhs)
static SCIP_RETCODE ensureRstatMem(SCIP_LPI *lpi, int num)
const char * SCIPlpiGetSolverDesc(void)
SCIP_Bool SCIPlpiIsIterlimExc(SCIP_LPI *lpi)
SCIP_Bool SCIPlpiExistsDualRay(SCIP_LPI *lpi)
static SCIP_RETCODE ensureValMem(SCIP_LPI *lpi, int num)
SCIP_RETCODE SCIPlpiGetRealpar(SCIP_LPI *lpi, SCIP_LPPARAM type, SCIP_Real *dval)
enum SCIP_Retcode SCIP_RETCODE
SCIP_RETCODE SCIPlpiSetIntpar(SCIP_LPI *lpi, SCIP_LPPARAM type, int ival)
SCIP_RETCODE SCIPlpiCreate(SCIP_LPI **lpi, SCIP_MESSAGEHDLR *messagehdlr, const char *name, SCIP_OBJSEN objsen)
#define XPRS_LP_OPTIMAL_SCALEDINFEAS
enum SCIP_LPParam SCIP_LPPARAM
SCIP_RETCODE SCIPlpiDelColset(SCIP_LPI *lpi, int *dstat)
#define BMSallocMemoryArray(ptr, num)
SCIP_RETCODE SCIPlpiSolveBarrier(SCIP_LPI *lpi, SCIP_Bool crossover)
SCIP_RETCODE SCIPlpiChgBounds(SCIP_LPI *lpi, int ncols, const int *ind, const SCIP_Real *lb, const SCIP_Real *ub)
SCIP_DUALPACKET ROWPACKET
SCIP_RETCODE SCIPlpiSolvePrimal(SCIP_LPI *lpi)
SCIP_RETCODE SCIPlpiGetRealSolQuality(SCIP_LPI *lpi, SCIP_LPSOLQUALITY qualityindicator, SCIP_Real *quality)
static SCIP_RETCODE ensureCstatMem(SCIP_LPI *lpi, int num)
SCIP_DUALPACKET COLPACKET
SCIP_RETCODE SCIPlpiDelRows(SCIP_LPI *lpi, int firstrow, int lastrow)
#define BMSfreeMemory(ptr)
enum SCIP_Pricing SCIP_PRICING
void * SCIPlpiGetSolverPointer(SCIP_LPI *lpi)
SCIP_RETCODE SCIPlpiChgObj(SCIP_LPI *lpi, int ncols, const int *ind, const SCIP_Real *obj)
static int colpacketNum(int ncols)
SCIP_Real SCIPlpiInfinity(SCIP_LPI *lpi)
SCIP_Bool SCIPlpiIsObjlimExc(SCIP_LPI *lpi)
static void lpistateFree(SCIP_LPISTATE **lpistate, BMS_BLKMEM *blkmem)
SCIP_Bool SCIPlpiIsDualUnbounded(SCIP_LPI *lpi)
SCIP_DUALPACKET COLPACKET
SCIP_RETCODE SCIPlpiDelCols(SCIP_LPI *lpi, int firstcol, int lastcol)
static void reconvertLhs(SCIP_LPI *lpi, int nrows, SCIP_Real *lhss)
SCIP_Bool SCIPlpiIsPrimalFeasible(SCIP_LPI *lpi)
static char xprsname[100]
SCIP_RETCODE SCIPlpiFreeState(SCIP_LPI *lpi, BMS_BLKMEM *blkmem, SCIP_LPISTATE **lpistate)
SCIP_Bool SCIPlpiIsInfinity(SCIP_LPI *lpi, SCIP_Real val)
SCIP_RETCODE SCIPlpiGetNorms(SCIP_LPI *lpi, BMS_BLKMEM *blkmem, SCIP_LPINORMS **lpinorms)
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_RETCODE SCIPlpiReadLP(SCIP_LPI *lpi, const char *fname)
SCIP_RETCODE SCIPlpiFreeNorms(SCIP_LPI *lpi, BMS_BLKMEM *blkmem, SCIP_LPINORMS **lpinorms)
SCIP_Bool SCIPlpiIsStable(SCIP_LPI *lpi)
SCIP_RETCODE SCIPlpiGetObjsen(SCIP_LPI *lpi, SCIP_OBJSEN *objsen)
SCIP_RETCODE SCIPlpiGetRowNames(SCIP_LPI *lpi, int firstrow, int lastrow, char **rownames, char *namestorage, int namestoragesize, int *storageleft)
packing single and dual bit values
SCIP_RETCODE SCIPlpiGetState(SCIP_LPI *lpi, BMS_BLKMEM *blkmem, SCIP_LPISTATE **lpistate)
#define BMSfreeMemoryArray(ptr)
SCIP_Bool SCIPlpiIsTimelimExc(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)
static void invalidateSolution(SCIP_LPI *lpi)
#define XPRS_LPQUICKPRESOLVE
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_DUALPACKET ROWPACKET
SCIP_RETCODE SCIPlpiChgCoef(SCIP_LPI *lpi, int row, int col, SCIP_Real newval)
SCIP_Bool SCIPlpiHasDualRay(SCIP_LPI *lpi)
void SCIPmessagePrintWarning(SCIP_MESSAGEHDLR *messagehdlr, const char *formatstr,...)
SCIP_RETCODE SCIPlpiWriteLP(SCIP_LPI *lpi, const char *fname)
static int rowpacketNum(int nrows)
SCIP_RETCODE SCIPlpiIgnoreInstability(SCIP_LPI *lpi, SCIP_Bool *success)
SCIP_RETCODE SCIPlpiScaleRow(SCIP_LPI *lpi, int row, SCIP_Real scaleval)
static SCIP_RETCODE ensureBoundchgMem(SCIP_LPI *lpi, int num)
SCIP_RETCODE SCIPlpiChgObjsen(SCIP_LPI *lpi, SCIP_OBJSEN objsense)
SCIP_RETCODE SCIPlpiGetBInvARow(SCIP_LPI *lpi, int r, const SCIP_Real *binvrow, SCIP_Real *coef, int *inds, int *ninds)
SCIP_RETCODE SCIPlpiGetIntpar(SCIP_LPI *lpi, SCIP_LPPARAM type, int *ival)
SCIP_RETCODE SCIPlpiGetBasisInd(SCIP_LPI *lpi, int *bind)
SCIP_RETCODE SCIPlpiGetBInvRow(SCIP_LPI *lpi, int row, SCIP_Real *coef, int *inds, int *ninds)
void SCIPencodeDualBit(const int *inp, SCIP_DUALPACKET *out, int count)
const char * SCIPlpiGetSolverName(void)
SCIP_RETCODE SCIPlpiGetSolFeasibility(SCIP_LPI *lpi, SCIP_Bool *primalfeasible, SCIP_Bool *dualfeasible)
static SCIP_RETCODE lpiStrongbranches(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 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)
#define BMSfreeBlockMemory(mem, ptr)
unsigned int SCIP_DUALPACKET
#define BMSallocBlockMemoryArray(mem, ptr, num)
SCIP_Bool SCIPlpiIsPrimalUnbounded(SCIP_LPI *lpi)
SCIP_RETCODE SCIPlpiGetBInvCol(SCIP_LPI *lpi, int c, SCIP_Real *coef, int *inds, int *ninds)
static void reconvertBothSides(SCIP_LPI *lpi, int nrows, SCIP_Real *lhss, SCIP_Real *rhss)
#define BMSfreeBlockMemoryArray(mem, ptr, num)
SCIP_RETCODE SCIPlpiDelRowset(SCIP_LPI *lpi, int *dstat)
SCIP_Bool SCIPlpiIsDualInfeasible(SCIP_LPI *lpi)
SCIP_RETCODE SCIPlpiGetRows(SCIP_LPI *lpi, int firstrow, int lastrow, SCIP_Real *lhss, SCIP_Real *rhss, int *nnonz, int *beg, int *ind, SCIP_Real *val)
SCIP_RETCODE SCIPlpiSolveDual(SCIP_LPI *lpi)
int SCIPlpiGetInternalStatus(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 SCIPlpiChgSides(SCIP_LPI *lpi, int nrows, const int *ind, const SCIP_Real *lhs, const SCIP_Real *rhs)
SCIP_RETCODE SCIPlpiStartStrongbranch(SCIP_LPI *lpi)
SCIP_RETCODE SCIPlpiGetSides(SCIP_LPI *lpi, int firstrow, int lastrow, SCIP_Real *lhss, SCIP_Real *rhss)
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 SCIPlpiFree(SCIP_LPI **lpi)
SCIP_RETCODE SCIPlpiGetObj(SCIP_LPI *lpi, int firstcol, int lastcol, SCIP_Real *vals)
static int xprsObjsen(SCIP_OBJSEN const objsen)
SCIP_RETCODE SCIPlpiWriteState(SCIP_LPI *lpi, const char *fname)
SCIP_RETCODE SCIPlpiGetPrimalRay(SCIP_LPI *lpi, SCIP_Real *ray)
SCIP_RETCODE SCIPlpiSetRealpar(SCIP_LPI *lpi, SCIP_LPPARAM type, SCIP_Real dval)
SCIP_RETCODE SCIPlpiGetColNames(SCIP_LPI *lpi, int firstcol, int lastcol, char **colnames, char *namestorage, int namestoragesize, int *storageleft)
SCIP_RETCODE SCIPlpiClear(SCIP_LPI *lpi)
#define ABORT_ZERO(messagehdlr, retval, x)
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 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 SCIPlpiGetBInvACol(SCIP_LPI *lpi, int c, SCIP_Real *coef, int *inds, int *ninds)
SCIP_Bool SCIPlpiIsOptimal(SCIP_LPI *lpi)
static SCIP_RETCODE lpiSolve(SCIP_LPI *lpi, const char *method)
#define BMSallocMemory(ptr)
#define BMSreallocMemoryArray(ptr, num)
SCIP_RETCODE SCIPlpiGetNCols(SCIP_LPI *lpi, int *ncols)
SCIP_RETCODE SCIPlpiGetObjval(SCIP_LPI *lpi, SCIP_Real *objval)
static SCIP_RETCODE lpistateCreate(SCIP_LPISTATE **lpistate, BMS_BLKMEM *blkmem, int ncols, int nrows)
SCIP_Bool SCIPlpiIsPrimalInfeasible(SCIP_LPI *lpi)
SCIP_MESSAGEHDLR * messagehdlr
SCIP_RETCODE SCIPlpiGetNNonz(SCIP_LPI *lpi, int *nnonz)
SCIP_RETCODE SCIPlpiGetCoef(SCIP_LPI *lpi, int row, int col, SCIP_Real *val)
static void debugCheckColrang(SCIP_LPI *lpi, int firstcol, int lastcol)
#define BMSallocBlockMemory(mem, ptr)
static void debugCheckRowrang(SCIP_LPI *lpi, int firstrow, int lastrow)
#define BMSclearMemoryArray(ptr, num)
struct BMS_BlkMem BMS_BLKMEM
SCIP_Bool SCIPlpiWasSolved(SCIP_LPI *lpi)
SCIP_RETCODE SCIPlpiSetState(SCIP_LPI *lpi, BMS_BLKMEM *blkmem, const SCIP_LPISTATE *lpistate)
SCIP_RETCODE SCIPlpiGetNRows(SCIP_LPI *lpi, int *nrows)
static void reconvertRhs(SCIP_LPI *lpi, int nrows, SCIP_Real *rhss)
SCIP_RETCODE SCIPlpiGetSol(SCIP_LPI *lpi, SCIP_Real *objval, SCIP_Real *primsol, SCIP_Real *dualsol, SCIP_Real *activity, SCIP_Real *redcost)
SCIP_RETCODE SCIPlpiSetIntegralityInformation(SCIP_LPI *lpi, int ncols, int *intInfo)