lpi_grb.c
Go to the documentation of this file.
27 * - The support of ranged rows is complicated for the user: one has to keep track of the additional 43 /*--+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/ 57 SCIPmessagePrintWarning((messagehdlr), "Gurobi error %d: %s\n", _restat_, GRBgeterrormsg(grbenv)); \ 82 #define SCIP_SINGLEPACKETSIZE (sizeof(SCIP_SINGLEPACKET)*8) /**< each entry needs one bit of information */ 84 #define SCIP_DUALPACKETSIZE (sizeof(SCIP_DUALPACKET)*4) /**< each entry needs two bits of information */ 86 typedef SCIP_DUALPACKET COLPACKET; /* each column needs two bits of information (basic/on_lower/on_upper) */ 88 typedef SCIP_DUALPACKET ROWPACKET; /* each row needs two bit of information (basic/on_lower/on_upper) */ 92 /* At several places we need to guarantee to have a factorization of an optimal basis and call the simplex to produce 93 * it. In a numerical perfect world, this should need no iterations. However, due to numerical inaccuracies after 95 #define GRB_REFACTORMAXITERS 50 /* maximal number of iterations allowed for producing a refactorization of the basis */ 351 CHECK_ZERO( lpi->messagehdlr, GRBsetintattrarray(lpi->grbmodel, GRB_INT_ATTR_VBASIS, 0, ncols, lpi->cstat) ); 352 CHECK_ZERO( lpi->messagehdlr, GRBsetintattrarray(lpi->grbmodel, GRB_INT_ATTR_CBASIS, 0, nrows, lpi->rstat) ); 385 /* The basis information for Gurobi is negative. So we cannot use the functions in bitencode.h/c. The functions below are a modified copy. */ 395 static const SCIP_DUALPACKET mask[SCIP_DUALPACKETSIZE][4] = { /* if the packet size changes, the mask has to be updated */ 626 CHECK_ZERO( lpi->messagehdlr, GRBgetintparam(lpi->grbenv, intparam[i], &(grbparam->intparval[i])) ); 630 CHECK_ZERO( lpi->messagehdlr, GRBgetdblparam(lpi->grbenv, dblparam[i], &(grbparam->dblparval[i])) ); 678 CHECK_ZERO( lpi->messagehdlr, GRBsetintparam(lpi->grbenv, intparam[i], lpi->curparam.intparval[i]) ); 688 CHECK_ZERO( lpi->messagehdlr, GRBsetdblparam(lpi->grbenv, dblparam[i], lpi->curparam.dblparval[i]) ); 916 /** converts Gurobi's sen/rhs pairs into SCIP's lhs/rhs pairs, only storing the left hand side */ 955 /** converts Gurobi's sen/rhs pairs into SCIP's lhs/rhs pairs, only storing the right hand side */ 1018 /** after restoring old LP data, need to resolve the LP to be able to retrieve correct information */ 1027 CHECK_ZERO( lpi->messagehdlr, GRBsetintparam(lpi->grbenv, GRB_INT_PAR_METHOD, GRB_METHOD_DUAL) ); 1034 /* modifying the LP, restoring the old LP, and loading the old basis is not enough for Gurobi to be able to return 1037 * In a numerical perfect world, GRB_REFACTORMAXITERS below should be zero. However, due to numerical inaccuracies 1042 SCIPmessagePrintWarning(lpi->messagehdlr, "Gurobi needed %d iterations to restore optimal basis.\n", (int) cnt); 1117 assert(sizeof(SCIP_Real) == sizeof(double)); /* Gurobi only works with doubles as floating points */ 1143 CHECK_ZERO( messagehdlr, GRBnewmodel(grbenv, &(*lpi)->grbmodel, name, 0, NULL, NULL, NULL, NULL, NULL) ); 1178 SCIPmessagePrintWarning(messagehdlr, "The Gurobi LPI is a beta version only - use with care.\n"); 1281 CHECK_ZERO( lpi->messagehdlr, GRBloadmodel(lpi->grbenv, &(lpi->grbmodel), NULL, ncols, nrows, objsen, 0.0, (SCIP_Real*)obj, 1282 lpi->senarray, lpi->rhsarray, (int*)beg, cnt, (int*)ind, (SCIP_Real*)val, (SCIP_Real*)lb, (SCIP_Real*)ub, NULL, colnames, rownames) ); 1315 const int* beg, /**< start index of each column in ind- and val-array, or NULL if nnonz == 0 */ 1328 CHECK_ZERO( lpi->messagehdlr, GRBaddvars(lpi->grbmodel, ncols, nnonz, (int*)beg, (int*)ind, (SCIP_Real*)val, (SCIP_Real*)obj, (SCIP_Real*)lb, (SCIP_Real*)ub, NULL, colnames) ) 1372 /** deletes columns from SCIP_LP; the new position of a column must not be greater that its old position */ 1437 CHECK_ZERO( lpi->messagehdlr, GRBaddconstrs(lpi->grbmodel, nrows, nnonz, (int*)beg, (int*)ind, (SCIP_Real*)val, lpi->senarray, lpi->rhsarray, rownames) ); 1480 /** deletes rows from SCIP_LP; the new position of a row must not be greater that its old position */ 1543 CHECK_ZERO( lpi->messagehdlr, GRBnewmodel(lpi->grbenv, &(lpi->grbmodel), "", 0, NULL, NULL, NULL, NULL, NULL) ); 1572 CHECK_ZERO( lpi->messagehdlr, GRBsetdblattrlist(lpi->grbmodel, GRB_DBL_ATTR_LB, ncols, (int*)ind, (SCIP_Real*)lb) ); 1573 CHECK_ZERO( lpi->messagehdlr, GRBsetdblattrlist(lpi->grbmodel, GRB_DBL_ATTR_UB, ncols, (int*)ind, (SCIP_Real*)ub) ); 1604 CHECK_ZERO( lpi->messagehdlr, GRBsetdblattrlist(lpi->grbmodel, GRB_DBL_ATTR_RHS, nrows, (int*)ind, lpi->rhsarray) ); 1605 CHECK_ZERO( lpi->messagehdlr, GRBsetcharattrlist(lpi->grbmodel, GRB_CHAR_ATTR_SENSE, nrows, (int*)ind, lpi->senarray) ); 1623 SCIPdebugMessage("changing coefficient row %d, column %d in Gurobi to %g\n", row, col, newval); 1668 CHECK_ZERO( lpi->messagehdlr, GRBsetdblattrlist(lpi->grbmodel, GRB_DBL_ATTR_OBJ, ncols, ind, obj) ); 1675 /** multiplies a row with a non-zero scalar; for negative scalars, the row's sense is switched accordingly */ 1701 SCIP_CALL( SCIPlpiGetRows(lpi, row, row, &lhs, &rhs, &nnonz, &beg, lpi->indarray, lpi->valarray) ); 1730 /** multiplies a column with a non-zero scalar; the objective value is multiplied with the scalar, and the bounds 1759 SCIP_CALL( SCIPlpiGetCols(lpi, col, col, &lb, &ub, &nnonz, &beg, lpi->indarray, lpi->valarray) ); 1855 /** gets columns from LP problem object; the arrays have to be large enough to store all values 1887 CHECK_ZERO( lpi->messagehdlr, GRBgetdblattrarray(lpi->grbmodel, GRB_DBL_ATTR_LB, firstcol, lastcol-firstcol+1, lb) ); 1888 CHECK_ZERO( lpi->messagehdlr, GRBgetdblattrarray(lpi->grbmodel, GRB_DBL_ATTR_UB, firstcol, lastcol-firstcol+1, ub) ); 1900 CHECK_ZERO( lpi->messagehdlr, GRBgetvars(lpi->grbmodel, nnonz, beg, ind, val, firstcol, lastcol-firstcol+1) ); 1944 CHECK_ZERO( lpi->messagehdlr, GRBgetdblattrarray(lpi->grbmodel, GRB_DBL_ATTR_RHS, firstrow, lastrow-firstrow+1, lpi->rhsarray) ); 1945 CHECK_ZERO( lpi->messagehdlr, GRBgetcharattrarray(lpi->grbmodel, GRB_CHAR_ATTR_SENSE, firstrow, lastrow-firstrow+1, lpi->senarray) ); 1958 CHECK_ZERO( lpi->messagehdlr, GRBgetconstrs(lpi->grbmodel, nnonz, beg, ind, val, firstrow, lastrow-firstrow+1) ); 1977 int namestoragesize, /**< size of namestorage (if 0, storageleft returns the storage needed) */ 1992 int namestoragesize, /**< size of namestorage (if 0, -storageleft returns the storage needed) */ 2014 CHECK_ZERO( lpi->messagehdlr, GRBgetintattr(lpi->grbmodel, GRB_INT_ATTR_MODELSENSE, &grbobjsen) ); 2037 CHECK_ZERO( lpi->messagehdlr, GRBgetdblattrarray(lpi->grbmodel, GRB_DBL_ATTR_OBJ, firstcol, lastcol-firstcol+1, vals) ); 2065 CHECK_ZERO( lpi->messagehdlr, GRBgetdblattrarray(lpi->grbmodel, GRB_DBL_ATTR_LB, firstcol, lastcol-firstcol+1, lbs) ); 2070 CHECK_ZERO( lpi->messagehdlr, GRBgetdblattrarray(lpi->grbmodel, GRB_DBL_ATTR_UB, firstcol, lastcol-firstcol+1, ubs) ); 2094 CHECK_ZERO( lpi->messagehdlr, GRBgetdblattrarray(lpi->grbmodel, GRB_DBL_ATTR_RHS, firstrow, lastrow-firstrow+1, lpi->rhsarray) ); 2095 CHECK_ZERO( lpi->messagehdlr, GRBgetcharattrarray(lpi->grbmodel, GRB_CHAR_ATTR_SENSE, firstrow, lastrow-firstrow+1, lpi->senarray) ); 2170 CHECK_ZERO( lpi->messagehdlr, GRBsetintparam(lpi->grbenv, GRB_INT_PAR_METHOD, GRB_METHOD_PRIMAL) ); 2187 CHECK_ZERO( lpi->messagehdlr, GRBgetintattr(lpi->grbmodel, GRB_INT_ATTR_STATUS, &lpi->solstat) ); 2189 SCIPdebugMessage("Gurobi primal simplex needed %d iterations to gain LP status %d\n", (int) cnt, lpi->solstat); 2192 CHECK_ZERO( lpi->messagehdlr, CPXsolninfo(lpi->grbenv, lpi->grbmodel, NULL, NULL, &primalfeasible, &dualfeasible) ); 2209 /* maybe the preprocessor solved the problem; but we need a solution, so solve again without preprocessing */ 2210 SCIPdebugMessage("presolver may have solved the problem -> calling Gurobi primal simplex again without presolve\n"); 2213 CHECK_ZERO( lpi->messagehdlr, GRBsetintparam(lpi->grbenv, GRB_INT_PAR_PRESOLVE, GRB_PRESOLVE_OFF) ); 2228 CHECK_ZERO( lpi->messagehdlr, GRBgetintattr(lpi->grbmodel, GRB_INT_ATTR_STATUS, &lpi->solstat) ); 2229 SCIPdebugMessage(" -> Gurobi returned solstat=%d (%d iterations)\n", lpi->solstat, lpi->iterations); 2238 SCIPerrorMessage("Gurobi primal simplex returned GRB_INF_OR_UNBD after presolving was turned off\n"); 2281 CHECK_ZERO( lpi->messagehdlr, GRBsetintparam(lpi->grbenv, GRB_INT_PAR_METHOD, GRB_METHOD_DUAL) ); 2298 CHECK_ZERO( lpi->messagehdlr, GRBgetintattr(lpi->grbmodel, GRB_INT_ATTR_STATUS, &lpi->solstat) ); 2300 SCIPdebugMessage("Gurobi dual simplex needed %d iterations to gain LP status %d\n", (int) cnt, lpi->solstat); 2314 /* maybe the preprocessor solved the problem; but we need a solution, so solve again without preprocessing */ 2315 SCIPdebugMessage("presolver may have solved the problem -> calling Gurobi dual simplex again without presolve\n"); 2334 CHECK_ZERO( lpi->messagehdlr, GRBgetintattr(lpi->grbmodel, GRB_INT_ATTR_STATUS, &lpi->solstat) ); 2335 SCIPdebugMessage(" -> Gurobi returned solstat=%d (%d iterations)\n", lpi->solstat, lpi->iterations); 2344 SCIPerrorMessage("Gurobi dual simplex returned GRB_INF_OR_UNBD after presolving was turned off\n"); 2351 /** calls barrier or interior point algorithm to solve the LP with crossover to simplex basis */ 2396 CHECK_ZERO( lpi->messagehdlr, GRBsetintparam(lpi->grbenv, GRB_INT_PAR_METHOD, GRB_METHOD_BARRIER) ); 2413 CHECK_ZERO( lpi->messagehdlr, GRBgetintattr(lpi->grbmodel, GRB_INT_ATTR_STATUS, &lpi->solstat) ); 2415 SCIPdebugMessage("Gurobi barrier needed %d iterations to gain LP status %d\n", (int) cnt, lpi->solstat); 2429 /* maybe the preprocessor solved the problem; but we need a solution, so solve again without preprocessing */ 2430 SCIPdebugMessage("presolver may have solved the problem -> calling Gurobi barrier again without presolve\n"); 2449 CHECK_ZERO( lpi->messagehdlr, GRBgetintattr(lpi->grbmodel, GRB_INT_ATTR_STATUS, &lpi->solstat) ); 2450 SCIPdebugMessage(" -> Gurobi returned solstat=%d (%d iterations)\n", lpi->solstat, lpi->iterations); 2459 SCIPerrorMessage("Gurobi dual simplex returned GRB_INF_OR_UNBD after presolving was turned off\n"); 2527 CHECK_ZERO( lpi->messagehdlr, GRBgetintattr(lpi->grbmodel, GRB_INT_ATTR_MODELSENSE, &objsen) ); 2531 CHECK_ZERO( lpi->messagehdlr, GRBgetdblattrelement(lpi->grbmodel, GRB_DBL_ATTR_LB, col, &oldlb) ); 2532 CHECK_ZERO( lpi->messagehdlr, GRBgetdblattrelement(lpi->grbmodel, GRB_DBL_ATTR_UB, col, &oldub) ); 2550 SCIPdebugMessage("strong branching down (%g) on x%d (%g) with %d iterations\n", newub, col, psol, itlim); 2552 CHECK_ZERO( lpi->messagehdlr, GRBsetdblattrelement(lpi->grbmodel, GRB_DBL_ATTR_UB, col, newub) ); 2575 CHECK_ZERO( lpi->messagehdlr, GRBsetdblattrelement(lpi->grbmodel, GRB_DBL_ATTR_UB, col, oldub) ); 2602 SCIPdebugMessage("strong branching up (%g) on x%d (%g) with %d iterations\n", newlb, col, psol, itlim); 2604 CHECK_ZERO( lpi->messagehdlr, GRBsetdblattrelement(lpi->grbmodel, GRB_DBL_ATTR_LB, col, newlb) ); 2627 CHECK_ZERO( lpi->messagehdlr, GRBsetdblattrelement(lpi->grbmodel, GRB_DBL_ATTR_LB, col, oldlb) ); 2716 SCIP_CALL( lpiStrongbranch(lpi, cols[j], psols[j], itlim, &(down[j]), &(up[j]), &(downvalid[j]), &(upvalid[j]), iter) ); 2775 SCIP_CALL( lpiStrongbranch(lpi, cols[j], psols[j], itlim, &(down[j]), &(up[j]), &(downvalid[j]), &(upvalid[j]), iter) ); 2821 *primalfeasible = (lpi->solstat == GRB_OPTIMAL || (lpi->solstat == GRB_UNBOUNDED && algo == GRB_METHOD_PRIMAL)); 2826 *dualfeasible = (lpi->solstat == GRB_OPTIMAL || (lpi->solstat == GRB_INFEASIBLE && algo == GRB_METHOD_DUAL)); 2846 CHECK_ZERO( lpi->messagehdlr, GRBgetdblattr(lpi->grbmodel, GRB_DBL_ATTR_CONSTR_SRESIDUAL, &viol) ); 2860 CHECK_ZERO( lpi->messagehdlr, GRBgetdblattr(lpi->grbmodel, GRB_DBL_ATTR_DUAL_SRESIDUAL, &viol) ); 2873 /** returns TRUE iff LP is proven to have a primal unbounded ray (but not necessary a primal feasible point); 2887 /** returns TRUE iff LP is proven to have a primal unbounded ray (but not necessary a primal feasible point), 2920 /* Probably GRB_UNBOUNDED means that the problem has an unbounded ray, but not necessarily that a feasible primal solution exists. */ 2955 return (lpi->solstat == GRB_OPTIMAL || (lpi->solstat == GRB_UNBOUNDED && algo == GRB_METHOD_PRIMAL)); 2958 /** returns TRUE iff LP is proven to have a dual unbounded ray (but not necessary a dual feasible point); 2972 /** returns TRUE iff LP is proven to have a dual unbounded ray (but not necessary a dual feasible point), 3040 return (lpi->solstat == GRB_OPTIMAL || (lpi->solstat == GRB_INFEASIBLE && algo == GRB_METHOD_DUAL)); 3116 /** tries to reset the internal status of the LP solver in order to ignore an instability of the last solving call */ 3133 * @note if the solution status is iteration limit reached (GRB_ITERATION_LIMIT), the objective value was not computed 3180 CHECK_ZERO( lpi->messagehdlr, GRBgetdblattrarray(lpi->grbmodel, GRB_DBL_ATTR_X, 0, ncols, primsol) ); 3185 CHECK_ZERO( lpi->messagehdlr, GRBgetdblattrarray(lpi->grbmodel, GRB_DBL_ATTR_PI, 0, nrows, dualsol) ); 3193 CHECK_ZERO( lpi->messagehdlr, GRBgetdblattrarray(lpi->grbmodel, GRB_DBL_ATTR_SLACK, 0, nrows, activity) ); 3197 CHECK_ZERO( lpi->messagehdlr, GRBgetdblattrarray(lpi->grbmodel, GRB_DBL_ATTR_RHS, 0, nrows, lpi->rhsarray) ); 3198 CHECK_ZERO( lpi->messagehdlr, GRBgetcharattrarray(lpi->grbmodel, GRB_CHAR_ATTR_SENSE, 0, nrows, lpi->senarray) ); 3221 CHECK_ZERO( lpi->messagehdlr, GRBgetdblattrarray(lpi->grbmodel, GRB_DBL_ATTR_RC, 0, ncols, redcost) ); 3244 CHECK_ZERO( lpi->messagehdlr, GRBgetdblattrarray(lpi->grbmodel, GRB_DBL_ATTR_UNBDRAY, 0, ncols, ray) ); 3267 CHECK_ZERO( lpi->messagehdlr, GRBgetdblattrarray(lpi->grbmodel, GRB_DBL_ATTR_FARKASDUAL, 0, nrows, dualfarkas) ); 3289 * Such information is usually only available, if also a (maybe not optimal) solution is available. 3290 * The LPI should return SCIP_INVALID for @p quality, if the requested quantity is not available. 3318 /** gets current basis status for columns and rows; arrays must be large enough to store the basis status */ 3340 CHECK_ZERO( lpi->messagehdlr, GRBgetintattrelement(lpi->grbmodel, GRB_INT_ATTR_CBASIS, i, &stat) ); 3378 CHECK_ZERO( lpi->messagehdlr, GRBgetintattrelement(lpi->grbmodel, GRB_INT_ATTR_VBASIS, j, &stat) ); 3435 CHECK_ZERO( lpi->messagehdlr, GRBsetintattrelement(lpi->grbmodel, GRB_INT_ATTR_CBASIS, i, GRB_BASIC) ); 3439 CHECK_ZERO( lpi->messagehdlr, GRBsetintattrelement(lpi->grbmodel, GRB_INT_ATTR_CBASIS, i, GRB_NONBASIC_LOWER) ); 3443 CHECK_ZERO( lpi->messagehdlr, GRBsetintattrelement(lpi->grbmodel, GRB_INT_ATTR_CBASIS, i, GRB_NONBASIC_UPPER) ); 3447 CHECK_ZERO( lpi->messagehdlr, GRBsetintattrelement(lpi->grbmodel, GRB_INT_ATTR_CBASIS, i, GRB_SUPERBASIC) ); 3462 CHECK_ZERO( lpi->messagehdlr, GRBsetintattrelement(lpi->grbmodel, GRB_INT_ATTR_VBASIS, j, GRB_BASIC) ); 3466 CHECK_ZERO( lpi->messagehdlr, GRBsetintattrelement(lpi->grbmodel, GRB_INT_ATTR_VBASIS, j, GRB_NONBASIC_LOWER) ); 3470 CHECK_ZERO( lpi->messagehdlr, GRBsetintattrelement(lpi->grbmodel, GRB_INT_ATTR_VBASIS, j, GRB_NONBASIC_UPPER) ); 3473 CHECK_ZERO( lpi->messagehdlr, GRBsetintattrelement(lpi->grbmodel, GRB_INT_ATTR_VBASIS, j, GRB_SUPERBASIC) ); 3486 /** returns the indices of the basic columns and rows; basic column n gives value n, basic row m gives value -1-m */ 3537 CHECK_ZERO( lpi->messagehdlr, GRBgetintattrelement(lpi->grbmodel, GRB_INT_ATTR_CBASIS, i, &stat) ); 3546 CHECK_ZERO( lpi->messagehdlr, GRBgetintattrelement(lpi->grbmodel, GRB_INT_ATTR_VBASIS, j, &stat) ); 3559 * @note The LP interface defines slack variables to have coefficient +1. This means that if, internally, the LP solver 3560 * uses a -1 coefficient, then rows associated with slacks variables whose coefficient is -1, should be negated; 3652 * @note The LP interface defines slack variables to have coefficient +1. This means that if, internally, the LP solver 3653 * uses a -1 coefficient, then rows associated with slacks variables whose coefficient is -1, should be negated; 3749 * @note The LP interface defines slack variables to have coefficient +1. This means that if, internally, the LP solver 3750 * uses a -1 coefficient, then rows associated with slacks variables whose coefficient is -1, should be negated; 3758 const SCIP_Real* binvrow, /**< row in (A_B)^-1 from prior call to SCIPlpiGetBInvRow(), or NULL */ 3832 * @note The LP interface defines slack variables to have coefficient +1. This means that if, internally, the LP solver 3833 * uses a -1 coefficient, then rows associated with slacks variables whose coefficient is -1, should be negated; 3960 SCIPdebugMessage("stored Gurobi LPI state in %p (%d cols, %d rows)\n", (void*) *lpistate, ncols, nrows); 3981 /** loads LPi state (like basis information) into solver; note that the LP might have been extended with additional 4007 SCIPdebugMessage("loading LPI state %p (%d cols, %d rows) into Gurobi LP with %d cols and %d rows\n", 4024 CHECK_ZERO( lpi->messagehdlr, GRBgetdblattrarray(lpi->grbmodel, GRB_DBL_ATTR_LB, i, i, &bnd) ); 4028 CHECK_ZERO( lpi->messagehdlr, GRBgetdblattrarray(lpi->grbmodel, GRB_DBL_ATTR_UB, i, i, &bnd) ); 4097 if ( l > 4 && fname[l-4] == '.' && fname[l-3] == 'b' && fname[l-2] == 'a' && fname[l-1] == 's' ) 4124 if ( l > 4 && fname[l-4] == '.' && fname[l-3] == 'b' && fname[l-2] == 'a' && fname[l-1] == 's' ) 4169 /** loads LPi pricing norms into solver; note that the LP might have been extended with additional 4240 assert( temp == GRB_PRESOLVE_AUTO || temp == GRB_PRESOLVE_OFF || temp == GRB_PRESOLVE_CONSERVATIVE || temp == GRB_PRESOLVE_AGGRESSIVE ); 4374 CHECK_ZERO( lpi->messagehdlr, GRBgetintattr(lpi->grbmodel, GRB_INT_ATTR_MODELSENSE, &objsen) ); 4381 CHECK_ZERO( lpi->messagehdlr, GRBgetintattr(lpi->grbmodel, GRB_INT_ATTR_MODELSENSE, &objsen) ); 4426 CHECK_ZERO( lpi->messagehdlr, GRBgetintattr(lpi->grbmodel, GRB_INT_ATTR_MODELSENSE, &objsen) ); 4431 CHECK_ZERO( lpi->messagehdlr, GRBgetintattr(lpi->grbmodel, GRB_INT_ATTR_MODELSENSE, &objsen) ); static SCIP_RETCODE setParameterValues(SCIP_LPI *lpi, GRBPARAM *grbparam) Definition: lpi_grb.c:658 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) Definition: lpi_grb.c:2743 #define BMSfreeBlockMemoryArrayNull(mem, ptr, num) Definition: memory.h:422 static SCIP_RETCODE getDblParam(SCIP_LPI *lpi, const char *param, double *p) Definition: lpi_grb.c:764 SCIP_RETCODE SCIPlpiGetRealSolQuality(SCIP_LPI *lpi, SCIP_LPSOLQUALITY qualityindicator, SCIP_Real *quality) Definition: lpi_grb.c:3292 SCIP_RETCODE SCIPlpiSetState(SCIP_LPI *lpi, BMS_BLKMEM *blkmem, SCIP_LPISTATE *lpistate) Definition: lpi_grb.c:3984 SCIP_RETCODE SCIPlpiGetObjsen(SCIP_LPI *lpi, SCIP_OBJSEN *objsen) Definition: lpi_grb.c:2001 SCIP_RETCODE SCIPlpiGetBInvACol(SCIP_LPI *lpi, int c, SCIP_Real *coef, int *inds, int *ninds) Definition: lpi_grb.c:3838 SCIP_RETCODE SCIPlpiStartStrongbranch(SCIP_LPI *lpi) Definition: lpi_grb.c:2466 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) Definition: lpi_grb.c:1859 static void lpistateUnpack(const SCIP_LPISTATE *lpistate, int *cstat, int *rstat) Definition: lpi_grb.c:552 SCIP_RETCODE SCIPlpiScaleCol(SCIP_LPI *lpi, int col, SCIP_Real scaleval) Definition: lpi_grb.c:1733 Definition: type_lpi.h:50 SCIP_RETCODE SCIPlpiChgBounds(SCIP_LPI *lpi, int ncols, const int *ind, const SCIP_Real *lb, const SCIP_Real *ub) Definition: lpi_grb.c:1550 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) Definition: lpi_grb.c:1307 SCIP_RETCODE SCIPlpiChgCoef(SCIP_LPI *lpi, int row, int col, SCIP_Real newval) Definition: lpi_grb.c:1613 Definition: type_lpi.h:41 SCIP_RETCODE SCIPlpiFreeNorms(SCIP_LPI *lpi, BMS_BLKMEM *blkmem, SCIP_LPINORMS **lpinorms) Definition: lpi_grb.c:4185 interface methods for specific LP solvers static SCIP_RETCODE lpistateCreate(SCIP_LPISTATE **lpistate, BMS_BLKMEM *blkmem, int ncols, int nrows) Definition: lpi_grb.c:568 Definition: type_lpi.h:52 SCIP_RETCODE SCIPlpiGetDualfarkas(SCIP_LPI *lpi, SCIP_Real *dualfarkas) Definition: lpi_grb.c:3250 Definition: type_lpi.h:72 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) Definition: lpi_grb.c:2722 static void lpistateFree(SCIP_LPISTATE **lpistate, BMS_BLKMEM *blkmem) Definition: lpi_grb.c:589 static SCIP_RETCODE reconvertSides(SCIP_LPI *lpi, int nrows, SCIP_Real *lhs, SCIP_Real *rhs) Definition: lpi_grb.c:996 Definition: struct_message.h:35 SCIP_RETCODE SCIPlpiGetNorms(SCIP_LPI *lpi, BMS_BLKMEM *blkmem, SCIP_LPINORMS **lpinorms) Definition: lpi_grb.c:4156 static void lpistatePack(SCIP_LPISTATE *lpistate, const int *cstat, const int *rstat) Definition: lpi_grb.c:536 SCIP_RETCODE SCIPlpiGetRowNames(SCIP_LPI *lpi, int firstrow, int lastrow, char **rownames, char *namestorage, int namestoragesize, int *storageleft) Definition: lpi_grb.c:1986 static SCIP_RETCODE setDblParam(SCIP_LPI *lpi, const char *param, double parval) Definition: lpi_grb.c:785 SCIP_RETCODE SCIPlpiGetSol(SCIP_LPI *lpi, SCIP_Real *objval, SCIP_Real *primsol, SCIP_Real *dualsol, SCIP_Real *activity, SCIP_Real *redcost) Definition: lpi_grb.c:3151 SCIP_RETCODE SCIPlpiGetIntpar(SCIP_LPI *lpi, SCIP_LPPARAM type, int *ival) Definition: lpi_grb.c:4210 SCIP_RETCODE SCIPlpiGetCoef(SCIP_LPI *lpi, int row, int col, SCIP_Real *val) Definition: lpi_grb.c:2104 SCIP_RETCODE SCIPlpiGetObj(SCIP_LPI *lpi, int firstcol, int lastcol, SCIP_Real *vals) Definition: lpi_grb.c:2023 SCIP_RETCODE SCIPlpiGetBInvRow(SCIP_LPI *lpi, int r, SCIP_Real *coef, int *inds, int *ninds) Definition: lpi_grb.c:3565 SCIP_RETCODE SCIPlpiSetIntpar(SCIP_LPI *lpi, SCIP_LPPARAM type, int ival) Definition: lpi_grb.c:4267 SCIP_Bool SCIPlpiIsInfinity(SCIP_LPI *lpi, SCIP_Real val) Definition: lpi_grb.c:4469 static SCIP_RETCODE setIntParam(SCIP_LPI *lpi, const char *param, int parval) Definition: lpi_grb.c:739 SCIP_RETCODE SCIPlpiGetBasisInd(SCIP_LPI *lpi, int *bind) Definition: lpi_grb.c:3488 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) Definition: lpi_grb.c:2485 Definition: lpi_cpx.c:191 SCIP_RETCODE SCIPlpiChgObjsen(SCIP_LPI *lpi, SCIP_OBJSEN objsen) Definition: lpi_grb.c:1634 Definition: type_lpi.h:53 Definition: type_lpi.h:70 SCIP_RETCODE SCIPlpiFreeState(SCIP_LPI *lpi, BMS_BLKMEM *blkmem, SCIP_LPISTATE **lpistate) Definition: lpi_grb.c:4059 SCIP_RETCODE SCIPlpiGetBInvARow(SCIP_LPI *lpi, int r, const SCIP_Real *binvrow, SCIP_Real *coef, int *inds, int *ninds) Definition: lpi_grb.c:3755 static SCIP_RETCODE getIntParam(SCIP_LPI *lpi, const char *param, int *p) Definition: lpi_grb.c:714 SCIP_RETCODE SCIPlpiGetState(SCIP_LPI *lpi, BMS_BLKMEM *blkmem, SCIP_LPISTATE **lpistate) Definition: lpi_grb.c:3923 SCIP_RETCODE SCIPlpiGetSolFeasibility(SCIP_LPI *lpi, SCIP_Bool *primalfeasible, SCIP_Bool *dualfeasible) Definition: lpi_grb.c:2802 static SCIP_RETCODE presolve(SCIP *scip, SCIP_Bool *unbounded, SCIP_Bool *infeasible) Definition: scip.c:13490 Definition: type_lpi.h:34 SCIP_RETCODE SCIPlpiCreate(SCIP_LPI **lpi, SCIP_MESSAGEHDLR *messagehdlr, const char *name, SCIP_OBJSEN objsen) Definition: lpi_grb.c:1110 Definition: type_lpi.h:44 static SCIP_RETCODE convertSides(SCIP_LPI *lpi, int nrows, const SCIP_Real *lhs, const SCIP_Real *rhs, int *rngcount) Definition: lpi_grb.c:820 void SCIPmessagePrintWarning(SCIP_MESSAGEHDLR *messagehdlr, const char *formatstr,...) Definition: message.c:411 Definition: type_lpi.h:51 SCIP_RETCODE SCIPlpiIgnoreInstability(SCIP_LPI *lpi, SCIP_Bool *success) Definition: lpi_grb.c:3117 Definition: type_retcode.h:33 Definition: type_lpi.h:33 SCIP_RETCODE SCIPlpiChgObj(SCIP_LPI *lpi, int ncols, int *ind, SCIP_Real *obj) Definition: lpi_grb.c:1656 Definition: type_lpi.h:45 Definition: type_retcode.h:46 Definition: type_lpi.h:54 Definition: type_lpi.h:68 SCIP_RETCODE SCIPlpiSolveBarrier(SCIP_LPI *lpi, SCIP_Bool crossover) Definition: lpi_grb.c:2352 SCIP_RETCODE SCIPlpiGetIterations(SCIP_LPI *lpi, int *iterations) Definition: lpi_grb.c:3273 SCIP_RETCODE SCIPlpiGetColNames(SCIP_LPI *lpi, int firstcol, int lastcol, char **colnames, char *namestorage, int namestoragesize, int *storageleft) Definition: lpi_grb.c:1971 SCIP_RETCODE SCIPlpiGetBounds(SCIP_LPI *lpi, int firstcol, int lastcol, SCIP_Real *lbs, SCIP_Real *ubs) Definition: lpi_grb.c:2043 SCIP_RETCODE SCIPlpiGetObjval(SCIP_LPI *lpi, SCIP_Real *objval) Definition: lpi_grb.c:3135 static void SCIPencodeDualBitNeg(const int *inp, SCIP_DUALPACKET *out, int count) Definition: lpi_grb.c:389 SCIP_RETCODE SCIPlpiGetSides(SCIP_LPI *lpi, int firstrow, int lastrow, SCIP_Real *lhss, SCIP_Real *rhss) Definition: lpi_grb.c:2077 static SCIP_RETCODE checkParameterValues(SCIP_LPI *lpi) Definition: lpi_grb.c:638 SCIP_RETCODE SCIPlpiGetBase(SCIP_LPI *lpi, int *cstat, int *rstat) Definition: lpi_grb.c:3319 SCIP_RETCODE SCIPlpiSetBase(SCIP_LPI *lpi, int *cstat, int *rstat) Definition: lpi_grb.c:3409 Definition: type_lpi.h:71 static SCIP_RETCODE reconvertRhs(SCIP_LPI *lpi, int nrows, SCIP_Real *rhs) Definition: lpi_grb.c:957 static SCIP_RETCODE reconvertBothSides(SCIP_LPI *lpi, int nrows, SCIP_Real *lhs, SCIP_Real *rhs) Definition: lpi_grb.c:873 SCIP_Bool SCIPlpiIsPrimalInfeasible(SCIP_LPI *lpi) Definition: lpi_grb.c:2925 SCIP_RETCODE SCIPlpiSetNorms(SCIP_LPI *lpi, BMS_BLKMEM *blkmem, SCIP_LPINORMS *lpinorms) Definition: lpi_grb.c:4172 Definition: type_lpi.h:67 Definition: type_lpi.h:43 Definition: type_lpi.h:42 SCIP_RETCODE SCIPlpiWriteLP(SCIP_LPI *lpi, const char *fname) Definition: lpi_grb.c:4506 SCIP_RETCODE SCIPlpiGetBInvCol(SCIP_LPI *lpi, int c, SCIP_Real *coef, int *inds, int *ninds) Definition: lpi_grb.c:3658 SCIP_RETCODE SCIPlpiReadState(SCIP_LPI *lpi, const char *fname) Definition: lpi_grb.c:4084 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) Definition: lpi_grb.c:2684 Definition: type_lpi.h:47 SCIP_Bool SCIPlpiHasStateBasis(SCIP_LPI *lpi, SCIP_LPISTATE *lpistate) Definition: lpi_grb.c:4075 static SCIP_RETCODE getParameterValues(SCIP_LPI *lpi, GRBPARAM *grbparam) Definition: lpi_grb.c:611 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) Definition: lpi_grb.c:1229 Definition: type_retcode.h:40 Definition: lpi_clp.cpp:121 SCIP_RETCODE SCIPlpiDelRows(SCIP_LPI *lpi, int firstrow, int lastrow) Definition: lpi_grb.c:1444 SCIP_RETCODE SCIPlpiWriteState(SCIP_LPI *lpi, const char *fname) Definition: lpi_grb.c:4111 static void copyParameterValues(GRBPARAM *dest, const GRBPARAM *source) Definition: lpi_grb.c:699 public methods for message output Definition: type_lpi.h:79 Definition: type_lpi.h:69 SCIP_RETCODE SCIPlpiSetRealpar(SCIP_LPI *lpi, SCIP_LPPARAM type, SCIP_Real dval) Definition: lpi_grb.c:4401 Definition: lpi_clp.cpp:93 SCIP_RETCODE SCIPlpiGetRealpar(SCIP_LPI *lpi, SCIP_LPPARAM type, SCIP_Real *dval) Definition: lpi_grb.c:4348 SCIP_RETCODE SCIPlpiDelCols(SCIP_LPI *lpi, int firstcol, int lastcol) Definition: lpi_grb.c:1335 Definition: type_lpi.h:49 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) Definition: lpi_grb.c:1409 SCIP_RETCODE SCIPlpiChgSides(SCIP_LPI *lpi, int nrows, const int *ind, const SCIP_Real *lhs, const SCIP_Real *rhs) Definition: lpi_grb.c:1581 static SCIP_RETCODE ensureSidechgMem(SCIP_LPI *lpi, int num) Definition: lpi_grb.c:187 static SCIP_RETCODE reconvertLhs(SCIP_LPI *lpi, int nrows, SCIP_Real *lhs) Definition: lpi_grb.c:918 Definition: type_lpi.h:66 Definition: type_lpi.h:46 Definition: type_lpi.h:80 Definition: type_retcode.h:35 SCIP_RETCODE SCIPlpiGetPrimalRay(SCIP_LPI *lpi, SCIP_Real *ray) Definition: lpi_grb.c:3228 SCIP_RETCODE SCIPlpiScaleRow(SCIP_LPI *lpi, int row, SCIP_Real scaleval) Definition: lpi_grb.c:1676 Definition: type_retcode.h:43 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) Definition: lpi_grb.c:2663 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) Definition: lpi_grb.c:1916 static void SCIPdecodeDualBitNeg(const SCIP_DUALPACKET *inp, int *out, int count) Definition: lpi_grb.c:460 Definition: type_lpi.h:82 Definition: type_lpi.h:48 Definition: type_lpi.h:81 |