44#define strcasecmp _stricmp
54#include "tinycthread/tinycthread.h"
56#ifndef XPRS_LPQUICKPRESOLVE
57#define XPRS_LPQUICKPRESOLVE 8207
61#define XPRS_LP_OPTIMAL_SCALEDINFEAS 16
63#define CHECK_ZERO(messagehdlr, x) { int _restat_; \
64 if( (_restat_ = (x)) != 0 ) \
66 SCIPmessagePrintWarning((messagehdlr), "%s:%d: LP Error: Xpress returned %d\n", __FILE__, __LINE__, _restat_); \
67 return SCIP_LPERROR; \
72#define ABORT_ZERO(messagehdlr, retval, x) { int _restat_; \
73 if( (_restat_ = (x)) != 0 ) \
75 SCIPmessagePrintWarning((messagehdlr), "LP Error: Xpress returned %d\n", _restat_); \
83#define COLS_PER_PACKET SCIP_DUALPACKETSIZE
85#define ROWS_PER_PACKET SCIP_DUALPACKETSIZE
154 assert(firstcol <= lastcol + 1);
155 (void)XPRSgetintattrib(lpi->
xprslp, XPRS_COLS, &ncols);
171 assert(firstrow <= lastrow + 1);
172 (void)XPRSgetintattrib(lpi->
xprslp, XPRS_ROWS, &nrows);
179#define debugCheckColrang(lpi, firstcol, lastcol)
180#define debugCheckRowrang(lpi, firstrow, lastrow)
217 assert(num <= lpi->boundchgsize);
241 assert(num <= lpi->sidechgsize);
264 assert(num <= lpi->valsize);
286 assert(num <= lpi->cstatsize);
308 assert(num <= lpi->rstatsize);
425 return XPRS_OBJ_MAXIMIZE;
427 return XPRS_OBJ_MINIMIZE;
452 for(
i = 0;
i < nrows; ++
i )
455 if( lhss[
i] == rhss[
i] )
457 assert(XPRS_MINUSINFINITY < rhss[
i] && rhss[
i] < XPRS_PLUSINFINITY);
462 else if( lhss[
i] <= XPRS_MINUSINFINITY )
468 else if( rhss[
i] >= XPRS_PLUSINFINITY )
500 for(
i = 0;
i < nrows; ++
i )
510 lhss[
i] = XPRS_MINUSINFINITY;
516 rhss[
i] = XPRS_PLUSINFINITY;
547 for(
i = 0;
i < nrows; ++
i )
558 lhss[
i] = XPRS_MINUSINFINITY;
592 for(
i = 0;
i < nrows; ++
i )
608 rhss[
i] = XPRS_PLUSINFINITY;
634 else if( lhs !=
NULL )
636 else if( rhs !=
NULL )
665static char xprsname[] = {
'X',
'p',
'r',
'e',
's',
's',
' ',
'0' + XPVERSION / 10,
'0' + XPVERSION % 10,
'\0'};
676 if( XPRSgetversion(version) == 0 )
677 (void) sprintf(
xprsname,
"Xpress %s", version);
679 (
void) sprintf(
xprsname,
"Xpress %d", XPVERSION);
689 return "Linear Programming Solver developed by FICO (www.fico.com/en/products/fico-xpress-optimization)";
700 return (
void*) lpi->
xprslp;
714 SCIPerrorMessage(
"SCIPlpiSetIntegralityInformation() has not been implemented yet.\n");
781 (void)strncpy((*lpi)->name, name, 199);
782 (*lpi)->name[199] =
'\0';
784 (*lpi)->larray =
NULL;
785 (*lpi)->uarray =
NULL;
786 (*lpi)->senarray =
NULL;
787 (*lpi)->rhsarray =
NULL;
788 (*lpi)->rngarray =
NULL;
789 (*lpi)->indarray =
NULL;
790 (*lpi)->valarray =
NULL;
791 (*lpi)->cstat =
NULL;
792 (*lpi)->rstat =
NULL;
793 (*lpi)->boundchgsize = 0;
794 (*lpi)->sidechgsize = 0;
796 (*lpi)->cstatsize = 0;
797 (*lpi)->rstatsize = 0;
798 (*lpi)->iterations = 0;
799 (*lpi)->solisbasic =
TRUE;
800 (*lpi)->clearstate =
FALSE;
801 (*lpi)->solmethod =
' ';
802 (*lpi)->par_lobjlim = -1e+40;
803 (*lpi)->par_uobjlim = +1e+40;
804 (*lpi)->par_fastlp = 0;
805 (*lpi)->par_presolve = 0;
806 (*lpi)->messagehdlr = messagehdlr;
808 CHECK_ZERO( messagehdlr, XPRScreateprob(&(*lpi)->xprslp) );
814 CHECK_ZERO( messagehdlr, XPRSsetintcontrol((*lpi)->xprslp, XPRS_OUTPUTLOG, 0) );
817 CHECK_ZERO( messagehdlr, XPRSloadlp((*lpi)->xprslp, (*lpi)->name, 0, 0,
NULL,
NULL,
NULL,
NULL, &zero,
NULL,
NULL,
NULL,
NULL,
NULL) );
837 CHECK_ZERO( (*lpi)->messagehdlr, XPRSdestroyprob(((*lpi)->xprslp)) );
840 CHECK_ZERO( (*lpi)->messagehdlr, XPRSfree() );
889 for( j = 0; j < nnonz; j++ )
905 SCIPdebugMessage(
"loading LP in column format into Xpress: %d cols, %d rows\n", ncols, nrows);
919 for(
c = 0;
c < ncols-1; ++
c )
924 lpi->
indarray[ncols-1] = nnonz - beg[ncols-1];
965 SCIPdebugMessage(
"adding %d columns with %d nonzeros to Xpress\n", ncols, nnonz);
979 for (j = 0; j < nnonz; ++j)
982 assert( 0 <= ind[j] && ind[j] < nrows );
991 for(
c = 0;
c < ncols;
c++ )
1013 SCIPdebugMessage(
"deleting %d columns from Xpress\n", lastcol - firstcol + 1);
1016 if( firstcol > lastcol )
1025 for(
c = firstcol;
c <= lastcol;
c++ )
1063 for(
c = 0;
c < ncols;
c++ )
1073 dstat[
c] = nkeptcols;
1109 SCIPdebugMessage(
"adding %d rows with %d nonzeros to Xpress\n", nrows, nnonz);
1120 for (j = 0; j < nnonz; ++j)
1123 assert( 0 <= ind[j] && ind[j] < ncols );
1138 for(
r = 0;
r < nrows;
r++ )
1159 SCIPdebugMessage(
"deleting %d rows from Xpress\n", lastrow - firstrow + 1);
1162 if( firstrow > lastrow )
1170 for(
r = firstrow;
r <= lastrow;
r++ )
1207 for(
r = 0;
r < nrows;
r++ )
1217 dstat[
r] = nkeptrows;
1242 CHECK_ZERO( lpi->
messagehdlr, XPRSloadlp(lpi->
xprslp, lpi->
name, 0, 0,
NULL,
NULL,
NULL,
NULL, &zero,
NULL,
NULL,
NULL,
NULL,
NULL) );
1268 for (j = 0; j < ncols; ++j)
1272 SCIPerrorMessage(
"LP Error: fixing lower bound for variable %d to infinity.\n", ind[j]);
1277 SCIPerrorMessage(
"LP Error: fixing upper bound for variable %d to -infinity.\n", ind[j]);
1335 SCIPdebugMessage(
"changing coefficient row %d, column %d in Xpress to %g\n", row, col, newval);
1401 SCIPdebugMessage(
"scaling row %d with factor %g in Xpress\n", row, scaleval);
1414 for(
i = 0;
i < nnonz; ++
i )
1420 if( lhs > XPRS_MINUSINFINITY )
1422 else if( scaleval < 0.0 )
1423 lhs = XPRS_PLUSINFINITY;
1424 if( rhs < XPRS_PLUSINFINITY )
1426 else if( scaleval < 0.0 )
1427 rhs = XPRS_MINUSINFINITY;
1429 if( scaleval > 0.0 )
1461 SCIPdebugMessage(
"scaling column %d with factor %g in Xpress\n", col, scaleval);
1478 for(
i = 0;
i < nnonz; ++
i )
1488 if( lb > XPRS_MINUSINFINITY )
1490 else if( scaleval < 0.0 )
1491 lb = XPRS_PLUSINFINITY;
1492 if( ub < XPRS_PLUSINFINITY )
1494 else if( scaleval < 0.0 )
1495 ub = XPRS_MINUSINFINITY;
1497 if( scaleval > 0.0 )
1613 assert(*nnonz <= ntotalnonz);
1617 for(
c = 0;
c < lastcol-firstcol+1;
c++ )
1669 assert(*nnonz <= ntotalnonz);
1673 for(
r = 0;
r < lastrow-firstrow+1;
r++ )
1687 int namestoragesize,
1691 assert(colnames !=
NULL || namestoragesize == 0);
1692 assert(namestorage !=
NULL || namestoragesize == 0);
1693 assert(namestoragesize >= 0);
1710 int namestoragesize,
1714 assert(rownames !=
NULL || namestoragesize == 0);
1715 assert(namestorage !=
NULL || namestoragesize == 0);
1716 assert(namestoragesize >= 0);
1741 if( xprsobjsen < 0.0 )
1761 SCIPdebugMessage(
"getting objective values %d to %d\n", firstcol, lastcol);
1853 int primalinfeasible;
1903 SCIPdebugMessage(
" -> Xpress returned solstat=%d, pinfeas=%d, dinfeas=%d (%d iterations)\n",
1907 if( lpi->
solstat == XPRS_LP_INFEAS || lpi->
solstat == XPRS_LP_UNBOUNDED )
1921 if( presolving != 0 )
1926 SCIPdebugMessage(
"presolver may have solved the problem -> calling Xpress %s again without presolve\n",
1927 strcmp(method,
"p") == 0 ?
"primal simplex" : strcmp(method,
"d") == 0 ?
"dual simplex" :
"barrier");
1944 SCIPdebugMessage(
" -> Xpress returned solstat=%d, pinfeas=%d, dinfeas=%d (%d iterations)\n",
1953 if( (lpi->
solstat == XPRS_LP_OPTIMAL) && (primalinfeasible || dualinfeasible) )
2059 SCIPdebugMessage(
"calling Xpress strong branching on variable %d (%d iterations)\n", col, itlim);
2075 dbndval[0] =
EPSCEIL(psol-1.0, 1e-06);
2078 dbndval[1] =
EPSFLOOR(psol+1.0, 1e-06);
2085 if( (mstatus[0] == XPRS_LP_INFEAS) || (mstatus[0] == XPRS_LP_CUTOFF_IN_DUAL) )
2087 else if( (mstatus[0] == XPRS_LP_OPTIMAL) || (mstatus[0] == XPRS_LP_UNFINISHED) )
2096 if( (mstatus[1] == XPRS_LP_INFEAS) || (mstatus[1] == XPRS_LP_CUTOFF_IN_DUAL) )
2098 else if( (mstatus[1] == XPRS_LP_OPTIMAL) || (mstatus[1] == XPRS_LP_UNFINISHED) )
2148 SCIPdebugMessage(
"calling Xpress strong branching on %d variables (%d iterations)\n", ncols, itlim);
2154 nbranches = 2*ncols;
2167 for( j = 0; j < ncols; ++j )
2169 mbndind[2*j] = cols[j];
2170 dbndval[2*j] =
EPSCEIL(psols[j] - 1.0, 1e-06);
2171 cbndtype[2*j] =
'U';
2173 mbndind[2*j+1] = cols[j];
2174 dbndval[2*j+1] =
EPSFLOOR(psols[j] + 1.0, 1e-06);
2175 cbndtype[2*j+1] =
'L';
2181 for( j = 0; j < ncols; ++j )
2184 downvalid[j] =
TRUE;
2187 if( (mstatus[2*j] == XPRS_LP_INFEAS) || (mstatus[2*j] == XPRS_LP_CUTOFF_IN_DUAL) )
2189 else if( (mstatus[2*j] == XPRS_LP_OPTIMAL) || (mstatus[2*j] == XPRS_LP_UNFINISHED) )
2190 down[j] = dobjval[2*j];
2194 downvalid[j] =
FALSE;
2198 if( (mstatus[2*j+1] == XPRS_LP_INFEAS) || (mstatus[2*j+1] == XPRS_LP_CUTOFF_IN_DUAL) )
2200 else if( (mstatus[2*j+1] == XPRS_LP_OPTIMAL) || (mstatus[2*j+1] == XPRS_LP_UNFINISHED) )
2201 up[j] = dobjval[2*j+1];
2368 return (lpi->
solstat == XPRS_LP_UNBOUNDED);
2424 return (lpi->
solstat == XPRS_LP_INFEAS);
2457 if (nInfeasible == 0 && nIter > 0 && lpi->
solmethod ==
'p')
2474 return (lpi->
solstat == XPRS_LP_INFEAS);
2520 return (lpi->
solstat == XPRS_LP_UNBOUNDED);
2553 if (nInfeasible == 0 && nIter > 0 && lpi->
solmethod ==
'd')
2588#ifdef SCIP_DISABLED_CODE
2597 if( lpi->
solstat == XPRS_LP_UNBOUNDED )
2602 retcode = XPRSgetintattrib(lpi->
xprslp, XPRS_PRIMALINFEAS, &pinfeas);
2604 if( retcode != 0 || pinfeas )
2627 return (lpi->
solstat == XPRS_LP_CUTOFF || lpi->
solstat == XPRS_LP_CUTOFF_IN_DUAL);
2747 if( activity !=
NULL )
2759 for(
r = 0;
r < nrows;
r++ )
2869 SCIPdebugMessage(
"saving Xpress basis into %p/%p\n", (
void*)rstat, (
void*)cstat);
2880 for(
r = 0;
r < nrows; ++
r )
2918 SCIPdebugMessage(
"loading basis %p/%p into Xpress\n", (
void*)rstat, (
void*)cstat);
2927 for(
r = 0;
r < nrows; ++
r )
2934 slackstats[
r] = rstat[
r];
2980 for(
r = 0;
r < nrows;
r++ )
2982 if( bind[
r] < nrows )
2983 bind[
r] = -bind[
r]-1;
2987 bind[
r] = bind[
r] - irspace;
3021 if ( ninds !=
NULL )
3063 if ( ninds !=
NULL )
3106 if ( ninds !=
NULL )
3115 if( binvrow ==
NULL )
3122 binv = (
double*) binvrow;
3127 for(
c = 0;
c < ncols;
c++ )
3138 for(
i = 0;
i < nnonz;
i++ )
3179 if ( ninds !=
NULL )
3193 for(
i = 0;
i < nnonz;
i++ )
3241 SCIPdebugMessage(
"storing Xpress LPI state in %p (%d cols, %d rows)\n", (
void*)*lpistate, ncols, nrows);
3254 (*lpistate)->ncols = ncols;
3255 (*lpistate)->nrows = nrows;
3279 if( lpistate ==
NULL )
3282 if( lpistate->
ncols == 0 || lpistate->
nrows == 0 )
3294 SCIPdebugMessage(
"loading LPI state %p (%d cols, %d rows) into Xpress\n", (
void*)lpistate, lpistate->
ncols, lpistate->
nrows);
3307 for(
i = lpistate->
ncols;
i < ncols; ++
i )
3326 for(
i = lpistate->
nrows;
i < nrows; ++
i )
3364 if( *lpistate !=
NULL )
3379 return (lpistate !=
NULL);
3507 *ival = (ictrlval == 0);
3514 else if( ictrlval == 16 )
3524 *ival = (ictrlval != 0);
3529 if( *ival >= XPRS_MAXINT )
3530 *ival = XPRS_MAXINT;
3584 assert(ival >= 0 && ival <= 2);
3589 else if( ival == 1 )
3610 ival =
MIN(ival, XPRS_MAXINT);
3659 *dval = (double) -ictrlval;
3727 if( dval >= INT_MAX )
3730 ival = (int) -floor(dval);
3779 return XPRS_PLUSINFINITY;
3789 return (val >= XPRS_PLUSINFINITY);
3812 char* basename =
NULL;
3813 char* compression =
NULL;
3814 char* extension =
NULL;
3815 char* filename =
NULL;
3817 char* xpressfilename =
NULL;
3828 size = (int)strlen(fname)+1;
3831 if (size > XPRS_MAXPROBNAMELENGTH)
3845 (void)
SCIPsnprintf(xpressfilename, size,
"%s/%s", path, basename);
3847 (
void)
SCIPsnprintf(xpressfilename, size,
"%s", basename);
3850 if (compression !=
NULL || extension ==
NULL || basename ==
NULL)
3852 if (strcasecmp(extension,
"mps") == 0) {
3855 else if (strcasecmp(extension,
"lp") == 0) {
3880 char* basename =
NULL;
3881 char* compression =
NULL;
3882 char* extension =
NULL;
3883 char* filename =
NULL;
3885 char* xpressfilename =
NULL;
3896 size = (int)strlen(fname)+1;
3899 if (size > XPRS_MAXPROBNAMELENGTH)
3913 (void)
SCIPsnprintf(xpressfilename, size,
"%s/%s", path, basename);
3915 (
void)
SCIPsnprintf(xpressfilename, size,
"%s", basename);
3918 if (compression !=
NULL || extension ==
NULL || basename ==
NULL)
3920 if (strcasecmp(extension,
"mps") == 0) {
3923 else if (strcasecmp(extension,
"lp") == 0) {
void SCIPdecodeDualBit(const SCIP_DUALPACKET *inp, int *out, int count)
void SCIPencodeDualBit(const int *inp, SCIP_DUALPACKET *out, int count)
packing single and dual bit values
unsigned int SCIP_DUALPACKET
void SCIPsplitFilename(char *filename, char **path, char **name, char **extension, char **compression)
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)
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)
int SCIPsnprintf(char *t, int len, const char *s,...)
assert(minobj< SCIPgetCutoffbound(scip))
interface methods for specific LP solvers
static int rowpacketNum(int nrows)
SCIP_DUALPACKET ROWPACKET
SCIP_DUALPACKET COLPACKET
static int colpacketNum(int ncols)
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)
static void reconvertSides(SCIP_LPI *lpi, int nrows, SCIP_Real *lhs, SCIP_Real *rhs)
static void lpistatePack(SCIP_LPISTATE *lpistate, const int *cstat, const int *rstat)
static void lpistateUnpack(const SCIP_LPISTATE *lpistate, int *cstat, int *rstat)
static int rowpacketNum(int nrows)
static _Thread_local char xprsname[100]
static SCIP_RETCODE ensureCstatMem(SCIP_LPI *lpi, int num)
static void reconvertBothSides(SCIP_LPI *lpi, int nrows, SCIP_Real *lhss, SCIP_Real *rhss)
static SCIP_RETCODE lpiSolve(SCIP_LPI *lpi, const char *method)
static void reconvertRhs(SCIP_LPI *lpi, int nrows, SCIP_Real *rhss)
#define XPRS_LPQUICKPRESOLVE
static SCIP_RETCODE ensureBoundchgMem(SCIP_LPI *lpi, int num)
static void debugCheckRowrang(SCIP_LPI *lpi, int firstrow, int lastrow)
static void lpistateFree(SCIP_LPISTATE **lpistate, BMS_BLKMEM *blkmem)
static int xprsObjsen(SCIP_OBJSEN const objsen)
#define XPRS_LP_OPTIMAL_SCALEDINFEAS
#define ABORT_ZERO(messagehdlr, retval, x)
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)
#define CHECK_ZERO(messagehdlr, x)
static SCIP_RETCODE ensureRstatMem(SCIP_LPI *lpi, int num)
static int colpacketNum(int ncols)
static void debugCheckColrang(SCIP_LPI *lpi, int firstcol, int lastcol)
static void convertSides(SCIP_LPI *lpi, int nrows, const SCIP_Real *lhss, const SCIP_Real *rhss)
static SCIP_RETCODE ensureSidechgMem(SCIP_LPI *lpi, int num)
static void reconvertLhs(SCIP_LPI *lpi, int nrows, SCIP_Real *lhss)
static SCIP_RETCODE lpistateCreate(SCIP_LPISTATE **lpistate, BMS_BLKMEM *blkmem, int ncols, int nrows)
static void invalidateSolution(SCIP_LPI *lpi)
static SCIP_RETCODE ensureValMem(SCIP_LPI *lpi, int num)
#define BMSfreeMemory(ptr)
#define BMSfreeBlockMemory(mem, ptr)
#define BMSallocBlockMemory(mem, ptr)
#define BMSreallocMemoryArray(ptr, num)
#define BMSduplicateMemoryArray(ptr, source, num)
#define BMSallocMemoryArray(ptr, num)
#define BMSfreeMemoryArray(ptr)
#define BMSallocBlockMemoryArray(mem, ptr, num)
#define BMSfreeBlockMemoryArray(mem, ptr, num)
#define BMSclearMemoryArray(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
public data structures and miscellaneous methods
SCIP_MESSAGEHDLR * messagehdlr
@ SCIP_PRICING_STEEPQSTART
@ SCIP_PRICING_LPIDEFAULT
enum SCIP_Pricing SCIP_PRICING
enum SCIP_LPParam SCIP_LPPARAM
struct SCIP_LPiState SCIP_LPISTATE
struct SCIP_LPiNorms SCIP_LPINORMS
@ SCIP_LPPAR_BARRIERCONVTOL
enum SCIP_LPSolQuality SCIP_LPSOLQUALITY
enum SCIP_ObjSen SCIP_OBJSEN
struct SCIP_Messagehdlr SCIP_MESSAGEHDLR
enum SCIP_Retcode SCIP_RETCODE