All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
lp.c
Go to the documentation of this file.
31 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
468 /* we do not save the farkas coefficient, since it can be recomputed; thus, we invalidate it here */
471 /* if the column was created after performing the storage (possibly during probing), we treat it as implicitly zero;
556 /* if the row was created after performing the storage (possibly during probing), we treat it as basic;
727 /* recompute the loose objective value from scratch, if it was marked to be unreliable before */
756 /* we are only interested in variables with a finite impact, because the infinity counters should be correct */
769 /* recompute the pseudo solution value from scratch, if it was marked to be unreliable before */
793 /* we are only interested in variables with a finite impact, because the infinity counters should be correct */
811 /* recompute the global pseudo solution value from scratch, if it was marked to be unreliable before */
835 /* we are only interested in variables with a finite impact, because the infinity counters should be correct */
917 /** sorts column entries of linked rows currently in the LP such that lower row indices precede higher ones */
948 /** sorts column entries of unlinked rows or rows currently not in the LP such that lower row indices precede higher
965 SCIPsortPtrRealInt((void**)(&(col->rows[col->nlprows])), &(col->vals[col->nlprows]), &(col->linkpos[col->nlprows]), SCIProwComp, col->len - col->nlprows);
981 /** sorts row entries of linked columns currently in the LP such that lower column indices precede higher ones */
996 SCIPsortIntPtrIntReal(row->cols_index, (void**)row->cols, row->linkpos, row->vals, row->nlpcols);
1012 /** sorts row entries of unlinked columns or columns currently not in the LP such that lower column indices precede
1031 SCIPsortIntPtrIntReal(&(row->cols_index[row->nlpcols]), (void**)(&(row->cols[row->nlpcols])), &(row->linkpos[row->nlpcols]), &(row->vals[row->nlpcols]), row->len - row->nlpcols);
1049 /** searches coefficient in part of the column, returns position in col vector or -1 if not found */
1124 /** searches coefficient in part of the row, returns position in col vector or -1 if not found */
1216 /** moves a coefficient in a column to a different place, and updates all corresponding data structures */
1312 /** moves a coefficient in a row to a different place, and updates all corresponding data structures */
1433 if( (row->eventfilter->len > 0 && (row->eventfilter->eventmask & SCIP_EVENTTYPE_ROWCOEFCHANGED) != 0) )
1438 SCIP_CALL( SCIPeventqueueAdd(eventqueue, blkmem, set, NULL, NULL, NULL, row->eventfilter, &event) );
1461 if( (row->eventfilter->len > 0 && (row->eventfilter->eventmask & SCIP_EVENTTYPE_ROWCONSTCHANGED) != 0) )
1466 SCIP_CALL( SCIPeventqueueAdd(eventqueue, blkmem, set, NULL, NULL, NULL, row->eventfilter, &event) );
1490 if( (row->eventfilter->len > 0 && (row->eventfilter->eventmask & SCIP_EVENTTYPE_ROWSIDECHANGED) != 0) )
1495 SCIP_CALL( SCIPeventqueueAdd(eventqueue, blkmem, set, NULL, NULL, NULL, row->eventfilter, &event) );
1667 /*assert(colSearchCoef(col, row) == -1);*/ /* this assert would lead to slight differences in the solution process */
1677 /* if the row is in current LP and is linked to the column, we have to insert it at the end of the linked LP rows
1691 /* in case the coefficient is integral w.r.t. numerics we explicitly round the coefficient to an integral value */
1702 /* if the column is in current LP, we have to link it to the row, because otherwise, the primal information
1707 /* this call might swap the current row with the first non-LP/not linked row, s.t. insertion position
1729 /* if the column is in current LP, now both conditions, row->cols[linkpos]->lppos >= 0 and row->linkpos[linkpos] >= 0
1761 SCIPdebugMessage("added coefficient %g * <%s> at position %d (%d/%d) to column <%s> (nunlinked=%d)\n",
1795 /* if row is a linked LP row, move last linked LP coefficient to position of empty slot (deleted coefficient) */
1831 /* in case the coefficient is integral w.r.t. numerics we explicitly round the coefficient to an integral value */
1877 /* Euclidean norm, sum norm, and objective function scalar product only take into accout LP columns */
1954 /* Euclidean norm, sum norm, and objective function scalar product only take into accout LP columns */
2005 /*assert(rowSearchCoef(row, col) == -1);*/ /* this assert would lead to slight differences in the solution process */
2020 /* if the column is in current LP and is linked to the row, we have to insert it at the end of the linked LP columns
2034 /* in case the coefficient is integral w.r.t. numerics we explicitly round the coefficient to an integral value */
2047 /* if the row is in current LP, we have to link it to the column, because otherwise, the dual information
2052 /* this call might swap the current column with the first non-LP/not linked column, s.t. insertion position
2074 /* if the row is in current LP, now both conditions, col->rows[linkpos]->lppos >= 0 and col->linkpos[linkpos] >= 0
2115 SCIPdebugMessage("added coefficient %g * <%s> at position %d (%d/%d) to row <%s> (nunlinked=%d)\n",
2153 SCIPerrorMessage("cannot delete a coefficient from the locked unmodifiable row <%s>\n", row->name);
2160 /* if column is a linked LP column, move last linked LP coefficient to position of empty slot (deleted coefficient) */
2206 SCIPerrorMessage("cannot change a coefficient of the locked unmodifiable row <%s>\n", row->name);
2210 /* in case the coefficient is integral w.r.t. numerics we explicitly round the coefficient to an integral value */
2321 /* this call might swap the current row with the first non-LP/not linked row, but this is of no harm */
2326 assert(col->nlprows == 0 || col->rows[col->nlprows-1]->cols[col->linkpos[col->nlprows-1]] == col);
2327 assert(col->nlprows == 0 || col->rows[col->nlprows-1]->linkpos[col->linkpos[col->nlprows-1]] == col->nlprows-1);
2403 /* this call might swap the current column with the first non-LP/not linked column, but this is of no harm */
2408 assert(row->nlpcols == 0 || row->cols[row->nlpcols-1]->rows[row->linkpos[row->nlpcols-1]] == row);
2409 assert(row->nlpcols == 0 || row->cols[row->nlpcols-1]->linkpos[row->linkpos[row->nlpcols-1]] == row->nlpcols-1);
2525 /** checks, that parameter of type int in LP solver has the given value, ignoring unknown parameters */
2550 /** checks, that parameter of type SCIP_Bool in LP solver has the given value, ignoring unknown parameters */
2561 /** checks, that parameter of type SCIP_Real in LP solver has the given value, ignoring unknown parameters */
2592 #define lpCutoffDisabled(set) (set->lp_disablecutoff == 1 || (set->nactivepricers > 0 && set->lp_disablecutoff == 2))
2605 /* we disabled the objective limit in the LP solver or we want so solve exactly and thus cannot rely on the LP
2955 /** sets the pricing strategy of the LP solver (given the character representation of the strategy) */
3189 SCIPmessageFPrintInfo(messagehdlr, file, "(obj: %.15g) [%.15g,%.15g], ", col->obj, col->lb, col->ub);
3203 /** sorts column entries such that LP rows precede non-LP rows and inside both parts lower row indices precede higher ones
3259 SCIPerrorMessage("coefficient for row <%s> doesn't exist in column <%s>\n", row->name, SCIPvarGetName(col->var));
3375 SCIP_CALL( rowChgCoefPos(row, blkmem, set, eventqueue, lp, col->linkpos[pos], col->vals[pos] + incval) );
3422 SCIPdebugMessage("changing objective value of column <%s> from %f to %f\n", SCIPvarGetName(col->var), col->obj, newobj);
3438 /* in any case, when the sign of the objective (and thereby the best bound) changes, the variable has to enter the
3469 SCIPdebugMessage("changing lower bound of column <%s> from %f to %f\n", SCIPvarGetName(col->var), col->lb, newlb);
3485 /* in any case, when the best bound is zero and gets changed, the variable has to enter the LP and the LP has to be
3514 SCIPdebugMessage("changing upper bound of column <%s> from %f to %f\n", SCIPvarGetName(col->var), col->ub, newub);
3530 /* in any case, when the best bound is zero and gets changed, the variable has to enter the LP and the LP has to be
3728 /** calculates the Farkas coefficient y^T A_i of a column i using the given dual Farkas vector y */
3857 /** gets the Farkas value of a column in last LP (which must be infeasible), i.e. the Farkas coefficient y^T A_i times
4008 SCIP_Bool* downvalid, /**< stores whether the returned down value is a valid dual bound, or NULL;
4050 /* if a loose variables has an infinite best bound, the LP bound is -infinity and no gain can be achieved */
4081 retcode = SCIPlpiStrongbranchInt(lp->lpi, col->lpipos, col->primsol, itlim, down == NULL ? NULL : &sbdown, up == NULL ? NULL : &sbup, &sbdownvalid, &sbupvalid, &iter);
4085 retcode = SCIPlpiStrongbranchFrac(lp->lpi, col->lpipos, col->primsol, itlim, down == NULL ? NULL : &sbdown, up == NULL ? NULL : &sbup, &sbdownvalid, &sbupvalid, &iter);
4120 iter = stat->ndualresolvelps > 0 ? (int)(2*stat->ndualresolvelpiterations / stat->ndualresolvelps)
4122 : stat->nprimalresolvelps > 0 ? (int)(2*stat->nprimalresolvelpiterations / stat->nprimalresolvelps)
4168 SCIP_Bool* downvalid, /**< stores whether the returned down values are valid dual bounds, or NULL;
4243 /* if a loose variables has an infinite best bound, the LP bound is -infinity and no gain can be achieved */
4282 SCIPdebugMessage("performing strong branching on %d variables with %d iterations\n", ncols, itlim);
4286 retcode = SCIPlpiStrongbranchesInt(lp->lpi, lpipos, nsubcols, primsols, itlim, sbdown, sbup, sbdownvalid, sbupvalid, &iter);
4288 retcode = SCIPlpiStrongbranchesFrac(lp->lpi, lpipos, nsubcols, primsols, itlim, sbdown, sbup, sbdownvalid, sbupvalid, &iter);
4357 iter = stat->ndualresolvelps > 0 ? (int)(2*stat->ndualresolvelpiterations / stat->ndualresolvelps)
4359 : stat->nprimalresolvelps > 0 ? (int)(2*stat->nprimalresolvelpiterations / stat->nprimalresolvelps)
4391 * keep in mind, that the returned old values may have nothing to do with the current LP solution
4397 SCIP_Bool* downvalid, /**< stores whether the returned down value is a valid dual bound, or NULL;
4401 SCIP_Real* solval, /**< stores LP solution value of column at last strong branching call, or NULL */
4421 /** if strong branching was already applied on the column at the current node, returns the number of LPs solved after
4433 return (col->sbnode != stat->nnodes ? SCIP_LONGINT_MAX : stat->lpcount - stat->nsbdivinglps - col->validsblp);
4436 /** marks a column to be not removable from the LP in the current node because it became obsolete */
4446 /* lpRemoveObsoleteCols() does not remove a column if the node number stored in obsoletenode equals the current node number */
4574 /** checks, whether the given scalar scales the given value to an integral number with error in the given bounds */
4579 SCIP_Real mindelta, /**< minimal relative allowed difference of scaled coefficient s*c and integral i */
4580 SCIP_Real maxdelta, /**< maximal relative allowed difference of scaled coefficient s*c and integral i */
4613 * if the row's activity is proven to be integral, the sides are automatically rounded to the next integer
4624 SCIP_Bool integralcontvars, /**< should the coefficients of the continuous variables also be made integral,
4626 SCIP_Real minrounddelta, /**< minimal relative difference of scaled coefficient s*c and integral i,
4628 SCIP_Real maxrounddelta /**< maximal relative difference of scaled coefficient s*c and integral i
4652 SCIPdebugMessage("scale row <%s> with %g (tolerance=[%g,%g])\n", row->name, scaleval, minrounddelta, maxrounddelta);
4660 /* scale the row coefficients, thereby recalculating whether the row's activity is always integral;
4661 * if the row coefficients are rounded to the nearest integer value, calculate the maximal activity difference,
4673 /* get local or global bounds for column, depending on the local or global feasibility of the row */
4738 /* scale the row sides, and move the constant to the sides; relax the sides with accumulated delta in order
4775 for( c = 0; c < row->len && SCIPcolIsIntegral(row->cols[c]) && SCIPsetIsIntegral(set, row->vals[c]); ++c )
4799 void* origin, /**< pointer to constraint handler or separator who created the row (NULL if unkown) */
4801 SCIP_Bool modifiable, /**< is row modifiable during node processing (subject to column generation)? */
4811 * in case, for example, lhs > rhs but they are equal with tolerances, one could pass lhs=rhs=lhs+rhs/2 to
4983 SCIPmessageFPrintInfo(messagehdlr, file, "%+.15g<%s> ", row->vals[i], SCIPvarGetName(row->cols[i]->var));
5003 SCIPdebugMessage("capture row <%s> with nuses=%d and nlocks=%u\n", row->name, row->nuses, row->nlocks);
5021 SCIPdebugMessage("release row <%s> with nuses=%d and nlocks=%u\n", (*row)->name, (*row)->nuses, (*row)->nlocks);
5033 /** locks an unmodifiable row, which forbids further changes; has no effect on modifiable rows */
5043 SCIPdebugMessage("lock row <%s> with nuses=%d and nlocks=%u\n", row->name, row->nuses, row->nlocks);
5048 /** unlocks a lock of an unmodifiable row; a row with no sealed lock may be modified; has no effect on modifiable rows */
5058 SCIPdebugMessage("unlock row <%s> with nuses=%d and nlocks=%u\n", row->name, row->nuses, row->nlocks);
5108 SCIPerrorMessage("coefficient for column <%s> doesn't exist in row <%s>\n", SCIPvarGetName(col->var), row->name);
5210 /* coefficient doesn't exist, or sorting is delayed: add coefficient to the end of the row's arrays */
5312 SCIP_CALL( SCIProwChgConstant(row, blkmem, set, stat, eventqueue, lp, row->constant + addval) );
5343 SCIP_CALL( rowEventSideChanged(row, blkmem, set, eventqueue, SCIP_SIDETYPE_LEFT, oldlhs, lhs) );
5375 SCIP_CALL( rowEventSideChanged(row, blkmem, set, eventqueue, SCIP_SIDETYPE_RIGHT, oldrhs, rhs) );
5399 /** tries to find a value, such that all row coefficients, if scaled with this value become integral */
5403 SCIP_Real mindelta, /**< minimal relative allowed difference of scaled coefficient s*c and integral i */
5404 SCIP_Real maxdelta, /**< maximal relative allowed difference of scaled coefficient s*c and integral i */
5407 SCIP_Bool usecontvars, /**< should the coefficients of the continuous variables also be made integral? */
5408 SCIP_Real* intscalar, /**< pointer to store scalar that would make the coefficients integral, or NULL */
5430 /**@todo call misc.c:SCIPcalcIntegralScalar() instead - if usecontvars == FALSE, filter the integer variables first */
5440 SCIPdebugMessage("trying to find rational representation for row <%s> (contvars: %u)\n", SCIProwGetName(row), usecontvars);
5441 SCIPdebug( val = 0; ); /* avoid warning "val might be used uninitialized; see SCIPdebugMessage lastval=%g below */
5481 /* try, if row coefficients can be made integral by multiplying them with the reciprocal of the smallest coefficient
5522 SCIPdebugMessage(" -> integrality can be achieved by scaling with %g (minval=%g)\n", scaleval, minval);
5540 && (absval * twomultval < 0.5 || !isIntegralScalar(val, twomultval, mindelta, maxdelta, NULL)) )
5564 SCIPdebugMessage(" -> integrality can be achieved by scaling with %g (power of 2)\n", twomultval);
5569 /* convert each coefficient into a rational number, calculate the greatest common divisor of the numerators
5589 SCIPdebugMessage(" -> first rational: val: %g == %"SCIP_LONGINT_FORMAT"/%"SCIP_LONGINT_FORMAT", gcd=%"SCIP_LONGINT_FORMAT", scm=%"SCIP_LONGINT_FORMAT", rational=%u\n",
5609 SCIPdebugMessage(" -> next rational : val: %g == %"SCIP_LONGINT_FORMAT"/%"SCIP_LONGINT_FORMAT", gcd=%"SCIP_LONGINT_FORMAT", scm=%"SCIP_LONGINT_FORMAT", rational=%u\n",
5617 /* make row coefficients integral by multiplying them with the smallest common multiple of the denominators */
5622 SCIPdebugMessage(" -> integrality can be achieved by scaling with %g (rational:%"SCIP_LONGINT_FORMAT"/%"SCIP_LONGINT_FORMAT")\n",
5628 SCIPdebugMessage(" -> rationalizing failed: gcd=%"SCIP_LONGINT_FORMAT", scm=%"SCIP_LONGINT_FORMAT", lastval=%g\n", gcd, scm, val); /*lint !e771*/
5642 SCIP_Real mindelta, /**< minimal relative allowed difference of scaled coefficient s*c and integral i */
5643 SCIP_Real maxdelta, /**< maximal relative allowed difference of scaled coefficient s*c and integral i */
5646 SCIP_Bool usecontvars, /**< should the coefficients of the continuous variables also be made integral? */
5655 SCIP_CALL( SCIProwCalcIntegralScalar(row, set, mindelta, maxdelta, maxdnom, maxscale, usecontvars,
5661 SCIP_CALL( rowScale(row, blkmem, set, eventqueue, stat, lp, intscalar, usecontvars, mindelta, maxdelta) );
5667 /** sorts row entries such that LP columns precede non-LP columns and inside both parts lower column indices precede
5697 /** sorts row, and merges equal column entries (resulting from lazy sorting and adding) into a single entry; removes
5757 /* in case the coefficient is integral w.r.t. numerics we explicitly round the coefficient to an integral value */
5760 row->integral = row->integral && SCIPcolIsIntegral(cols[t]) && SCIPsetIsIntegral(set, vals[t]);
5770 row->integral = row->integral && SCIPcolIsIntegral(cols[t]) && SCIPsetIsIntegral(set, vals[t]);
5779 /* if equal entries were merged, we have to recalculate the norms, since the squared Euclidean norm is wrong */
5907 /** returns the feasibility of a row in the current LP solution: negative value means infeasibility */
5924 /** returns the feasibility of a row in the relaxed solution solution: negative value means infeasibility
5986 /** returns the feasibility of a row in the current NLP solution: negative value means infeasibility
6072 assert(!row->integral || EPSISINT(row->pseudoactivity - row->constant, SCIP_DEFAULT_SUMEPSILON));
6103 /** returns the pseudo feasibility of a row in the current pseudo solution: negative value means infeasibility */
6233 assert(!row->integral || mininfinite || REALABS(row->minactivity - row->constant) > 1.0/SCIP_DEFAULT_SUMEPSILON
6235 assert(!row->integral || maxinfinite || REALABS(row->maxactivity - row->constant) > 1.0/SCIP_DEFAULT_SUMEPSILON
6417 /** returns whether the row's efficacy with respect to the current LP solution is greater than the minimal cut efficacy */
6474 /** returns whether the row's efficacy with respect to the given primal solution is greater than the minimal cut
6593 * The columns in a row are divided into two parts: LP columns, which are currently in the LP and non-LP columns;
6594 * we sort the rows, but that only ensures that within these two parts, columns are sorted w.r.t. their index.
6595 * Normally, this should be suficient, because a column contained in both rows should either be one of the LP columns
6597 * However, directly after a row was created, before a row is added to the LP, the row is not linked to all its
6598 * columns and all columns are treated as non-LP columns. Moreover, for example when doing column generation,
6599 * columns can be added later and remain unlinked while all previously added columns might already be linked.
6600 * Therefore, we have to be very careful about whether we can rely on the partitioning of the variables.
6615 * -> we need to compare three partitions: the LP part of the completely linked row and both partitions of the
6619 * -> we need to compare three partitions: the complete unlinked row and both partitions of the other row
6638 /* check that we can rely on the partition into LP columns and non-LP columns if the rows are completely linked */
6682 /* set the iterators to the last column we want to regard in the row: nunlinked is either 0 or row->len,
6707 /* the "harder" cases 3) - 5): start with four partitions and reduce their number iteratively */
6729 while( ilp1 < row1->nlpcols && inlp1 < row1->len && ilp2 < row2->nlpcols && inlp2 < row2->len )
6738 assert((row1->cols[inlp1] == row2->cols[inlp2]) == (row1colsidx[inlp1] == row2colsidx[inlp2]));
6805 /* One partition was completely handled, we just have to handle the three remaining partitions:
6807 * If necessary, we swap the partitions to ensure that row1 is the row with only one remaining partition.
6826 /* determine section of row 1 that we want to look at (current iterator = begin, end, LP-columns?)
6844 /* handle the case of three partitions (case 4) until one partition is finished, this reduces our problem to case 1), 2), or 5);
6886 /* if the second section of row 1 was finished, we can stop; otherwise, we have to consider the remaining parts of
6891 /* determine section of row 2 that we want to look at (current iterator = begin, end, LP-columns?) */
6906 /* handle the case of two partitions (standard case 5, or case 1 or 2 due to partition reduction) */
6950 * The columns in a row are divided into two parts: LP columns, which are currently in the LP and non-LP columns;
6951 * we sort the rows, but that only ensures that within these two parts, columns are sorted w.r.t. their index.
6952 * Normally, this should be suficient, because a column contained in both rows should either be one of the LP columns
6954 * However, directly after a row was created, before a row is added to the LP, the row is not linked to all its
6955 * columns and all columns are treated as non-LP columns. Moreover, for example when doing column generation,
6956 * columns can be added later and remain unlinked while all previously added columns might already be linked.
6957 * Therefore, we have to be very careful about whether we can rely on the partitioning of the variables.
6972 * -> we need to compare three partitions: the LP part of the completely linked row and both partitions of the
6976 * -> we need to compare three partitions: the complete unlinked row and both partitions of the other row
6995 /* check that we can rely on the partition into LP columns and non-LP columns if the rows are completely linked */
7039 /* set the iterators to the last column we want to regard in the row: nunlinked is either 0 or row->len,
7064 /* the "harder" cases 3) - 5): start with four partitions and reduce their number iteratively */
7086 while( ilp1 < row1->nlpcols && inlp1 < row1->len && ilp2 < row2->nlpcols && inlp2 < row2->len )
7095 assert((row1->cols[inlp1] == row2->cols[inlp2]) == (row1colsidx[inlp1] == row2colsidx[inlp2]));
7162 /* One partition was completely handled, we just have to handle the three remaining partitions:
7164 * If necessary, we swap the partitions to ensure that row1 is the row with only one remaining partition.
7183 /* determine section of row 1 that we want to look at (current iterator = begin, end, LP-columns?)
7201 /* handle the case of three partitions (case 4) until one partition is finished, this reduces our problem to case 1), 2), or 5);
7243 /* if the second section of row 1 was finished, we can stop; otherwise, we have to consider the remaining parts of
7248 /* determine section of row 2 that we want to look at (current iterator = begin, end, LP-columns?) */
7263 /* handle the case of two partitions (standard case 5, or case 1 or 2 due to partition reduction) */
7289 /** returns the degree of parallelism between the hyperplanes defined by the two row vectors v, w:
7310 parallelism = scalarprod / (sqrt((SCIP_Real) SCIProwGetNNonz(row1)) * sqrt((SCIP_Real) SCIProwGetNNonz(row2)));
7321 /** returns the degree of orthogonality between the hyperplanes defined by the two row vectors v, w:
7334 /** gets parallelism of row with objective function: if the returned value is 1, the row is parallel to the objective
7376 SCIP_EVENTDATA* eventdata, /**< event data to pass to the event handler for the event processing */
7388 SCIP_CALL( SCIPeventfilterAdd(row->eventfilter, blkmem, set, eventtype, eventhdlr, eventdata, filterpos) );
7400 SCIP_EVENTDATA* eventdata, /**< event data to pass to the event handler for the event processing */
7407 SCIPdebugMessage("drop event of row <%s> with handler %p and data %p\n", row->name, (void*)eventhdlr, (void*)eventdata);
7409 SCIP_CALL( SCIPeventfilterDel(row->eventfilter, blkmem, set, eventtype, eventhdlr, eventdata, filterpos) );
7414 /** marks a row to be not removable from the LP in the current node because it became obsolete */
7424 /* lpRemoveObsoleteRows() does not remove a row if the node number stored in obsoletenode equals the current node number */
7480 SCIPdebugMessage("flushing col deletions: shrink LP from %d to %d columns\n", lp->nlpicols, lp->lpifirstchgcol);
7524 if( SCIPsetIsInfinity(set, -col->lb) || (SCIPsetIsLE(set, col->lb, col->lazylb) && !SCIPlpDiving(lp)) )
7532 if( SCIPsetIsInfinity(set, col->ub) || (SCIPsetIsGE(set, col->ub, col->lazyub) && !SCIPlpDiving(lp)) )
7669 SCIPdebugMessage("flushing col additions: enlarge LP from %d to %d columns\n", lp->nlpicols, lp->ncols);
7737 SCIPdebugMessage("flushing row deletions: shrink LP from %d to %d rows\n", lp->nlpirows, lp->lpifirstchgrow);
7881 SCIPdebugMessage("flushing row additions: enlarge LP from %d to %d rows\n", lp->nlpirows, lp->nrows);
8014 SCIPdebugMessage("flushing objective changes: change %d objective values of %d changed columns\n", nobjchg, lp->nchgcols);
8027 SCIPdebugMessage("flushing bound changes: change %d bounds of %d changed columns\n", nbdchg, lp->nchgcols);
8158 SCIPdebugMessage("flushing LP changes: old (%d cols, %d rows), nchgcols=%d, nchgrows=%d, firstchgcol=%d, firstchgrow=%d, new (%d cols, %d rows), flushed=%u\n",
8159 lp->nlpicols, lp->nlpirows, lp->nchgcols, lp->nchgrows, lp->lpifirstchgcol, lp->lpifirstchgrow,
8272 assert(col->flushedlb == (SCIPsetIsInfinity(set, -col->lb) ? -SCIPlpiInfinity(lp->lpi) : col->lb)); /*lint !e777*/
8273 assert(col->flushedub == (SCIPsetIsInfinity(set, col->ub) ? SCIPlpiInfinity(lp->lpi) : col->ub)); /*lint !e777*/
8304 assert(row->flushedlhs == (SCIPsetIsInfinity(set, -row->lhs) ? -SCIPlpiInfinity(lp->lpi) : row->lhs - row->constant)); /*lint !e777*/
8305 assert(row->flushedrhs == (SCIPsetIsInfinity(set, row->rhs) ? SCIPlpiInfinity(lp->lpi) : row->rhs - row->constant)); /*lint !e777*/
8614 (*lp)->validsollp = stat->lpcount; /* the initial (empty) SCIP_LP is solved with primal and dual solution of zero */
8671 "LP Solver <%s>: upper objective limit cannot be set -- can lead to unnecessary simplex iterations\n",
8679 "LP Solver <%s>: primal feasibility tolerance cannot be set -- tolerance of SCIP and LP solver may differ\n",
8687 "LP Solver <%s>: dual feasibility tolerance cannot be set -- tolerance of SCIP and LP solver may differ\n",
8695 "LP Solver <%s>: barrier convergence tolerance cannot be set -- tolerance of SCIP and LP solver may differ\n",
8727 "LP Solver <%s>: iteration limit cannot be set -- can lead to unnecessary simplex iterations\n",
8749 "LP Solver <%s>: row representation of the basis not available -- SCIP parameter lp/rowrepswitch has no effect\n",
8756 "LP Solver <%s>: condition number limit for the basis not available -- SCIP parameter lp/conditionlimit has no effect\n",
8812 /** resets the LP to the empty LP by removing all columns and rows from LP, releasing all rows, and flushing the
8832 lp->validsollp = stat->lpcount; /* the initial (empty) SCIP_LP is solved with primal and dual solution of zero */
8861 SCIPdebugMessage("adding column <%s> to LP (%d rows, %d cols)\n", SCIPvarGetName(col->var), lp->nrows, lp->ncols);
8918 SCIPdebugMessage("adding row <%s> to LP (%d rows, %d cols)\n", row->name, lp->nrows, lp->ncols);
8958 SCIP_CALL( SCIPeventqueueAdd(eventqueue, blkmem, set, NULL, NULL, NULL, eventfilter, &event) );
8966 /** method checks if all columns in the lazycols array have at least one lazy bound and also have a counter part in the
8967 * cols array; furthermore, it is checked if columns in the cols array which have a lazy bound have a counter part in
8987 assert(!SCIPsetIsInfinity(set, lp->lazycols[i]->lazyub) || !SCIPsetIsInfinity(set, -lp->lazycols[i]->lazylb));
8994 assert(!SCIPsetIsInfinity(set, lp->cols[c]->lazyub) || !SCIPsetIsInfinity(set, -lp->cols[c]->lazylb));
9001 /* check if each column in the column array which has at least one lazy bound has a counter part in the lazy column *
9016 assert(contained == (!SCIPsetIsInfinity(set, lp->cols[c]->lazyub) || !SCIPsetIsInfinity(set, -lp->cols[c]->lazylb)));
9139 SCIP_CALL( SCIPeventqueueAdd(eventqueue, blkmem, set, NULL, NULL, NULL, eventfilter, &event) );
9202 /** gets all indices of basic columns and rows: index i >= 0 corresponds to column i, index i < 0 to row -i-1 */
9219 /** gets current basis status for columns and rows; arrays must be large enough to store the basis status */
9278 /** gets a row from the product of inverse basis matrix B^-1 and coefficient matrix A (i.e. from B^-1 * A) */
9298 /** gets a column from the product of inverse basis matrix B^-1 and coefficient matrix A (i.e. from B^-1 * A),
9319 /** calculates a weighted sum of all LP rows; for negative weights, the left and right hand side of the corresponding
9327 SCIP_REALARRAY* sumcoef, /**< array to store sum coefficients indexed by variables' probindex */
9349 SCIP_CALL( SCIPrealarrayExtend(sumcoef, set->mem_arraygrowinit, set->mem_arraygrowfac, 0, prob->nvars-1) );
9374 SCIP_CALL( SCIPrealarrayIncVal(sumcoef, set->mem_arraygrowinit, set->mem_arraygrowfac, idx, weights[r] * row->vals[i]) );
9407 /** returns the maximum absolute row weight in the given weight vector, and calculates the sparsity pattern of the weights */
9457 SCIP_Bool* varused, /**< array to flag variables that appear in the MIR constraint; size prob->nvars */
9458 int* varinds, /**< array to store sparsity pattern of non-zero MIR coefficients; size prob->nvars */
9521 /** builds a weighted sum of rows, and decides whether to use the left or right hand side of the rows in summation */
9528 int* sidetypes, /**< specify row side type (-1 = lhs, 0 = unkown, 1 = rhs) or NULL for automatic choices */
9530 SCIP_Bool allowlocal, /**< should local rows be included, resulting in a locally valid summation? */
9532 SCIP_Real maxweightrange, /**< maximal valid range max(|weights|)/min(|weights|) of row weights */
9536 SCIP_Bool* varused, /**< array to flag variables that appear in the MIR constraint; size prob->nvars */
9537 int* varinds, /**< array to store sparsity pattern of non-zero MIR coefficients; size prob->nvars */
9543 SCIP_Bool* rowtoolong, /**< pointer to store whether the aggregated row is too long and thus invalid */
9637 /* Automatically decide, whether we want to use the left or the right hand side of the row in the summation.
9648 /* Automatically decide, whether we want to use the left or the right hand side of the row in the summation.
9658 addRowToAggregation(set, mircoef, mirrhs, slacksign, varused, varinds, nvarinds, row, weight, uselhs);
9662 SCIPdebugMessage("MIR: %d: row <%s>, lhs = %g, rhs = %g, scale = %g, weight = %g, slacksign = %d -> rhs = %g\n",
9674 /* remove row from sparsity pattern, do not increase i (i-th position is filled with last entry) */
9692 /** removes all nearly-zero coefficients from MIR row and relaxes the right hand side correspondingly in order to
9750 /* remove variable from sparsity pattern, do not increase i (i-th position is filled with last entry) */
9770 SCIP_Bool allowlocal, /**< should local information allowed to be used, resulting in a local cut? */
9803 /* we have to avoid cyclic variable bound usage, so we enforce to use only variable bounds variables of smaller index */
9804 /**@todo this check is not needed for continuous variables; but allowing all but binary variables
9826 SCIP_Bool allowlocal, /**< should local information allowed to be used, resulting in a local cut? */
9858 /* we have to avoid cyclic variable bound usage, so we enforce to use only variable bounds variables of smaller index */
9859 /**@todo this check is not needed for continuous variables; but allowing all but binary variables
9879 * x^\prime_j := x_j - lb_j,& x_j = x^\prime_j + lb_j,& a^\prime_j = a_j,& \mbox{if lb is used in transformation}\\
9880 * x^\prime_j := ub_j - x_j,& x_j = ub_j - x^\prime_j,& a^\prime_j = -a_j,& \mbox{if ub is used in transformation}
9888 * x^\prime_j := x_j - (bl_j\, zl_j + dl_j),& x_j = x^\prime_j + (bl_j\, zl_j + dl_j),& a^\prime_j = a_j,& \mbox{if vlb is used in transf.} \\
9889 * x^\prime_j := (bu_j\, zu_j + du_j) - x_j,& x_j = (bu_j\, zu_j + du_j) - x^\prime_j,& a^\prime_j = -a_j,& \mbox{if vub is used in transf.}
9892 * move the constant terms \f$ a_j\, dl_j \f$ or \f$ a_j\, du_j \f$ to the rhs, and update the coefficient of the VLB variable:
9906 SCIP_Real boundswitch, /**< fraction of domain up to which lower bound is used in transformation */
9908 SCIP_Bool allowlocal, /**< should local information allowed to be used, resulting in a local cut? */
9909 SCIP_Bool fixintegralrhs, /**< should complementation tried to be adjusted such that rhs gets fractional? */
9910 int* boundsfortrans, /**< bounds that should be used for transformed variables: vlb_idx/vub_idx,
9913 SCIP_BOUNDTYPE* boundtypesfortrans, /**< type of bounds that should be used for transformed variables;
9925 SCIP_Bool* freevariable, /**< stores whether a free variable was found in MIR row -> invalid summation */
9926 SCIP_Bool* localbdsused /**< pointer to store whether local bounds were used in transformation */
9964 /* start with continuous variables, because using variable bounds can affect the untransformed integral
9965 * variables, and these changes have to be incorporated in the transformation of the integral variables
10008 assert(SCIPvarGetType(var) == SCIP_VARTYPE_CONTINUOUS || ( boundsfortrans[v] == -2 || boundsfortrans[v] == -1 ));
10036 /* we have to avoid cyclic variable bound usage, so we enforce to use only variable bounds variables of smaller index */
10038 bestlb = vlbcoefs[k] * (sol == NULL ? SCIPvarGetLPSol(vlbvars[k]) : SCIPsolGetVal(sol, set, stat, vlbvars[k])) + vlbconsts[k];
10049 /* find closest upper bound in standard upper bound (and variable upper bounds for continuous variables) */
10050 findBestUb(set, stat, var, sol, usevbds && fixintegralrhs, allowlocal && fixintegralrhs, &bestub, &bestubtype);
10079 /* we have to avoid cyclic variable bound usage, so we enforce to use only variable bounds variables of smaller index */
10081 bestub = vubcoefs[k] * (sol == NULL ? SCIPvarGetLPSol(vubvars[k]) : SCIPsolGetVal(sol, set, stat, vubvars[k])) + vubconsts[k];
10092 /* find closest lower bound in standard lower bound (and variable lower bounds for continuous variables) */
10093 findBestLb(set, stat, var, sol, usevbds && fixintegralrhs, allowlocal && fixintegralrhs, &bestlb, &bestlbtype);
10102 /* find closest lower bound in standard lower bound (and variable lower bounds for continuous variables) */
10105 /* find closest upper bound in standard upper bound (and variable upper bounds for continuous variables) */
10253 SCIPdebugMessage("MIR var <%s>: varsign=%d, boundtype=%d, mircoef=%g, base=%d, sol=%g, lb=%g, ub=%g, vlb=%g<%s>%+g, vub=%g<%s>%+g -> rhs=%g\n",
10328 solval = (sol == NULL ? SCIPvarGetLPSol(prob->vars[v]) : SCIPsolGetVal(sol, set, stat, prob->vars[v]));
10333 /* prefer larger violations; for equal violations, prefer smaller f0 values since then the possibility that
10358 assert(bestubtypes[bestv] < 0); /* cannot switch to a variable bound (would lead to further coef updates) */
10365 assert(bestlbtypes[bestv] < 0); /* cannot switch to a variable bound (would lead to further coef updates) */
10385 /** Calculate fractionalities \f$ f_0 := b - down(b), f_j := a^\prime_j - down(a^\prime_j) \f$, and derive MIR cut \f$ \tilde{a} \cdot x' \leq down(b) \f$
10400 * x^\prime_j := x_j - lb_j,& x_j = x^\prime_j + lb_j,& a^\prime_j = a_j,& \hat{a}_j := \tilde{a}_j,& \mbox{if lb was used in transformation} \\
10401 * x^\prime_j := ub_j - x_j,& x_j = ub_j - x^\prime_j,& a^\prime_j = -a_j,& \hat{a}_j := -\tilde{a}_j,& \mbox{if ub was used in transformation}
10416 * x^\prime_j := x_j - (bl_j \cdot zl_j + dl_j),& x_j = x^\prime_j + (bl_j\, zl_j + dl_j),& a^\prime_j = a_j,& \hat{a}_j := \tilde{a}_j,& \mbox{(vlb)} \\
10417 * x^\prime_j := (bu_j\, zu_j + du_j) - x_j,& x_j = (bu_j\, zu_j + du_j) - x^\prime_j,& a^\prime_j = -a_j,& \hat{a}_j := -\tilde{a}_j,& \mbox{(vub)}
10430 * \hat{a}_{zl_j} := \hat{a}_{zl_j} - \tilde{a}_j\, bl_j = \hat{a}_{zl_j} - \hat{a}_j\, bl_j,& \mbox{or} \\
10445 int* boundtype, /**< stores the bound used for transformed variable (vlb/vub_idx or -1 for lb/ub)*/
10463 /* Loop backwards to be able to delete coefficients from the sparsity pattern. Additionally, the variable bound
10464 * substitutions are only used in such a way that a variable of higher index is substituted by a variable of a
10528 /* move the constant term -a~_j * lb_j == -a^_j * lb_j , or a~_j * ub_j == -a^_j * ub_j to the rhs */
10607 * The coefficient of the slack variable s_r is equal to the row's weight times the slack's sign, because the slack
10608 * variable only appears in its own row: \f$ a^\prime_r = scale * weight[r] * slacksign[r]. \f$
10610 * Depending on the slacks type (integral or continuous), its coefficient in the cut calculates as follows:
10614 * & \hat{a}_r = \tilde{a}_r = down(a^\prime_r) + (f_r - f0)/(1 - f0),& \mbox{if}\qquad f_r > f0 \\
10620 * Substitute \f$ \hat{a}_r \cdot s_r \f$ by adding \f$ \hat{a}_r \f$ times the slack's definition to the cut.
10745 /* a*x + c + s == rhs => s == - a*x - c + rhs: move a^_r * (rhs - c) to the right hand side */
10799 activity += mircoef[i] * (sol == NULL ? SCIPvarGetLPSol(prob->vars[i]) : SCIPsolGetVal(sol, set, stat, prob->vars[i]));
10830 act += mircoef[v] * ( sol == NULL ? SCIPvarGetLPSol(prob->vars[v]) : SCIPsolGetVal(sol, set, stat, prob->vars[v]));
10836 /* calculates a MIR cut out of the weighted sum of LP rows; The weights of modifiable rows are set to 0.0, because these
10845 SCIP_Real boundswitch, /**< fraction of domain up to which lower bound is used in transformation */
10847 SCIP_Bool allowlocal, /**< should local information allowed to be used, resulting in a local cut? */
10848 SCIP_Bool fixintegralrhs, /**< should complementation tried to be adjusted such that rhs gets fractional? */
10849 int* boundsfortrans, /**< bounds that should be used for transformed variables: vlb_idx/vub_idx,
10852 SCIP_BOUNDTYPE* boundtypesfortrans, /**< type of bounds that should be used for transformed variables;
10855 SCIP_Real maxweightrange, /**< maximal valid range max(|weights|)/min(|weights|) of row weights */
10859 int* sidetypes, /**< specify row side type (-1 = lhs, 0 = unkown, 1 = rhs) or NULL for automatic choices */
10861 SCIP_Real* mksetcoefs, /**< array to store mixed knapsack set coefficients: size nvars; or NULL */
10862 SCIP_Bool* mksetcoefsvalid, /**< pointer to store whether mixed knapsack set coefficients are valid; or NULL */
10866 SCIP_Bool* success, /**< pointer to store whether the returned coefficients are a valid MIR cut */
10867 SCIP_Bool* cutislocal, /**< pointer to store whether the returned cut is only valid locally */
10917 maxmksetcoefs, maxweightrange, mircoef, &rhs, slacksign, varused, varinds, &nvarinds, rowinds, &nrowinds,
10925 /* remove all nearly-zero coefficients from MIR row and relax the right hand side correspondingly in order to
10940 * x'_j := x_j - (bl_j * zl_j + dl_j), x_j == x'_j + (bl_j * zl_j + dl_j), a'_j == a_j, if vlb is used in transf.
10941 * x'_j := (bu_j * zu_j + du_j) - x_j, x_j == (bu_j * zu_j + du_j) - x'_j, a'_j == -a_j, if vub is used in transf.
10942 * move the constant terms "a_j * dl_j" or "a_j * du_j" to the rhs, and update the coefficient of the VLB variable:
10946 SCIP_CALL( transformMIRRow(set, stat, prob, sol, boundswitch, usevbds, allowlocal, fixintegralrhs, boundsfortrans,
10947 boundtypesfortrans, minfrac, maxfrac, mircoef, &rhs, varused, varinds, &nvarinds, varsign, boundtype,
10962 /* Calculate fractionalities f_0 := b - down(b), f_j := a'_j - down(a'_j) , and derive MIR cut
10972 * x'_j := x_j - lb_j, x_j == x'_j + lb_j, a'_j == a_j, a^_j := a~_j, if lb was used in transformation
10973 * x'_j := ub_j - x_j, x_j == ub_j - x'_j, a'_j == -a_j, a^_j := -a~_j, if ub was used in transformation
10980 * x'_j := x_j - (bl_j * zl_j + dl_j), x_j == x'_j + (bl_j * zl_j + dl_j), a'_j == a_j, a^_j := a~_j, (vlb)
10981 * x'_j := (bu_j * zu_j + du_j) - x_j, x_j == (bu_j * zu_j + du_j) - x'_j, a'_j == -a_j, a^_j := -a~_j, (vub)
11006 * The coefficient of the slack variable s_r is equal to the row's weight times the slack's sign, because the slack
11010 * Depending on the slacks type (integral or continuous), its coefficient in the cut calculates as follows:
11022 /* remove again all nearly-zero coefficients from MIR row and relax the right hand side correspondingly in order to
11041 /**@todo pass the sparsity pattern to the calling method in order to speed up the calling method's loops */
11046 /** builds a weighted sum of rows, and decides whether to use the left or right hand side of the rows in summation */
11054 SCIP_Bool allowlocal, /**< should local rows be included, resulting in a locally valid summation? */
11056 SCIP_Real maxweightrange, /**< maximal valid range max(|weights|)/min(|weights|) of row weights */
11057 SCIP_Real* strongcgcoef, /**< array to store strong CG coefficients: must be of size prob->nvars */
11060 SCIP_Bool* varused, /**< array to flag variables that appear in the MIR constraint; size prob->nvars */
11061 int* varinds, /**< array to store sparsity pattern of non-zero MIR coefficients; size prob->nvars */
11067 SCIP_Bool* rowtoolong, /**< pointer to store whether the aggregated row is too long and thus invalid */
11153 if( SCIPsetIsInfinity(set, row->rhs) || (!SCIPsetIsInfinity(set, -row->lhs) && weight < 0.0) )
11176 addRowToAggregation(set, strongcgcoef, strongcgrhs, slacksign, varused, varinds, nvarinds, row, weight, uselhs);
11182 SCIPdebugMessage("strong CG: %d: row <%s>, lhs = %g, rhs = %g, scale = %g, weight = %g, slacksign = %d -> rhs = %g\n",
11193 /* remove row from sparsity pattern, do not increase i, since the i-th position is filled with the last element */
11213 /** Transform equation \f$ a*x == b \f$, \f$ lb <= x <= ub \f$ into standard form \f$ a^\prime*x^\prime == b\f$, \f$ 0 <= x^\prime <= ub^\prime \f$.
11218 * x^\prime_j := x_j - lb_j,& x_j == x^\prime_j + lb_j,& a^\prime_j == a_j,& \mbox{if lb is used in transformation} \\
11219 * x^\prime_j := ub_j - x_j,& x_j == ub_j - x^\prime_j,& a^\prime_j == -a_j,& \mbox{if ub is used in transformation}
11227 * x^\prime_j := x_j - (bl_j * zl_j + dl_j),& x_j == x^\prime_j + (bl_j * zl_j + dl_j),& a^\prime_j == a_j,& \mbox{if vlb is used in transf.} \\
11228 * x^\prime_j := (bu_j * zu_j + du_j) - x_j,& x_j == (bu_j * zu_j + du_j) - x^\prime_j,& a^\prime_j == -a_j,& \mbox{if vub is used in transf.}
11231 * move the constant terms \f$ a_j * dl_j \f$ or \f$ a_j * du_j \f$ to the rhs, and update the coefficient of the VLB variable:
11244 SCIP_Real boundswitch, /**< fraction of domain up to which lower bound is used in transformation */
11246 SCIP_Bool allowlocal, /**< should local information allowed to be used, resulting in a local cut? */
11255 SCIP_Bool* freevariable, /**< stores whether a free variable was found in strong CG row -> invalid summation */
11256 SCIP_Bool* localbdsused /**< pointer to store whether local bounds were used in transformation */
11284 /* start with continuous variables, because using variable bounds can affect the untransformed integral
11285 * variables, and these changes have to be incorporated in the transformation of the integral variables
11326 /* find closest lower bound in standard lower bound (and variable lower bounds for continuous variables) */
11354 /* find closest upper bound in standard upper bound (and variable upper bounds for continuous variables) */
11505 SCIPdebugMessage("strong CG var <%s>: varsign=%d, boundtype=%d, strongcgcoef=%g, lb=%g, ub=%g -> rhs=%g\n",
11506 SCIPvarGetName(var), varsign[v], boundtype[v], strongcgcoef[v], bestlb, bestub, *strongcgrhs);
11512 /** Calculate fractionalities \f$ f_0 := b - down(b) \f$, \f$ f_j := a^\prime_j - down(a^\prime_j) \f$ and
11513 * integer \f$ k >= 1 \f$ with \f$ 1/(k + 1) <= f_0 < 1/k \f$ and \f$ (=> k = up(1/f_0) + 1) \f$
11514 * integer \f$ 1 <= p_j <= k \f$ with \f$ f_0 + ((p_j - 1) * (1 - f_0)/k) < f_j <= f_0 + (p_j * (1 - f_0)/k)\f$ \f$ (=> p_j = up( k*(f_j - f_0)/(1 - f_0) )) \f$
11530 * x^\prime_j := x_j - lb_j,& x_j == x^\prime_j + lb_j,& a^\prime_j == a_j,& \hat{a}_j := \tilde{a}_j,& \mbox{if lb was used in transformation} \\
11531 * x^\prime_j := ub_j - x_j,& x_j == ub_j - x^\prime_j,& a^\prime_j == -a_j,& \hat{a}_j := -\tilde{a}_j,& \mbox{if ub was used in transformation}
11546 * x^\prime_j := x_j - (bl_j * zl_j + dl_j),& x_j == x^\prime_j + (bl_j * zl_j + dl_j),& a^\prime_j == a_j,& \hat{a}_j := \tilde{a}_j,& \mbox{(vlb)} \\
11547 * x^\prime_j := (bu_j * zu_j + du_j) - x_j,& x_j == (bu_j * zu_j + du_j) - x^\prime_j,& a^\prime_j == -a_j,& \hat{a}_j := -\tilde{a}_j,& \mbox{(vub)}
11560 * \hat{a}_{zl_j} := \hat{a}_{zl_j} - \tilde{a}_j * bl_j == \hat{a}_{zl_j} - \hat{a}_j * bl_j,& \mbox{or} \\
11561 * \hat{a}_{zu_j} := \hat{a}_{zu_j} + \tilde{a}_j * bu_j == \hat{a}_{zu_j} - \hat{a}_j * bu_j &
11575 int* boundtype, /**< stores the bound used for transformed variable (vlb/vub_idx or -1 for lb/ub)*/
11596 /* start with integer variables, since the variable bound substitutions can add up to the integer cut coefficients;
11642 assert(pj >= 0); /* should be >= 1, but due to rounding bias can be 0 if fj almost equal to f0 */
11660 /* move the constant term -a~_j * lb_j == -a^_j * lb_j , or a~_j * ub_j == -a^_j * ub_j to the rhs */
11701 /* in a strong CG cut, cut coefficients of continuous variables are always zero; check this in debug mode */
11729 * The coefficient of the slack variable s_r is equal to the row's weight times the slack's sign, because the slack
11730 * variable only appears in its own row: \f$ a^\prime_r = scale * weight[r] * slacksign[r] \f$.
11732 * Depending on the slacks type (integral or continuous), its coefficient in the cut calculates as follows:
11742 * Substitute \f$ \hat{a}_r * s_r \f$ by adding \f$ \hat{a}_r \f$ times the slack's definition to the cut.
11819 assert(pr >= 0); /* should be >= 1, but due to rounding bias can be 0 if fr almost equal to f0 */
11866 /* a*x + c + s == rhs => s == - a*x - c + rhs: move a^_r * (rhs - c) to the right hand side */
11897 /* calculates a strong CG cut out of the weighted sum of LP rows; The weights of modifiable rows are set to 0.0, because these
11905 SCIP_Real boundswitch, /**< fraction of domain up to which lower bound is used in transformation */
11907 SCIP_Bool allowlocal, /**< should local information allowed to be used, resulting in a local cut? */
11909 SCIP_Real maxweightrange, /**< maximal valid range max(|weights|)/min(|weights|) of row weights */
11917 SCIP_Bool* success, /**< pointer to store whether the returned coefficients are a valid strong CG cut */
11918 SCIP_Bool* cutislocal, /**< pointer to store whether the returned cut is only valid locally */
11968 maxmksetcoefs, maxweightrange, strongcgcoef, &rhs, slacksign, varused, varinds, &nvarinds, rowinds, &nrowinds,
11976 /* remove all nearly-zero coefficients from strong CG row and relaxes the right hand side correspondingly in order to
11991 * x'_j := x_j - (bl_j * zl_j + dl_j), x_j == x'_j + (bl_j * zl_j + dl_j), a'_j == a_j, if vlb is used in transf.
11992 * x'_j := (bu_j * zu_j + du_j) - x_j, x_j == (bu_j * zu_j + du_j) - x'_j, a'_j == -a_j, if vub is used in transf.
11993 * move the constant terms "a_j * dl_j" or "a_j * du_j" to the rhs, and update the coefficient of the VLB variable:
11998 strongcgcoef, &rhs, varused, varinds, &nvarinds, varsign, boundtype, &freevariable, &localbdsused);
12009 * - integer 1 <= p_j <= k with f_0 + ((p_j - 1) * (1 - f_0)/k) < f_j <= f_0 + (p_j * (1 - f_0)/k)
12021 * x'_j := x_j - lb_j, x_j == x'_j + lb_j, a'_j == a_j, a^_j := a~_j, if lb was used in transformation
12022 * x'_j := ub_j - x_j, x_j == ub_j - x'_j, a'_j == -a_j, a^_j := -a~_j, if ub was used in transformation
12029 * x'_j := x_j - (bl_j * zl_j + dl_j), x_j == x'_j + (bl_j * zl_j + dl_j), a'_j == a_j, a^_j := a~_j, (vlb)
12030 * x'_j := (bu_j * zu_j + du_j) - x_j, x_j == (bu_j * zu_j + du_j) - x'_j, a'_j == -a_j, a^_j := -a~_j, (vub)
12045 roundStrongCGRow(set, prob, strongcgcoef, strongcgrhs, varused, varinds, &nvarinds, varsign, boundtype, f0, k);
12050 * The coefficient of the slack variable s_r is equal to the row's weight times the slack's sign, because the slack
12054 * Depending on the slacks type (integral or continuous), its coefficient in the cut calculates as follows:
12066 /* remove again all nearly-zero coefficients from strong CG row and relax the right hand side correspondingly in order to
12141 /* @todo: setting feasibility to TRUE might be wrong because in probing mode, the state is even saved when the LP was
12235 SCIPdebugMessage("setting LP upper objective limit from %g to %g\n", lp->cutoffbound, cutoffbound);
12237 /* if the objective function was changed in diving, the cutoff bound has no meaning (it will be set correctly
12246 /* if the cutoff bound is increased, and the LP was proved to exceed the old cutoff, it is no longer solved */
12254 /* if the cutoff bound is decreased below the current optimal value, the LP now exceeds the objective limit;
12255 * if the objective limit in the LP solver was disabled, the solution status of the LP is not changed
12293 /** calls LPI to perform primal simplex, measures time and counts iterations, gets basis feasibility status */
12300 SCIP_Bool keepsol, /**< should the old LP solution be kept if no iterations were performed? */
12314 SCIPdebugMessage("solving LP %"SCIP_LONGINT_FORMAT" (%d cols, %d rows) with primal simplex (diving=%d, nprimallps=%"SCIP_LONGINT_FORMAT", ndivinglps=%"SCIP_LONGINT_FORMAT")\n",
12315 stat->lpcount+1, lp->ncols, lp->nrows, lp->diving || lp->probing, stat->nprimallps, stat->ndivinglps);
12323 (void) SCIPsnprintf(fname, SCIP_MAXSTRLEN, "lp%"SCIP_LONGINT_FORMAT"_%"SCIP_LONGINT_FORMAT".lp", stat->nnodes, stat->lpcount);
12325 SCIPmessagePrintInfo("wrote LP to file <%s> (primal simplex, uobjlim=%.15g, feastol=%.15g/%.15g, fromscratch=%d, fastmip=%d, scaling=%d, presolving=%d)\n",
12352 SCIPdebugMessage("(node %"SCIP_LONGINT_FORMAT") primal simplex solving error in LP %"SCIP_LONGINT_FORMAT"\n", stat->nnodes, stat->nlps);
12428 SCIPdebugMessage("solved LP %"SCIP_LONGINT_FORMAT" with primal simplex (diving=%d, nprimallps=%"SCIP_LONGINT_FORMAT", ndivinglps=%"SCIP_LONGINT_FORMAT")\n",
12441 SCIP_Bool keepsol, /**< should the old LP solution be kept if no iterations were performed? */
12455 SCIPdebugMessage("solving LP %"SCIP_LONGINT_FORMAT" (%d cols, %d rows) with dual simplex (diving=%d, nduallps=%"SCIP_LONGINT_FORMAT", ndivinglps=%"SCIP_LONGINT_FORMAT")\n",
12456 stat->lpcount+1, lp->ncols, lp->nrows, lp->diving || lp->probing, stat->nduallps, stat->ndivinglps);
12464 (void) SCIPsnprintf(fname, SCIP_MAXSTRLEN, "lp%"SCIP_LONGINT_FORMAT"_%"SCIP_LONGINT_FORMAT".lp", stat->nnodes, stat->lpcount);
12466 SCIPmessagePrintInfo("wrote LP to file <%s> (dual simplex, uobjlim=%.15g, feastol=%.15g/%.15g, fromscratch=%d, fastmip=%d, scaling=%d, presolving=%d)\n",
12493 SCIPdebugMessage("(node %"SCIP_LONGINT_FORMAT") dual simplex solving error in LP %"SCIP_LONGINT_FORMAT"\n", stat->nnodes, stat->nlps);
12569 SCIPdebugMessage("solved LP %"SCIP_LONGINT_FORMAT" with dual simplex (diving=%d, nduallps=%"SCIP_LONGINT_FORMAT", ndivinglps=%"SCIP_LONGINT_FORMAT")\n",
12575 /** calls LPI to perform lexicographic dual simplex to find a lexicographically minimal optimal solution, measures time and counts iterations
12584 * We do, however, not aim for the exact lexicographically minimal optimal solutions, but perform a
12587 * More precisely, we first solve the problem with the dual simplex algorithm. Then we fix those
12589 * variables) that have nonzero reduced cost. This fixes the objective function value, because only
12592 * Then the not yet fixed variables are considered in turn. If they are at their lower bounds and
12593 * nonbasic, they are fixed to this bound, since their value cannot be decreased further. Once a
12594 * candidate is found, we set the objective to minimize this variable. We run the primal simplex
12596 * variables out of the basis have been fixed to their lower bound, the basis is also not primal
12597 * feasible anymore). After the optimization, we again fix nonbasic variables that have nonzero
12604 * @todo Can we skip the consideration of basic variables that are at their lower bound? How can we
12605 * guarantee that these variables will not be changed in later stages? We can fix these variables
12615 SCIP_Bool keepsol, /**< should the old LP solution be kept if no iterations were performed? */
12632 SCIPdebugMessage("solving LP %"SCIP_LONGINT_FORMAT" (%d cols, %d rows) with lex dual simplex (diving=%d, nduallps=%"SCIP_LONGINT_FORMAT", ndivinglps=%"SCIP_LONGINT_FORMAT")\n",
12633 stat->lpcount+1, lp->ncols, lp->nrows, lp->diving || lp->probing, stat->nduallps, stat->ndivinglps);
12658 SCIPdebugMessage("(node %"SCIP_LONGINT_FORMAT") dual simplex solving error in LP %"SCIP_LONGINT_FORMAT"\n", stat->nnodes, stat->nlps);
12897 /* check columns: find first candidate (either basic or nonbasic and zero reduced cost) and fix variables */
13024 /* solve with primal simplex, because we are primal feasible, but not necessarily dual feasible */
13029 SCIPdebugMessage("(node %"SCIP_LONGINT_FORMAT") in lex-dual: primal simplex solving error in LP %"SCIP_LONGINT_FORMAT"\n", stat->nnodes, stat->nlps);
13107 while( pos >= 0 && nDualDeg > 0 && (set->lp_lexdualmaxrounds == -1 || rounds < set->lp_lexdualmaxrounds) );
13114 /* resolve to update solvers internal data structures - should only produce few pivots - is this needed? */
13119 SCIPdebugMessage("(node %"SCIP_LONGINT_FORMAT") dual simplex solving error in LP %"SCIP_LONGINT_FORMAT"\n", stat->nnodes, stat->nlps);
13183 SCIPdebugMessage("solved LP %"SCIP_LONGINT_FORMAT" with lex dual simplex (diving=%d, nduallps=%"SCIP_LONGINT_FORMAT", ndivinglps=%"SCIP_LONGINT_FORMAT")\n",
13206 /** calls LPI to perform barrier, measures time and counts iterations, gets basis feasibility status */
13213 SCIP_Bool keepsol, /**< should the old LP solution be kept if no iterations were performed? */
13227 SCIPdebugMessage("solving LP %"SCIP_LONGINT_FORMAT" (%d cols, %d rows) with barrier%s (diving=%d, nbarrierlps=%"SCIP_LONGINT_FORMAT", ndivinglps=%"SCIP_LONGINT_FORMAT")\n",
13228 stat->lpcount+1, lp->ncols, lp->nrows, crossover ? "/crossover" : "", lp->diving || lp->probing,
13237 (void) SCIPsnprintf(fname, SCIP_MAXSTRLEN, "lp%"SCIP_LONGINT_FORMAT"_%"SCIP_LONGINT_FORMAT".lp", stat->nnodes, stat->lpcount);
13239 SCIPmessagePrintInfo("wrote LP to file <%s> (barrier, uobjlim=%.15g, feastol=%.15g/%.15g, convtol=%.15g, fromscratch=%d, fastmip=%d, scaling=%d, presolving=%d)\n",
13266 SCIPdebugMessage("(node %"SCIP_LONGINT_FORMAT") barrier solving error in LP %"SCIP_LONGINT_FORMAT"\n", stat->nnodes, stat->nlps);
13337 SCIPdebugMessage("solved LP %"SCIP_LONGINT_FORMAT" with barrier%s (diving=%d, nduallps=%"SCIP_LONGINT_FORMAT", nbarrierlps=%"SCIP_LONGINT_FORMAT")\n",
13338 stat->lpcount, crossover ? "/crossover" : "", lp->diving || lp->probing, stat->nbarrierlps, stat->ndivinglps);
13351 SCIP_Bool keepsol, /**< should the old LP solution be kept if no iterations were performed? */
13376 SCIPdebugMessage("calling LP algorithm <%s> with a time limit of %f seconds\n", lpalgoName(lpalgo), lptimelimit);
13387 if( set->lp_lexdualalgo && (!set->lp_lexdualrootonly || stat->maxdepth == 0) && (!set->lp_lexdualstalling || lp->installing) )
13415 SCIPdebugMessage("LP feasibility: primalfeasible=%u, dualfeasible=%u\n", lp->primalfeasible, lp->dualfeasible);
13431 int itlim, /**< maximal number of LP iterations to perform in first LP calls (before solving from scratch), or -1 for no limit */
13432 int harditlim, /**< maximal number of LP iterations to perform (hard limit for all LP calls), or -1 for no limit */
13437 SCIP_Bool fromscratch, /**< should the LP be solved from scratch without using current basis? */
13438 SCIP_Bool keepsol, /**< should the old LP solution be kept if no iterations were performed? */
13458 /**@todo implement solving the LP when loose variables with infinite best bound are present; for this, we need to
13459 * solve with deactivated objective limit in order to determine whether we are (a) infeasible or (b) feasible
13460 * and hence unbounded; to handle case (b) we need to store an array of loose variables with best bound in
13465 SCIPerrorMessage("cannot solve LP when loose variable with infinite best bound is present\n");
13485 SCIP_CALL( lpSetFeastol(lp, tightprimfeastol ? FEASTOLTIGHTFAC * SCIPsetLpfeastol(set) : SCIPsetLpfeastol(set), &success) );
13486 SCIP_CALL( lpSetDualfeastol(lp, tightdualfeastol ? FEASTOLTIGHTFAC * SCIPsetDualfeastol(set) : SCIPsetDualfeastol(set),
13488 SCIP_CALL( lpSetBarrierconvtol(lp, (tightprimfeastol || tightdualfeastol) ? FEASTOLTIGHTFAC * SCIPsetBarrierconvtol(set)
13502 /* check for stability; iteration limit exceeded is also treated like instability if the iteration limit is soft */
13503 if( *timelimit || (!(*lperror) && SCIPlpiIsStable(lp->lpi) && (itlimishard || !SCIPlpiIsIterlimExc(lp->lpi))) )
13511 "(node %"SCIP_LONGINT_FORMAT") numerical troubles in LP %"SCIP_LONGINT_FORMAT" -- ignoring instability of %s\n",
13517 /* In the following, whenever the LP iteration limit is exceeded in an LP solving call, we leave out the
13518 * remaining resolving calls with changed settings and go directly to solving the LP from scratch.
13521 /* if FASTMIP is turned on, solve again without FASTMIP (starts from the solution of the last LP solving call);
13530 "(node %"SCIP_LONGINT_FORMAT") numerical troubles in LP %"SCIP_LONGINT_FORMAT" -- solve again with %s without FASTMIP\n",
13535 if( *timelimit || (!(*lperror) && SCIPlpiIsStable(lp->lpi) && (itlimishard || !SCIPlpiIsIterlimExc(lp->lpi))) )
13543 "(node %"SCIP_LONGINT_FORMAT") numerical troubles in LP %"SCIP_LONGINT_FORMAT" -- ignoring instability of %s\n",
13551 /* if the iteration limit was exceeded in the last LP solving call, we leave out the remaining resolving calls with changed settings
13556 /* solve again with opposite scaling setting (starts from the solution of the last LP solving call) */
13561 "(node %"SCIP_LONGINT_FORMAT") numerical troubles in LP %"SCIP_LONGINT_FORMAT" -- solve again with %s %s scaling\n",
13566 if( *timelimit || (!(*lperror) && SCIPlpiIsStable(lp->lpi) && (itlimishard || !SCIPlpiIsIterlimExc(lp->lpi))) )
13574 "(node %"SCIP_LONGINT_FORMAT") numerical troubles in LP %"SCIP_LONGINT_FORMAT" -- ignoring instability of %s\n",
13586 /* if the iteration limit was exceeded in the last LP solving call, we leave out the remaining resolving calls with changed settings
13591 /* solve again with opposite presolving setting (starts from the solution of the last LP solving call) */
13596 "(node %"SCIP_LONGINT_FORMAT") numerical troubles in LP %"SCIP_LONGINT_FORMAT" -- solve again with %s %s presolving\n",
13601 if( *timelimit || (!(*lperror) && SCIPlpiIsStable(lp->lpi) && (itlimishard || !SCIPlpiIsIterlimExc(lp->lpi))) )
13609 "(node %"SCIP_LONGINT_FORMAT") numerical troubles in LP %"SCIP_LONGINT_FORMAT" -- ignoring instability of %s\n",
13621 /* solve again with a tighter feasibility tolerance (starts from the solution of the last LP solving call);
13624 if( ((simplex && (!tightprimfeastol || !tightdualfeastol)) || (!tightprimfeastol && !tightdualfeastol)) &&
13642 SCIP_CALL( lpSetBarrierconvtol(lp, FEASTOLTIGHTFAC * SCIPsetBarrierconvtol(set), &success3) );
13648 "(node %"SCIP_LONGINT_FORMAT") numerical troubles in LP %"SCIP_LONGINT_FORMAT" -- solve again with %s with tighter primal and dual feasibility tolerance\n",
13653 if( *timelimit || (!(*lperror) && SCIPlpiIsStable(lp->lpi) && (itlimishard || !SCIPlpiIsIterlimExc(lp->lpi))) )
13661 "(node %"SCIP_LONGINT_FORMAT") numerical troubles in LP %"SCIP_LONGINT_FORMAT" -- ignoring instability of %s\n",
13683 /* all LPs solved after this point are solved from scratch, so set the LP iteration limit to the hard limit;
13694 "(node %"SCIP_LONGINT_FORMAT") numerical troubles in LP %"SCIP_LONGINT_FORMAT" -- solve again from scratch with %s\n",
13707 "(node %"SCIP_LONGINT_FORMAT") numerical troubles in LP %"SCIP_LONGINT_FORMAT" -- ignoring instability of %s\n",
13718 lpalgo = (lpalgo == SCIP_LPALGO_PRIMALSIMPLEX ? SCIP_LPALGO_DUALSIMPLEX : SCIP_LPALGO_PRIMALSIMPLEX);
13720 "(node %"SCIP_LONGINT_FORMAT") numerical troubles in LP %"SCIP_LONGINT_FORMAT" -- solve again from scratch with %s\n",
13733 "(node %"SCIP_LONGINT_FORMAT") numerical troubles in LP %"SCIP_LONGINT_FORMAT" -- ignoring instability of %s\n",
13744 "(node %"SCIP_LONGINT_FORMAT") numerical troubles in LP %"SCIP_LONGINT_FORMAT" -- solve again from scratch with %s %s scaling\n",
13757 "(node %"SCIP_LONGINT_FORMAT") numerical troubles in LP %"SCIP_LONGINT_FORMAT" -- ignoring instability of %s\n",
13773 "(node %"SCIP_LONGINT_FORMAT") numerical troubles in LP %"SCIP_LONGINT_FORMAT" -- solve again from scratch with %s %s presolving\n",
13786 "(node %"SCIP_LONGINT_FORMAT") numerical troubles in LP %"SCIP_LONGINT_FORMAT" -- ignoring instability of %s\n",
13815 "(node %"SCIP_LONGINT_FORMAT") numerical troubles in LP %"SCIP_LONGINT_FORMAT" -- solve again from scratch with %s with tighter feasibility tolerance\n",
13828 "(node %"SCIP_LONGINT_FORMAT") numerical troubles in LP %"SCIP_LONGINT_FORMAT" -- ignoring instability of %s\n",
13848 SCIPmessagePrintVerbInfo(messagehdlr, set->disp_verblevel, SCIP_VERBLEVEL_HIGH, "(node %"SCIP_LONGINT_FORMAT") unresolved numerical troubles in LP %"SCIP_LONGINT_FORMAT"\n",
13864 int resolveitlim, /**< maximal number of LP iterations to perform in resolving calls, or -1 for no limit */
13865 int harditlim, /**< maximal number of LP iterations to perform (hard limit for all LP calls), or -1 for no limit */
13872 SCIP_Bool fromscratch, /**< should the LP be solved from scratch without using current basis? */
13873 SCIP_Bool keepsol, /**< should the old LP solution be kept if no iterations were performed? */
13899 SCIP_CALL( lpSolveStable(lp, set, messagehdlr, stat, prob, lpalgo, itlim, harditlim, resolve, fastmip, tightprimfeastol, tightdualfeastol, fromscratch,
13925 assert(!(SCIPlpiIsOptimal(lp->lpi) && SCIPlpiIsObjlimExc(lp->lpi) && SCIPlpiIsPrimalInfeasible(lp->lpi) &&
13926 SCIPlpiExistsPrimalRay(lp->lpi) && SCIPlpiIsIterlimExc(lp->lpi) && SCIPlpiIsTimelimExc(lp->lpi)));
13937 /* the solver may return the optimal value, even if this is greater or equal than the upper bound */
13938 SCIPdebugMessage("optimal solution %.15g exceeds objective limit %.15g\n", lp->lpobjval, lp->lpiuobjlim);
13942 /* if we did not disable the cutoff bound in the LP solver, the LP solution status should be objective limit
13945 assert(lpCutoffDisabled(set) || lp->lpsolstat == SCIP_LPSOLSTAT_OBJLIMIT || SCIPsetIsInfinity(set, lp->cutoffbound)
13956 /* because of numerical instability lpalgo != lp->lastlpalgo might happen - hence, we have to check both */
13957 if( needdualray && !SCIPlpiHasDualRay(lp->lpi) && !solveddual && lpalgo != SCIP_LPALGO_DUALSIMPLEX )
13968 /* because of numerical instability lpalgo != lp->lastlpalgo might happen - hence, we have to check both */
13969 if( needprimalray && !SCIPlpiHasPrimalRay(lp->lpi) && !solvedprimal && lpalgo != SCIP_LPALGO_PRIMALSIMPLEX )
13993 "(node %"SCIP_LONGINT_FORMAT") solution status of LP %"SCIP_LONGINT_FORMAT" could not be proven (internal status:%d) -- solve again with %s\n",
14002 "(node %"SCIP_LONGINT_FORMAT") solution status of LP %"SCIP_LONGINT_FORMAT" could not be proven (internal status:%d) -- solve again with %s\n",
14008 SCIPerrorMessage("(node %"SCIP_LONGINT_FORMAT") error or unknown return status of %s in LP %"SCIP_LONGINT_FORMAT" (internal status: %d)\n",
14016 SCIPdebugMessage("solving LP with %s returned solstat=%d (internal status: %d, primalfeasible=%u, dualfeasible=%u)\n",
14023 /** flushes the LP and solves it with the primal or dual simplex algorithm, depending on the current basis feasibility */
14033 int resolveitlim, /**< maximal number of LP iterations to perform in resolving calls, or -1 for no limit */
14034 int harditlim, /**< maximal number of LP iterations to perform (hard limit for all LP calls), or -1 for no limit */
14040 SCIP_Bool fromscratch, /**< should the LP be solved from scratch without using current basis? */
14041 SCIP_Bool keepsol, /**< should the old LP solution be kept if no iterations were performed? */
14054 fastmip = ((!lp->flushaddedcols && !lp->flushdeletedcols) ? fastmip : 0); /* turn off FASTMIP if columns were changed */
14067 SCIP_CALL( lpSolve(lp, set, messagehdlr, stat, prob, SCIP_LPALGO_DUALSIMPLEX, resolveitlim, harditlim, needprimalray,
14068 needdualray, resolve, fastmip, tightprimfeastol, tightdualfeastol, fromscratch, keepsol, lperror) );
14073 SCIP_CALL( lpSolve(lp, set, messagehdlr, stat, prob, SCIP_LPALGO_PRIMALSIMPLEX, resolveitlim, harditlim, needprimalray,
14074 needdualray, resolve, fastmip, tightprimfeastol, tightdualfeastol, fromscratch, keepsol, lperror) );
14080 SCIP_CALL( lpSolve(lp, set, messagehdlr, stat, prob, SCIP_LPALGO_PRIMALSIMPLEX, resolveitlim, harditlim, needprimalray,
14081 needdualray, resolve, fastmip, tightprimfeastol, tightdualfeastol, fromscratch, keepsol, lperror) );
14086 SCIP_CALL( lpSolve(lp, set, messagehdlr, stat, prob, SCIP_LPALGO_DUALSIMPLEX, resolveitlim, harditlim, needprimalray,
14087 needdualray, resolve, fastmip, tightprimfeastol, tightdualfeastol, fromscratch, keepsol, lperror) );
14092 SCIP_CALL( lpSolve(lp, set, messagehdlr, stat, prob, SCIP_LPALGO_BARRIER, resolveitlim, harditlim, needprimalray,
14093 needdualray, resolve, fastmip, tightprimfeastol, tightdualfeastol, fromscratch, keepsol, lperror) );
14098 SCIP_CALL( lpSolve(lp, set, messagehdlr, stat, prob, SCIP_LPALGO_BARRIERCROSSOVER, resolveitlim, harditlim, needprimalray,
14099 needdualray, resolve, fastmip, tightprimfeastol, tightdualfeastol, fromscratch, keepsol, lperror) );
14129 assert(SCIPsetIsInfinity(set, -col->lazylb) || SCIPsetIsFeasGE(set, col->primsol, col->lazylb));
14130 assert(SCIPsetIsInfinity(set, col->lazyub) || SCIPsetIsFeasLE(set, col->primsol, col->lazyub));
14137 /** marks all lazy columns to be changed; this is needed for reloading/removing bounds of these columns before and after
14157 SCIPdebugMessage("mark all lazy columns as changed in order to reload bounds (diving=%u, applied=%u)\n",
14193 /* update lp->divinglazyapplied flag: if we are in diving mode, we just applied the lazy bounds,
14212 /* set itlim to INT_MAX if it is -1 to reduce the number of cases to be regarded in the following */
14215 /* return resolveiterfac * average iteration number per call after root, but at least resolveitermin and at most the hard iteration limit */
14217 (set->lp_resolveiterfac * (stat->nlpiterations - stat->nrootlpiterations) / (SCIP_Real)(stat->nlps - stat->nrootlps))));
14236 SCIP_Bool keepsol, /**< should the old LP solution be kept if no iterations were performed? */
14251 SCIPdebugMessage("solving LP: %d rows, %d cols, primalfeasible=%u, dualfeasible=%u, solved=%u, diving=%u, probing=%u, cutoffbnd=%g\n",
14252 lp->nrows, lp->ncols, lp->primalfeasible, lp->dualfeasible, lp->solved, lp->diving, lp->probing, lp->cutoffbound);
14262 /* compute the limit for the number of LP resolving iterations, if needed (i.e. if limitresolveiters == TRUE) */
14267 /* if there are lazy bounds, check whether the bounds should explicitly be put into the LP (diving was started)
14272 /* @todo avoid loosing primal feasibility here after changing the objective already did destroy dual feasibility;
14298 fastmip = ((lp->lpihasfastmip && !lp->flushaddedcols && !lp->flushdeletedcols && stat->nnodes > 1) ? set->lp_fastmip : 0);
14309 SCIP_CALL( lpFlushAndSolve(lp, blkmem, set, messagehdlr, stat, prob, eventqueue, resolveitlim, harditlim, needprimalray,
14311 SCIPdebugMessage("lpFlushAndSolve() returned solstat %d (error=%u)\n", SCIPlpGetSolstat(lp), *lperror);
14360 SCIPdebugMessage("removed obsoletes - resolve LP again: %d rows, %d cols\n", lp->nrows, lp->ncols);
14367 SCIP_Bool simplex = (lp->lastlpalgo == SCIP_LPALGO_PRIMALSIMPLEX || lp->lastlpalgo == SCIP_LPALGO_DUALSIMPLEX);
14371 /* solution is infeasible (this can happen due to numerical problems): solve again without FASTMIP */
14373 "(node %"SCIP_LONGINT_FORMAT") solution of LP %"SCIP_LONGINT_FORMAT" not optimal (pfeas=%d, dfeas=%d) -- solving again without FASTMIP\n",
14380 /* solution is infeasible (this can happen due to numerical problems): solve again with tighter feasibility
14384 "(node %"SCIP_LONGINT_FORMAT") solution of LP %"SCIP_LONGINT_FORMAT" not optimal (pfeas=%d, dfeas=%d) -- solving again with tighter feasibility tolerance\n",
14392 /* solution is infeasible (this can happen due to numerical problems): solve again from scratch */
14394 "(node %"SCIP_LONGINT_FORMAT") solution of LP %"SCIP_LONGINT_FORMAT" not optimal (pfeas=%d, dfeas=%d) -- solving again from scratch\n",
14402 "(node %"SCIP_LONGINT_FORMAT") unresolved numerical troubles in LP %"SCIP_LONGINT_FORMAT"\n", stat->nnodes, stat->nlps);
14409 lp->lpobjval, getFiniteLooseObjval(lp, set, prob), lp->lpobjval + getFiniteLooseObjval(lp, set, prob),
14421 /* it might happen that we have no infeasibility proof for the current LP (e.g. if the LP was always solved
14427 "(node %"SCIP_LONGINT_FORMAT") infeasibility of LP %"SCIP_LONGINT_FORMAT" could not be proven by dual ray\n", stat->nnodes, stat->nlps);
14458 SCIP_Bool simplex = (lp->lastlpalgo == SCIP_LPALGO_PRIMALSIMPLEX || lp->lastlpalgo == SCIP_LPALGO_DUALSIMPLEX);
14462 /* unbounded solution is infeasible (this can happen due to numerical problems): solve again without FASTMIP */
14464 "(node %"SCIP_LONGINT_FORMAT") solution of unbounded LP %"SCIP_LONGINT_FORMAT" not optimal (pfeas=%d, rfeas=%d) -- solving again without FASTMIP\n",
14471 /* unbounded solution is infeasible (this can happen due to numerical problems): solve again with tighter feasibility
14475 "(node %"SCIP_LONGINT_FORMAT") solution of unbounded LP %"SCIP_LONGINT_FORMAT" not optimal (pfeas=%d, rfeas=%d) -- solving again with tighter primal feasibility tolerance\n",
14482 /* unbounded solution is infeasible (this can happen due to numerical problems): solve again from scratch */
14484 "(node %"SCIP_LONGINT_FORMAT") solution of unbounded LP %"SCIP_LONGINT_FORMAT" not optimal (pfeas=%d, rfeas=%d) -- solving again from scratch\n",
14491 /* unbounded solution is infeasible (this can happen due to numerical problems) and nothing helped:
14495 "(node %"SCIP_LONGINT_FORMAT") unresolved numerical troubles in unbounded LP %"SCIP_LONGINT_FORMAT"\n", stat->nnodes, stat->nlps);
14506 /* if we do branch-and-price, make sure that a dual feasible solution exists, that exceeds the objective limit;
14507 * With FASTMIP setting, CPLEX does not apply the final pivot to reach the dual solution exceeding the objective
14508 * limit. Therefore, we have to either turn off FASTMIP and resolve the problem or continue solving it without
14509 * objective limit for at least one iteration. We first try to continue with FASTMIP for one additional simplex
14510 * iteration using the steepest edge pricing rule. If this does not fix the problem, we temporarily disable
14521 /* actually, SCIPsetIsGE(set, lp->lpobjval, lp->lpiuobjlim) should hold, but we are a bit less strict in
14524 assert(SCIPlpiIsObjlimExc(lpi) || !SCIPsetIsFeasNegative(set, lp->lpobjval - lp->lpiuobjlim));
14528 /* do one additional simplex step if the computed dual solution doesn't exceed the objective limit */
14535 SCIPdebugMessage("objval = %f < %f = lp->lpiuobjlim, but status objlimit\n", objval, lp->lpiuobjlim);
14537 /* we want to resolve from the current basis (also if the LP had to be solved from scratch) */
14550 FALSE, FALSE, TRUE, fastmip, tightprimfeastol, tightdualfeastol, fromscratch, keepsol, lperror) );
14568 /* disable fastmip for subsequent LP calls (if objective limit is not yet exceeded or LP solution is infeasible) */
14580 FALSE, FALSE, TRUE, fastmip, tightprimfeastol, tightdualfeastol, fromscratch, keepsol, lperror) );
14604 /* optimal solution / objlimit with fastmip turned off / itlimit or timelimit, but objlimit exceeded */
14629 /* in debug mode, check that lazy bounds (if present) are not violated by an optimal LP solution */
14645 /* LP solution is not feasible or objective limit was reached without the LP value really exceeding
14653 "(node %"SCIP_LONGINT_FORMAT") unresolved numerical troubles in LP %"SCIP_LONGINT_FORMAT"\n", stat->nnodes, stat->nlps);
14660 lp->lpobjval, getFiniteLooseObjval(lp, set, prob), lp->lpobjval + getFiniteLooseObjval(lp, set, prob),
14700 "(node %"SCIP_LONGINT_FORMAT") unresolved numerical troubles in unbounded LP %"SCIP_LONGINT_FORMAT"\n", stat->nnodes, stat->nlps);
14747 /* if the LP had to be solved from scratch, we have to reset this flag since it is stored in the LPI; otherwise it
14753 SCIPdebugMessage("resetting parameter SCIP_LPPARAM_FROMSCRATCH to FALSE %s\n", success ? "" : "failed");
14772 * @note This method returns the objective value of the current LP solution, which might be primal or dual infeasible
14773 * if a limit was hit during solving. It must not be used as a dual bound if the LP solution status is
14858 /** gets the global pseudo objective value; that is all variables set to their best (w.r.t. the objective function)
14879 /* if the global pseudo objective value is smaller than -infinity, we just return -infinity */
14887 /** gets the pseudo objective value for the current search node; that is all variables set to their best (w.r.t. the
14916 /** gets pseudo objective value, if a bound of the given variable would be modified in the given way */
14954 /** gets pseudo objective value, if a bound of the given variable would be modified in the given way;
15015 * @note: Here we only consider cancellations which can occur during decreasing the oldvalue to newvalue; not the
15181 assert(SCIPsetIsPositive(set, obj)); /* we only need to update if the objective is positive */
15222 assert(SCIPsetIsNegative(set, obj)); /* we only need to update if the objective is negative */
15268 if( SCIPsetIsLT(set, lp->objsqrnorm, 0.0) || isNewValueUnreliable(set, lp->objsqrnorm, oldvalue) )
15274 /* due to numerical troubles it still can appear that lp->objsqrnorm is a little bit smaller than 0 */
15286 /** updates current pseudo and loose objective values for a change in a variable's objective value or bounds */
15321 /* after changing a local bound on a LOOSE variable, we have to update the loose objective value, too */
15366 /** updates current pseudo and loose objective values for a change in a variable's objective value or bounds;
15400 if( SCIPvarGetStatus(var) != SCIP_VARSTATUS_LOOSE && SCIPvarGetStatus(var) != SCIP_VARSTATUS_COLUMN )
15421 SCIPintervalSub(SCIPsetInfinity(set), &deltaval, deltaval, prod); /* deltaval -= oldlb * oldobj; */
15433 SCIPintervalSub(SCIPsetInfinity(set), &deltaval, deltaval, prod); /* deltaval -= oldub * oldobj; */
15447 SCIPintervalAdd(SCIPsetInfinity(set), &deltaval, deltaval, prod); /* deltaval += newlb * newobj; */
15459 SCIPintervalAdd(SCIPsetInfinity(set), &deltaval, deltaval, prod); /* deltaval += newub * newobj; */
15482 /** updates current pseudo and loose objective value for a change in a variable's objective value */
15498 SCIP_CALL( lpUpdateVarProved(lp, set, var, oldobj, SCIPvarGetLbLocal(var), SCIPvarGetUbLocal(var),
15509 assert(SCIPvarGetStatus(var) == SCIP_VARSTATUS_LOOSE || SCIPvarGetStatus(var) == SCIP_VARSTATUS_COLUMN);
15512 /* the objective coefficient can only be changed during presolving, that implies that the global and local
15519 getObjvalDeltaObj(set, oldobj, newobj, SCIPvarGetLbLocal(var), SCIPvarGetUbLocal(var), &deltaval, &deltainf);
15532 /** updates current root pseudo objective value for a global change in a variable's lower bound */
15559 /** updates current pseudo and loose objective value for a change in a variable's lower bound */
15586 assert(SCIPvarGetStatus(var) == SCIP_VARSTATUS_LOOSE || SCIPvarGetStatus(var) == SCIP_VARSTATUS_COLUMN);
15600 /** updates current root pseudo objective value for a global change in a variable's upper bound */
15654 assert(SCIPvarGetStatus(var) == SCIP_VARSTATUS_LOOSE || SCIPvarGetStatus(var) == SCIP_VARSTATUS_COLUMN);
15676 assert(SCIPvarGetStatus(var) == SCIP_VARSTATUS_LOOSE || SCIPvarGetStatus(var) == SCIP_VARSTATUS_COLUMN);
15697 assert(SCIPvarGetStatus(var) == SCIP_VARSTATUS_LOOSE || SCIPvarGetStatus(var) == SCIP_VARSTATUS_COLUMN);
15795 SCIPintervalSub(SCIPsetInfinity(set), &loose, loose, prod); /* lp->looseobjval -= lb * obj; */
15808 SCIPintervalSub(SCIPsetInfinity(set), &loose, loose, prod); /* lp->looseobjval -= ub * obj; */
15813 /* get rid of numerical problems: set loose objective value explicitly to zero, if no loose variables remain */
15926 SCIPintervalAdd(SCIPsetInfinity(set), &loose, loose, prod); /* lp->looseobjval += lb * obj; */
15939 SCIPintervalAdd(SCIPsetInfinity(set), &loose, loose, prod); /* lp->looseobjval += ub * obj; */
15980 /* get rid of numerical problems: set loose objective value explicitly to zero, if no loose variables remain */
15993 SCIP_Bool* primalfeasible, /**< pointer to store whether the solution is primal feasible, or NULL */
15994 SCIP_Bool* dualfeasible /**< pointer to store whether the solution is dual feasible, or NULL */
16022 /* initialize return and feasibility flags; if primal oder dual feasibility shall not be checked, we set the
16096 /* complementary slackness in barrier solutions is measured as product of primal slack and dual multiplier;
16097 * we use a slack of at most 1, because otherwise we multiply by something like SCIPinfinty() for unbounded
16111 SCIPdebugMessage(" col <%s> [%.9g,%.9g]: primsol=%.9f, redcost=%.9f, pfeas=%u/%u(%u), dfeas=%d/%d(%u)\n",
16112 SCIPvarGetName(lpicols[c]->var), lpicols[c]->lb, lpicols[c]->ub, lpicols[c]->primsol, lpicols[c]->redcost,
16116 !SCIPsetIsFeasPositive(set, MIN((lpicols[c]->primsol - lpicols[c]->lb), 1.0) * lpicols[c]->redcost),
16117 !SCIPsetIsFeasNegative(set, MIN((lpicols[c]->ub - lpicols[c]->primsol), 1.0) * lpicols[c]->redcost),
16122 /* complementary slackness means that if a variable is not at its lower or upper bound, its reduced costs
16123 * must be non-positive or non-negative, respectively; in particular, if a variable is strictly within its
16131 SCIPdebugMessage(" col <%s> [%.9g,%.9g]: primsol=%.9f, redcost=%.9f, pfeas=%u/%u(%u), dfeas=%d/%d(%u)\n",
16132 SCIPvarGetName(lpicols[c]->var), lpicols[c]->lb, lpicols[c]->ub, lpicols[c]->primsol, lpicols[c]->redcost,
16136 !SCIPsetIsFeasGT(set, lpicols[c]->primsol, lpicols[c]->lb) || !SCIPsetIsFeasPositive(set, lpicols[c]->redcost),
16137 !SCIPsetIsFeasLT(set, lpicols[c]->primsol, lpicols[c]->ub) || !SCIPsetIsFeasNegative(set, lpicols[c]->redcost),
16141 /* we intentionally use an exact positive/negative check because ignoring small reduced cost values may lead to a
16142 * wrong bound value; if the corresponding bound is +/-infinity, we use zero reduced cost (if stilldualfeasible is
16171 /* complementary slackness in barrier solutions is measured as product of primal slack and dual multiplier;
16172 * we use a slack of at most 1, because otherwise we multiply by something like SCIPinfinty() for unbounded
16186 SCIPdebugMessage(" row <%s> [%.9g,%.9g]: activity=%.9f, dualsol=%.9f, pfeas=%u/%u(%u), dfeas=%d/%d(%u)\n",
16187 lpirows[r]->name, lpirows[r]->lhs, lpirows[r]->rhs, lpirows[r]->activity, lpirows[r]->dualsol,
16191 !SCIPsetIsFeasPositive(set, MIN((lpirows[r]->activity - lpirows[r]->lhs), 1.0) * lpirows[r]->dualsol),
16192 !SCIPsetIsFeasNegative(set, MIN((lpirows[r]->rhs - lpirows[r]->activity), 1.0) * lpirows[r]->dualsol),
16197 /* complementary slackness means that if the activity of a row is not at its left-hand or right-hand side,
16198 * its dual multiplier must be non-positive or non-negative, respectively; in particular, if the activity is
16206 SCIPdebugMessage(" row <%s> [%.9g,%.9g] + %.9g: activity=%.9f, dualsol=%.9f, pfeas=%u/%u(%u), dfeas=%d/%d(%u)\n",
16207 lpirows[r]->name, lpirows[r]->lhs, lpirows[r]->rhs, lpirows[r]->constant, lpirows[r]->activity, lpirows[r]->dualsol,
16211 !SCIPsetIsFeasGT(set, lpirows[r]->activity, lpirows[r]->lhs) || !SCIPsetIsFeasPositive(set, lpirows[r]->dualsol),
16212 !SCIPsetIsFeasLT(set, lpirows[r]->activity, lpirows[r]->rhs) || !SCIPsetIsFeasNegative(set, lpirows[r]->dualsol),
16216 /* we intentionally use an exact positive/negative check because ignoring small dual multipliers may lead to a
16217 * wrong bound value; if the corresponding side is +/-infinity, we use a zero dual multiplier (if
16218 * stilldualfeasible is TRUE, we are in the case that the dual multiplier is tiny with wrong sign)
16222 if( lpirows[r]->dualsol > 0.0 && !SCIPsetIsInfinity(set, -(lpirows[r]->lhs - lpirows[r]->constant)) )
16224 else if( lpirows[r]->dualsol < 0.0 && !SCIPsetIsInfinity(set, lpirows[r]->rhs - lpirows[r]->constant) )
16229 /* if the objective value returned by the LP solver is smaller than the internally computed primal bound, then we
16232 /**@todo alternatively, if otherwise the LP solution is feasible, we could simply update the objective value */
16236 SCIPdebugMessage(" primalbound=%.9f, lpbound=%.9g, pfeas=%u(%u)\n", primalbound, lp->lpobjval,
16237 SCIPsetIsFeasLE(set, primalbound, lp->lpobjval), primalfeasible != NULL ? stillprimalfeasible : TRUE);
16240 /* if the objective value returned by the LP solver is smaller than the internally computed dual bound, we declare
16243 /**@todo alternatively, if otherwise the LP solution is feasible, we could simply update the objective value */
16248 SCIPsetIsFeasGE(set, dualbound, lp->lpobjval), dualfeasible != NULL ? stilldualfeasible : TRUE);
16272 SCIP_Bool* primalfeasible, /**< pointer to store whether the solution is primal feasible, or NULL */
16273 SCIP_Bool* rayfeasible /**< pointer to store whether the primal ray is a feasible unboundedness proof, or NULL */
16316 SCIPdebugMessage("getting new unbounded LP solution %"SCIP_LONGINT_FORMAT"\n", stat->lpcount);
16342 /* there should only be a nonzero value in the ray if there is no finite bound in this direction */
16439 SCIP_Real* ray /**< array for storing primal ray values, they are stored w.r.t. the problem index of the variables,
16571 /** increases age of columns with solution value 0.0 and basic rows with activity not at its bounds,
16619 /*debugMessage(" -> row <%s>: activity=%f, age=%d\n", lpirows[r]->name, lpirows[r]->activity, lpirows[r]->age);*/
16772 SCIP_CALL( SCIPeventqueueAdd(eventqueue, blkmem, set, NULL, NULL, NULL, eventfilter, &event) );
16864 && cols[c]->obsoletenode != stat->nnodes /* don't remove column a second time from same node (avoid cycling), or a first time if marked nonremovable locally */
16867 && SCIPsetIsZero(set, SCIPcolGetBestBound(cols[c])) ) /* bestbd != 0 -> column would be priced in next time */
16943 && rows[r]->obsoletenode != stat->nnodes /* don't remove row a second time from same node (avoid cycling), or a first time if marked nonremovable locally */
16970 /** removes all non-basic columns and basic rows in the part of the LP created at the current node, that are too old */
16986 SCIPdebugMessage("removing obsolete columns starting with %d/%d, obsolete rows starting with %d/%d\n",
16995 SCIP_CALL( lpRemoveObsoleteRows(lp, blkmem, set, stat, eventqueue, eventfilter, lp->firstnewrow) );
17076 && SCIPsetIsZero(set, SCIPcolGetBestBound(cols[c])) ) /* bestbd != 0 -> column would be priced in next time */
17170 /** removes all non-basic columns at 0.0 and basic rows in the part of the LP created at the current node */
17194 SCIPdebugMessage("removing unused columns starting with %d/%d (%u), unused rows starting with %d/%d (%u), LP algo: %d, basic sol: %u\n",
17195 lp->firstnewcol, lp->ncols, cleanupcols, lp->firstnewrow, lp->nrows, cleanuprows, lp->lastlpalgo, lp->solisbasic);
17233 SCIPdebugMessage("removing all unused columns (%u) and rows (%u), LP algo: %d, basic sol: %u\n",
17406 SCIP_CALL( rowStoreSolVals(lp->rows[r], blkmem, lp->storedsolvals->lpsolstat == SCIP_LPSOLSTAT_INFEASIBLE) );
17423 /** quits LP diving and resets bounds and objective values of columns to the current node's values */
17489 /* reload LPI state saved at start of diving and free it afterwards; it may be NULL, in which case simply nothing
17503 /* if the LP was solved before starting the dive, but not to optimality (or unboundedness), then we need to solve the
17504 * LP again to reset the solution (e.g. we do not save the Farkas proof for infeasible LPs, because we assume that we
17505 * are not called in this case, anyway); restoring by solving the LP again in either case can be forced by setting
17507 * restoring an unbounded ray after solve does not seem to work currently (bug 631), so we resolve also in this case
17515 SCIP_CALL( SCIPlpSolveAndEval(lp, set, messagehdlr, blkmem, stat, eventqueue, eventfilter, prob, -1LL, FALSE, FALSE, FALSE, &lperror) );
17519 "(node %"SCIP_LONGINT_FORMAT") unresolved numerical troubles while resolving LP %"SCIP_LONGINT_FORMAT" after diving\n", stat->nnodes, stat->nlps);
17532 /* otherwise, we can just reload the buffered LP solution values at start of diving; this has the advantage that we
17533 * are guaranteed to continue with the same LP status as before diving, while in numerically difficult cases, a
17544 /* @todo avoid loosing primal feasibility here after changing the objective already did destroy dual feasibility;
17554 /* increment lp counter to ensure that we do not use solution values from the last solved diving lp */
17571 SCIP_CALL( colRestoreSolVals(lp->cols[c], blkmem, stat->lpcount, set->lp_freesolvalbuffers) );
17575 SCIP_CALL( rowRestoreSolVals(lp->rows[r], blkmem, stat->lpcount, set->lp_freesolvalbuffers, lp->storedsolvals->lpsolstat == SCIP_LPSOLSTAT_INFEASIBLE) );
17687 * Calculating this value in interval arithmetics gives a proved lower LP bound for the following reason (assuming,
17699 SCIP_Bool usefarkas, /**< use y = dual Farkas and c = 0 instead of y = dual solution and c = obj? */
17834 SCIPdebugMessage("proved Farkas value of LP: %g -> infeasibility %sproved\n", bound, *proved ? "" : "not ");
17862 SCIP_Bool genericnames, /**< should generic names like x_i and row_j be used in order to avoid
17892 SCIPmessageFPrintInfo(messagehdlr, file, "\\ Original Variable and Constraint Names have been replaced by generic names.\n");
17895 SCIPmessageFPrintInfo(messagehdlr, file, "\\ Warning: Variable and Constraint Names should not contain special characters like '+', '=' etc.\n");
17896 SCIPmessageFPrintInfo(messagehdlr, file, "\\ If this is the case, the model may be corrupted!\n");
17901 SCIPmessageFPrintInfo(messagehdlr, file, "\\ An artificial variable 'objoffset' has been added and fixed to 1.\n");
17902 SCIPmessageFPrintInfo(messagehdlr, file, "\\ Switching this variable to 0 will disable the offset in the objective.\n\n");
17938 SCIPmessageFPrintInfo(messagehdlr, file, " %+.15g objoffset", objoffset * (SCIP_Real) objsense * objscale);
17950 /* constraint types: 'l' means: only lhs exists, 'r' means: only rhs exists, 'e' means: both sides exist and are
17951 * equal, 'b' and 'B' mean: both sides exist, if the type is 'b', the lhs will be written, if the type is 'B',
17952 * the rhs will be written. Ergo: set type to b first, change it to 'B' afterwards and go back to WRITEROW.
17954 if( SCIPsetIsInfinity(set, REALABS(lp->rows[i]->lhs)) && !SCIPsetIsInfinity(set, REALABS(lp->rows[i]->rhs)) )
17956 else if( !SCIPsetIsInfinity(set, REALABS(lp->rows[i]->lhs)) && SCIPsetIsInfinity(set, REALABS(lp->rows[i]->rhs)) )
17958 else if( !SCIPsetIsInfinity(set, REALABS(lp->rows[i]->lhs)) && SCIPsetIsEQ(set, lp->rows[i]->lhs, lp->rows[i]->rhs) )
17960 else if( !SCIPsetIsInfinity(set, REALABS(lp->rows[i]->lhs)) && !SCIPsetIsInfinity(set, REALABS(lp->rows[i]->rhs)) )
17979 SCIPmessageFPrintInfo(messagehdlr, file, "\\\\ WARNING: The lhs and the rhs of the row with original name <%s>", lp->rows[i]->name);
17980 SCIPmessageFPrintInfo(messagehdlr, file, "are not in a valid range. The following two constraints may be corrupted!\n");
17981 SCIPmessagePrintWarning(messagehdlr, "The lhs and rhs of row <%s> are not in a valid range.\n", lp->rows[i]->name);
17999 SCIPmessageFPrintInfo(messagehdlr, file, " %+.15g x_%d", lp->rows[i]->vals[j], lp->rows[i]->cols[j]->lppos);
18001 SCIPmessageFPrintInfo(messagehdlr, file, " %+.15g %s", lp->rows[i]->vals[j], lp->rows[i]->cols[j]->var->name);
18011 SCIPmessageFPrintInfo(messagehdlr, file, " >= %.15g\n", lp->rows[i]->lhs - lp->rows[i]->constant);
18015 SCIPmessageFPrintInfo(messagehdlr, file, " >= %.15g\n", lp->rows[i]->lhs - lp->rows[i]->constant);
18019 SCIPmessageFPrintInfo(messagehdlr, file, " <= %.15g\n", lp->rows[i]->rhs - lp->rows[i]->constant);
18022 SCIPmessageFPrintInfo(messagehdlr, file, " = %.15g\n", lp->rows[i]->lhs - lp->rows[i]->constant);
18042 /* constraint types: 'l' means: only lhs exists, 'r' means: only rhs exists, 'e' means: both sides exist and are
18043 * equal, 'b' and 'B' mean: both sides exist, if the type is 'b', the lhs will be written, if the type is 'B',
18044 * the rhs will be written. Ergo: set type to b first, change it to 'B' afterwards and go back to WRITEROW.
18046 if( SCIPsetIsInfinity(set, REALABS(lp->rows[i]->lhs)) && !SCIPsetIsInfinity(set, REALABS(lp->rows[i]->rhs)) )
18048 else if( !SCIPsetIsInfinity(set, REALABS(lp->rows[i]->lhs)) && SCIPsetIsInfinity(set, REALABS(lp->rows[i]->rhs)) )
18050 else if( !SCIPsetIsInfinity(set, REALABS(lp->rows[i]->lhs)) && SCIPsetIsEQ(set, lp->rows[i]->lhs, lp->rows[i]->rhs) )
18052 else if( !SCIPsetIsInfinity(set, REALABS(lp->rows[i]->lhs)) && !SCIPsetIsInfinity(set, REALABS(lp->rows[i]->rhs)) )
18071 SCIPmessageFPrintInfo(messagehdlr, file, "\\\\ WARNING: The lhs and the rhs of the row with original name <%s>", lp->rows[i]->name);
18072 SCIPmessageFPrintInfo(messagehdlr, file, "are not in a valid range. The following two constraints may be corrupted!\n");
18073 SCIPmessagePrintWarning(messagehdlr, "The lhs and rhs of row <%s> are not in a valid range.\n",lp->rows[i]->name);
18091 SCIPmessageFPrintInfo(messagehdlr, file, " %+.15g x_%d", lp->rows[i]->vals[j], lp->rows[i]->cols[j]->lppos);
18093 SCIPmessageFPrintInfo(messagehdlr, file, " %+.15g %s", lp->rows[i]->vals[j], lp->rows[i]->cols[j]->var->name);
18103 SCIPmessageFPrintInfo(messagehdlr, file, " >= %.15g\n", lp->rows[i]->lhs - lp->rows[i]->constant);
18107 SCIPmessageFPrintInfo(messagehdlr, file, " >= %.15g\n", lp->rows[i]->lhs - lp->rows[i]->constant);
18111 SCIPmessageFPrintInfo(messagehdlr, file, " <= %.15g\n", lp->rows[i]->rhs - lp->rows[i]->constant);
18114 SCIPmessageFPrintInfo(messagehdlr, file, " = %.15g\n", lp->rows[i]->lhs - lp->rows[i]->constant);
18330 /** gets the basis status of a column in the LP solution; only valid for LPs with status SCIP_LPSOLSTAT_OPTIMAL
18331 * and with SCIPisLPSolBasic(scip) == TRUE; returns SCIP_BASESTAT_ZERO for columns not in the current SCIP_LP
18363 /** returns whether the associated variable is of integral type (binary, integer, implicit integer) */
18427 /** get number of nonzero entries in column vector, that correspond to rows currently in the SCIP_LP;
18429 * @warning This method is only applicable on columns, that are completely linked to their rows (e.g. a column
18430 * that is in the current LP and the LP was solved, or a column that was in a solved LP and didn't change afterwards
18462 /** gets node number of the last node in current branch and bound run, where strong branching was used on the
18504 /** get number of nonzero entries in row vector, that correspond to columns currently in the SCIP_LP;
18506 * @warning This method is only applicable on rows, that are completely linked to their columns (e.g. a row
18507 * that is in the current LP and the LP was solved, or a row that was in a solved LP and didn't change afterwards
18619 /** gets the basis status of a row in the LP solution; only valid for LPs with status SCIP_LPSOLSTAT_OPTIMAL
18620 * and with SCIPisLPSolBasic(scip) == TRUE; returns SCIP_BASESTAT_BASIC for rows not in the current SCIP_LP
18672 /** returns TRUE iff the activity of the row (without the row's constant) is always integral in a feasible solution */
18692 /** returns TRUE iff row is modifiable during node processing (subject to column generation) */
18890 /** recalculates Euclidean norm of objective function vector of column variables if it have gotten unreliable during calculation */
18912 /* due to numerical troubles it still can appear that lp->objsqrnorm is a little bit smaller than 0 */
18920 /** gets Euclidean norm of objective function vector of column variables, only use this method if
18921 * lp->objsqrnormunreliable == FALSE, so probably you have to call SCIPlpRecalculateObjSqrNorm before */
18933 /** sets whether the root lp is a relaxation of the problem and its optimal objective value is a global lower bound */
18944 /** returns whether the root lp is a relaxation of the problem and its optimal objective value is a global lower bound */
18954 /** gets the objective value of the root node LP; returns SCIP_INVALID if the root node LP was not (yet) solved */
18964 /** gets part of the objective value of the root node LP that results from COLUMN variables only;
18976 /** gets part of the objective value of the root node LP that results from LOOSE variables only;
18998 /** sets whether the current LP is a relaxation of the current problem and its optimal objective value is a local lower bound */
19009 /** returns whether the current LP is a relaxation of the problem for which it has been solved and its
19051 /** returns whether the LP is in diving mode and the objective value of at least one column was changed */
19076 * "Identifying the Set of Always-Active Constraints in a System of Linear Inequalities by a Single Linear Program"@par
19103 * If the original LP is feasible, this LP is feasible as well. Any optimal solution yields the relative interior point
19104 * \f$x^*_j/\alpha^*\f$. Note that this will just produce some relative interior point. It does not produce a
19105 * particular relative interior point, e.g., one that maximizes the distance to the boundary in some norm.
19117 SCIP_Bool* success /**< buffer to indicate whether interior point was successfully computed */
19160 if( inclobjcutoff && (SCIPsetIsInfinity(set, lp->cutoffbound) || lp->looseobjvalinf > 0 || lp->looseobjval == SCIP_INVALID) ) /*lint !e777 */
19199 /* note: if the variable is fixed we cannot simply fix the variables (because alpha scales the problem) */
19541 SCIPmessagePrintWarning(messagehdlr, "Could not set time limit of LP solver for relative interior point computation.\n");
19548 SCIPmessagePrintWarning(messagehdlr, "Could not set iteration limit of LP solver for relative interior point computation.\n");
19563 SCIPmessagePrintWarning(messagehdlr, "Iteration limit exceeded in relative interior point computation.\n");
19565 SCIPmessagePrintWarning(messagehdlr, "Time limit exceeded in relative interior point computation.\n");
19670 assert( SCIPsetIsFeasZero(set, primal[lp->ncols+1+cnt]) || SCIPsetIsFeasGT(set, val, col->lb) );
19676 assert( SCIPsetIsFeasZero(set, primal[lp->ncols+1+cnt]) || SCIPsetIsFeasLT(set, val, col->ub) );
|