70#include <ClpSimplex.hpp>
71#include <ClpPrimalColumnSteepest.hpp>
72#include <ClpDualRowSteepest.hpp>
73#include <CoinIndexedVector.hpp>
76#include <config_clp.h>
77#define CLP_VERSION VERSION
91#if defined(_WIN32) || defined(_WIN64)
92#define snprintf _snprintf
96#ifdef LPI_CLP_DEBUG_WRITE_FILES
101#define SUMINFEASBOUND 1.0e-3
127#define COLS_PER_PACKET SCIP_DUALPACKETSIZE
129#define ROWS_PER_PACKET SCIP_DUALPACKETSIZE
315 lpi->
clp->defaultFactorizationFrequency();
339 lpi->
clp->setPerturbation(50);
408 lpi->
clp->setSpecialOptions(32|64|128|1024|32768|262144|2097152|0x2000000);
428 lpi->
clp->setPerturbation(100);
431 lpi->
clp->setSpecialOptions(32|64|128|1024|32768|262144|2097152|0x2000000);
434 lpi->
clp->setMoreSpecialOptions(8192);
437 lpi->
clp->setPersistenceFlag(0);
467 return "COIN-OR Linear Programming Solver developed by J. Forrest et.al. (projects.coin-or.org/Clp)";
476 return (
void*) lpi->
clp;
488 SCIPerrorMessage(
"SCIPlpiSetIntegralityInformation() has not been implemented yet.\n");
548 (*lpi)->cstatsize = 0;
549 (*lpi)->rstatsize = 0;
550 (*lpi)->startscratch =
true;
552 (*lpi)->validFactorization =
false;
553 (*lpi)->setFactorizationFrequency =
false;
554 (*lpi)->fastmip =
FALSE;
555 (*lpi)->lastalgorithm = 0;
583 (*lpi)->clp->setStrParam(
ClpProbName, std::string(name) );
586 (*lpi)->clp->setOptimizationDirection(
objsen);
589 (*lpi)->clp->setLogLevel(0);
592 (*lpi)->clp->scaling(3);
603 (*lpi)->clp->setSpecialOptions(32|64|128|1024|32768|262144|2097152|0x2000000);
633 (*lpi)->clp->setMoreSpecialOptions(8192);
681 const SCIP_Real*
obj,
686 const SCIP_Real* lhs,
687 const SCIP_Real* rhs,
698 for(
j = 0;
j < nnonz;
j++ )
726 mybeg[ncols] = nnonz;
729 clp->loadProblem(ncols, nrows,
mybeg,
ind, val, lb, ub,
obj, lhs, rhs);
733 clp->setOptimizationDirection(
objsen);
736 if ( colnames || rownames )
739 std::vector<std::string>
rowNames(nrows);
742 for (
int j = 0;
j < ncols; ++
j)
747 for (
int i = 0;
i < ncols; ++
i)
761 const SCIP_Real*
obj,
799 for(
j = 0;
j < nnonz;
j++ )
808 mybeg[ncols] = nnonz;
815 for (
int j = 0;
j <= ncols; ++
j)
819 lpi->
clp->addColumns(ncols, lb, ub,
obj,
mybeg, 0, 0);
827 for (
int j = 0;
j < ncols; ++
j)
860 lpi->
clp->deleteColumns(num,
which);
884 int ncols = lpi->
clp->getNumCols();
888 for (
int j = 0;
j < ncols; ++
j)
893 lpi->
clp->deleteColumns(cnt,
which);
898 for (
int j = 0;
j < ncols; ++
j)
917 const SCIP_Real* lhs,
918 const SCIP_Real* rhs,
948 int ncols = lpi->
clp->getNumCols();
949 for (
int j = 0;
j < nnonz; ++
j)
958 mybeg[nrows] = nnonz;
961 lpi->
clp->addRows(nrows, lhs, rhs,
mybeg,
ind, val);
966 for (
int i = 0;
i <= nrows; ++
i)
968 lpi->
clp->addRows(nrows, lhs, rhs,
mybeg, 0, 0);
975 std::vector<std::string>
rowNames(nrows);
976 for (
int j = 0;
j < nrows; ++
j)
1034 int nrows = lpi->
clp->getNumRows();
1038 for (
int i = 0;
i < nrows; ++
i)
1048 for (
int i = 0;
i < nrows; ++
i)
1077 lpi->
clp->resize(0,0);
1088 const SCIP_Real* lb,
1104#if SCIP_DISABLED_CODE
1107 double*
sol = lpi->
clp->primalColumnSolution();
1112 for (
int j = 0;
j < ncols; ++
j)
1125 clp->setColumnBounds(
ind[
j], lb[
j], ub[
j]);
1127#if SCIP_DISABLED_CODE
1131 if( clp->statusExists() )
1136 switch ( clp->getColumnStatus(
k) )
1138 case ClpSimplex::isFree:
1139 case ClpSimplex::superBasic:
1142 case ClpSimplex::atUpperBound:
1146 case ClpSimplex::isFixed:
1147 case ClpSimplex::atLowerBound:
1171 const SCIP_Real* lhs,
1172 const SCIP_Real* rhs
1189 for (
int i = 0;
i < nrows; ++
i)
1190 clp->setRowBounds(
ind[
i], lhs[
i], rhs[
i]);
1213 lpi->
clp->matrix()->modifyCoefficient(row, col, newval);
1233 lpi->
clp->setOptimizationDirection(
objsen);
1244 const SCIP_Real*
obj
1259 for(
int j = 0;
j < ncols; ++
j )
1289 double* lhs = clp->rowLower();
1290 double* rhs = clp->rowUpper();
1292 double lhsval = lhs[row];
1295 else if( scaleval < 0.0 )
1297 double rhsval = rhs[row];
1300 else if( scaleval < 0.0 )
1302 if( scaleval < 0.0 )
1317 assert( M->getNumCols() == clp->numberColumns() );
1320 const int* length = M->getVectorLengths();
1321 const int*
ind = M->getIndices();
1322 double* val = M->getMutableElements();
1324 for (
int j = 0;
j < M->getNumCols(); ++
j)
1362 double*
objvec = clp->objective();
1366 double* lb = clp->columnLower();
1367 double* ub = clp->columnUpper();
1368 double lbval = lb[col];
1369 double ubval = ub[col];
1373 else if( scaleval < 0.0 )
1377 else if( scaleval < 0.0 )
1379 if( scaleval < 0.0 )
1391 assert( M->getNumCols() == clp->numberColumns() );
1394 const int* length = M->getVectorLengths();
1395 double* val = M->getMutableElements();
1428 *nrows = lpi->
clp->numberRows();
1446 *ncols = lpi->
clp->numberColumns();
1464 *nnonz = lpi->
clp->getNumElements();
1499 const double*
colLower = clp->getColLower();
1500 const double*
colUpper = clp->getColUpper();
1506 if ( nnonz !=
NULL )
1510 assert( M->getNumCols() == clp->numberColumns() );
1513 const int*
Mlength = M->getVectorLengths();
1514 const int*
Mind = M->getIndices();
1515 const double*
Mval = M->getElements();
1561 const double*
rowLower = clp->getRowLower();
1562 const double*
rowUpper = clp->getRowUpper();
1568 if ( nnonz !=
NULL )
1572 M = clp->clpMatrix()->reverseOrderedCopy();
1574 assert( M->getNumRows() == clp->numberRows() );
1577 const int*
Mlength = M->getVectorLengths();
1578 const int*
Mind = M->getIndices();
1579 const double*
Mval = M->getElements();
1584 beg[
i-firstrow] = *nnonz;
1588 val[*nnonz] =
Mval[
k];
1676 if ( lpi->
clp->getObjSense() < 0 )
1700 const double*
obj = lpi->
clp->getObjCoefficients();
1786 *val = lpi->
clp->matrix()->getCoefficient(row, col);
1812 SCIPdebugMessage(
"calling Clp primal(): %d cols, %d rows\n", lpi->
clp->numberColumns(), lpi->
clp->numberRows());
1814#ifdef LPI_CLP_DEBUG_WRITE_FILES
1830 lpi->
clp->allSlackBasis(
true);
1848#ifdef LPI_CLP_DEBUG_WRITE_FILES
1872 if ( status == 4 || status == 5 || status == -1 )
1887 SCIPdebugMessage(
"calling Clp dual(): %d cols, %d rows\n", lpi->
clp->numberColumns(), lpi->
clp->numberRows());
1889#ifdef LPI_CLP_DEBUG_WRITE_FILES
1907 lpi->
clp->allSlackBasis(
true);
1925#ifdef LPI_CLP_DEBUG_WRITE_FILES
1949 if ( status == 4 || status == 5 || status == -1 )
1965 SCIPdebugMessage(
"calling Clp barrier(): %d cols, %d rows; crossover: %u\n", lpi->
clp->numberColumns(), lpi->
clp->numberRows(), crossover);
1976#if (CLP_VERSION_MAJOR >= 1 && CLP_VERSION_MINOR > 17) || CLP_VERSION_MAJOR >= 2
1980 int status = lpi->
clp->barrier(crossover);
1999 if ( status == 4 || status == 5 || status == -1 )
2057 int ncols = clp->numberColumns();
2058 assert( 0 <= col && col < ncols );
2071 int iterlimit = clp->maximumIterations();
2072 clp->setMaximumIterations(
itlim);
2075 double objval = clp->objectiveValue();
2082 lpi->
clp->setSpecialOptions(32|64|128|512|1024|2048|4096|32768|262144|2097152|0x2000000);
2134 clp->setMaximumIterations(iterlimit);
2166 SCIPdebugMessage(
"calling SCIPlpiStrongbranches() on %d variables (%d iterations)\n", ncols,
itlim);
2180 int n = clp->numberColumns();
2181 assert( 0 < ncols && ncols <= n );
2184 for (
int j = 0;
j < 2*ncols; ++
j)
2196 int iterlimit = clp->maximumIterations();
2197 clp->setMaximumIterations(
itlim);
2200 double objval = clp->objectiveValue();
2207 lpi->
clp->setSpecialOptions(32|64|128|512|1024|2048|4096|32768|262144|2097152|0x2000000);
2222 for (
int j = 0;
j < ncols; ++
j)
2224 assert( 0 <= cols[
j] && cols[
j] < n );
2255 for (
int j = 0;
j < ncols; ++
j)
2269 clp->setMaximumIterations(iterlimit);
2407 SCIP_Bool* primalfeasible,
2408 SCIP_Bool* dualfeasible
2418 if ( lpi->
clp->primalFeasible() )
2419 *primalfeasible =
TRUE;
2421 *primalfeasible =
FALSE;
2423 if ( lpi->
clp->dualFeasible() )
2424 *dualfeasible =
TRUE;
2426 *dualfeasible =
FALSE;
2429 if (lpi->
clp->status()==0 && ( ! (*primalfeasible) || ! (*dualfeasible)) )
2431 if ( !(*primalfeasible) && lpi->
clp->sumPrimalInfeasibilities() <
SUMINFEASBOUND )
2433 lpi->
clp->setNumberPrimalInfeasibilities(0);
2434 *primalfeasible =
TRUE;
2438 lpi->
clp->setNumberDualInfeasibilities(0);
2439 *dualfeasible =
TRUE;
2461 return ( lpi->
clp->status() == 2 );
2479 if ( lpi->
clp->rayExists() )
2481 return ( lpi->
clp->status() == 2 );
2497 return ( lpi->
clp->isProvenDualInfeasible() && lpi->
clp->primalFeasible() );
2516 return ( lpi->
clp->status() == 1 && (lpi->
clp->secondaryStatus() == 0 || lpi->
clp->secondaryStatus() == 6) );
2530 return ( lpi->
clp->primalFeasible() );
2549 return ( lpi->
clp->status() == 1 && lpi->
clp->secondaryStatus() == 0 && lpi->
clp->rayExists() );
2567 if ( lpi->
clp->rayExists() )
2569 if ( lpi->
clp->status() == 1 && lpi->
clp->secondaryStatus() == 0 )
2590 return ( lpi->
clp->status() == 1 && lpi->
clp->secondaryStatus() == 0 && lpi->
clp->dualFeasible() );
2604 return ( lpi->
clp->isProvenDualInfeasible() );
2618 return ( lpi->
clp->dualFeasible() );
2636 return( lpi->
clp->isProvenOptimal() && (lpi->
clp->secondaryStatus() == 0 || lpi->
clp->secondaryStatus() == 6));
2683 assert( 0 <= lpi->
clp->status() && lpi->
clp->status() <= 5 );
2685 return( (lpi->
clp->status() <= 3) && (lpi->
clp->secondaryStatus() <= 1 || lpi->
clp->secondaryStatus() == 6 || lpi->
clp->secondaryStatus() == 9) );
2700 if ( lpi->
clp->status() == 1 )
2702 if ( lpi->
clp->secondaryStatus() == 1 )
2708 return ( lpi->
clp->isObjectiveLimitTestValid() && lpi->
clp->isDualObjectiveLimitReached() );
2731 return ( lpi->
clp->status() == 3 && lpi->
clp->secondaryStatus() != 9 );
2747 return ( lpi->
clp->status() == 3 && lpi->
clp->secondaryStatus() == 9 );
2761 return lpi->
clp->status();
2793 SCIP_Real* activity,
2804 *
objval = clp->objectiveValue();
2808 const double*
sol = clp->getColSolution();
2811 if( dualsol !=
NULL )
2813 const double*
dsol = clp->getRowPrice();
2816 if( activity !=
NULL )
2818 const double*
act = clp->getRowActivity();
2821 if( redcost !=
NULL )
2823 const double*
red = clp->getReducedCost();
2844 const double*
clpray = lpi->
clp->unboundedRay();
2859 SCIP_Real* dualfarkas
2869 const double*
dualray = lpi->
clp->infeasibilityRay();
2878 double feastol = lpi->
clp->primalTolerance();
2879 for (
int j = 0;
j < lpi->
clp->numberRows(); ++
j)
2884 if ( val >= feastol )
2904 for (
int j = 0;
j < lpi->
clp->numberRows(); ++
j)
2905 dualfarkas[
j] = -
dualray[
j]/scalingfactor;
2910 for (
int j = 0;
j < lpi->
clp->numberRows(); ++
j)
2930 *iterations = lpi->
clp->numberIterations();
2982 for(
int i = 0;
i < clp->numberRows(); ++
i )
2984 switch ( clp->getRowStatus(
i) )
2986 case ClpSimplex::isFree:
2989 case ClpSimplex::basic:
2992 case ClpSimplex::atUpperBound:
2995 case ClpSimplex::atLowerBound:
2998 case ClpSimplex::superBasic:
3001 case ClpSimplex::isFixed:
3002 if (clp->getRowPrice()[
i] > 0.0)
3018 const double* lb = clp->getColLower();
3019 const double* ub = clp->getColUpper();
3022 for(
int j = 0;
j < clp->numberColumns(); ++
j )
3024 switch ( clp->getColumnStatus(
j) )
3026 case ClpSimplex::isFree:
3029 case ClpSimplex::basic:
3032 case ClpSimplex::atUpperBound:
3036 case ClpSimplex::atLowerBound:
3040 case ClpSimplex::superBasic:
3043 case ClpSimplex::isFixed:
3044 if (clp->getReducedCost()[
j] > 0.0)
3092 clp->createStatus();
3094 const double* lhs = clp->getRowLower();
3095 const double* rhs = clp->getRowUpper();
3097 for(
int i = 0;
i < clp->numberRows(); ++
i )
3099 int status = rstat[
i];
3100 assert( 0 <= status && status <= 3 );
3108 clp->setRowStatus(
i, ClpSimplex::isFree);
3110 clp->setRowStatus(
i, ClpSimplex::superBasic);
3113 clp->setRowStatus(
i, ClpSimplex::basic);
3116 clp->setRowStatus(
i, ClpSimplex::atUpperBound);
3120 clp->setRowStatus(
i, ClpSimplex::isFixed);
3122 clp->setRowStatus(
i, ClpSimplex::atLowerBound);
3131 const double* lb = clp->getColLower();
3132 const double* ub = clp->getColUpper();
3134 for(
int j = 0;
j < clp->numberColumns(); ++
j )
3136 int status = cstat[
j];
3137 assert( 0 <= status && status <= 3 );
3145 clp->setColumnStatus(
j, ClpSimplex::isFree);
3147 clp->setColumnStatus(
j, ClpSimplex::superBasic);
3150 clp->setColumnStatus(
j, ClpSimplex::basic);
3153 clp->setColumnStatus(
j, ClpSimplex::atUpperBound);
3157 clp->setColumnStatus(
j, ClpSimplex::isFixed);
3159 clp->setColumnStatus(
j, ClpSimplex::atLowerBound);
3182 clp->setWhatsChanged(clp->whatsChanged() & (~512));
3201 int nrows = clp->numberRows();
3202 int ncols = clp->numberColumns();
3210 if ( clp->secondaryStatus() == 6 )
3212 assert( clp->getNumElements() == 0 );
3213 for (
int i = 0;
i < nrows; ++
i)
3217 clp->getBasics(idx);
3219 for (
int i = 0;
i < nrows; ++
i)
3221 if ( idx[
i] < ncols )
3224 bind[
i] = -1 - (idx[
i] - ncols);
3262 clp->getBInvRow(
r, coef);
3301 clp->getBInvCol(
c, coef);
3336 clp->getBInvARow(
r, coef, 0);
3370 clp->getBInvACol(
c, coef);
3402 int ncols = lpi->
clp->numberColumns();
3403 int nrows = lpi->
clp->numberRows();
3418 (*lpistate)->ncols = ncols;
3419 (*lpistate)->nrows = nrows;
3446 if( lpistate ==
NULL )
3464 SCIP_Real
bnd = (lpi->
clp->getColLower())[
i];
3468 bnd = (lpi->
clp->getColUpper())[
i];
3496 lpi->
clp->allSlackBasis(
true);
3515 if ( *lpistate !=
NULL )
3528 return (lpistate !=
NULL);
3545 if ( lpi->
clp->readBasis(
fname) < 0 )
3571 if ( lpi->
clp->writeBasis(
fname,
false, 0) )
3666 if( lpi->
clp->scalingFlag() != 0 )
3678 *
ival = lpi->
clp->maximumIterations();
3754 lpi->
clp->scaling((
ival > 0) ? 3 : 0);
3771 lpi->
clp->setLogLevel(2);
3773 lpi->
clp->setLogLevel(0);
3778 lpi->
clp->setMaximumIterations(
ival);
3811 *
dval = lpi->
clp->primalTolerance();
3814 *
dval = lpi->
clp->dualTolerance();
3820 *
dval = lpi->
clp->dualObjectiveLimit();
3823 *
dval = lpi->
clp->maximumSeconds();
3856 lpi->
clp->setPrimalTolerance(
dval);
3867 lpi->
clp->setDualTolerance(
dval);
3875 lpi->
clp->setDualObjectiveLimit(
dval);
3885 lpi->
clp->setMaximumSeconds(
dval);
3957 const char* filename
3962 f =
fopen(filename,
"r");
3994 if ( lpi->
clp->readMps(
fname,
true,
false) )
4019 if ( lpi->
clp->writeMps(
fname, 0, 2, lpi->
clp->optimizationDirection()) )
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
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 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)
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)
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)
assert(minobj< SCIPgetCutoffbound(scip))
interface methods for specific LP solvers
static void lpistatePack(SCIP_LPISTATE *lpistate, const int *cstat, const int *rstat)
static void lpistateUnpack(const SCIP_LPISTATE *lpistate, int *cstat, int *rstat)
static SCIP_Bool fileExists(const char *filename)
static int rowpacketNum(int nrows)
SCIP_DUALPACKET ROWPACKET
static SCIP_RETCODE ensureCstatMem(SCIP_LPI *lpi, int num)
static void lpistateFree(SCIP_LPISTATE **lpistate, BMS_BLKMEM *blkmem)
SCIP_DUALPACKET COLPACKET
static void unsetFastmipClpParameters(SCIP_LPI *lpi)
static void setFactorizationFrequency(SCIP_LPI *lpi)
static SCIP_RETCODE ensureRstatMem(SCIP_LPI *lpi, int num)
static int colpacketNum(int ncols)
static void setFastmipClpParameters(SCIP_LPI *lpi)
static SCIP_RETCODE lpistateCreate(SCIP_LPISTATE **lpistate, BMS_BLKMEM *blkmem, int ncols, int nrows)
static void invalidateSolution(SCIP_LPI *lpi)
SCIP_DUALPACKET ROWPACKET
SCIP_DUALPACKET COLPACKET
#define BMSfreeMemory(ptr)
#define BMSfreeBlockMemory(mem, ptr)
#define BMSallocBlockMemory(mem, ptr)
#define BMSreallocMemoryArray(ptr, num)
#define BMSallocMemoryArray(ptr, num)
#define BMSfreeMemoryArray(ptr)
#define BMSallocBlockMemoryArray(mem, ptr, num)
#define BMScopyMemoryArray(ptr, source, num)
#define BMSfreeBlockMemoryArray(mem, ptr, num)
struct BMS_BlkMem BMS_BLKMEM
#define BMSfreeMemoryArrayNull(ptr)
#define BMSallocMemory(ptr)
public methods for message output
bool setFactorizationFrequency
@ 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