43#if defined(_WIN32) || defined(_WIN64)
53#include "tinycthread/tinycthread.h"
55#ifndef XPRS_LPQUICKPRESOLVE
56#define XPRS_LPQUICKPRESOLVE 8207
60#define XPRS_LP_OPTIMAL_SCALEDINFEAS 16
62#define CHECK_ZERO(messagehdlr, x) { int _restat_; \
63 if( (_restat_ = (x)) != 0 ) \
65 SCIPmessagePrintWarning((messagehdlr), "%s:%d: LP Error: Xpress returned %d\n", __FILE__, __LINE__, _restat_); \
66 return SCIP_LPERROR; \
71#define ABORT_ZERO(messagehdlr, retval, x) { int _restat_; \
72 if( (_restat_ = (x)) != 0 ) \
74 SCIPmessagePrintWarning((messagehdlr), "LP Error: Xpress returned %d\n", _restat_); \
82#define COLS_PER_PACKET SCIP_DUALPACKETSIZE
84#define ROWS_PER_PACKET SCIP_DUALPACKETSIZE
153 assert(firstcol <= lastcol + 1);
154 (void)XPRSgetintattrib(lpi->
xprslp, XPRS_COLS, &ncols);
170 assert(firstrow <= lastrow + 1);
171 (void)XPRSgetintattrib(lpi->
xprslp, XPRS_ROWS, &nrows);
178#define debugCheckColrang(lpi, firstcol, lastcol)
179#define debugCheckRowrang(lpi, firstrow, lastrow)
216 assert(num <= lpi->boundchgsize);
240 assert(num <= lpi->sidechgsize);
263 assert(num <= lpi->valsize);
285 assert(num <= lpi->cstatsize);
307 assert(num <= lpi->rstatsize);
424 return XPRS_OBJ_MAXIMIZE;
426 return XPRS_OBJ_MINIMIZE;
451 for(
i = 0;
i < nrows; ++
i )
454 if( lhss[
i] == rhss[
i] )
456 assert(XPRS_MINUSINFINITY < rhss[
i] && rhss[
i] < XPRS_PLUSINFINITY);
461 else if( lhss[
i] <= XPRS_MINUSINFINITY )
467 else if( rhss[
i] >= XPRS_PLUSINFINITY )
499 for(
i = 0;
i < nrows; ++
i )
509 lhss[
i] = XPRS_MINUSINFINITY;
515 rhss[
i] = XPRS_PLUSINFINITY;
546 for(
i = 0;
i < nrows; ++
i )
557 lhss[
i] = XPRS_MINUSINFINITY;
591 for(
i = 0;
i < nrows; ++
i )
607 rhss[
i] = XPRS_PLUSINFINITY;
633 else if( lhs !=
NULL )
635 else if( rhs !=
NULL )
662static _Thread_local
char xprsname[100];
664static char xprsname[] = {
'X',
'p',
'r',
'e',
's',
's',
' ',
'0' + XPVERSION / 10,
'0' + XPVERSION % 10,
'\0'};
675 if( XPRSgetversion(version) == 0 )
676 (void) sprintf(
xprsname,
"Xpress %s", version);
678 (
void) sprintf(
xprsname,
"Xpress %d", XPVERSION);
688 return "Linear Programming Solver developed by FICO (www.fico.com/en/products/fico-xpress-optimization)";
699 return (
void*) lpi->
xprslp;
713 SCIPerrorMessage(
"SCIPlpiSetIntegralityInformation() has not been implemented yet.\n");
780 (void)strncpy((*lpi)->name, name, 199);
781 (*lpi)->name[199] =
'\0';
783 (*lpi)->larray =
NULL;
784 (*lpi)->uarray =
NULL;
785 (*lpi)->senarray =
NULL;
786 (*lpi)->rhsarray =
NULL;
787 (*lpi)->rngarray =
NULL;
788 (*lpi)->indarray =
NULL;
789 (*lpi)->valarray =
NULL;
790 (*lpi)->cstat =
NULL;
791 (*lpi)->rstat =
NULL;
792 (*lpi)->boundchgsize = 0;
793 (*lpi)->sidechgsize = 0;
795 (*lpi)->cstatsize = 0;
796 (*lpi)->rstatsize = 0;
797 (*lpi)->iterations = 0;
798 (*lpi)->solisbasic =
TRUE;
799 (*lpi)->clearstate =
FALSE;
800 (*lpi)->solmethod =
' ';
801 (*lpi)->par_lobjlim = -1e+40;
802 (*lpi)->par_uobjlim = +1e+40;
803 (*lpi)->par_fastlp = 0;
804 (*lpi)->par_presolve = 0;
805 (*lpi)->messagehdlr = messagehdlr;
807 CHECK_ZERO( messagehdlr, XPRScreateprob(&(*lpi)->xprslp) );
813 CHECK_ZERO( messagehdlr, XPRSsetintcontrol((*lpi)->xprslp, XPRS_OUTPUTLOG, 0) );
816 CHECK_ZERO( messagehdlr, XPRSloadlp((*lpi)->xprslp, (*lpi)->name, 0, 0,
NULL,
NULL,
NULL,
NULL, &zero,
NULL,
NULL,
NULL,
NULL,
NULL) );
836 CHECK_ZERO( (*lpi)->messagehdlr, XPRSdestroyprob(((*lpi)->xprslp)) );
839 CHECK_ZERO( (*lpi)->messagehdlr, XPRSfree() );
888 for( j = 0; j < nnonz; j++ )
904 SCIPdebugMessage(
"loading LP in column format into Xpress: %d cols, %d rows\n", ncols, nrows);
918 for(
c = 0;
c < ncols-1; ++
c )
923 lpi->
indarray[ncols-1] = nnonz - beg[ncols-1];
964 SCIPdebugMessage(
"adding %d columns with %d nonzeros to Xpress\n", ncols, nnonz);
978 for (j = 0; j < nnonz; ++j)
981 assert( 0 <= ind[j] && ind[j] < nrows );
990 for(
c = 0;
c < ncols;
c++ )
1012 SCIPdebugMessage(
"deleting %d columns from Xpress\n", lastcol - firstcol + 1);
1015 if( firstcol > lastcol )
1024 for(
c = firstcol;
c <= lastcol;
c++ )
1062 for(
c = 0;
c < ncols;
c++ )
1072 dstat[
c] = nkeptcols;
1108 SCIPdebugMessage(
"adding %d rows with %d nonzeros to Xpress\n", nrows, nnonz);
1119 for (j = 0; j < nnonz; ++j)
1122 assert( 0 <= ind[j] && ind[j] < ncols );
1137 for(
r = 0;
r < nrows;
r++ )
1158 SCIPdebugMessage(
"deleting %d rows from Xpress\n", lastrow - firstrow + 1);
1161 if( firstrow > lastrow )
1169 for(
r = firstrow;
r <= lastrow;
r++ )
1206 for(
r = 0;
r < nrows;
r++ )
1216 dstat[
r] = nkeptrows;
1241 CHECK_ZERO( lpi->
messagehdlr, XPRSloadlp(lpi->
xprslp, lpi->
name, 0, 0,
NULL,
NULL,
NULL,
NULL, &zero,
NULL,
NULL,
NULL,
NULL,
NULL) );
1267 for (j = 0; j < ncols; ++j)
1271 SCIPerrorMessage(
"LP Error: fixing lower bound for variable %d to infinity.\n", ind[j]);
1276 SCIPerrorMessage(
"LP Error: fixing upper bound for variable %d to -infinity.\n", ind[j]);
1334 SCIPdebugMessage(
"changing coefficient row %d, column %d in Xpress to %g\n", row, col, newval);
1400 SCIPdebugMessage(
"scaling row %d with factor %g in Xpress\n", row, scaleval);
1413 for(
i = 0;
i < nnonz; ++
i )
1419 if( lhs > XPRS_MINUSINFINITY )
1421 else if( scaleval < 0.0 )
1422 lhs = XPRS_PLUSINFINITY;
1423 if( rhs < XPRS_PLUSINFINITY )
1425 else if( scaleval < 0.0 )
1426 rhs = XPRS_MINUSINFINITY;
1428 if( scaleval > 0.0 )
1460 SCIPdebugMessage(
"scaling column %d with factor %g in Xpress\n", col, scaleval);
1477 for(
i = 0;
i < nnonz; ++
i )
1487 if( lb > XPRS_MINUSINFINITY )
1489 else if( scaleval < 0.0 )
1490 lb = XPRS_PLUSINFINITY;
1491 if( ub < XPRS_PLUSINFINITY )
1493 else if( scaleval < 0.0 )
1494 ub = XPRS_MINUSINFINITY;
1496 if( scaleval > 0.0 )
1612 assert(*nnonz <= ntotalnonz);
1616 for(
c = 0;
c < lastcol-firstcol+1;
c++ )
1668 assert(*nnonz <= ntotalnonz);
1672 for(
r = 0;
r < lastrow-firstrow+1;
r++ )
1686 int namestoragesize,
1690 assert(colnames !=
NULL || namestoragesize == 0);
1691 assert(namestorage !=
NULL || namestoragesize == 0);
1692 assert(namestoragesize >= 0);
1709 int namestoragesize,
1713 assert(rownames !=
NULL || namestoragesize == 0);
1714 assert(namestorage !=
NULL || namestoragesize == 0);
1715 assert(namestoragesize >= 0);
1740 if( xprsobjsen < 0.0 )
1760 SCIPdebugMessage(
"getting objective values %d to %d\n", firstcol, lastcol);
1852 int primalinfeasible;
1902 SCIPdebugMessage(
" -> Xpress returned solstat=%d, pinfeas=%d, dinfeas=%d (%d iterations)\n",
1906 if( lpi->
solstat == XPRS_LP_INFEAS || lpi->
solstat == XPRS_LP_UNBOUNDED )
1920 if( presolving != 0 )
1925 SCIPdebugMessage(
"presolver may have solved the problem -> calling Xpress %s again without presolve\n",
1926 strcmp(method,
"p") == 0 ?
"primal simplex" : strcmp(method,
"d") == 0 ?
"dual simplex" :
"barrier");
1943 SCIPdebugMessage(
" -> Xpress returned solstat=%d, pinfeas=%d, dinfeas=%d (%d iterations)\n",
1952 if( (lpi->
solstat == XPRS_LP_OPTIMAL) && (primalinfeasible || dualinfeasible) )
2058 SCIPdebugMessage(
"calling Xpress strong branching on variable %d (%d iterations)\n", col, itlim);
2074 dbndval[0] =
EPSCEIL(psol-1.0, 1e-06);
2077 dbndval[1] =
EPSFLOOR(psol+1.0, 1e-06);
2084 if( (mstatus[0] == XPRS_LP_INFEAS) || (mstatus[0] == XPRS_LP_CUTOFF_IN_DUAL) )
2086 else if( (mstatus[0] == XPRS_LP_OPTIMAL) || (mstatus[0] == XPRS_LP_UNFINISHED) )
2095 if( (mstatus[1] == XPRS_LP_INFEAS) || (mstatus[1] == XPRS_LP_CUTOFF_IN_DUAL) )
2097 else if( (mstatus[1] == XPRS_LP_OPTIMAL) || (mstatus[1] == XPRS_LP_UNFINISHED) )
2147 SCIPdebugMessage(
"calling Xpress strong branching on %d variables (%d iterations)\n", ncols, itlim);
2153 nbranches = 2*ncols;
2166 for( j = 0; j < ncols; ++j )
2168 mbndind[2*j] = cols[j];
2169 dbndval[2*j] =
EPSCEIL(psols[j] - 1.0, 1e-06);
2170 cbndtype[2*j] =
'U';
2172 mbndind[2*j+1] = cols[j];
2173 dbndval[2*j+1] =
EPSFLOOR(psols[j] + 1.0, 1e-06);
2174 cbndtype[2*j+1] =
'L';
2180 for( j = 0; j < ncols; ++j )
2183 downvalid[j] =
TRUE;
2186 if( (mstatus[2*j] == XPRS_LP_INFEAS) || (mstatus[2*j] == XPRS_LP_CUTOFF_IN_DUAL) )
2188 else if( (mstatus[2*j] == XPRS_LP_OPTIMAL) || (mstatus[2*j] == XPRS_LP_UNFINISHED) )
2189 down[j] = dobjval[2*j];
2193 downvalid[j] =
FALSE;
2197 if( (mstatus[2*j+1] == XPRS_LP_INFEAS) || (mstatus[2*j+1] == XPRS_LP_CUTOFF_IN_DUAL) )
2199 else if( (mstatus[2*j+1] == XPRS_LP_OPTIMAL) || (mstatus[2*j+1] == XPRS_LP_UNFINISHED) )
2200 up[j] = dobjval[2*j+1];
2367 return (lpi->
solstat == XPRS_LP_UNBOUNDED);
2423 return (lpi->
solstat == XPRS_LP_INFEAS);
2456 if (nInfeasible == 0 && nIter > 0 && lpi->
solmethod ==
'p')
2473 return (lpi->
solstat == XPRS_LP_INFEAS);
2519 return (lpi->
solstat == XPRS_LP_UNBOUNDED);
2552 if (nInfeasible == 0 && nIter > 0 && lpi->
solmethod ==
'd')
2587#ifdef SCIP_DISABLED_CODE
2596 if( lpi->
solstat == XPRS_LP_UNBOUNDED )
2601 retcode = XPRSgetintattrib(lpi->
xprslp, XPRS_PRIMALINFEAS, &pinfeas);
2603 if( retcode != 0 || pinfeas )
2626 return (lpi->
solstat == XPRS_LP_CUTOFF || lpi->
solstat == XPRS_LP_CUTOFF_IN_DUAL);
2746 if( activity !=
NULL )
2758 for(
r = 0;
r < nrows;
r++ )
2868 SCIPdebugMessage(
"saving Xpress basis into %p/%p\n", (
void*)rstat, (
void*)cstat);
2879 for(
r = 0;
r < nrows; ++
r )
2917 SCIPdebugMessage(
"loading basis %p/%p into Xpress\n", (
void*)rstat, (
void*)cstat);
2926 for(
r = 0;
r < nrows; ++
r )
2933 slackstats[
r] = rstat[
r];
2979 for(
r = 0;
r < nrows;
r++ )
2981 if( bind[
r] < nrows )
2982 bind[
r] = -bind[
r]-1;
2986 bind[
r] = bind[
r] - irspace;
3020 if ( ninds !=
NULL )
3062 if ( ninds !=
NULL )
3105 if ( ninds !=
NULL )
3114 if( binvrow ==
NULL )
3121 binv = (
double*) binvrow;
3126 for(
c = 0;
c < ncols;
c++ )
3137 for(
i = 0;
i < nnonz;
i++ )
3178 if ( ninds !=
NULL )
3192 for(
i = 0;
i < nnonz;
i++ )
3240 SCIPdebugMessage(
"storing Xpress LPI state in %p (%d cols, %d rows)\n", (
void*)*lpistate, ncols, nrows);
3253 (*lpistate)->ncols = ncols;
3254 (*lpistate)->nrows = nrows;
3278 if( lpistate ==
NULL )
3281 if( lpistate->
ncols == 0 || lpistate->
nrows == 0 )
3293 SCIPdebugMessage(
"loading LPI state %p (%d cols, %d rows) into Xpress\n", (
void*)lpistate, lpistate->
ncols, lpistate->
nrows);
3306 for(
i = lpistate->
ncols;
i < ncols; ++
i )
3325 for(
i = lpistate->
nrows;
i < nrows; ++
i )
3363 if( *lpistate !=
NULL )
3378 return (lpistate !=
NULL);
3506 *ival = (ictrlval == 0);
3513 else if( ictrlval == 16 )
3523 *ival = (ictrlval != 0);
3528 if( *ival >= XPRS_MAXINT )
3529 *ival = XPRS_MAXINT;
3583 assert(ival >= 0 && ival <= 2);
3588 else if( ival == 1 )
3609 ival =
MIN(ival, XPRS_MAXINT);
3658 *dval = (double) -ictrlval;
3726 if( dval >= INT_MAX )
3729 ival = (int) -floor(dval);
3778 return XPRS_PLUSINFINITY;
3788 return (val >= XPRS_PLUSINFINITY);
3811 char* basename =
NULL;
3812 char* compression =
NULL;
3813 char* extension =
NULL;
3814 char* filename =
NULL;
3816 char* xpressfilename =
NULL;
3827 size = (int)strlen(fname)+1;
3830 if (size > XPRS_MAXPROBNAMELENGTH)
3844 (void)
SCIPsnprintf(xpressfilename, size,
"%s/%s", path, basename);
3846 (
void)
SCIPsnprintf(xpressfilename, size,
"%s", basename);
3849 if (compression !=
NULL || extension ==
NULL || basename ==
NULL)
3851 if (strcasecmp(extension,
"mps") == 0) {
3854 else if (strcasecmp(extension,
"lp") == 0) {
3879 char* basename =
NULL;
3880 char* compression =
NULL;
3881 char* extension =
NULL;
3882 char* filename =
NULL;
3884 char* xpressfilename =
NULL;
3895 size = (int)strlen(fname)+1;
3898 if (size > XPRS_MAXPROBNAMELENGTH)
3912 (void)
SCIPsnprintf(xpressfilename, size,
"%s/%s", path, basename);
3914 (
void)
SCIPsnprintf(xpressfilename, size,
"%s", basename);
3917 if (compression !=
NULL || extension ==
NULL || basename ==
NULL)
3919 if (strcasecmp(extension,
"mps") == 0) {
3922 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 objsense)
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 row, 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 *lhss, SCIP_Real *rhss, 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 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