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
151 (void)XPRSgetintattrib(lpi->
xprslp, XPRS_COLS, &ncols);
152 assert(0 <= firstcol && firstcol <= lastcol && lastcol < ncols);
165 (void)XPRSgetintattrib(lpi->
xprslp, XPRS_ROWS, &nrows);
166 assert(0 <= firstrow && firstrow <= lastrow && lastrow < nrows);
172#define debugCheckColrang(lpi, firstcol, lastcol)
173#define debugCheckRowrang(lpi, firstrow, lastrow)
210 assert(num <= lpi->boundchgsize);
234 assert(num <= lpi->sidechgsize);
257 assert(num <= lpi->valsize);
279 assert(num <= lpi->cstatsize);
301 assert(num <= lpi->rstatsize);
418 return XPRS_OBJ_MAXIMIZE;
420 return XPRS_OBJ_MINIMIZE;
433 const SCIP_Real* lhss,
434 const SCIP_Real* rhss
445 for(
i = 0;
i < nrows; ++
i )
448 if( lhss[
i] == rhss[
i] )
450 assert(XPRS_MINUSINFINITY < rhss[
i] && rhss[
i] < XPRS_PLUSINFINITY);
455 else if( lhss[
i] <= XPRS_MINUSINFINITY )
461 else if( rhss[
i] >= XPRS_PLUSINFINITY )
493 for(
i = 0;
i < nrows; ++
i )
503 lhss[
i] = XPRS_MINUSINFINITY;
509 rhss[
i] = XPRS_PLUSINFINITY;
540 for(
i = 0;
i < nrows; ++
i )
551 lhss[
i] = XPRS_MINUSINFINITY;
585 for(
i = 0;
i < nrows; ++
i )
601 rhss[
i] = XPRS_PLUSINFINITY;
627 else if( lhs !=
NULL )
629 else if( rhs !=
NULL )
656static _Thread_local
char xprsname[100];
658static char xprsname[] = {
'X',
'p',
'r',
'e',
's',
's',
' ',
'0' + XPVERSION / 10,
'0' + XPVERSION % 10,
'\0'};
669 if( XPRSgetversion(version) == 0 )
670 (void) sprintf(
xprsname,
"Xpress %s", version);
672 (
void) sprintf(
xprsname,
"Xpress %d", XPVERSION);
682 return "Linear Programming Solver developed by FICO (www.fico.com/en/products/fico-xpress-optimization)";
693 return (
void*) lpi->
xprslp;
707 SCIPerrorMessage(
"SCIPlpiSetIntegralityInformation() has not been implemented yet.\n");
753 assert(
sizeof(SCIP_Real) ==
sizeof(
double));
754 assert(
sizeof(SCIP_Bool) ==
sizeof(
int));
774 (void)strncpy((*lpi)->name, name, 199);
775 (*lpi)->name[199] =
'\0';
777 (*lpi)->larray =
NULL;
778 (*lpi)->uarray =
NULL;
779 (*lpi)->senarray =
NULL;
780 (*lpi)->rhsarray =
NULL;
781 (*lpi)->rngarray =
NULL;
782 (*lpi)->indarray =
NULL;
783 (*lpi)->valarray =
NULL;
784 (*lpi)->cstat =
NULL;
785 (*lpi)->rstat =
NULL;
786 (*lpi)->boundchgsize = 0;
787 (*lpi)->sidechgsize = 0;
789 (*lpi)->cstatsize = 0;
790 (*lpi)->rstatsize = 0;
791 (*lpi)->iterations = 0;
792 (*lpi)->solisbasic =
TRUE;
793 (*lpi)->clearstate =
FALSE;
794 (*lpi)->solmethod =
' ';
795 (*lpi)->par_lobjlim = -1e+40;
796 (*lpi)->par_uobjlim = +1e+40;
797 (*lpi)->par_fastlp = 0;
798 (*lpi)->par_presolve = 0;
799 (*lpi)->messagehdlr = messagehdlr;
801 CHECK_ZERO( messagehdlr, XPRScreateprob(&(*lpi)->xprslp) );
807 CHECK_ZERO( messagehdlr, XPRSsetintcontrol((*lpi)->xprslp, XPRS_OUTPUTLOG, 0) );
810 CHECK_ZERO( messagehdlr, XPRSloadlp((*lpi)->xprslp, (*lpi)->name, 0, 0,
NULL,
NULL,
NULL,
NULL, &zero,
NULL,
NULL,
NULL,
NULL,
NULL) );
830 CHECK_ZERO( (*lpi)->messagehdlr, XPRSdestroyprob(((*lpi)->xprslp)) );
833 CHECK_ZERO( (*lpi)->messagehdlr, XPRSfree() );
863 const SCIP_Real*
obj,
868 const SCIP_Real* lhs,
869 const SCIP_Real* rhs,
882 for( j = 0; j < nnonz; j++ )
898 SCIPdebugMessage(
"loading LP in column format into Xpress: %d cols, %d rows\n", ncols, nrows);
912 for(
c = 0;
c < ncols-1; ++
c )
917 lpi->
indarray[ncols-1] = nnonz - beg[ncols-1];
934 const SCIP_Real*
obj,
958 SCIPdebugMessage(
"adding %d columns with %d nonzeros to Xpress\n", ncols, nnonz);
972 for (j = 0; j < nnonz; ++j)
975 assert( 0 <= ind[j] && ind[j] < nrows );
984 for(
c = 0;
c < ncols;
c++ )
1009 SCIPdebugMessage(
"deleting %d columns from Xpress\n", lastcol - firstcol + 1);
1017 for(
c = firstcol;
c <= lastcol;
c++ )
1055 for(
c = 0;
c < ncols;
c++ )
1065 dstat[
c] = nkeptcols;
1079 const SCIP_Real* lhs,
1080 const SCIP_Real* rhs,
1085 const SCIP_Real* val
1101 SCIPdebugMessage(
"adding %d rows with %d nonzeros to Xpress\n", nrows, nnonz);
1112 for (j = 0; j < nnonz; ++j)
1115 assert( 0 <= ind[j] && ind[j] < ncols );
1130 for(
r = 0;
r < nrows;
r++ )
1154 SCIPdebugMessage(
"deleting %d rows from Xpress\n", lastrow - firstrow + 1);
1161 for(
r = firstrow;
r <= lastrow;
r++ )
1198 for(
r = 0;
r < nrows;
r++ )
1208 dstat[
r] = nkeptrows;
1233 CHECK_ZERO( lpi->
messagehdlr, XPRSloadlp(lpi->
xprslp, lpi->
name, 0, 0,
NULL,
NULL,
NULL,
NULL, &zero,
NULL,
NULL,
NULL,
NULL,
NULL) );
1243 const SCIP_Real* lb,
1259 for (j = 0; j < ncols; ++j)
1263 SCIPerrorMessage(
"LP Error: fixing lower bound for variable %d to infinity.\n", ind[j]);
1268 SCIPerrorMessage(
"LP Error: fixing upper bound for variable %d to -infinity.\n", ind[j]);
1287 const SCIP_Real* lhs,
1288 const SCIP_Real* rhs
1326 SCIPdebugMessage(
"changing coefficient row %d, column %d in Xpress to %g\n", row, col, newval);
1358 const SCIP_Real*
obj
1392 SCIPdebugMessage(
"scaling row %d with factor %g in Xpress\n", row, scaleval);
1405 for(
i = 0;
i < nnonz; ++
i )
1411 if( lhs > XPRS_MINUSINFINITY )
1413 else if( scaleval < 0.0 )
1414 lhs = XPRS_PLUSINFINITY;
1415 if( rhs < XPRS_PLUSINFINITY )
1417 else if( scaleval < 0.0 )
1418 rhs = XPRS_MINUSINFINITY;
1420 if( scaleval > 0.0 )
1452 SCIPdebugMessage(
"scaling column %d with factor %g in Xpress\n", col, scaleval);
1469 for(
i = 0;
i < nnonz; ++
i )
1479 if( lb > XPRS_MINUSINFINITY )
1481 else if( scaleval < 0.0 )
1482 lb = XPRS_PLUSINFINITY;
1483 if( ub < XPRS_PLUSINFINITY )
1485 else if( scaleval < 0.0 )
1486 ub = XPRS_MINUSINFINITY;
1488 if( scaleval > 0.0 )
1606 assert(*nnonz <= ntotalnonz);
1610 for(
c = 0;
c < lastcol-firstcol+1;
c++ )
1664 assert(*nnonz <= ntotalnonz);
1668 for(
r = 0;
r < lastrow-firstrow+1;
r++ )
1682 int namestoragesize,
1688 assert(colnames !=
NULL || namestoragesize == 0);
1689 assert(namestorage !=
NULL || namestoragesize == 0);
1690 assert(namestoragesize >= 0);
1692 assert(0 <= firstcol && firstcol <= lastcol);
1705 int namestoragesize,
1711 assert(rownames !=
NULL || namestoragesize == 0);
1712 assert(namestorage !=
NULL || namestoragesize == 0);
1713 assert(namestoragesize >= 0);
1715 assert(0 <= firstrow && firstrow <= lastrow);
1736 if( xprsobjsen < 0.0 )
1754 assert(firstcol <= lastcol);
1757 SCIPdebugMessage(
"getting objective values %d to %d\n", firstcol, lastcol);
1775 assert(firstcol <= lastcol);
1803 assert(firstrow <= lastrow);
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) )
2038 SCIP_Bool* downvalid,
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) )
2123 SCIP_Bool* downvalid,
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];
2232 SCIP_Bool* downvalid,
2254 SCIP_Bool* downvalid,
2275 SCIP_Bool* downvalid,
2297 SCIP_Bool* downvalid,
2340 SCIP_Bool* primalfeasible,
2341 SCIP_Bool* dualfeasible
2368 return (lpi->
solstat == XPRS_LP_UNBOUNDED);
2391 return (SCIP_Bool)hasRay;
2424 return (lpi->
solstat == XPRS_LP_INFEAS);
2457 if (nInfeasible == 0 && nIter > 0 && lpi->
solmethod ==
'p')
2474 return (lpi->
solstat == XPRS_LP_INFEAS);
2492 return (SCIP_Bool) hasRay;
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);
2726 SCIP_Real* activity,
2747 if( activity !=
NULL )
2759 for(
r = 0;
r < nrows;
r++ )
2790 SCIP_Real* dualfarkas
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 )
3085 const SCIP_Real* binvrow,
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 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
SCIP_DUALPACKET ROWPACKET
SCIP_DUALPACKET COLPACKET
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
@ SCIP_LPPAR_BARRIERCONVTOL
enum SCIP_LPSolQuality SCIP_LPSOLQUALITY
enum SCIP_ObjSen SCIP_OBJSEN
enum SCIP_Retcode SCIP_RETCODE