Scippy

SCIP

Solving Constraint Integer Programs

lp.c File Reference

Detailed Description

LP management methods and data structures.

Author
Tobias Achterberg
Timo Berthold
Marc Pfetsch
Kati Wolter
Gerald Gamrath

In LP management, we have to differ between the current LP and the SCIP_LP stored in the LP solver. All LP methods affect the current LP only. Before solving the current LP with the LP solver or setting an LP state, the LP solvers data has to be updated to the current LP with a call to lpFlush().

Definition in file lp.c.

#include <assert.h>
#include <math.h>
#include <limits.h>
#include <string.h>
#include "scip/def.h"
#include "scip/set.h"
#include "scip/stat.h"
#include "scip/intervalarith.h"
#include "scip/clock.h"
#include "scip/misc.h"
#include "scip/lp.h"
#include "scip/var.h"
#include "scip/prob.h"
#include "scip/sol.h"
#include "scip/solve.h"
#include "scip/event.h"
#include "scip/pub_message.h"
#include "lpi/lpi.h"

Go to the source code of this file.

Macros

#define MAXCMIRSCALE   1e+6
 
#define debugRowPrint(x)
 
#define debugColPrint(x)
 
#define checkRow(row)
 
#define checkRowSqrnorm(row)
 
#define checkRowSumnorm(row)
 
#define checkRowObjprod(row)
 
#define checkLinks(lp)
 
#define lpCutoffDisabled(set)   (set->lp_disablecutoff == 1 || (set->nactivepricers > 0 && set->lp_disablecutoff == 2))
 
#define DIVESTACKINITSIZE   100
 
#define FEASTOLTIGHTFAC   0.001
 
#define DIVESTACKGROWFACT   1.5
 

Functions

static SCIP_RETCODE ensureChgcolsSize (SCIP_LP *lp, SCIP_SET *set, int num)
 
static SCIP_RETCODE ensureChgrowsSize (SCIP_LP *lp, SCIP_SET *set, int num)
 
static SCIP_RETCODE ensureLpicolsSize (SCIP_LP *lp, SCIP_SET *set, int num)
 
static SCIP_RETCODE ensureLpirowsSize (SCIP_LP *lp, SCIP_SET *set, int num)
 
static SCIP_RETCODE ensureColsSize (SCIP_LP *lp, SCIP_SET *set, int num)
 
static SCIP_RETCODE ensureLazycolsSize (SCIP_LP *lp, SCIP_SET *set, int num)
 
static SCIP_RETCODE ensureRowsSize (SCIP_LP *lp, SCIP_SET *set, int num)
 
static SCIP_RETCODE colEnsureSize (SCIP_COL *col, BMS_BLKMEM *blkmem, SCIP_SET *set, int num)
 
static SCIP_RETCODE lpStoreSolVals (SCIP_LP *lp, SCIP_STAT *stat, BMS_BLKMEM *blkmem)
 
static SCIP_RETCODE lpRestoreSolVals (SCIP_LP *lp, BMS_BLKMEM *blkmem, SCIP_Longint validlp)
 
static SCIP_RETCODE colStoreSolVals (SCIP_COL *col, BMS_BLKMEM *blkmem)
 
static SCIP_RETCODE colRestoreSolVals (SCIP_COL *col, BMS_BLKMEM *blkmem, SCIP_Longint validlp, SCIP_Bool freebuffer)
 
static SCIP_RETCODE rowStoreSolVals (SCIP_ROW *row, BMS_BLKMEM *blkmem, SCIP_Bool infeasible)
 
static SCIP_RETCODE rowRestoreSolVals (SCIP_ROW *row, BMS_BLKMEM *blkmem, SCIP_Longint validlp, SCIP_Bool freebuffer, SCIP_Bool infeasible)
 
SCIP_RETCODE SCIProwEnsureSize (SCIP_ROW *row, BMS_BLKMEM *blkmem, SCIP_SET *set, int num)
 
static void recomputeLooseObjectiveValue (SCIP_LP *lp, SCIP_SET *set, SCIP_PROB *prob)
 
static void recomputePseudoObjectiveValue (SCIP_LP *lp, SCIP_SET *set, SCIP_PROB *prob)
 
static void recomputeGlbPseudoObjectiveValue (SCIP_LP *lp, SCIP_SET *set, SCIP_PROB *prob)
 
static SCIP_Real getFiniteLooseObjval (SCIP_LP *lp, SCIP_SET *set, SCIP_PROB *prob)
 
static SCIP_Real getFinitePseudoObjval (SCIP_LP *lp, SCIP_SET *set, SCIP_PROB *prob)
 
 SCIP_DECL_SORTPTRCOMP (SCIProwComp)
 
static void colSortLP (SCIP_COL *col)
 
static void colSortNonLP (SCIP_COL *col)
 
static void rowSortLP (SCIP_ROW *row)
 
static void rowSortNonLP (SCIP_ROW *row)
 
static int colSearchCoefPart (SCIP_COL *col, const SCIP_ROW *row, int minpos, int maxpos)
 
static int colSearchCoef (SCIP_COL *col, const SCIP_ROW *row)
 
static int rowSearchCoefPart (SCIP_ROW *row, const SCIP_COL *col, int minpos, int maxpos)
 
static int rowSearchCoef (SCIP_ROW *row, const SCIP_COL *col)
 
static void colMoveCoef (SCIP_COL *col, int oldpos, int newpos)
 
static void colSwapCoefs (SCIP_COL *col, int pos1, int pos2)
 
static void rowMoveCoef (SCIP_ROW *row, int oldpos, int newpos)
 
static void rowSwapCoefs (SCIP_ROW *row, int pos1, int pos2)
 
static SCIP_RETCODE rowEventCoefChanged (SCIP_ROW *row, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_EVENTQUEUE *eventqueue, SCIP_COL *col, SCIP_Real oldval, SCIP_Real newval)
 
static SCIP_RETCODE rowEventConstantChanged (SCIP_ROW *row, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_EVENTQUEUE *eventqueue, SCIP_Real oldval, SCIP_Real newval)
 
static SCIP_RETCODE rowEventSideChanged (SCIP_ROW *row, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_EVENTQUEUE *eventqueue, SCIP_SIDETYPE side, SCIP_Real oldval, SCIP_Real newval)
 
static void coefChanged (SCIP_ROW *row, SCIP_COL *col, SCIP_LP *lp)
 
static SCIP_RETCODE rowAddCoef (SCIP_ROW *row, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_EVENTQUEUE *eventqueue, SCIP_LP *lp, SCIP_COL *col, SCIP_Real val, int linkpos)
 
static SCIP_RETCODE colAddCoef (SCIP_COL *col, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_EVENTQUEUE *eventqueue, SCIP_LP *lp, SCIP_ROW *row, SCIP_Real val, int linkpos)
 
static SCIP_RETCODE colDelCoefPos (SCIP_COL *col, SCIP_SET *set, SCIP_LP *lp, int pos)
 
static SCIP_RETCODE colChgCoefPos (SCIP_COL *col, SCIP_SET *set, SCIP_LP *lp, int pos, SCIP_Real val)
 
static void rowAddNorms (SCIP_ROW *row, SCIP_SET *set, SCIP_COL *col, SCIP_Real val, SCIP_Bool updateidxvals)
 
static void rowDelNorms (SCIP_ROW *row, SCIP_SET *set, SCIP_COL *col, SCIP_Real val, SCIP_Bool forcenormupdate, SCIP_Bool updateindex, SCIP_Bool updateval)
 
static SCIP_RETCODE rowDelCoefPos (SCIP_ROW *row, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_EVENTQUEUE *eventqueue, SCIP_LP *lp, int pos)
 
static SCIP_RETCODE rowChgCoefPos (SCIP_ROW *row, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_EVENTQUEUE *eventqueue, SCIP_LP *lp, int pos, SCIP_Real val)
 
static SCIP_RETCODE rowSideChanged (SCIP_ROW *row, SCIP_SET *set, SCIP_LP *lp, SCIP_SIDETYPE sidetype)
 
static SCIP_RETCODE colLink (SCIP_COL *col, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_EVENTQUEUE *eventqueue, SCIP_LP *lp)
 
static SCIP_RETCODE colUnlink (SCIP_COL *col, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_EVENTQUEUE *eventqueue, SCIP_LP *lp)
 
static SCIP_RETCODE rowLink (SCIP_ROW *row, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_EVENTQUEUE *eventqueue, SCIP_LP *lp)
 
static SCIP_RETCODE rowUnlink (SCIP_ROW *row, SCIP_SET *set, SCIP_LP *lp)
 
static SCIP_RETCODE lpSetIntpar (SCIP_LP *lp, SCIP_LPPARAM lpparam, int value, SCIP_Bool *success)
 
static SCIP_RETCODE lpSetBoolpar (SCIP_LP *lp, SCIP_LPPARAM lpparam, SCIP_Bool value, SCIP_Bool *success)
 
static SCIP_RETCODE lpSetRealpar (SCIP_LP *lp, SCIP_LPPARAM lpparam, SCIP_Real value, SCIP_Bool *success)
 
static SCIP_RETCODE lpCheckIntpar (SCIP_LP *lp, SCIP_LPPARAM lpparam, int value)
 
static SCIP_RETCODE lpCheckBoolpar (SCIP_LP *lp, SCIP_LPPARAM lpparam, SCIP_Bool value)
 
static SCIP_RETCODE lpCheckRealpar (SCIP_LP *lp, SCIP_LPPARAM lpparam, SCIP_Real value)
 
static SCIP_RETCODE lpSetUobjlim (SCIP_LP *lp, SCIP_SET *set, SCIP_Real uobjlim)
 
static SCIP_RETCODE lpSetFeastol (SCIP_LP *lp, SCIP_Real feastol, SCIP_Bool *success)
 
static SCIP_RETCODE lpSetDualfeastol (SCIP_LP *lp, SCIP_Real dualfeastol, SCIP_Bool *success)
 
static SCIP_RETCODE lpSetBarrierconvtol (SCIP_LP *lp, SCIP_Real barrierconvtol, SCIP_Bool *success)
 
static SCIP_RETCODE lpSetFromscratch (SCIP_LP *lp, SCIP_Bool fromscratch, SCIP_Bool *success)
 
static SCIP_RETCODE lpSetFastmip (SCIP_LP *lp, int fastmip, SCIP_Bool *success)
 
static SCIP_RETCODE lpSetScaling (SCIP_LP *lp, SCIP_Bool scaling, SCIP_Bool *success)
 
static SCIP_RETCODE lpSetThreads (SCIP_LP *lp, int threads, SCIP_Bool *success)
 
static SCIP_RETCODE lpSetPresolving (SCIP_LP *lp, SCIP_Bool presolving, SCIP_Bool *success)
 
static SCIP_RETCODE lpSetRowrepswitch (SCIP_LP *lp, SCIP_Real rowrepswitch, SCIP_Bool *success)
 
static SCIP_RETCODE lpSetIterationLimit (SCIP_LP *lp, int itlim)
 
static SCIP_RETCODE lpSetPricing (SCIP_LP *lp, SCIP_PRICING pricing)
 
static SCIP_RETCODE lpSetPricingChar (SCIP_LP *lp, char pricingchar)
 
static SCIP_RETCODE lpSetLPInfo (SCIP_LP *lp, SCIP_Bool lpinfo)
 
static SCIP_RETCODE lpSetConditionLimit (SCIP_LP *lp, SCIP_Real condlimit, SCIP_Bool *success)
 
static SCIP_RETCODE lpSetTiming (SCIP_LP *lp, SCIP_CLOCKTYPE timing, SCIP_Bool enabled, SCIP_Bool *success)
 
SCIP_RETCODE SCIPcolCreate (SCIP_COL **col, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_VAR *var, int len, SCIP_ROW **rows, SCIP_Real *vals, SCIP_Bool removable)
 
SCIP_RETCODE SCIPcolFree (SCIP_COL **col, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_EVENTQUEUE *eventqueue, SCIP_LP *lp)
 
void SCIPcolPrint (SCIP_COL *col, SCIP_MESSAGEHDLR *messagehdlr, FILE *file)
 
void SCIPcolSort (SCIP_COL *col)
 
SCIP_RETCODE SCIPcolAddCoef (SCIP_COL *col, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_EVENTQUEUE *eventqueue, SCIP_LP *lp, SCIP_ROW *row, SCIP_Real val)
 
SCIP_RETCODE SCIPcolDelCoef (SCIP_COL *col, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_EVENTQUEUE *eventqueue, SCIP_LP *lp, SCIP_ROW *row)
 
SCIP_RETCODE SCIPcolChgCoef (SCIP_COL *col, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_EVENTQUEUE *eventqueue, SCIP_LP *lp, SCIP_ROW *row, SCIP_Real val)
 
SCIP_RETCODE SCIPcolIncCoef (SCIP_COL *col, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_EVENTQUEUE *eventqueue, SCIP_LP *lp, SCIP_ROW *row, SCIP_Real incval)
 
static SCIP_RETCODE insertColChgcols (SCIP_COL *col, SCIP_SET *set, SCIP_LP *lp)
 
static SCIP_Bool isNewValueUnreliable (SCIP_SET *set, SCIP_Real newvalue, SCIP_Real oldvalue)
 
static void lpUpdateObjNorms (SCIP_LP *lp, SCIP_SET *set, SCIP_Real oldobj, SCIP_Real newobj)
 
SCIP_RETCODE SCIPcolChgObj (SCIP_COL *col, SCIP_SET *set, SCIP_LP *lp, SCIP_Real newobj)
 
SCIP_RETCODE SCIPcolChgLb (SCIP_COL *col, SCIP_SET *set, SCIP_LP *lp, SCIP_Real newlb)
 
SCIP_RETCODE SCIPcolChgUb (SCIP_COL *col, SCIP_SET *set, SCIP_LP *lp, SCIP_Real newub)
 
SCIP_Real SCIPcolCalcRedcost (SCIP_COL *col, SCIP_Real *dualsol)
 
static SCIP_Real colCalcInternalRedcost (SCIP_COL *col)
 
SCIP_Real SCIPcolGetRedcost (SCIP_COL *col, SCIP_STAT *stat, SCIP_LP *lp)
 
SCIP_Real SCIPcolGetFeasibility (SCIP_COL *col, SCIP_SET *set, SCIP_STAT *stat, SCIP_LP *lp)
 
SCIP_Real SCIPcolCalcFarkasCoef (SCIP_COL *col, SCIP_Real *dualfarkas)
 
static SCIP_Real colCalcInternalFarkasCoef (SCIP_COL *col)
 
SCIP_Real SCIPcolGetFarkasCoef (SCIP_COL *col, SCIP_STAT *stat, SCIP_LP *lp)
 
SCIP_Real SCIPcolGetFarkasValue (SCIP_COL *col, SCIP_STAT *stat, SCIP_LP *lp)
 
SCIP_RETCODE SCIPlpStartStrongbranch (SCIP_LP *lp)
 
SCIP_RETCODE SCIPlpEndStrongbranch (SCIP_LP *lp)
 
void SCIPcolSetStrongbranchData (SCIP_COL *col, SCIP_SET *set, SCIP_STAT *stat, SCIP_LP *lp, SCIP_Real lpobjval, SCIP_Real primsol, SCIP_Real sbdown, SCIP_Real sbup, SCIP_Bool sbdownvalid, SCIP_Bool sbupvalid, SCIP_Longint iter, int itlim)
 
void SCIPcolInvalidateStrongbranchData (SCIP_COL *col, SCIP_SET *set, SCIP_STAT *stat, SCIP_LP *lp)
 
SCIP_RETCODE SCIPcolGetStrongbranch (SCIP_COL *col, SCIP_Bool integral, SCIP_SET *set, SCIP_STAT *stat, SCIP_PROB *prob, SCIP_LP *lp, int itlim, SCIP_Real *down, SCIP_Real *up, SCIP_Bool *downvalid, SCIP_Bool *upvalid, SCIP_Bool *lperror)
 
SCIP_RETCODE SCIPcolGetStrongbranches (SCIP_COL **cols, int ncols, SCIP_Bool integral, SCIP_SET *set, SCIP_STAT *stat, SCIP_PROB *prob, SCIP_LP *lp, int itlim, SCIP_Real *down, SCIP_Real *up, SCIP_Bool *downvalid, SCIP_Bool *upvalid, SCIP_Bool *lperror)
 
void SCIPcolGetStrongbranchLast (SCIP_COL *col, SCIP_Real *down, SCIP_Real *up, SCIP_Bool *downvalid, SCIP_Bool *upvalid, SCIP_Real *solval, SCIP_Real *lpobjval)
 
SCIP_Longint SCIPcolGetStrongbranchLPAge (SCIP_COL *col, SCIP_STAT *stat)
 
void SCIPcolMarkNotRemovableLocal (SCIP_COL *col, SCIP_STAT *stat)
 
static void rowCalcNorms (SCIP_ROW *row, SCIP_SET *set)
 
static void rowCalcIdxsAndVals (SCIP_ROW *row, SCIP_SET *set)
 
static SCIP_Bool isIntegralScalar (SCIP_Real val, SCIP_Real scalar, SCIP_Real mindelta, SCIP_Real maxdelta, SCIP_Real *intval)
 
static SCIP_RETCODE rowScale (SCIP_ROW *row, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_EVENTQUEUE *eventqueue, SCIP_STAT *stat, SCIP_LP *lp, SCIP_Real scaleval, SCIP_Bool integralcontvars, SCIP_Real minrounddelta, SCIP_Real maxrounddelta)
 
SCIP_RETCODE SCIProwCreate (SCIP_ROW **row, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_LP *lp, const char *name, int len, SCIP_COL **cols, SCIP_Real *vals, SCIP_Real lhs, SCIP_Real rhs, SCIP_ROWORIGINTYPE origintype, void *origin, SCIP_Bool local, SCIP_Bool modifiable, SCIP_Bool removable)
 
SCIP_RETCODE SCIProwFree (SCIP_ROW **row, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_LP *lp)
 
void SCIProwPrint (SCIP_ROW *row, SCIP_MESSAGEHDLR *messagehdlr, FILE *file)
 
void SCIProwCapture (SCIP_ROW *row)
 
SCIP_RETCODE SCIProwRelease (SCIP_ROW **row, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_LP *lp)
 
void SCIProwLock (SCIP_ROW *row)
 
void SCIProwUnlock (SCIP_ROW *row)
 
SCIP_RETCODE SCIProwAddCoef (SCIP_ROW *row, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_EVENTQUEUE *eventqueue, SCIP_LP *lp, SCIP_COL *col, SCIP_Real val)
 
SCIP_RETCODE SCIProwDelCoef (SCIP_ROW *row, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_EVENTQUEUE *eventqueue, SCIP_LP *lp, SCIP_COL *col)
 
SCIP_RETCODE SCIProwChgCoef (SCIP_ROW *row, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_EVENTQUEUE *eventqueue, SCIP_LP *lp, SCIP_COL *col, SCIP_Real val)
 
SCIP_RETCODE SCIProwIncCoef (SCIP_ROW *row, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_EVENTQUEUE *eventqueue, SCIP_LP *lp, SCIP_COL *col, SCIP_Real incval)
 
SCIP_RETCODE SCIProwChgConstant (SCIP_ROW *row, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_EVENTQUEUE *eventqueue, SCIP_LP *lp, SCIP_Real constant)
 
SCIP_RETCODE SCIProwAddConstant (SCIP_ROW *row, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_EVENTQUEUE *eventqueue, SCIP_LP *lp, SCIP_Real addval)
 
SCIP_RETCODE SCIProwChgLhs (SCIP_ROW *row, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_EVENTQUEUE *eventqueue, SCIP_LP *lp, SCIP_Real lhs)
 
SCIP_RETCODE SCIProwChgRhs (SCIP_ROW *row, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_EVENTQUEUE *eventqueue, SCIP_LP *lp, SCIP_Real rhs)
 
SCIP_RETCODE SCIProwChgLocal (SCIP_ROW *row, SCIP_Bool local)
 
SCIP_RETCODE SCIProwCalcIntegralScalar (SCIP_ROW *row, SCIP_SET *set, SCIP_Real mindelta, SCIP_Real maxdelta, SCIP_Longint maxdnom, SCIP_Real maxscale, SCIP_Bool usecontvars, SCIP_Real *intscalar, SCIP_Bool *success)
 
SCIP_RETCODE SCIProwMakeIntegral (SCIP_ROW *row, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_EVENTQUEUE *eventqueue, SCIP_STAT *stat, SCIP_LP *lp, SCIP_Real mindelta, SCIP_Real maxdelta, SCIP_Longint maxdnom, SCIP_Real maxscale, SCIP_Bool usecontvars, SCIP_Bool *success)
 
void SCIProwSort (SCIP_ROW *row)
 
static void rowMerge (SCIP_ROW *row, SCIP_SET *set)
 
void SCIProwDelaySort (SCIP_ROW *row)
 
void SCIProwForceSort (SCIP_ROW *row, SCIP_SET *set)
 
void SCIProwRecalcLPActivity (SCIP_ROW *row, SCIP_STAT *stat)
 
SCIP_Real SCIProwGetLPActivity (SCIP_ROW *row, SCIP_SET *set, SCIP_STAT *stat, SCIP_LP *lp)
 
SCIP_Real SCIProwGetLPFeasibility (SCIP_ROW *row, SCIP_SET *set, SCIP_STAT *stat, SCIP_LP *lp)
 
SCIP_Real SCIProwGetRelaxFeasibility (SCIP_ROW *row, SCIP_SET *set, SCIP_STAT *stat)
 
SCIP_Real SCIProwGetNLPFeasibility (SCIP_ROW *row, SCIP_SET *set, SCIP_STAT *stat)
 
void SCIProwRecalcPseudoActivity (SCIP_ROW *row, SCIP_STAT *stat)
 
SCIP_Real SCIProwGetPseudoActivity (SCIP_ROW *row, SCIP_SET *set, SCIP_STAT *stat)
 
SCIP_Real SCIProwGetPseudoFeasibility (SCIP_ROW *row, SCIP_SET *set, SCIP_STAT *stat)
 
SCIP_Real SCIProwGetSolActivity (SCIP_ROW *row, SCIP_SET *set, SCIP_STAT *stat, SCIP_SOL *sol)
 
SCIP_Real SCIProwGetSolFeasibility (SCIP_ROW *row, SCIP_SET *set, SCIP_STAT *stat, SCIP_SOL *sol)
 
static void rowCalcActivityBounds (SCIP_ROW *row, SCIP_SET *set, SCIP_STAT *stat)
 
SCIP_Real SCIProwGetMinActivity (SCIP_ROW *row, SCIP_SET *set, SCIP_STAT *stat)
 
SCIP_Real SCIProwGetMaxActivity (SCIP_ROW *row, SCIP_SET *set, SCIP_STAT *stat)
 
SCIP_Bool SCIProwIsRedundant (SCIP_ROW *row, SCIP_SET *set, SCIP_STAT *stat)
 
SCIP_Real SCIProwGetMaxval (SCIP_ROW *row, SCIP_SET *set)
 
SCIP_Real SCIProwGetMinval (SCIP_ROW *row, SCIP_SET *set)
 
int SCIProwGetMaxidx (SCIP_ROW *row, SCIP_SET *set)
 
int SCIProwGetMinidx (SCIP_ROW *row, SCIP_SET *set)
 
SCIP_Real SCIProwGetLPEfficacy (SCIP_ROW *row, SCIP_SET *set, SCIP_STAT *stat, SCIP_LP *lp)
 
SCIP_Bool SCIProwIsLPEfficacious (SCIP_ROW *row, SCIP_SET *set, SCIP_STAT *stat, SCIP_LP *lp, SCIP_Bool root)
 
SCIP_Real SCIProwGetSolEfficacy (SCIP_ROW *row, SCIP_SET *set, SCIP_STAT *stat, SCIP_SOL *sol)
 
SCIP_Bool SCIProwIsSolEfficacious (SCIP_ROW *row, SCIP_SET *set, SCIP_STAT *stat, SCIP_SOL *sol, SCIP_Bool root)
 
SCIP_Real SCIProwGetRelaxEfficacy (SCIP_ROW *row, SCIP_SET *set, SCIP_STAT *stat)
 
SCIP_Real SCIProwGetNLPEfficacy (SCIP_ROW *row, SCIP_SET *set, SCIP_STAT *stat)
 
SCIP_Real SCIProwGetScalarProduct (SCIP_ROW *row1, SCIP_ROW *row2)
 
static int SCIProwGetDiscreteScalarProduct (SCIP_ROW *row1, SCIP_ROW *row2)
 
SCIP_Real SCIProwGetParallelism (SCIP_ROW *row1, SCIP_ROW *row2, char orthofunc)
 
SCIP_Real SCIProwGetOrthogonality (SCIP_ROW *row1, SCIP_ROW *row2, char orthofunc)
 
SCIP_Real SCIProwGetObjParallelism (SCIP_ROW *row, SCIP_SET *set, SCIP_LP *lp)
 
SCIP_RETCODE SCIProwCatchEvent (SCIP_ROW *row, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_EVENTTYPE eventtype, SCIP_EVENTHDLR *eventhdlr, SCIP_EVENTDATA *eventdata, int *filterpos)
 
SCIP_RETCODE SCIProwDropEvent (SCIP_ROW *row, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_EVENTTYPE eventtype, SCIP_EVENTHDLR *eventhdlr, SCIP_EVENTDATA *eventdata, int filterpos)
 
void SCIProwMarkNotRemovableLocal (SCIP_ROW *row, SCIP_STAT *stat)
 
static void markColDeleted (SCIP_COL *col)
 
static SCIP_RETCODE lpFlushDelCols (SCIP_LP *lp)
 
static void computeLPBounds (SCIP_LP *lp, SCIP_SET *set, SCIP_COL *col, SCIP_Real lpiinf, SCIP_Real *lb, SCIP_Real *ub)
 
static SCIP_RETCODE lpFlushAddCols (SCIP_LP *lp, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_EVENTQUEUE *eventqueue)
 
static void markRowDeleted (SCIP_ROW *row)
 
static SCIP_RETCODE lpFlushDelRows (SCIP_LP *lp, BMS_BLKMEM *blkmem, SCIP_SET *set)
 
static SCIP_RETCODE lpFlushAddRows (SCIP_LP *lp, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_EVENTQUEUE *eventqueue)
 
static SCIP_RETCODE lpFlushChgCols (SCIP_LP *lp, SCIP_SET *set)
 
static SCIP_RETCODE lpFlushChgRows (SCIP_LP *lp, SCIP_SET *set)
 
SCIP_RETCODE SCIPlpFlush (SCIP_LP *lp, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_EVENTQUEUE *eventqueue)
 
SCIP_RETCODE SCIPlpMarkFlushed (SCIP_LP *lp, SCIP_SET *set)
 
static void colUpdateAddLP (SCIP_COL *col, SCIP_SET *set)
 
static void rowUpdateAddLP (SCIP_ROW *row)
 
static void colUpdateDelLP (SCIP_COL *col, SCIP_SET *set)
 
static void rowUpdateDelLP (SCIP_ROW *row)
 
static SCIP_RETCODE allocDiveChgSideArrays (SCIP_LP *lp, int initsize)
 
static SCIP_RETCODE reallocDiveChgSideArrays (SCIP_LP *lp, int minsize, SCIP_Real growfact)
 
static void freeDiveChgSideArrays (SCIP_LP *lp)
 
SCIP_RETCODE SCIPlpCreate (SCIP_LP **lp, SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr, SCIP_STAT *stat, const char *name)
 
SCIP_RETCODE SCIPlpFree (SCIP_LP **lp, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_EVENTQUEUE *eventqueue, SCIP_EVENTFILTER *eventfilter)
 
SCIP_RETCODE SCIPlpReset (SCIP_LP *lp, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_EVENTQUEUE *eventqueue, SCIP_EVENTFILTER *eventfilter)
 
SCIP_RETCODE SCIPlpAddCol (SCIP_LP *lp, SCIP_SET *set, SCIP_COL *col, int depth)
 
SCIP_RETCODE SCIPlpAddRow (SCIP_LP *lp, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_EVENTQUEUE *eventqueue, SCIP_EVENTFILTER *eventfilter, SCIP_ROW *row, int depth)
 
static void checkLazyColArray (SCIP_LP *lp, SCIP_SET *set)
 
SCIP_RETCODE SCIPlpShrinkCols (SCIP_LP *lp, SCIP_SET *set, int newncols)
 
SCIP_RETCODE SCIPlpShrinkRows (SCIP_LP *lp, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_EVENTQUEUE *eventqueue, SCIP_EVENTFILTER *eventfilter, int newnrows)
 
SCIP_RETCODE SCIPlpClear (SCIP_LP *lp, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_EVENTQUEUE *eventqueue, SCIP_EVENTFILTER *eventfilter)
 
void SCIPlpMarkSize (SCIP_LP *lp)
 
void SCIPlpSetSizeMark (SCIP_LP *lp, int nrows, int ncols)
 
SCIP_RETCODE SCIPlpGetBasisInd (SCIP_LP *lp, int *basisind)
 
SCIP_RETCODE SCIPlpGetBase (SCIP_LP *lp, int *cstat, int *rstat)
 
SCIP_RETCODE SCIPlpGetBInvRow (SCIP_LP *lp, int r, SCIP_Real *coef, int *inds, int *ninds)
 
SCIP_RETCODE SCIPlpGetBInvCol (SCIP_LP *lp, int c, SCIP_Real *coef, int *inds, int *ninds)
 
SCIP_RETCODE SCIPlpGetBInvARow (SCIP_LP *lp, int r, SCIP_Real *binvrow, SCIP_Real *coef, int *inds, int *ninds)
 
SCIP_RETCODE SCIPlpGetBInvACol (SCIP_LP *lp, int c, SCIP_Real *coef, int *inds, int *ninds)
 
SCIP_RETCODE SCIPlpSumRows (SCIP_LP *lp, SCIP_SET *set, SCIP_PROB *prob, SCIP_Real *weights, SCIP_REALARRAY *sumcoef, SCIP_Real *sumlhs, SCIP_Real *sumrhs)
 
static SCIP_Real getMaxAbsWeightCalcSparsity (SCIP_SET *set, SCIP_LP *lp, SCIP_Real *weights, int *rowinds, int *nrowinds, int *rowlensum)
 
static SCIP_Real getMaxAbsWeight (SCIP_SET *set, SCIP_LP *lp, SCIP_Real *weights, int *rowinds, int *nrowinds, int *rowlensum)
 
static void addRowToAggregation (SCIP_SET *set, SCIP_Real *mircoef, SCIP_Real *mirrhs, int *slacksign, SCIP_Bool *varused, int *varinds, int *nvarinds, SCIP_ROW *row, SCIP_Real weight, SCIP_Bool uselhs)
 
static void sumMIRRow (SCIP_SET *set, SCIP_PROB *prob, SCIP_LP *lp, SCIP_Real *weights, SCIP_Real knownmaxweight, int *sidetypes, SCIP_Real scale, SCIP_Bool allowlocal, int maxmksetcoefs, SCIP_Real maxweightrange, SCIP_Bool compress, SCIP_Real *mircoef, SCIP_Real *mirrhs, int *slacksign, SCIP_Bool *varused, int *varinds, int *nvarinds, int *rowinds, int *nrowinds, SCIP_Bool *emptyrow, SCIP_Bool *localrowsused, SCIP_Bool *rowtoolong, int *cutrank)
 
static void cleanupMIRRow (SCIP_SET *set, SCIP_PROB *prob, SCIP_Real *mircoef, SCIP_Real *mirrhs, SCIP_Bool *varused, int *varinds, int *nvarinds, SCIP_Bool cutislocal)
 
static void findBestLb (SCIP_SET *set, SCIP_STAT *stat, SCIP_VAR *var, SCIP_SOL *sol, SCIP_Bool usevbds, SCIP_Bool allowlocal, SCIP_Real *bestlb, int *bestlbtype)
 
static void findBestUb (SCIP_SET *set, SCIP_STAT *stat, SCIP_VAR *var, SCIP_SOL *sol, SCIP_Bool usevbds, SCIP_Bool allowlocal, SCIP_Real *bestub, int *bestubtype)
 
static SCIP_RETCODE transformMIRRow (SCIP_SET *set, SCIP_STAT *stat, SCIP_PROB *prob, SCIP_SOL *sol, SCIP_Real boundswitch, SCIP_Bool usevbds, SCIP_Bool allowlocal, SCIP_Bool fixintegralrhs, int *boundsfortrans, SCIP_BOUNDTYPE *boundtypesfortrans, SCIP_Real minfrac, SCIP_Real maxfrac, SCIP_Real *mircoef, SCIP_Real *mirrhs, SCIP_Bool *varused, int *varinds, int *nvarinds, int *varsign, int *boundtype, SCIP_Bool *freevariable, SCIP_Bool *localbdsused)
 
static void roundMIRRow (SCIP_SET *set, SCIP_PROB *prob, SCIP_Real *mircoef, SCIP_Real *mirrhs, SCIP_Bool *varused, int *varinds, int *nvarinds, int *varsign, int *boundtype, SCIP_Real f0)
 
static void substituteMIRRow (SCIP_SET *set, SCIP_STAT *stat, SCIP_LP *lp, SCIP_Real *weights, SCIP_Real scale, SCIP_Real *mircoef, SCIP_Real *mirrhs, int *slacksign, SCIP_Bool *varused, int *varinds, int *nvarinds, int *rowinds, int nrowinds, SCIP_Real f0)
 
static SCIP_Real getMIRRowActivity (SCIP_SET *set, SCIP_STAT *stat, SCIP_PROB *prob, SCIP_SOL *sol, SCIP_Real *mircoef, int *varinds, int nvarinds)
 
SCIP_RETCODE SCIPlpCalcMIR (SCIP_LP *lp, SCIP_SET *set, SCIP_STAT *stat, SCIP_PROB *prob, SCIP_SOL *sol, SCIP_Real boundswitch, SCIP_Bool usevbds, SCIP_Bool allowlocal, SCIP_Bool fixintegralrhs, int *boundsfortrans, SCIP_BOUNDTYPE *boundtypesfortrans, int maxmksetcoefs, SCIP_Real maxweightrange, SCIP_Real minfrac, SCIP_Real maxfrac, SCIP_Real *weights, SCIP_Real maxweight, int *weightinds, int nweightinds, int rowlensum, int *sidetypes, SCIP_Real scale, SCIP_Real *mksetcoefs, SCIP_Bool *mksetcoefsvalid, SCIP_Real *mircoef, SCIP_Real *mirrhs, SCIP_Real *cutactivity, SCIP_Bool *success, SCIP_Bool *cutislocal, int *cutrank)
 
static void sumStrongCGRow (SCIP_SET *set, SCIP_PROB *prob, SCIP_LP *lp, SCIP_Real *weights, SCIP_Real scale, SCIP_Bool allowlocal, int maxmksetcoefs, SCIP_Real maxweightrange, SCIP_Real *strongcgcoef, SCIP_Real *strongcgrhs, int *slacksign, SCIP_Bool *varused, int *varinds, int *nvarinds, int *rowinds, int *nrowinds, SCIP_Bool *emptyrow, SCIP_Bool *localrowsused, SCIP_Bool *rowtoolong, int *cutrank)
 
static void transformStrongCGRow (SCIP_SET *set, SCIP_STAT *stat, SCIP_PROB *prob, SCIP_Real boundswitch, SCIP_Bool usevbds, SCIP_Bool allowlocal, SCIP_Real *strongcgcoef, SCIP_Real *strongcgrhs, SCIP_Bool *varused, int *varinds, int *nvarinds, int *varsign, int *boundtype, SCIP_Bool *freevariable, SCIP_Bool *localbdsused)
 
static void roundStrongCGRow (SCIP_SET *set, SCIP_PROB *prob, SCIP_Real *strongcgcoef, SCIP_Real *strongcgrhs, SCIP_Bool *varused, int *varinds, int *nvarinds, int *varsign, int *boundtype, SCIP_Real f0, SCIP_Real k)
 
static void substituteStrongCGRow (SCIP_SET *set, SCIP_STAT *stat, SCIP_LP *lp, SCIP_Real *weights, SCIP_Real scale, SCIP_Real *strongcgcoef, SCIP_Real *strongcgrhs, int *slacksign, SCIP_Bool *varused, int *varinds, int *nvarinds, int *rowinds, int nrowinds, SCIP_Real f0, SCIP_Real k)
 
SCIP_RETCODE SCIPlpCalcStrongCG (SCIP_LP *lp, SCIP_SET *set, SCIP_STAT *stat, SCIP_PROB *prob, SCIP_Real boundswitch, SCIP_Bool usevbds, SCIP_Bool allowlocal, int maxmksetcoefs, SCIP_Real maxweightrange, SCIP_Real minfrac, SCIP_Real maxfrac, SCIP_Real *weights, int *rowinds, int nrowinds, SCIP_Real scale, SCIP_Real *strongcgcoef, SCIP_Real *strongcgrhs, SCIP_Real *cutactivity, SCIP_Bool *success, SCIP_Bool *cutislocal, int *cutrank)
 
SCIP_RETCODE SCIPlpGetState (SCIP_LP *lp, BMS_BLKMEM *blkmem, SCIP_LPISTATE **lpistate)
 
SCIP_RETCODE SCIPlpSetState (SCIP_LP *lp, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_EVENTQUEUE *eventqueue, SCIP_LPISTATE *lpistate, SCIP_Bool wasprimfeas, SCIP_Bool wasdualfeas)
 
SCIP_RETCODE SCIPlpFreeState (SCIP_LP *lp, BMS_BLKMEM *blkmem, SCIP_LPISTATE **lpistate)
 
SCIP_RETCODE SCIPlpGetNorms (SCIP_LP *lp, BMS_BLKMEM *blkmem, SCIP_LPINORMS **lpinorms)
 
SCIP_RETCODE SCIPlpSetNorms (SCIP_LP *lp, BMS_BLKMEM *blkmem, SCIP_LPINORMS *lpinorms)
 
SCIP_RETCODE SCIPlpFreeNorms (SCIP_LP *lp, BMS_BLKMEM *blkmem, SCIP_LPINORMS **lpinorms)
 
SCIP_RETCODE SCIPlpSetCutoffbound (SCIP_LP *lp, SCIP_SET *set, SCIP_PROB *prob, SCIP_Real cutoffbound)
 
static const char * lpalgoName (SCIP_LPALGO lpalgo)
 
static SCIP_RETCODE lpPrimalSimplex (SCIP_LP *lp, SCIP_SET *set, SCIP_STAT *stat, SCIP_Bool resolve, SCIP_Bool keepsol, SCIP_Bool *lperror)
 
static SCIP_RETCODE lpDualSimplex (SCIP_LP *lp, SCIP_SET *set, SCIP_STAT *stat, SCIP_Bool resolve, SCIP_Bool keepsol, SCIP_Bool *lperror)
 
static SCIP_RETCODE lpLexDualSimplex (SCIP_LP *lp, SCIP_SET *set, SCIP_STAT *stat, SCIP_Bool resolve, SCIP_Bool keepsol, SCIP_Bool *lperror)
 
static SCIP_RETCODE lpBarrier (SCIP_LP *lp, SCIP_SET *set, SCIP_STAT *stat, SCIP_Bool crossover, SCIP_Bool keepsol, SCIP_Bool *lperror)
 
static SCIP_RETCODE lpAlgorithm (SCIP_LP *lp, SCIP_SET *set, SCIP_STAT *stat, SCIP_LPALGO lpalgo, SCIP_Bool resolve, SCIP_Bool keepsol, SCIP_Bool *timelimit, SCIP_Bool *lperror)
 
static SCIP_RETCODE lpSolveStable (SCIP_LP *lp, SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr, SCIP_STAT *stat, SCIP_PROB *prob, SCIP_LPALGO lpalgo, int itlim, int harditlim, SCIP_Bool resolve, int fastmip, SCIP_Bool tightprimfeastol, SCIP_Bool tightdualfeastol, SCIP_Bool fromscratch, SCIP_Bool keepsol, SCIP_Bool *timelimit, SCIP_Bool *lperror)
 
static void adjustLPobjval (SCIP_LP *lp, SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr)
 
static SCIP_RETCODE lpSolve (SCIP_LP *lp, SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr, SCIP_STAT *stat, SCIP_PROB *prob, SCIP_LPALGO lpalgo, int resolveitlim, int harditlim, SCIP_Bool needprimalray, SCIP_Bool needdualray, SCIP_Bool resolve, int fastmip, SCIP_Bool tightprimfeastol, SCIP_Bool tightdualfeastol, SCIP_Bool fromscratch, SCIP_Bool keepsol, SCIP_Bool *lperror)
 
static SCIP_RETCODE lpFlushAndSolve (SCIP_LP *lp, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr, SCIP_STAT *stat, SCIP_PROB *prob, SCIP_EVENTQUEUE *eventqueue, int resolveitlim, int harditlim, SCIP_Bool needprimalray, SCIP_Bool needdualray, int fastmip, SCIP_Bool tightprimfeastol, SCIP_Bool tightdualfeastol, SCIP_Bool fromscratch, SCIP_Bool keepsol, SCIP_Bool *lperror)
 
static void checkLazyBounds (SCIP_LP *lp, SCIP_SET *set)
 
static SCIP_RETCODE updateLazyBounds (SCIP_LP *lp, SCIP_SET *set)
 
static int lpGetResolveItlim (SCIP_SET *set, SCIP_STAT *stat, int itlim)
 
SCIP_RETCODE SCIPlpSolveAndEval (SCIP_LP *lp, SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr, BMS_BLKMEM *blkmem, SCIP_STAT *stat, SCIP_EVENTQUEUE *eventqueue, SCIP_EVENTFILTER *eventfilter, SCIP_PROB *prob, SCIP_Longint itlim, SCIP_Bool limitresolveiters, SCIP_Bool aging, SCIP_Bool keepsol, SCIP_Bool *lperror)
 
SCIP_LPSOLSTAT SCIPlpGetSolstat (SCIP_LP *lp)
 
SCIP_Real SCIPlpGetObjval (SCIP_LP *lp, SCIP_SET *set, SCIP_PROB *prob)
 
SCIP_Real SCIPlpGetColumnObjval (SCIP_LP *lp)
 
SCIP_Real SCIPlpGetLooseObjval (SCIP_LP *lp, SCIP_SET *set, SCIP_PROB *prob)
 
void SCIPlpStoreRootObjval (SCIP_LP *lp, SCIP_SET *set, SCIP_PROB *prob)
 
void SCIPlpInvalidateRootObjval (SCIP_LP *lp)
 
void SCIPlpRecomputeLocalAndGlobalPseudoObjval (SCIP_LP *lp, SCIP_SET *set, SCIP_PROB *prob)
 
SCIP_Real SCIPlpGetGlobalPseudoObjval (SCIP_LP *lp, SCIP_SET *set, SCIP_PROB *prob)
 
SCIP_Real SCIPlpGetPseudoObjval (SCIP_LP *lp, SCIP_SET *set, SCIP_PROB *prob)
 
SCIP_Real SCIPlpGetModifiedPseudoObjval (SCIP_LP *lp, SCIP_SET *set, SCIP_PROB *prob, SCIP_VAR *var, SCIP_Real oldbound, SCIP_Real newbound, SCIP_BOUNDTYPE boundtype)
 
SCIP_Real SCIPlpGetModifiedProvedPseudoObjval (SCIP_LP *lp, SCIP_SET *set, SCIP_VAR *var, SCIP_Real oldbound, SCIP_Real newbound, SCIP_BOUNDTYPE boundtype)
 
static void getObjvalDeltaObj (SCIP_SET *set, SCIP_Real oldobj, SCIP_Real newobj, SCIP_Real lb, SCIP_Real ub, SCIP_Real *deltaval, int *deltainf)
 
static void getObjvalDeltaLb (SCIP_SET *set, SCIP_Real obj, SCIP_Real oldlb, SCIP_Real newlb, SCIP_Real *deltaval, int *deltainf)
 
static void getObjvalDeltaUb (SCIP_SET *set, SCIP_Real obj, SCIP_Real oldub, SCIP_Real newub, SCIP_Real *deltaval, int *deltainf)
 
static void lpUpdateObjval (SCIP_LP *lp, SCIP_SET *set, SCIP_VAR *var, SCIP_Real deltaval, int deltainf, SCIP_Bool local, SCIP_Bool loose, SCIP_Bool global)
 
static SCIP_RETCODE lpUpdateVarProved (SCIP_LP *lp, SCIP_SET *set, SCIP_VAR *var, SCIP_Real oldobj, SCIP_Real oldlb, SCIP_Real oldub, SCIP_Real newobj, SCIP_Real newlb, SCIP_Real newub)
 
SCIP_RETCODE SCIPlpUpdateVarObj (SCIP_LP *lp, SCIP_SET *set, SCIP_VAR *var, SCIP_Real oldobj, SCIP_Real newobj)
 
SCIP_RETCODE SCIPlpUpdateVarLbGlobal (SCIP_LP *lp, SCIP_SET *set, SCIP_VAR *var, SCIP_Real oldlb, SCIP_Real newlb)
 
SCIP_RETCODE SCIPlpUpdateVarLb (SCIP_LP *lp, SCIP_SET *set, SCIP_VAR *var, SCIP_Real oldlb, SCIP_Real newlb)
 
SCIP_RETCODE SCIPlpUpdateVarUbGlobal (SCIP_LP *lp, SCIP_SET *set, SCIP_VAR *var, SCIP_Real oldub, SCIP_Real newub)
 
SCIP_RETCODE SCIPlpUpdateVarUb (SCIP_LP *lp, SCIP_SET *set, SCIP_VAR *var, SCIP_Real oldub, SCIP_Real newub)
 
SCIP_RETCODE SCIPlpUpdateAddVar (SCIP_LP *lp, SCIP_SET *set, SCIP_VAR *var)
 
SCIP_RETCODE SCIPlpUpdateDelVar (SCIP_LP *lp, SCIP_SET *set, SCIP_VAR *var)
 
static SCIP_RETCODE lpUpdateVarColumn (SCIP_LP *lp, SCIP_SET *set, SCIP_VAR *var)
 
static SCIP_RETCODE lpUpdateVarColumnProved (SCIP_LP *lp, SCIP_SET *set, SCIP_VAR *var)
 
SCIP_RETCODE SCIPlpUpdateVarColumn (SCIP_LP *lp, SCIP_SET *set, SCIP_VAR *var)
 
static SCIP_RETCODE lpUpdateVarLoose (SCIP_LP *lp, SCIP_SET *set, SCIP_VAR *var)
 
static SCIP_RETCODE lpUpdateVarLooseProved (SCIP_LP *lp, SCIP_SET *set, SCIP_VAR *var)
 
SCIP_RETCODE SCIPlpUpdateVarLoose (SCIP_LP *lp, SCIP_SET *set, SCIP_VAR *var)
 
void SCIPlpDecNLoosevars (SCIP_LP *lp)
 
SCIP_RETCODE SCIPlpGetSol (SCIP_LP *lp, SCIP_SET *set, SCIP_STAT *stat, SCIP_Bool *primalfeasible, SCIP_Bool *dualfeasible)
 
SCIP_RETCODE SCIPlpGetUnboundedSol (SCIP_LP *lp, SCIP_SET *set, SCIP_STAT *stat, SCIP_Bool *primalfeasible, SCIP_Bool *rayfeasible)
 
SCIP_RETCODE SCIPlpGetPrimalRay (SCIP_LP *lp, SCIP_SET *set, SCIP_Real *ray)
 
SCIP_RETCODE SCIPlpGetDualfarkas (SCIP_LP *lp, SCIP_SET *set, SCIP_STAT *stat)
 
SCIP_RETCODE SCIPlpGetIterations (SCIP_LP *lp, int *iterations)
 
SCIP_RETCODE SCIPlpUpdateAges (SCIP_LP *lp, SCIP_STAT *stat)
 
static SCIP_RETCODE lpDelColset (SCIP_LP *lp, SCIP_SET *set, int *coldstat)
 
static SCIP_RETCODE lpDelRowset (SCIP_LP *lp, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_EVENTQUEUE *eventqueue, SCIP_EVENTFILTER *eventfilter, int *rowdstat)
 
static SCIP_RETCODE lpRemoveObsoleteCols (SCIP_LP *lp, SCIP_SET *set, SCIP_STAT *stat, int firstcol)
 
static SCIP_RETCODE lpRemoveObsoleteRows (SCIP_LP *lp, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_EVENTQUEUE *eventqueue, SCIP_EVENTFILTER *eventfilter, int firstrow)
 
SCIP_RETCODE SCIPlpRemoveNewObsoletes (SCIP_LP *lp, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_EVENTQUEUE *eventqueue, SCIP_EVENTFILTER *eventfilter)
 
SCIP_RETCODE SCIPlpRemoveAllObsoletes (SCIP_LP *lp, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_EVENTQUEUE *eventqueue, SCIP_EVENTFILTER *eventfilter)
 
static SCIP_RETCODE lpCleanupCols (SCIP_LP *lp, SCIP_SET *set, SCIP_STAT *stat, int firstcol)
 
static SCIP_RETCODE lpCleanupRows (SCIP_LP *lp, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_EVENTQUEUE *eventqueue, SCIP_EVENTFILTER *eventfilter, int firstrow)
 
SCIP_RETCODE SCIPlpCleanupNew (SCIP_LP *lp, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_EVENTQUEUE *eventqueue, SCIP_EVENTFILTER *eventfilter, SCIP_Bool root)
 
SCIP_RETCODE SCIPlpCleanupAll (SCIP_LP *lp, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_EVENTQUEUE *eventqueue, SCIP_EVENTFILTER *eventfilter, SCIP_Bool root)
 
SCIP_RETCODE SCIPlpRemoveRedundantRows (SCIP_LP *lp, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_EVENTQUEUE *eventqueue, SCIP_EVENTFILTER *eventfilter)
 
SCIP_RETCODE SCIPlpStartDive (SCIP_LP *lp, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat)
 
SCIP_RETCODE SCIPlpEndDive (SCIP_LP *lp, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr, SCIP_STAT *stat, SCIP_EVENTQUEUE *eventqueue, SCIP_EVENTFILTER *eventfilter, SCIP_PROB *prob, SCIP_VAR **vars, int nvars)
 
SCIP_RETCODE SCIPlpRecordOldRowSideDive (SCIP_LP *lp, SCIP_ROW *row, SCIP_SIDETYPE sidetype)
 
SCIP_RETCODE SCIPlpStartProbing (SCIP_LP *lp)
 
SCIP_RETCODE SCIPlpEndProbing (SCIP_LP *lp)
 
void SCIPlpStartStrongbranchProbing (SCIP_LP *lp)
 
void SCIPlpEndStrongbranchProbing (SCIP_LP *lp)
 
static SCIP_RETCODE provedBound (SCIP_LP *lp, SCIP_SET *set, SCIP_Bool usefarkas, SCIP_Real *bound)
 
SCIP_RETCODE SCIPlpGetProvedLowerbound (SCIP_LP *lp, SCIP_SET *set, SCIP_Real *bound)
 
SCIP_RETCODE SCIPlpIsInfeasibilityProved (SCIP_LP *lp, SCIP_SET *set, SCIP_Bool *proved)
 
SCIP_RETCODE SCIPlpWrite (SCIP_LP *lp, const char *fname)
 
SCIP_RETCODE SCIPlpWriteMip (SCIP_LP *lp, SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr, const char *fname, SCIP_Bool genericnames, SCIP_Bool origobj, SCIP_OBJSENSE objsense, SCIP_Real objscale, SCIP_Real objoffset, SCIP_Bool lazyconss)
 
SCIP_Real SCIPcolGetObj (SCIP_COL *col)
 
SCIP_Real SCIPcolGetLb (SCIP_COL *col)
 
SCIP_Real SCIPcolGetUb (SCIP_COL *col)
 
SCIP_Real SCIPcolGetBestBound (SCIP_COL *col)
 
SCIP_Real SCIPcolGetPrimsol (SCIP_COL *col)
 
SCIP_Real SCIPcolGetMinPrimsol (SCIP_COL *col)
 
SCIP_Real SCIPcolGetMaxPrimsol (SCIP_COL *col)
 
SCIP_BASESTAT SCIPcolGetBasisStatus (SCIP_COL *col)
 
SCIP_VARSCIPcolGetVar (SCIP_COL *col)
 
int SCIPcolGetIndex (SCIP_COL *col)
 
SCIP_Bool SCIPcolIsIntegral (SCIP_COL *col)
 
SCIP_Bool SCIPcolIsRemovable (SCIP_COL *col)
 
int SCIPcolGetLPPos (SCIP_COL *col)
 
int SCIPcolGetLPDepth (SCIP_COL *col)
 
SCIP_Bool SCIPcolIsInLP (SCIP_COL *col)
 
int SCIPcolGetNNonz (SCIP_COL *col)
 
int SCIPcolGetNLPNonz (SCIP_COL *col)
 
SCIP_ROW ** SCIPcolGetRows (SCIP_COL *col)
 
SCIP_RealSCIPcolGetVals (SCIP_COL *col)
 
SCIP_Longint SCIPcolGetStrongbranchNode (SCIP_COL *col)
 
int SCIPcolGetNStrongbranchs (SCIP_COL *col)
 
SCIP_BOUNDTYPE SCIPboundtypeOpposite (SCIP_BOUNDTYPE boundtype)
 
int SCIProwGetNNonz (SCIP_ROW *row)
 
int SCIProwGetNLPNonz (SCIP_ROW *row)
 
SCIP_COL ** SCIProwGetCols (SCIP_ROW *row)
 
SCIP_RealSCIProwGetVals (SCIP_ROW *row)
 
SCIP_Real SCIProwGetConstant (SCIP_ROW *row)
 
SCIP_Real SCIProwGetNorm (SCIP_ROW *row)
 
SCIP_Real SCIProwGetSumNorm (SCIP_ROW *row)
 
SCIP_Real SCIProwGetLhs (SCIP_ROW *row)
 
SCIP_Real SCIProwGetRhs (SCIP_ROW *row)
 
SCIP_Real SCIProwGetDualsol (SCIP_ROW *row)
 
SCIP_Real SCIProwGetDualfarkas (SCIP_ROW *row)
 
SCIP_BASESTAT SCIProwGetBasisStatus (SCIP_ROW *row)
 
const char * SCIProwGetName (SCIP_ROW *row)
 
int SCIProwGetIndex (SCIP_ROW *row)
 
int SCIProwGetAge (SCIP_ROW *row)
 
int SCIProwGetRank (SCIP_ROW *row)
 
SCIP_Bool SCIProwIsIntegral (SCIP_ROW *row)
 
SCIP_Bool SCIProwIsLocal (SCIP_ROW *row)
 
SCIP_Bool SCIProwIsModifiable (SCIP_ROW *row)
 
SCIP_Bool SCIProwIsRemovable (SCIP_ROW *row)
 
SCIP_ROWORIGINTYPE SCIProwGetOrigintype (SCIP_ROW *row)
 
SCIP_CONSHDLRSCIProwGetOriginCons (SCIP_ROW *row)
 
SCIP_SEPASCIProwGetOriginSepa (SCIP_ROW *row)
 
SCIP_Bool SCIProwIsInGlobalCutpool (SCIP_ROW *row)
 
int SCIProwGetLPPos (SCIP_ROW *row)
 
int SCIProwGetLPDepth (SCIP_ROW *row)
 
SCIP_Bool SCIProwIsInLP (SCIP_ROW *row)
 
void SCIProwChgRank (SCIP_ROW *row, int rank)
 
SCIP_Longint SCIProwGetActiveLPCount (SCIP_ROW *row)
 
SCIP_Longint SCIProwGetNLPsAfterCreation (SCIP_ROW *row)
 
SCIP_COL ** SCIPlpGetCols (SCIP_LP *lp)
 
int SCIPlpGetNCols (SCIP_LP *lp)
 
SCIP_ROW ** SCIPlpGetRows (SCIP_LP *lp)
 
int SCIPlpGetNRows (SCIP_LP *lp)
 
SCIP_COL ** SCIPlpGetNewcols (SCIP_LP *lp)
 
int SCIPlpGetNNewcols (SCIP_LP *lp)
 
SCIP_ROW ** SCIPlpGetNewrows (SCIP_LP *lp)
 
int SCIPlpGetNNewrows (SCIP_LP *lp)
 
void SCIPlpRecalculateObjSqrNorm (SCIP_SET *set, SCIP_LP *lp)
 
SCIP_Real SCIPlpGetObjNorm (SCIP_LP *lp)
 
void SCIPlpSetRootLPIsRelax (SCIP_LP *lp, SCIP_Bool isrelax)
 
SCIP_Bool SCIPlpIsRootLPRelax (SCIP_LP *lp)
 
SCIP_Real SCIPlpGetRootObjval (SCIP_LP *lp)
 
SCIP_Real SCIPlpGetRootColumnObjval (SCIP_LP *lp)
 
SCIP_Real SCIPlpGetRootLooseObjval (SCIP_LP *lp)
 
SCIP_LPISCIPlpGetLPI (SCIP_LP *lp)
 
void SCIPlpSetIsRelax (SCIP_LP *lp, SCIP_Bool relax)
 
SCIP_Bool SCIPlpIsRelax (SCIP_LP *lp)
 
SCIP_Bool SCIPlpIsSolved (SCIP_LP *lp)
 
SCIP_Bool SCIPlpIsSolBasic (SCIP_LP *lp)
 
SCIP_Bool SCIPlpDiving (SCIP_LP *lp)
 
SCIP_Bool SCIPlpDivingObjChanged (SCIP_LP *lp)
 
void SCIPlpMarkDivingObjChanged (SCIP_LP *lp)
 
void SCIPlpUnmarkDivingObjChanged (SCIP_LP *lp)
 
SCIP_Bool SCIPlpDivingRowsChanged (SCIP_LP *lp)
 
SCIP_RETCODE SCIPlpComputeRelIntPoint (SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr, SCIP_LP *lp, SCIP_PROB *prob, SCIP_Bool relaxrows, SCIP_Bool inclobjcutoff, SCIP_Real timelimit, int iterlimit, SCIP_Real *point, SCIP_Bool *success)
 

Variables

static const SCIP_Real scalars [] = {3.0, 5.0, 7.0, 9.0, 11.0, 13.0, 15.0, 17.0, 19.0}
 
static const int nscalars = 9
 

Macro Definition Documentation

#define MAXCMIRSCALE   1e+6

maximal scaling (scale/(1-f0)) allowed in c-MIR calculations

Definition at line 54 of file lp.c.

Referenced by SCIPlpCalcMIR().

#define debugRowPrint (   x)

Definition at line 106 of file lp.c.

Referenced by lpFlushAddRows(), rowScale(), sumMIRRow(), and sumStrongCGRow().

#define debugColPrint (   x)

Definition at line 138 of file lp.c.

Referenced by lpFlushAddCols().

#define checkRow (   row)

Definition at line 646 of file lp.c.

Referenced by rowSortNonLP(), and SCIProwEnsureSize().

#define checkRowSqrnorm (   row)

Definition at line 719 of file lp.c.

Referenced by SCIProwGetNorm(), and SCIProwGetObjParallelism().

#define checkRowSumnorm (   row)

Definition at line 720 of file lp.c.

Referenced by SCIProwGetSumNorm().

#define checkRowObjprod (   row)

Definition at line 721 of file lp.c.

Referenced by SCIProwGetObjParallelism().

#define lpCutoffDisabled (   set)    (set->lp_disablecutoff == 1 || (set->nactivepricers > 0 && set->lp_disablecutoff == 2))

should the objective limit of the LP solver be disabled

Definition at line 2593 of file lp.c.

Referenced by lpSetUobjlim(), lpSolve(), SCIPlpSetCutoffbound(), and SCIPlpSolveAndEval().

#define DIVESTACKINITSIZE   100

Definition at line 8654 of file lp.c.

Referenced by SCIPlpCreate().

#define FEASTOLTIGHTFAC   0.001

Definition at line 13674 of file lp.c.

Referenced by lpSolveStable().

#define DIVESTACKGROWFACT   1.5

Definition at line 17940 of file lp.c.

Referenced by SCIPlpRecordOldRowSideDive().

Function Documentation

static SCIP_RETCODE ensureChgcolsSize ( SCIP_LP lp,
SCIP_SET set,
int  num 
)
static

ensures, that chgcols array can store at least num entries

Parameters
lpcurrent LP data
setglobal SCIP settings
numminimum number of entries to store

Definition at line 147 of file lp.c.

References BMSreallocMemoryArray, SCIP_Lp::chgcols, SCIP_Lp::chgcolssize, SCIP_Lp::nchgcols, SCIP_ALLOC, SCIP_OKAY, and SCIPsetCalcMemGrowSize().

Referenced by insertColChgcols().

static SCIP_RETCODE ensureChgrowsSize ( SCIP_LP lp,
SCIP_SET set,
int  num 
)
static

ensures, that chgrows array can store at least num entries

Parameters
lpcurrent LP data
setglobal SCIP settings
numminimum number of entries to store

Definition at line 170 of file lp.c.

References BMSreallocMemoryArray, SCIP_Lp::chgrows, SCIP_Lp::chgrowssize, SCIP_Lp::nchgrows, SCIP_ALLOC, SCIP_OKAY, and SCIPsetCalcMemGrowSize().

Referenced by rowSideChanged().

static SCIP_RETCODE ensureLpicolsSize ( SCIP_LP lp,
SCIP_SET set,
int  num 
)
static

ensures, that lpicols array can store at least num entries

Parameters
lpcurrent LP data
setglobal SCIP settings
numminimum number of entries to store

Definition at line 193 of file lp.c.

References BMSreallocMemoryArray, SCIP_Lp::lpicols, SCIP_Lp::lpicolssize, SCIP_Lp::nlpicols, SCIP_ALLOC, SCIP_OKAY, and SCIPsetCalcMemGrowSize().

Referenced by lpFlushAddCols().

static SCIP_RETCODE ensureLpirowsSize ( SCIP_LP lp,
SCIP_SET set,
int  num 
)
static

ensures, that lpirows array can store at least num entries

Parameters
lpcurrent LP data
setglobal SCIP settings
numminimum number of entries to store

Definition at line 216 of file lp.c.

References BMSreallocMemoryArray, SCIP_Lp::lpirows, SCIP_Lp::lpirowssize, SCIP_Lp::nlpirows, SCIP_ALLOC, SCIP_OKAY, and SCIPsetCalcMemGrowSize().

Referenced by lpFlushAddRows().

static SCIP_RETCODE ensureColsSize ( SCIP_LP lp,
SCIP_SET set,
int  num 
)
static

ensures, that cols array can store at least num entries

Parameters
lpcurrent LP data
setglobal SCIP settings
numminimum number of entries to store

Definition at line 239 of file lp.c.

References BMSreallocMemoryArray, SCIP_Lp::cols, SCIP_Lp::colssize, SCIP_Lp::ncols, SCIP_ALLOC, SCIP_OKAY, and SCIPsetCalcMemGrowSize().

Referenced by SCIPlpAddCol().

static SCIP_RETCODE ensureLazycolsSize ( SCIP_LP lp,
SCIP_SET set,
int  num 
)
static

ensures, that lazy cols array can store at least num entries

Parameters
lpcurrent LP data
setglobal SCIP settings
numminimum number of entries to store

Definition at line 262 of file lp.c.

References BMSreallocMemoryArray, SCIP_Lp::lazycols, SCIP_Lp::lazycolssize, SCIP_Lp::nlazycols, SCIP_ALLOC, SCIP_OKAY, and SCIPsetCalcMemGrowSize().

Referenced by SCIPlpAddCol().

static SCIP_RETCODE ensureRowsSize ( SCIP_LP lp,
SCIP_SET set,
int  num 
)
static

ensures, that rows array can store at least num entries

Parameters
lpcurrent LP data
setglobal SCIP settings
numminimum number of entries to store

Definition at line 285 of file lp.c.

References BMSreallocMemoryArray, SCIP_Lp::nrows, SCIP_Lp::rows, SCIP_Lp::rowssize, SCIP_ALLOC, SCIP_OKAY, and SCIPsetCalcMemGrowSize().

Referenced by SCIPlpAddRow().

static SCIP_RETCODE colEnsureSize ( SCIP_COL col,
BMS_BLKMEM blkmem,
SCIP_SET set,
int  num 
)
static

ensures, that row array of column can store at least num entries

Parameters
colLP column
blkmemblock memory
setglobal SCIP settings
numminimum number of entries to store

Definition at line 308 of file lp.c.

References BMSreallocBlockMemoryArray, SCIP_Col::len, SCIP_Col::linkpos, NULL, SCIP_Col::rows, SCIP_ALLOC, SCIP_OKAY, SCIPsetCalcMemGrowSize(), SCIP_Col::size, and SCIP_Col::vals.

Referenced by colAddCoef().

static SCIP_RETCODE lpStoreSolVals ( SCIP_LP lp,
SCIP_STAT stat,
BMS_BLKMEM blkmem 
)
static
static SCIP_RETCODE colStoreSolVals ( SCIP_COL col,
BMS_BLKMEM blkmem 
)
static

save current LP solution values stored in each column

Parameters
colLP column
blkmemblock memory

Definition at line 421 of file lp.c.

References SCIP_ColSolVals::basisstatus, SCIP_Col::basisstatus, BMSallocBlockMemory, NULL, SCIP_ColSolVals::primsol, SCIP_Col::primsol, SCIP_ColSolVals::redcost, SCIP_Col::redcost, SCIP_ALLOC, SCIP_OKAY, and SCIP_Col::storedsolvals.

Referenced by SCIPlpStartDive().

static SCIP_RETCODE colRestoreSolVals ( SCIP_COL col,
BMS_BLKMEM blkmem,
SCIP_Longint  validlp,
SCIP_Bool  freebuffer 
)
static

restore LP solution values in column

Parameters
colLP column
blkmemblock memory
validlpnumber of lp for which restored values are valid
freebuffershould buffer for LP solution values be freed?

Definition at line 448 of file lp.c.

References SCIP_ColSolVals::basisstatus, SCIP_Col::basisstatus, BMSfreeBlockMemoryNull, NULL, SCIP_ColSolVals::primsol, SCIP_Col::primsol, SCIP_ColSolVals::redcost, SCIP_Col::redcost, SCIP_BASESTAT_ZERO, SCIP_OKAY, SCIP_Col::storedsolvals, SCIP_Col::validfarkaslp, and SCIP_Col::validredcostlp.

Referenced by SCIPlpEndDive().

static SCIP_RETCODE rowStoreSolVals ( SCIP_ROW row,
BMS_BLKMEM blkmem,
SCIP_Bool  infeasible 
)
static

save current LP solution values stored in each column

Parameters
rowLP row
blkmemblock memory
infeasibleis the solution infeasible?

Definition at line 495 of file lp.c.

References SCIP_RowSolVals::activity, SCIP_Row::activity, SCIP_RowSolVals::basisstatus, SCIP_Row::basisstatus, BMSallocBlockMemory, SCIP_Row::dualfarkas, SCIP_RowSolVals::dualsol, SCIP_Row::dualsol, NULL, SCIP_ALLOC, SCIP_BASESTAT_BASIC, SCIP_INVALID, SCIP_OKAY, and SCIP_Row::storedsolvals.

Referenced by SCIPlpStartDive().

static SCIP_RETCODE rowRestoreSolVals ( SCIP_ROW row,
BMS_BLKMEM blkmem,
SCIP_Longint  validlp,
SCIP_Bool  freebuffer,
SCIP_Bool  infeasible 
)
static

restore LP solution values in row

Parameters
rowLP column
blkmemblock memory
validlpnumber of lp for which restored values are valid
freebuffershould buffer for LP solution values be freed?
infeasibleis the solution infeasible?

Definition at line 532 of file lp.c.

References SCIP_RowSolVals::activity, SCIP_Row::activity, SCIP_RowSolVals::basisstatus, SCIP_Row::basisstatus, BMSfreeBlockMemoryNull, SCIP_Row::dualfarkas, SCIP_RowSolVals::dualsol, SCIP_Row::dualsol, NULL, SCIP_BASESTAT_BASIC, SCIP_INVALID, SCIP_OKAY, SCIP_Row::storedsolvals, and SCIP_Row::validactivitylp.

Referenced by SCIPlpEndDive().

SCIP_RETCODE SCIProwEnsureSize ( SCIP_ROW row,
BMS_BLKMEM blkmem,
SCIP_SET set,
int  num 
)

ensures, that column array of row can store at least num entries

Parameters
rowLP row
blkmemblock memory
setglobal SCIP settings
numminimum number of entries to store

Definition at line 580 of file lp.c.

References BMSreallocBlockMemoryArray, checkRow, SCIP_Row::cols, SCIP_Row::cols_index, FALSE, SCIP_Col::index, SCIP_Row::len, SCIP_Row::linkpos, SCIP_Row::lpcolssorted, SCIP_Row::nlpcols, SCIP_Row::nonlpcolssorted, NULL, SCIP_ALLOC, SCIP_Bool, SCIP_OKAY, SCIPsetCalcMemGrowSize(), SCIP_Row::size, TRUE, and SCIP_Row::vals.

Referenced by rowAddCoef(), SCIPaddVarsToRow(), and SCIPaddVarsToRowSameCoef().

static void recomputeLooseObjectiveValue ( SCIP_LP lp,
SCIP_SET set,
SCIP_PROB prob 
)
static
static void recomputePseudoObjectiveValue ( SCIP_LP lp,
SCIP_SET set,
SCIP_PROB prob 
)
static
static void recomputeGlbPseudoObjectiveValue ( SCIP_LP lp,
SCIP_SET set,
SCIP_PROB prob 
)
static
static SCIP_Real getFiniteLooseObjval ( SCIP_LP lp,
SCIP_SET set,
SCIP_PROB prob 
)
static

gets finite part of objective value of current LP that results from LOOSE variables only

Parameters
lpcurrent LP data
setglobal SCIP settings
probproblem data

Definition at line 856 of file lp.c.

References SCIP_Lp::flushed, SCIP_Lp::looseobjval, SCIP_Lp::looseobjvalid, SCIP_Lp::looseobjvalinf, SCIP_Lp::nloosevars, NULL, and recomputeLooseObjectiveValue().

Referenced by lpSolve(), lpSolveStable(), SCIPcolGetStrongbranch(), SCIPcolGetStrongbranches(), SCIPlpComputeRelIntPoint(), SCIPlpGetLooseObjval(), and SCIPlpSolveAndEval().

static SCIP_Real getFinitePseudoObjval ( SCIP_LP lp,
SCIP_SET set,
SCIP_PROB prob 
)
static

gets finite part of pseudo objective value of current LP

Parameters
lpcurrent LP data
setglobal SCIP settings
probproblem data

Definition at line 878 of file lp.c.

References NULL, SCIP_Lp::pseudoobjval, SCIP_Lp::pseudoobjvalid, and recomputePseudoObjectiveValue().

Referenced by SCIPlpGetModifiedPseudoObjval().

static void colSortLP ( SCIP_COL col)
static

sorts column entries of linked rows currently in the LP such that lower row indices precede higher ones

Parameters
colcolumn to be sorted

Definition at line 920 of file lp.c.

References SCIP_Row::cols, SCIP_Col::linkpos, SCIP_Row::linkpos, SCIP_Col::lprowssorted, SCIP_Col::nlprows, NULL, SCIP_Col::rows, SCIPsortPtrRealInt(), TRUE, and SCIP_Col::vals.

Referenced by colSearchCoef(), and SCIPcolSort().

static void colSortNonLP ( SCIP_COL col)
static

sorts column entries of unlinked rows or rows currently not in the LP such that lower row indices precede higher ones

Parameters
colcolumn to be sorted

Definition at line 953 of file lp.c.

References SCIP_Row::cols, SCIP_Col::len, SCIP_Col::linkpos, SCIP_Row::linkpos, SCIP_Col::nlprows, SCIP_Col::nonlprowssorted, NULL, SCIP_Col::rows, SCIPsortPtrRealInt(), TRUE, and SCIP_Col::vals.

Referenced by colSearchCoef(), and SCIPcolSort().

static void rowSortLP ( SCIP_ROW row)
static

sorts row entries of linked columns currently in the LP such that lower column indices precede higher ones

Parameters
rowrow to be sorted

Definition at line 984 of file lp.c.

References SCIP_Row::cols, SCIP_Row::cols_index, SCIP_Row::delaysort, SCIP_Col::linkpos, SCIP_Row::linkpos, SCIP_Row::lpcolssorted, SCIP_Row::nlpcols, NULL, SCIP_Col::rows, SCIPsortIntPtrIntReal(), TRUE, and SCIP_Row::vals.

Referenced by rowSearchCoef(), SCIPlpComputeRelIntPoint(), and SCIProwSort().

static void rowSortNonLP ( SCIP_ROW row)
static

sorts row entries of unlinked columns or columns currently not in the LP such that lower column indices precede higher ones

Parameters
rowrow to be sorted

Definition at line 1017 of file lp.c.

References checkRow, SCIP_Row::cols, SCIP_Row::cols_index, SCIP_Row::delaysort, SCIP_Row::len, SCIP_Col::linkpos, SCIP_Row::linkpos, SCIP_Row::nlpcols, SCIP_Row::nonlpcolssorted, NULL, SCIP_Col::rows, SCIPsortIntPtrIntReal(), TRUE, and SCIP_Row::vals.

Referenced by rowSearchCoef(), and SCIProwSort().

static int colSearchCoefPart ( SCIP_COL col,
const SCIP_ROW row,
int  minpos,
int  maxpos 
)
static

searches coefficient in part of the column, returns position in col vector or -1 if not found

Parameters
colcolumn to be searched in
rowcoefficient to be searched for
minposfirst position of search range
maxposlast position of search range

Definition at line 1052 of file lp.c.

References SCIP_Row::index, SCIP_Col::linkpos, SCIP_Row::lppos, NULL, and SCIP_Col::rows.

Referenced by colSearchCoef().

static int colSearchCoef ( SCIP_COL col,
const SCIP_ROW row 
)
static

searches coefficient in column, returns position in col vector or -1 if not found

Parameters
colcolumn to be searched in
rowcoefficient to be searched for

Definition at line 1088 of file lp.c.

References colSearchCoefPart(), colSortLP(), colSortNonLP(), SCIP_Col::len, SCIP_Row::lppos, SCIP_Col::lprowssorted, SCIP_Col::nlprows, SCIP_Col::nonlprowssorted, NULL, and SCIP_Col::nunlinked.

Referenced by SCIPcolChgCoef(), SCIPcolDelCoef(), and SCIPcolIncCoef().

static int rowSearchCoefPart ( SCIP_ROW row,
const SCIP_COL col,
int  minpos,
int  maxpos 
)
static

searches coefficient in part of the row, returns position in col vector or -1 if not found

Parameters
rowrow to be searched in
colcoefficient to be searched for
minposfirst position of search range
maxposlast position of search range

Definition at line 1127 of file lp.c.

References SCIP_Row::cols, SCIP_Row::cols_index, SCIP_Col::index, SCIP_Row::linkpos, SCIP_Col::lppos, and NULL.

Referenced by rowSearchCoef().

static int rowSearchCoef ( SCIP_ROW row,
const SCIP_COL col 
)
static

searches coefficient in row, returns position in row vector or -1 if not found; if the sorting of the row is delayed, returns -1

Parameters
rowrow to be searched in
colcoefficient to be searched for

Definition at line 1166 of file lp.c.

References SCIP_Row::cols, SCIP_Row::delaysort, SCIP_Row::len, SCIP_Row::lpcolssorted, SCIP_Col::lppos, SCIP_Row::nlpcols, SCIP_Row::nonlpcolssorted, NULL, SCIP_Row::nunlinked, rowSearchCoefPart(), rowSortLP(), and rowSortNonLP().

Referenced by SCIProwChgCoef(), SCIProwDelCoef(), and SCIProwIncCoef().

static void colMoveCoef ( SCIP_COL col,
int  oldpos,
int  newpos 
)
static

moves a coefficient in a column to a different place, and updates all corresponding data structures

Parameters
colLP column
oldposold position of coefficient
newposnew position of coefficient

Definition at line 1219 of file lp.c.

References SCIP_Row::cols, FALSE, SCIP_Col::linkpos, SCIP_Row::linkpos, SCIP_Row::lppos, SCIP_Col::lprowssorted, SCIP_Col::nonlprowssorted, NULL, SCIP_Col::rows, and SCIP_Col::vals.

Referenced by colAddCoef(), and colDelCoefPos().

static void colSwapCoefs ( SCIP_COL col,
int  pos1,
int  pos2 
)
static

swaps two coefficients in a column, and updates all corresponding data structures

Parameters
colLP column
pos1position of first coefficient
pos2position of second coefficient

Definition at line 1255 of file lp.c.

References SCIP_Row::cols, FALSE, SCIP_Col::linkpos, SCIP_Row::linkpos, SCIP_Row::lppos, SCIP_Col::lprowssorted, SCIP_Col::nonlprowssorted, NULL, SCIP_Col::rows, SCIP_Real, and SCIP_Col::vals.

Referenced by rowAddCoef(), rowUpdateAddLP(), and rowUpdateDelLP().

static void rowMoveCoef ( SCIP_ROW row,
int  oldpos,
int  newpos 
)
static

moves a coefficient in a row to a different place, and updates all corresponding data structures

Parameters
rowLP row
oldposold position of coefficient
newposnew position of coefficient

Definition at line 1315 of file lp.c.

References SCIP_Row::cols, SCIP_Row::cols_index, FALSE, SCIP_Col::linkpos, SCIP_Row::linkpos, SCIP_Row::lpcolssorted, SCIP_Col::lppos, SCIP_Row::nonlpcolssorted, NULL, SCIP_Col::rows, and SCIP_Row::vals.

Referenced by rowAddCoef(), and rowDelCoefPos().

static void rowSwapCoefs ( SCIP_ROW row,
int  pos1,
int  pos2 
)
static

swaps two coefficients in a row, and updates all corresponding data structures

Parameters
rowLP row
pos1position of first coefficient
pos2position of second coefficient

Definition at line 1352 of file lp.c.

References SCIP_Row::cols, SCIP_Row::cols_index, FALSE, SCIP_Col::index, SCIP_Col::linkpos, SCIP_Row::linkpos, SCIP_Row::lpcolssorted, SCIP_Col::lppos, SCIP_Row::nonlpcolssorted, NULL, SCIP_Col::rows, SCIP_Real, and SCIP_Row::vals.

Referenced by colAddCoef(), colUpdateAddLP(), and colUpdateDelLP().

static SCIP_RETCODE rowEventCoefChanged ( SCIP_ROW row,
BMS_BLKMEM blkmem,
SCIP_SET set,
SCIP_EVENTQUEUE eventqueue,
SCIP_COL col,
SCIP_Real  oldval,
SCIP_Real  newval 
)
static

issues a ROWCOEFCHANGED event on the given row

Parameters
rowrow which coefficient has changed
blkmemblock memory
setglobal SCIP settings
eventqueueevent queue
colthe column which coefficient has changed
oldvalold value of the coefficient
newvalnew value of the coefficient

Definition at line 1417 of file lp.c.

References SCIP_Row::eventfilter, SCIP_EventFilter::eventmask, SCIP_EventFilter::len, NULL, SCIP_CALL, SCIP_EVENTTYPE_ROWCOEFCHANGED, SCIP_OKAY, SCIPeventCreateRowCoefChanged(), and SCIPeventqueueAdd().

Referenced by rowAddCoef(), rowChgCoefPos(), and rowDelCoefPos().

static SCIP_RETCODE rowEventConstantChanged ( SCIP_ROW row,
BMS_BLKMEM blkmem,
SCIP_SET set,
SCIP_EVENTQUEUE eventqueue,
SCIP_Real  oldval,
SCIP_Real  newval 
)
static

issues a ROWCONSTCHANGED event on the given row

Parameters
rowrow which coefficient has changed
blkmemblock memory
setglobal SCIP settings
eventqueueevent queue
oldvalold value of the constant
newvalnew value of the constant

Definition at line 1447 of file lp.c.

References SCIP_Row::eventfilter, SCIP_EventFilter::eventmask, SCIP_EventFilter::len, NULL, SCIP_CALL, SCIP_EVENTTYPE_ROWCONSTCHANGED, SCIP_OKAY, SCIPeventCreateRowConstChanged(), and SCIPeventqueueAdd().

Referenced by SCIProwChgConstant().

static SCIP_RETCODE rowEventSideChanged ( SCIP_ROW row,
BMS_BLKMEM blkmem,
SCIP_SET set,
SCIP_EVENTQUEUE eventqueue,
SCIP_SIDETYPE  side,
SCIP_Real  oldval,
SCIP_Real  newval 
)
static
static SCIP_RETCODE colAddCoef ( SCIP_COL col,
BMS_BLKMEM blkmem,
SCIP_SET set,
SCIP_EVENTQUEUE eventqueue,
SCIP_LP lp,
SCIP_ROW row,
SCIP_Real  val,
int  linkpos 
)
static

adds a previously non existing coefficient to an LP column

Parameters
colLP column
blkmemblock memory
setglobal SCIP settings
eventqueueevent queue
lpcurrent LP data
rowLP row
valvalue of coefficient
linkposposition of column in the row's col array, or -1

Definition at line 1649 of file lp.c.

References coefChanged(), colEnsureSize(), colMoveCoef(), SCIP_Row::cols, FALSE, SCIP_Row::index, SCIP_Col::len, SCIP_Col::linkpos, SCIP_Row::linkpos, SCIP_Row::lpcolssorted, SCIP_Col::lppos, SCIP_Row::lppos, SCIP_Col::lprowssorted, SCIP_Row::name, SCIP_Row::nlpcols, SCIP_Col::nlprows, SCIP_Col::nonlprowssorted, NULL, SCIP_Col::nunlinked, SCIP_Row::nunlinked, rowAddCoef(), SCIP_Col::rows, rowSwapCoefs(), SCIP_CALL, SCIP_OKAY, SCIPdebugMessage, SCIPsetIsIntegral(), SCIPsetIsZero(), SCIPsetRound(), SCIPvarGetName(), SCIP_Col::vals, and SCIP_Col::var.

Referenced by rowAddCoef(), rowLink(), SCIPcolAddCoef(), SCIPcolChgCoef(), and SCIPcolIncCoef().

static SCIP_RETCODE colDelCoefPos ( SCIP_COL col,
SCIP_SET set,
SCIP_LP lp,
int  pos 
)
static

deletes coefficient at given position from column

Parameters
colcolumn to be changed
setglobal SCIP settings
lpcurrent LP data
posposition in column vector to delete

Definition at line 1770 of file lp.c.

References coefChanged(), colMoveCoef(), SCIP_Row::cols, SCIP_Col::len, SCIP_Col::linkpos, SCIP_Row::lppos, SCIP_Col::nlprows, NULL, SCIP_Col::nunlinked, SCIP_Col::rows, SCIP_OKAY, and SCIP_Col::var.

Referenced by colChgCoefPos(), rowUnlink(), SCIPcolDelCoef(), and SCIProwDelCoef().

static SCIP_RETCODE colChgCoefPos ( SCIP_COL col,
SCIP_SET set,
SCIP_LP lp,
int  pos,
SCIP_Real  val 
)
static

changes a coefficient at given position of an LP column

Parameters
colLP column
setglobal SCIP settings
lpcurrent LP data
posposition in column vector to change
valvalue of coefficient

Definition at line 1815 of file lp.c.

References coefChanged(), colDelCoefPos(), SCIP_Row::cols, SCIP_Col::linkpos, NULL, SCIP_Col::rows, SCIP_CALL, SCIP_OKAY, SCIPsetIsEQ(), SCIPsetIsIntegral(), SCIPsetIsZero(), SCIPsetRound(), SCIP_Col::vals, and SCIP_Col::var.

Referenced by rowScale(), SCIPcolChgCoef(), SCIPcolIncCoef(), SCIProwChgCoef(), and SCIProwIncCoef().

static void rowAddNorms ( SCIP_ROW row,
SCIP_SET set,
SCIP_COL col,
SCIP_Real  val,
SCIP_Bool  updateidxvals 
)
static

update row norms after addition of coefficient

Parameters
rowLP row
setglobal SCIP settings
colcolumn of added coefficient
valvalue of added coefficient
updateidxvalsupdate min/max idx and min/max val?

Definition at line 1859 of file lp.c.

References SCIP_Col::index, SCIP_Col::lppos, MAX, SCIP_Row::maxidx, SCIP_Row::maxval, MIN, SCIP_Row::minidx, SCIP_Row::minval, NULL, SCIP_Row::nummaxval, SCIP_Row::numminval, SCIP_Row::objprod, REALABS, SCIP_Real, SCIPsetIsGE(), SCIPsetIsGT(), SCIPsetIsLE(), SCIPsetIsLT(), SCIPsetIsZero(), SCIP_Row::sqrnorm, SCIP_Row::sumnorm, and SCIP_Col::unchangedobj.

Referenced by colUpdateAddLP(), rowAddCoef(), rowCalcNorms(), and rowChgCoefPos().

static void rowDelNorms ( SCIP_ROW row,
SCIP_SET set,
SCIP_COL col,
SCIP_Real  val,
SCIP_Bool  forcenormupdate,
SCIP_Bool  updateindex,
SCIP_Bool  updateval 
)
static

update row norms after deletion of coefficient

Parameters
rowLP row
setglobal SCIP settings
colcolumn of deleted coefficient
valvalue of deleted coefficient
forcenormupdateshould the norms be updated even if lppos of column is -1?
updateindexshould the minimal/maximal column index of row be updated?
updatevalshould the minimal/maximal value of row be updated?

Definition at line 1928 of file lp.c.

References FALSE, SCIP_Col::index, SCIP_Col::lppos, MAX, SCIP_Row::maxidx, SCIP_Row::maxval, SCIP_Row::minidx, SCIP_Row::minval, NULL, SCIP_Row::nummaxval, SCIP_Row::numminval, SCIP_Row::objprod, REALABS, SCIP_Real, SCIPsetIsGE(), SCIPsetIsLE(), SCIPsetIsZero(), SCIP_Row::sqrnorm, SCIP_Row::sumnorm, SCIP_Col::unchangedobj, and SCIP_Row::validminmaxidx.

Referenced by colUpdateDelLP(), rowChgCoefPos(), and rowDelCoefPos().

static SCIP_RETCODE rowDelCoefPos ( SCIP_ROW row,
BMS_BLKMEM blkmem,
SCIP_SET set,
SCIP_EVENTQUEUE eventqueue,
SCIP_LP lp,
int  pos 
)
static

deletes coefficient at given position from row

Parameters
rowrow to be changed
blkmemblock memory
setglobal SCIP settings
eventqueueevent queue
lpcurrent LP data
posposition in row vector to delete

Definition at line 2127 of file lp.c.

References coefChanged(), SCIP_Row::cols, FALSE, SCIP_Row::len, SCIP_Row::linkpos, SCIP_Row::lpcolssorted, SCIP_Col::lppos, SCIP_Row::name, SCIP_Row::nlocks, SCIP_Row::nlpcols, NULL, SCIP_Row::nunlinked, rowDelNorms(), rowEventCoefChanged(), rowMoveCoef(), SCIP_CALL, SCIP_INVALIDDATA, SCIP_OKAY, SCIP_Real, SCIPerrorMessage, TRUE, and SCIP_Row::vals.

Referenced by colUnlink(), rowChgCoefPos(), SCIPcolDelCoef(), and SCIProwDelCoef().

static SCIP_RETCODE rowChgCoefPos ( SCIP_ROW row,
BMS_BLKMEM blkmem,
SCIP_SET set,
SCIP_EVENTQUEUE eventqueue,
SCIP_LP lp,
int  pos,
SCIP_Real  val 
)
static

changes a coefficient at given position of an LP row

Parameters
rowLP row
blkmemblock memory
setglobal SCIP settings
eventqueueevent queue
lpcurrent LP data
posposition in row vector to change
valvalue of coefficient

Definition at line 2187 of file lp.c.

References coefChanged(), SCIP_Row::cols, FALSE, SCIP_Row::integral, SCIP_Row::name, SCIP_Row::nlocks, NULL, rowAddNorms(), rowDelCoefPos(), rowDelNorms(), rowEventCoefChanged(), SCIP_CALL, SCIP_INVALIDDATA, SCIP_OKAY, SCIP_Real, SCIPcolIsIntegral(), SCIPerrorMessage, SCIPsetIsEQ(), SCIPsetIsIntegral(), SCIPsetIsZero(), SCIPsetRound(), TRUE, and SCIP_Row::vals.

Referenced by rowScale(), SCIPcolChgCoef(), SCIPcolIncCoef(), SCIProwChgCoef(), and SCIProwIncCoef().

static SCIP_RETCODE rowSideChanged ( SCIP_ROW row,
SCIP_SET set,
SCIP_LP lp,
SCIP_SIDETYPE  sidetype 
)
static

notifies LP row, that its sides were changed

Parameters
rowLP row
setglobal SCIP settings
lpcurrent LP data
sidetypetype of side: left or right hand side

Definition at line 2243 of file lp.c.

References SCIP_Lp::chgrows, ensureChgrowsSize(), FALSE, SCIP_Lp::flushed, SCIP_Row::lhschanged, SCIP_Row::lpipos, SCIP_Lp::nchgrows, NULL, SCIP_Row::rhschanged, SCIP_CALL, SCIP_INVALIDDATA, SCIP_OKAY, SCIP_SIDETYPE_LEFT, SCIP_SIDETYPE_RIGHT, SCIPABORT, SCIPerrorMessage, and TRUE.

Referenced by SCIProwChgConstant(), SCIProwChgLhs(), and SCIProwChgRhs().

static SCIP_RETCODE colLink ( SCIP_COL col,
BMS_BLKMEM blkmem,
SCIP_SET set,
SCIP_EVENTQUEUE eventqueue,
SCIP_LP lp 
)
static

insert column coefficients in corresponding rows

Parameters
colcolumn data
blkmemblock memory
setglobal SCIP settings
eventqueueevent queue
lpcurrent LP data

Definition at line 2296 of file lp.c.

References checkLinks, SCIP_Row::cols, SCIP_Col::linkpos, SCIP_Row::linkpos, SCIP_Col::nlprows, NULL, SCIP_Col::nunlinked, rowAddCoef(), SCIP_Col::rows, SCIP_CALL, SCIP_OKAY, SCIPdebugMessage, SCIPsetIsZero(), SCIPvarGetName(), SCIP_Col::vals, and SCIP_Col::var.

Referenced by lpFlushAddCols().

static SCIP_RETCODE colUnlink ( SCIP_COL col,
BMS_BLKMEM blkmem,
SCIP_SET set,
SCIP_EVENTQUEUE eventqueue,
SCIP_LP lp 
)
static

removes column coefficients from corresponding rows

Parameters
colcolumn data
blkmemblock memory
setglobal SCIP settings
eventqueueevent queue
lpcurrent LP data

Definition at line 2340 of file lp.c.

References checkLinks, SCIP_Row::cols, SCIP_Col::len, SCIP_Col::linkpos, NULL, SCIP_Col::nunlinked, rowDelCoefPos(), SCIP_Col::rows, SCIP_CALL, SCIP_OKAY, SCIPdebugMessage, SCIPvarGetName(), and SCIP_Col::var.

Referenced by SCIPcolFree().

static SCIP_RETCODE rowLink ( SCIP_ROW row,
BMS_BLKMEM blkmem,
SCIP_SET set,
SCIP_EVENTQUEUE eventqueue,
SCIP_LP lp 
)
static

insert row coefficients in corresponding columns

Parameters
rowrow data
blkmemblock memory
setglobal SCIP settings
eventqueueevent queue
lpcurrent LP data

Definition at line 2379 of file lp.c.

References checkLinks, colAddCoef(), SCIP_Row::cols, SCIP_Col::linkpos, SCIP_Row::linkpos, SCIP_Row::name, SCIP_Row::nlpcols, NULL, SCIP_Row::nunlinked, SCIP_Col::rows, SCIP_CALL, SCIP_OKAY, SCIPdebugMessage, SCIPsetIsZero(), and SCIP_Row::vals.

Referenced by lpFlushAddRows().

static SCIP_RETCODE rowUnlink ( SCIP_ROW row,
SCIP_SET set,
SCIP_LP lp 
)
static

removes row coefficients from corresponding columns

Parameters
rowrow data
setglobal SCIP settings
lpcurrent LP data

Definition at line 2422 of file lp.c.

References colDelCoefPos(), SCIP_Row::cols, SCIP_Row::len, SCIP_Row::linkpos, SCIP_Row::name, NULL, SCIP_Row::nunlinked, SCIP_Col::rows, SCIP_CALL, SCIP_OKAY, and SCIPdebugMessage.

Referenced by SCIProwFree().

static SCIP_RETCODE lpSetIntpar ( SCIP_LP lp,
SCIP_LPPARAM  lpparam,
int  value,
SCIP_Bool success 
)
static

sets parameter of type int in LP solver, ignoring unknown parameters

Parameters
lpcurrent LP data
lpparamLP parameter
valuevalue to set parameter to
successpointer to store whether the parameter was successfully changed

Definition at line 2461 of file lp.c.

References FALSE, SCIP_Lp::lpi, NULL, SCIP_OKAY, SCIP_PARAMETERUNKNOWN, SCIPlpiSetIntpar(), and TRUE.

Referenced by lpSetBoolpar(), lpSetFastmip(), lpSetIterationLimit(), lpSetPricing(), lpSetThreads(), lpSetTiming(), and SCIPlpCreate().

static SCIP_RETCODE lpSetBoolpar ( SCIP_LP lp,
SCIP_LPPARAM  lpparam,
SCIP_Bool  value,
SCIP_Bool success 
)
static

sets parameter of type SCIP_Bool in LP solver, ignoring unknown parameters

Parameters
lpcurrent LP data
lpparamLP parameter
valuevalue to set parameter to
successpointer to store whether the parameter was successfully changed

Definition at line 2488 of file lp.c.

References lpSetIntpar().

Referenced by lpSetFromscratch(), lpSetLPInfo(), lpSetPresolving(), lpSetScaling(), and SCIPlpCreate().

static SCIP_RETCODE lpSetRealpar ( SCIP_LP lp,
SCIP_LPPARAM  lpparam,
SCIP_Real  value,
SCIP_Bool success 
)
static

sets parameter of type SCIP_Real in LP solver, ignoring unknown parameters

Parameters
lpcurrent LP data
lpparamLP parameter
valuevalue to set parameter to
successpointer to store whether the parameter was successfully changed

Definition at line 2500 of file lp.c.

References FALSE, SCIP_Lp::lpi, NULL, SCIP_OKAY, SCIP_PARAMETERUNKNOWN, SCIPlpiSetRealpar(), and TRUE.

Referenced by lpAlgorithm(), lpSetBarrierconvtol(), lpSetConditionLimit(), lpSetDualfeastol(), lpSetFeastol(), lpSetRowrepswitch(), lpSetUobjlim(), and SCIPlpCreate().

static SCIP_RETCODE lpCheckIntpar ( SCIP_LP lp,
SCIP_LPPARAM  lpparam,
int  value 
)
static

checks, that parameter of type int in LP solver has the given value, ignoring unknown parameters

Parameters
lpcurrent LP data
lpparamLP parameter
valuevalue parameter should have

Definition at line 2528 of file lp.c.

References SCIP_Lp::lpi, NULL, SCIP_OKAY, SCIP_PARAMETERUNKNOWN, and SCIPlpiGetIntpar().

Referenced by lpCheckBoolpar(), lpSetFastmip(), lpSetIterationLimit(), lpSetPricing(), lpSetThreads(), and lpSetTiming().

static SCIP_RETCODE lpCheckBoolpar ( SCIP_LP lp,
SCIP_LPPARAM  lpparam,
SCIP_Bool  value 
)
static

checks, that parameter of type SCIP_Bool in LP solver has the given value, ignoring unknown parameters

Parameters
lpcurrent LP data
lpparamLP parameter
valuevalue parameter should have

Definition at line 2553 of file lp.c.

References lpCheckIntpar().

Referenced by lpSetFromscratch(), lpSetLPInfo(), lpSetPresolving(), and lpSetScaling().

static SCIP_RETCODE lpCheckRealpar ( SCIP_LP lp,
SCIP_LPPARAM  lpparam,
SCIP_Real  value 
)
static

checks, that parameter of type SCIP_Real in LP solver has the given value, ignoring unknown parameters

Parameters
lpcurrent LP data
lpparamLP parameter
valuevalue parameter should have

Definition at line 2564 of file lp.c.

References SCIP_Lp::lpi, NULL, SCIP_OKAY, SCIP_PARAMETERUNKNOWN, SCIP_Real, and SCIPlpiGetRealpar().

Referenced by lpSetBarrierconvtol(), lpSetConditionLimit(), lpSetDualfeastol(), lpSetFeastol(), lpSetRowrepswitch(), and lpSetUobjlim().

static SCIP_RETCODE lpSetUobjlim ( SCIP_LP lp,
SCIP_SET set,
SCIP_Real  uobjlim 
)
static

sets the upper objective limit of the LP solver

Parameters
lpcurrent LP data
setglobal SCIP settings
uobjlimnew feasibility tolerance

Definition at line 2597 of file lp.c.

References FALSE, lpCheckRealpar(), lpCutoffDisabled, SCIP_Lp::lpi, SCIP_Lp::lpiuobjlim, SCIP_Lp::lpobjval, lpSetRealpar(), SCIP_Lp::lpsolstat, NULL, SCIP_Lp::primalfeasible, SCIP_Bool, SCIP_CALL, SCIP_INVALID, SCIP_LPPAR_UOBJLIM, SCIP_LPSOLSTAT_NOTSOLVED, SCIP_OKAY, SCIPlpiInfinity(), SCIPsetIsInfinity(), and SCIP_Lp::solved.

Referenced by lpSolveStable().

static SCIP_RETCODE lpSetFeastol ( SCIP_LP lp,
SCIP_Real  feastol,
SCIP_Bool success 
)
static

sets the feasibility tolerance of the LP solver

Parameters
lpcurrent LP data
feastolnew feasibility tolerance
successpointer to store whether the parameter was successfully changed

Definition at line 2639 of file lp.c.

References FALSE, lpCheckRealpar(), SCIP_Lp::lpifeastol, SCIP_Lp::lpobjval, lpSetRealpar(), SCIP_Lp::lpsolstat, SCIP_Lp::nrows, NULL, SCIP_Lp::primalfeasible, SCIP_CALL, SCIP_INVALID, SCIP_LPPAR_FEASTOL, SCIP_LPSOLSTAT_NOTSOLVED, SCIP_OKAY, and SCIP_Lp::solved.

Referenced by lpSolveStable().

static SCIP_RETCODE lpSetDualfeastol ( SCIP_LP lp,
SCIP_Real  dualfeastol,
SCIP_Bool success 
)
static

sets the reduced costs feasibility tolerance of the LP solver

Parameters
lpcurrent LP data
dualfeastolnew reduced costs feasibility tolerance
successpointer to store whether the parameter was successfully changed

Definition at line 2675 of file lp.c.

References SCIP_Lp::dualfeasible, FALSE, lpCheckRealpar(), SCIP_Lp::lpidualfeastol, SCIP_Lp::lpobjval, lpSetRealpar(), SCIP_Lp::lpsolstat, SCIP_Lp::nrows, NULL, SCIP_CALL, SCIP_INVALID, SCIP_LPPAR_DUALFEASTOL, SCIP_LPSOLSTAT_NOTSOLVED, SCIP_OKAY, and SCIP_Lp::solved.

Referenced by lpSolveStable().

static SCIP_RETCODE lpSetBarrierconvtol ( SCIP_LP lp,
SCIP_Real  barrierconvtol,
SCIP_Bool success 
)
static

sets the convergence tolerance used in barrier algorithm of the LP solver

Parameters
lpcurrent LP data
barrierconvtolnew convergence tolerance used in barrier algorithm
successpointer to store whether the parameter was successfully changed

Definition at line 2711 of file lp.c.

References SCIP_Lp::dualfeasible, FALSE, SCIP_Lp::lastlpalgo, lpCheckRealpar(), SCIP_Lp::lpibarrierconvtol, SCIP_Lp::lpobjval, lpSetRealpar(), SCIP_Lp::lpsolstat, SCIP_Lp::nrows, NULL, SCIP_CALL, SCIP_INVALID, SCIP_LPALGO_BARRIER, SCIP_LPALGO_BARRIERCROSSOVER, SCIP_LPPAR_BARRIERCONVTOL, SCIP_LPSOLSTAT_NOTSOLVED, SCIP_OKAY, and SCIP_Lp::solved.

Referenced by lpSolveStable().

static SCIP_RETCODE lpSetFromscratch ( SCIP_LP lp,
SCIP_Bool  fromscratch,
SCIP_Bool success 
)
static

sets the FROMSCRATCH setting of the LP solver

Parameters
lpcurrent LP data
fromscratchnew FROMSCRATCH setting
successpointer to store whether the parameter was successfully changed

Definition at line 2748 of file lp.c.

References FALSE, lpCheckBoolpar(), SCIP_Lp::lpifromscratch, lpSetBoolpar(), NULL, SCIP_CALL, SCIP_LPPAR_FROMSCRATCH, and SCIP_OKAY.

Referenced by lpSolveStable(), and SCIPlpSolveAndEval().

static SCIP_RETCODE lpSetFastmip ( SCIP_LP lp,
int  fastmip,
SCIP_Bool success 
)
static

sets the FASTMIP setting of the LP solver

Parameters
lpcurrent LP data
fastmipnew FASTMIP setting
successpointer to store whether the parameter was successfully changed

Definition at line 2773 of file lp.c.

References FALSE, lpCheckIntpar(), SCIP_Lp::lpifastmip, lpSetIntpar(), NULL, SCIP_CALL, SCIP_LPPAR_FASTMIP, and SCIP_OKAY.

Referenced by lpSolveStable().

static SCIP_RETCODE lpSetScaling ( SCIP_LP lp,
SCIP_Bool  scaling,
SCIP_Bool success 
)
static

sets the SCALING setting of the LP solver

Parameters
lpcurrent LP data
scalingnew SCALING setting
successpointer to store whether the parameter was successfully changed

Definition at line 2799 of file lp.c.

References FALSE, lpCheckBoolpar(), SCIP_Lp::lpiscaling, lpSetBoolpar(), NULL, SCIP_CALL, SCIP_LPPAR_SCALING, and SCIP_OKAY.

Referenced by lpSolveStable().

static SCIP_RETCODE lpSetThreads ( SCIP_LP lp,
int  threads,
SCIP_Bool success 
)
static

sets the number of THREADS of the LP solver

Parameters
lpcurrent LP data
threadsnew number of threads used to solve the LP
successpointer to store whether the parameter was successfully changed

Definition at line 2824 of file lp.c.

References FALSE, lpCheckIntpar(), SCIP_Lp::lpithreads, lpSetIntpar(), NULL, SCIP_CALL, SCIP_LPPAR_THREADS, and SCIP_OKAY.

Referenced by lpSolveStable().

static SCIP_RETCODE lpSetPresolving ( SCIP_LP lp,
SCIP_Bool  presolving,
SCIP_Bool success 
)
static

sets the PRESOLVING setting of the LP solver

Parameters
lpcurrent LP data
presolvingnew PRESOLVING setting
successpointer to store whether the parameter was successfully changed

Definition at line 2849 of file lp.c.

References FALSE, lpCheckBoolpar(), SCIP_Lp::lpipresolving, lpSetBoolpar(), NULL, SCIP_CALL, SCIP_LPPAR_PRESOLVING, and SCIP_OKAY.

Referenced by lpSolveStable().

static SCIP_RETCODE lpSetRowrepswitch ( SCIP_LP lp,
SCIP_Real  rowrepswitch,
SCIP_Bool success 
)
static

sets the ROWREPSWITCH setting of the LP solver

Parameters
lpcurrent LP data
rowrepswitchnew ROWREPSWITCH value
successpointer to store whether the parameter was successfully changed

Definition at line 2874 of file lp.c.

References FALSE, lpCheckRealpar(), SCIP_Lp::lpirowrepswitch, lpSetRealpar(), NULL, SCIP_CALL, SCIP_LPPAR_ROWREPSWITCH, and SCIP_OKAY.

Referenced by lpSolveStable().

static SCIP_RETCODE lpSetIterationLimit ( SCIP_LP lp,
int  itlim 
)
static

sets the iteration limit of the LP solver

Parameters
lpcurrent LP data
itlimmaximal number of LP iterations to perform, or -1 for no limit

Definition at line 2899 of file lp.c.

References FALSE, lpCheckIntpar(), SCIP_Lp::lpiitlim, SCIP_Lp::lpobjval, lpSetIntpar(), SCIP_Lp::lpsolstat, NULL, SCIP_Bool, SCIP_CALL, SCIP_INVALID, SCIP_LPPAR_LPITLIM, SCIP_LPSOLSTAT_NOTSOLVED, SCIP_OKAY, and SCIP_Lp::solved.

Referenced by lpSolveStable(), and SCIPlpEndDive().

static SCIP_RETCODE lpSetPricing ( SCIP_LP lp,
SCIP_PRICING  pricing 
)
static

sets the pricing strategy of the LP solver

Parameters
lpcurrent LP data
pricingpricing strategy

Definition at line 2935 of file lp.c.

References lpCheckIntpar(), SCIP_Lp::lpipricing, lpSetIntpar(), NULL, SCIP_Bool, SCIP_CALL, SCIP_LPPAR_PRICING, and SCIP_OKAY.

Referenced by lpSetPricingChar().

static SCIP_RETCODE lpSetPricingChar ( SCIP_LP lp,
char  pricingchar 
)
static

sets the pricing strategy of the LP solver (given the character representation of the strategy)

Parameters
lpcurrent LP data
pricingcharcharacter representing the pricing strategy

Definition at line 2958 of file lp.c.

References lpSetPricing(), SCIP_CALL, SCIP_INVALIDDATA, SCIP_OKAY, SCIP_PRICING_AUTO, SCIP_PRICING_DEVEX, SCIP_PRICING_FULL, SCIP_PRICING_LPIDEFAULT, SCIP_PRICING_PARTIAL, SCIP_PRICING_STEEP, SCIP_PRICING_STEEPQSTART, and SCIPerrorMessage.

Referenced by lpSolveStable().

static SCIP_RETCODE lpSetLPInfo ( SCIP_LP lp,
SCIP_Bool  lpinfo 
)
static

sets the verbosity of the LP solver

Parameters
lpcurrent LP data
lpinfoshould the LP solver display status messages?

Definition at line 3000 of file lp.c.

References lpCheckBoolpar(), SCIP_Lp::lpilpinfo, lpSetBoolpar(), NULL, SCIP_Bool, SCIP_CALL, SCIP_LPPAR_LPINFO, and SCIP_OKAY.

Referenced by lpSolveStable().

static SCIP_RETCODE lpSetConditionLimit ( SCIP_LP lp,
SCIP_Real  condlimit,
SCIP_Bool success 
)
static

sets the CONDITIONLIMIT setting of the LP solver

Parameters
lpcurrent LP data
condlimitnew CONDITIONLIMIT value
successpointer to store whether the parameter was successfully changed

Definition at line 3023 of file lp.c.

References FALSE, lpCheckRealpar(), SCIP_Lp::lpiconditionlimit, lpSetRealpar(), NULL, SCIP_CALL, SCIP_LPPAR_CONDITIONLIMIT, and SCIP_OKAY.

Referenced by lpSolveStable().

static SCIP_RETCODE lpSetTiming ( SCIP_LP lp,
SCIP_CLOCKTYPE  timing,
SCIP_Bool  enabled,
SCIP_Bool success 
)
static

sets the type of timer of the LP solver

Parameters
lpcurrent LP data
timingnew timing value
enabledis timing enabled?
successpointer to store whether the parameter was successfully changed

Definition at line 3048 of file lp.c.

References FALSE, lpCheckIntpar(), SCIP_Lp::lpitiming, lpSetIntpar(), NULL, SCIP_CALL, SCIP_CLOCKTYPE_CPU, SCIP_CLOCKTYPE_WALL, SCIP_LPPAR_TIMING, and SCIP_OKAY.

Referenced by lpSolveStable().

SCIP_RETCODE SCIPcolCreate ( SCIP_COL **  col,
BMS_BLKMEM blkmem,
SCIP_SET set,
SCIP_STAT stat,
SCIP_VAR var,
int  len,
SCIP_ROW **  rows,
SCIP_Real vals,
SCIP_Bool  removable 
)

creates an LP column

Parameters
colpointer to column data
blkmemblock memory
setglobal SCIP settings
statproblem statistics
varvariable, this column represents
lennumber of nonzeros in the column
rowsarray with rows of column entries
valsarray with coefficients of column entries
removableshould the column be removed from the LP due to aging or cleanup?

Definition at line 3086 of file lp.c.

References BMSallocBlockMemory, BMSallocBlockMemoryArray, BMSduplicateBlockMemoryArray, FALSE, SCIP_Stat::ncolidx, NULL, SCIP_Var::obj, SCIP_ALLOC, SCIP_BASESTAT_ZERO, SCIP_INVALID, SCIP_OKAY, SCIPsetIsZero(), SCIPvarGetLbLazy(), SCIPvarGetLbLocal(), SCIPvarGetObj(), SCIPvarGetProbindex(), SCIPvarGetUbLazy(), SCIPvarGetUbLocal(), SCIPvarGetUnchangedObj(), SCIPvarIsIntegral(), and TRUE.

Referenced by SCIPvarColumn().

SCIP_RETCODE SCIPcolFree ( SCIP_COL **  col,
BMS_BLKMEM blkmem,
SCIP_SET set,
SCIP_EVENTQUEUE eventqueue,
SCIP_LP lp 
)

frees an LP column

Parameters
colpointer to LP column
blkmemblock memory
setglobal SCIP settings
eventqueueevent queue
lpcurrent LP data

Definition at line 3183 of file lp.c.

References BMSfreeBlockMemory, BMSfreeBlockMemoryArrayNull, BMSfreeBlockMemoryNull, colUnlink(), NULL, SCIP_CALL, SCIP_OKAY, SCIP_VARSTATUS_COLUMN, and SCIPvarGetStatus().

Referenced by SCIPvarLoose(), and varFree().

void SCIPcolPrint ( SCIP_COL col,
SCIP_MESSAGEHDLR messagehdlr,
FILE *  file 
)

output column to file stream

Parameters
colLP column
messagehdlrmessage handler
fileoutput file (or NULL for standard output)

Definition at line 3213 of file lp.c.

References SCIP_Col::lb, SCIP_Col::len, SCIP_Row::name, NULL, SCIP_Col::obj, SCIP_Col::rows, SCIPmessageFPrintInfo(), SCIP_Col::ub, SCIP_Col::vals, and SCIP_Col::var.

SCIP_RETCODE SCIPcolAddCoef ( SCIP_COL col,
BMS_BLKMEM blkmem,
SCIP_SET set,
SCIP_EVENTQUEUE eventqueue,
SCIP_LP lp,
SCIP_ROW row,
SCIP_Real  val 
)

adds a previously non existing coefficient to an LP column

Parameters
colLP column
blkmemblock memory
setglobal SCIP settings
eventqueueevent queue
lpcurrent LP data
rowLP row
valvalue of coefficient

Definition at line 3253 of file lp.c.

References checkLinks, colAddCoef(), SCIP_Lp::diving, NULL, SCIP_CALL, and SCIP_OKAY.

SCIP_RETCODE SCIPcolDelCoef ( SCIP_COL col,
BMS_BLKMEM blkmem,
SCIP_SET set,
SCIP_EVENTQUEUE eventqueue,
SCIP_LP lp,
SCIP_ROW row 
)

deletes existing coefficient from column

Parameters
colcolumn to be changed
blkmemblock memory
setglobal SCIP settings
eventqueueevent queue
lpcurrent LP data
rowcoefficient to be deleted

Definition at line 3274 of file lp.c.

References checkLinks, colDelCoefPos(), SCIP_Row::cols, SCIP_Row::cols_index, colSearchCoef(), SCIP_Lp::diving, SCIP_Col::index, SCIP_Col::linkpos, SCIP_Row::name, NULL, rowDelCoefPos(), SCIP_Col::rows, SCIP_CALL, SCIP_INVALIDDATA, SCIP_OKAY, SCIPerrorMessage, SCIPsetIsEQ(), SCIPvarGetName(), SCIP_Col::vals, SCIP_Row::vals, and SCIP_Col::var.

SCIP_RETCODE SCIPcolChgCoef ( SCIP_COL col,
BMS_BLKMEM blkmem,
SCIP_SET set,
SCIP_EVENTQUEUE eventqueue,
SCIP_LP lp,
SCIP_ROW row,
SCIP_Real  val 
)

changes or adds a coefficient to an LP column

Parameters
colLP column
blkmemblock memory
setglobal SCIP settings
eventqueueevent queue
lpcurrent LP data
rowLP row
valvalue of coefficient

Definition at line 3319 of file lp.c.

References checkLinks, colAddCoef(), colChgCoefPos(), SCIP_Row::cols, SCIP_Row::cols_index, colSearchCoef(), SCIP_Lp::diving, SCIP_Col::index, SCIP_Col::linkpos, NULL, rowChgCoefPos(), SCIP_Col::rows, SCIP_CALL, SCIP_OKAY, SCIPsetIsEQ(), SCIP_Col::vals, and SCIP_Row::vals.

SCIP_RETCODE SCIPcolIncCoef ( SCIP_COL col,
BMS_BLKMEM blkmem,
SCIP_SET set,
SCIP_EVENTQUEUE eventqueue,
SCIP_LP lp,
SCIP_ROW row,
SCIP_Real  incval 
)

increases value of an existing or non-existing coefficient in an LP column

Parameters
colLP column
blkmemblock memory
setglobal SCIP settings
eventqueueevent queue
lpcurrent LP data
rowLP row
incvalvalue to add to the coefficient

Definition at line 3370 of file lp.c.

References checkLinks, colAddCoef(), colChgCoefPos(), SCIP_Row::cols, SCIP_Row::cols_index, colSearchCoef(), SCIP_Lp::diving, SCIP_Col::index, SCIP_Col::linkpos, NULL, rowChgCoefPos(), SCIP_Col::rows, SCIP_CALL, SCIP_OKAY, SCIPsetIsEQ(), SCIPsetIsZero(), SCIP_Col::vals, and SCIP_Row::vals.

static SCIP_RETCODE insertColChgcols ( SCIP_COL col,
SCIP_SET set,
SCIP_LP lp 
)
static

insert column in the chgcols list (if not already there)

Parameters
colLP column to change
setglobal SCIP settings
lpcurrent LP data

Definition at line 3425 of file lp.c.

References SCIP_Lp::chgcols, ensureChgcolsSize(), FALSE, SCIP_Lp::flushed, SCIP_Col::lbchanged, SCIP_Lp::nchgcols, SCIP_Col::objchanged, SCIP_CALL, SCIP_OKAY, and SCIP_Col::ubchanged.

Referenced by SCIPcolChgLb(), SCIPcolChgObj(), SCIPcolChgUb(), and updateLazyBounds().

static SCIP_Bool isNewValueUnreliable ( SCIP_SET set,
SCIP_Real  newvalue,
SCIP_Real  oldvalue 
)
static

Is the new value reliable or may we have cancellation?

Note
: Here we only consider cancellations which can occur during decreasing the oldvalue to newvalue; not the cancellations which can occur during increasing the oldvalue to the newvalue
Parameters
setglobal SCIP settings
newvaluenew value
oldvalueold reliable value

Definition at line 3450 of file lp.c.

References NULL, REALABS, SCIP_INVALID, SCIP_Real, and SCIPsetIsZero().

Referenced by lpUpdateObjNorms().

static void lpUpdateObjNorms ( SCIP_LP lp,
SCIP_SET set,
SCIP_Real  oldobj,
SCIP_Real  newobj 
)
static

update norms of objective function vector

Parameters
lpcurrent LP data
setglobal SCIP settings
oldobjold objective value of variable
newobjnew objective value of variable

Definition at line 3468 of file lp.c.

References isNewValueUnreliable(), MAX, SCIP_Lp::objsqrnorm, SCIP_Lp::objsqrnormunreliable, SCIP_Lp::objsumnorm, REALABS, SCIP_Real, SCIPsetIsGE(), SCIPsetIsLT(), and TRUE.

Referenced by lpDelColset(), SCIPcolChgObj(), SCIPlpAddCol(), and SCIPlpShrinkCols().

SCIP_RETCODE SCIPcolChgLb ( SCIP_COL col,
SCIP_SET set,
SCIP_LP lp,
SCIP_Real  newlb 
)

changes lower bound of column

Parameters
colLP column to change
setglobal SCIP settings
lpcurrent LP data
newlbnew lower bound value

Definition at line 3563 of file lp.c.

References FALSE, SCIP_Lp::flushed, insertColChgcols(), SCIP_Col::lb, SCIP_Col::lbchanged, SCIP_Col::lpipos, SCIP_Lp::nchgcols, NULL, SCIP_Col::obj, SCIP_CALL, SCIP_OKAY, SCIP_VARSTATUS_COLUMN, SCIPdebugMessage, SCIPsetIsEQ(), SCIPsetIsZero(), SCIPvarGetCol(), SCIPvarGetName(), SCIPvarGetStatus(), TRUE, and SCIP_Col::var.

Referenced by SCIPeventProcess(), SCIPlpEndDive(), and SCIPvarChgLbDive().

SCIP_RETCODE SCIPcolChgUb ( SCIP_COL col,
SCIP_SET set,
SCIP_LP lp,
SCIP_Real  newub 
)

changes upper bound of column

Parameters
colLP column to change
setglobal SCIP settings
lpcurrent LP data
newubnew upper bound value

Definition at line 3608 of file lp.c.

References FALSE, SCIP_Lp::flushed, insertColChgcols(), SCIP_Col::lpipos, SCIP_Lp::nchgcols, NULL, SCIP_Col::obj, SCIP_CALL, SCIP_OKAY, SCIP_VARSTATUS_COLUMN, SCIPdebugMessage, SCIPsetIsEQ(), SCIPsetIsZero(), SCIPvarGetCol(), SCIPvarGetName(), SCIPvarGetStatus(), TRUE, SCIP_Col::ub, SCIP_Col::ubchanged, and SCIP_Col::var.

Referenced by SCIPeventProcess(), SCIPlpEndDive(), and SCIPvarChgUbDive().

SCIP_Real SCIPcolCalcRedcost ( SCIP_COL col,
SCIP_Real dualsol 
)

calculates the reduced costs of a column using the given dual solution vector

Parameters
colLP column
dualsoldual solution vector for current LP rows

Definition at line 3653 of file lp.c.

References SCIP_Col::linkpos, SCIP_Row::lppos, SCIP_Col::nlprows, NULL, SCIP_Col::nunlinked, SCIP_Col::obj, SCIP_Col::rows, SCIP_Real, SCIP_VARSTATUS_COLUMN, SCIPvarGetCol(), SCIPvarGetStatus(), SCIP_Col::vals, and SCIP_Col::var.

Referenced by undoBdchgsDualsol().

static SCIP_Real colCalcInternalRedcost ( SCIP_COL col)
static

calculates the reduced costs of a column using the dual solution stored in the rows

Parameters
colLP column

Definition at line 3705 of file lp.c.

References SCIP_Row::dualsol, SCIP_Col::linkpos, SCIP_Row::lppos, SCIP_Col::nlprows, NULL, SCIP_Col::nunlinked, SCIP_Col::obj, SCIP_Col::rows, SCIP_INVALID, SCIP_Real, SCIP_VARSTATUS_COLUMN, SCIPvarGetCol(), SCIPvarGetStatus(), SCIP_Col::vals, and SCIP_Col::var.

Referenced by SCIPcolGetRedcost().

SCIP_Real SCIPcolGetRedcost ( SCIP_COL col,
SCIP_STAT stat,
SCIP_LP lp 
)

gets the reduced costs of a column in last LP or after recalculation

Parameters
colLP column
statproblem statistics
lpcurrent LP data

Definition at line 3758 of file lp.c.

References colCalcInternalRedcost(), SCIP_Stat::lpcount, NULL, SCIP_Col::redcost, SCIP_INVALID, SCIP_Col::validredcostlp, and SCIP_Lp::validsollp.

Referenced by SCIPcolGetFeasibility(), SCIPgetColRedcost(), SCIPprobUpdateBestRootSol(), SCIPvarGetImplRedcost(), and SCIPvarGetRedcost().

SCIP_Real SCIPcolGetFeasibility ( SCIP_COL col,
SCIP_SET set,
SCIP_STAT stat,
SCIP_LP lp 
)

gets the feasibility of (the dual row of) a column in last LP or after recalculation

Parameters
colLP column
setglobal SCIP settings
statproblem statistics
lpcurrent LP data

Definition at line 3782 of file lp.c.

References SCIP_Col::lb, SCIP_Stat::lpcount, NULL, REALABS, SCIP_Real, SCIPcolGetRedcost(), SCIPsetInfinity(), SCIPsetIsEQ(), SCIPsetIsNegative(), SCIPsetIsPositive(), SCIP_Col::ub, and SCIP_Lp::validsollp.

Referenced by SCIPpricestoreAddProbVars().

SCIP_Real SCIPcolCalcFarkasCoef ( SCIP_COL col,
SCIP_Real dualfarkas 
)

calculates the Farkas coefficient y^T A_i of a column i using the given dual Farkas vector y

Parameters
colLP column
dualfarkasdense dual Farkas vector for current LP rows

Definition at line 3836 of file lp.c.

References SCIP_Col::linkpos, SCIP_Row::lppos, SCIP_Col::nlprows, NULL, SCIP_Col::nunlinked, SCIP_Col::rows, SCIP_Real, SCIP_VARSTATUS_COLUMN, SCIPvarGetCol(), SCIPvarGetStatus(), SCIP_Col::vals, and SCIP_Col::var.

static SCIP_Real colCalcInternalFarkasCoef ( SCIP_COL col)
static

gets the Farkas coefficient y^T A_i of a column i in last LP (which must be infeasible)

Parameters
colLP column

Definition at line 3888 of file lp.c.

References SCIP_Row::dualfarkas, SCIP_Col::linkpos, SCIP_Row::lppos, SCIP_Col::nlprows, NULL, SCIP_Col::nunlinked, SCIP_Col::rows, SCIP_INVALID, SCIP_Real, SCIP_VARSTATUS_COLUMN, SCIPvarGetCol(), SCIPvarGetStatus(), SCIP_Col::vals, and SCIP_Col::var.

Referenced by SCIPcolGetFarkasCoef().

SCIP_Real SCIPcolGetFarkasCoef ( SCIP_COL col,
SCIP_STAT stat,
SCIP_LP lp 
)

gets the Farkas coefficient of a column in last LP (which must be infeasible)

Parameters
colLP column
statproblem statistics
lpcurrent LP data

Definition at line 3941 of file lp.c.

References colCalcInternalFarkasCoef(), SCIP_Col::farkascoef, SCIP_Stat::lpcount, NULL, SCIP_INVALID, SCIP_Col::validfarkaslp, and SCIP_Lp::validfarkaslp.

Referenced by SCIPcolGetFarkasValue(), and SCIPgetColFarkasCoef().

SCIP_Real SCIPcolGetFarkasValue ( SCIP_COL col,
SCIP_STAT stat,
SCIP_LP lp 
)

gets the Farkas value of a column in last LP (which must be infeasible), i.e. the Farkas coefficient y^T A_i times the best bound for this coefficient, i.e. max{y^T A_i x_i | lb <= x_i <= ub}

Parameters
colLP column
statproblem statistics
lpcurrent LP data

Definition at line 3967 of file lp.c.

References SCIP_Col::lb, NULL, SCIP_Real, SCIPcolGetFarkasCoef(), and SCIP_Col::ub.

Referenced by SCIPpricestoreAddProbVars().

SCIP_RETCODE SCIPlpStartStrongbranch ( SCIP_LP lp)

start strong branching - call before any strong branching

Parameters
lpLP data

Definition at line 3986 of file lp.c.

References SCIP_Lp::lpi, NULL, SCIP_CALL, SCIP_OKAY, SCIPdebugMessage, SCIPlpiStartStrongbranch(), SCIP_Lp::strongbranching, and TRUE.

Referenced by SCIPstartStrongbranch().

SCIP_RETCODE SCIPlpEndStrongbranch ( SCIP_LP lp)

end strong branching - call after any strong branching

Parameters
lpLP data

Definition at line 4001 of file lp.c.

References FALSE, SCIP_Lp::lpi, NULL, SCIP_CALL, SCIP_OKAY, SCIPdebugMessage, SCIPlpiEndStrongbranch(), and SCIP_Lp::strongbranching.

Referenced by SCIPendStrongbranch().

void SCIPcolSetStrongbranchData ( SCIP_COL col,
SCIP_SET set,
SCIP_STAT stat,
SCIP_LP lp,
SCIP_Real  lpobjval,
SCIP_Real  primsol,
SCIP_Real  sbdown,
SCIP_Real  sbup,
SCIP_Bool  sbdownvalid,
SCIP_Bool  sbupvalid,
SCIP_Longint  iter,
int  itlim 
)

sets strong branching information for a column variable

Parameters
colLP column
setglobal SCIP settings
statdynamic problem statistics
lpLP data
lpobjvalobjective value of the current LP
primsolprimal solution value of the column in the current LP
sbdowndual bound after branching column down
sbupdual bound after branching column up
sbdownvalidis the returned down value a valid dual bound?
sbupvalidis the returned up value a valid dual bound?
itertotal number of strong branching iterations
itlimiteration limit applied to the strong branching call

Definition at line 4016 of file lp.c.

References SCIP_Lp::cols, SCIP_Lp::cutoffbound, SCIP_Stat::lpcount, SCIP_Col::lpipos, SCIP_Col::lppos, MIN, SCIP_Lp::ncols, SCIP_Stat::nnodes, SCIP_Stat::nrootsblpiterations, SCIP_Stat::nrootstrongbranchs, SCIP_Col::nsbcalls, SCIP_Stat::nsbdivinglps, SCIP_Stat::nsblpiterations, SCIP_Stat::nstrongbranchs, NULL, SCIP_Col::sbdown, SCIP_Col::sbdownvalid, SCIP_Col::sbitlim, SCIP_Col::sblpobjval, SCIP_Col::sbnode, SCIP_Col::sbsolval, SCIP_Col::sbup, SCIP_Col::sbupvalid, SCIP_VARSTATUS_COLUMN, SCIPcolIsIntegral(), SCIPvarGetCol(), SCIPvarGetStatus(), SCIPvarIsIntegral(), SCIP_Lp::strongbranchprobing, SCIP_Col::validsblp, and SCIP_Col::var.

Referenced by SCIPgetVarStrongbranchWithPropagation().

void SCIPcolInvalidateStrongbranchData ( SCIP_COL col,
SCIP_SET set,
SCIP_STAT stat,
SCIP_LP lp 
)
SCIP_RETCODE SCIPcolGetStrongbranch ( SCIP_COL col,
SCIP_Bool  integral,
SCIP_SET set,
SCIP_STAT stat,
SCIP_PROB prob,
SCIP_LP lp,
int  itlim,
SCIP_Real down,
SCIP_Real up,
SCIP_Bool downvalid,
SCIP_Bool upvalid,
SCIP_Bool lperror 
)

gets strong branching information on a column variable

Parameters
colLP column
integralshould integral strong branching be performed?
setglobal SCIP settings
statdynamic problem statistics
probproblem data
lpLP data
itlimiteration limit for strong branchings
downstores dual bound after branching column down
upstores dual bound after branching column up
downvalidstores whether the returned down value is a valid dual bound, or NULL; otherwise, it can only be used as an estimate value
upvalidstores whether the returned up value is a valid dual bound, or NULL; otherwise, it can only be used as an estimate value
lperrorpointer to store whether an unresolved LP error occurred

Definition at line 4105 of file lp.c.

References SCIP_Lp::cols, SCIP_Lp::cutoffbound, FALSE, SCIP_Lp::flushed, getFiniteLooseObjval(), SCIP_Lp::looseobjvalinf, SCIP_Stat::lpcount, SCIP_Lp::lpi, SCIP_Col::lpipos, SCIP_Lp::lpobjval, SCIP_Col::lppos, SCIP_Lp::lpsolstat, MIN, SCIP_Lp::ncols, SCIP_Stat::nduallpiterations, SCIP_Stat::nduallps, SCIP_Stat::ndualresolvelpiterations, SCIP_Stat::ndualresolvelps, SCIP_Stat::nnodes, SCIP_Stat::nprimallpiterations, SCIP_Stat::nprimallps, SCIP_Stat::nprimalresolvelpiterations, SCIP_Stat::nprimalresolvelps, SCIP_Stat::nrootsblpiterations, SCIP_Stat::nrootstrongbranchs, SCIP_Col::nsbcalls, SCIP_Stat::nsbdivinglps, SCIP_Stat::nsblpiterations, SCIP_Stat::nstrongbranchs, NULL, SCIP_Col::primsol, SCIP_Col::sbdown, SCIP_Col::sbdownvalid, SCIP_Col::sbitlim, SCIP_Col::sblpobjval, SCIP_Col::sbnode, SCIP_Col::sbsolval, SCIP_Col::sbup, SCIP_Col::sbupvalid, SCIP_Bool, SCIP_CALL, SCIP_INVALID, SCIP_LPERROR, SCIP_LPSOLSTAT_OPTIMAL, SCIP_OKAY, SCIP_Real, SCIP_VARSTATUS_COLUMN, SCIPclockStart(), SCIPclockStop(), SCIPcolIsIntegral(), SCIPdebugMessage, SCIPlpGetObjval(), SCIPlpiStrongbranchFrac(), SCIPlpiStrongbranchInt(), SCIPsetInfinity(), SCIPsetIsFeasIntegral(), SCIPsetIsIntegral(), SCIPvarGetCol(), SCIPvarGetName(), SCIPvarGetStatus(), SCIPvarIsIntegral(), SCIP_Lp::solved, SCIP_Lp::strongbranching, SCIP_Stat::strongbranchtime, TRUE, SCIP_Col::validsblp, SCIP_Lp::validsollp, and SCIP_Col::var.

Referenced by SCIPgetVarStrongbranchFrac(), and SCIPgetVarStrongbranchInt().

SCIP_RETCODE SCIPcolGetStrongbranches ( SCIP_COL **  cols,
int  ncols,
SCIP_Bool  integral,
SCIP_SET set,
SCIP_STAT stat,
SCIP_PROB prob,
SCIP_LP lp,
int  itlim,
SCIP_Real down,
SCIP_Real up,
SCIP_Bool downvalid,
SCIP_Bool upvalid,
SCIP_Bool lperror 
)

gets strong branching information on column variables

Parameters
colsLP columns
ncolsnumber of columns
integralshould integral strong branching be performed?
setglobal SCIP settings
statdynamic problem statistics
probproblem data
lpLP data
itlimiteration limit for strong branchings
downstores dual bounds after branching columns down
upstores dual bounds after branching columns up
downvalidstores whether the returned down values are valid dual bounds, or NULL; otherwise, they can only be used as an estimate value
upvalidstores whether the returned up values are valid dual bounds, or NULL; otherwise, they can only be used as an estimate value
lperrorpointer to store whether an unresolved LP error occurred

Definition at line 4264 of file lp.c.

References SCIP_Lp::cols, SCIP_Lp::cutoffbound, FALSE, SCIP_Lp::flushed, getFiniteLooseObjval(), SCIP_Lp::looseobjvalinf, SCIP_Stat::lpcount, SCIP_Lp::lpi, SCIP_Col::lpipos, SCIP_Col::lppos, SCIP_Lp::lpsolstat, MIN, SCIP_Lp::ncols, SCIP_Stat::nduallpiterations, SCIP_Stat::nduallps, SCIP_Stat::ndualresolvelpiterations, SCIP_Stat::ndualresolvelps, SCIP_Stat::nnodes, SCIP_Stat::nprimallpiterations, SCIP_Stat::nprimallps, SCIP_Stat::nprimalresolvelpiterations, SCIP_Stat::nprimalresolvelps, SCIP_Stat::nrootsblpiterations, SCIP_Stat::nrootstrongbranchs, SCIP_Col::nsbcalls, SCIP_Stat::nsbdivinglps, SCIP_Stat::nsblpiterations, SCIP_Stat::nstrongbranchs, NULL, SCIP_Col::primsol, SCIP_Col::sbdown, SCIP_Col::sbdownvalid, SCIP_Col::sbitlim, SCIP_Col::sblpobjval, SCIP_Col::sbnode, SCIP_Col::sbsolval, SCIP_Col::sbup, SCIP_Col::sbupvalid, SCIP_Bool, SCIP_CALL, SCIP_INVALID, SCIP_LPERROR, SCIP_LPSOLSTAT_OPTIMAL, SCIP_OKAY, SCIP_Real, SCIP_VARSTATUS_COLUMN, SCIPclockStart(), SCIPclockStop(), SCIPcolIsIntegral(), SCIPdebugMessage, SCIPlpGetObjval(), SCIPlpiStrongbranchesFrac(), SCIPlpiStrongbranchesInt(), SCIPsetAllocBufferArray, SCIPsetFreeBufferArray, SCIPsetInfinity(), SCIPsetIsFeasIntegral(), SCIPvarGetCol(), SCIPvarGetStatus(), SCIPvarIsIntegral(), SCIP_Lp::solved, SCIP_Stat::strongbranchtime, TRUE, SCIP_Col::validsblp, SCIP_Lp::validsollp, and SCIP_Col::var.

Referenced by SCIPgetVarsStrongbranchesFrac(), and SCIPgetVarsStrongbranchesInt().

void SCIPcolGetStrongbranchLast ( SCIP_COL col,
SCIP_Real down,
SCIP_Real up,
SCIP_Bool downvalid,
SCIP_Bool upvalid,
SCIP_Real solval,
SCIP_Real lpobjval 
)

gets last strong branching information available for a column variable; returns values of SCIP_INVALID, if strong branching was not yet called on the given column; keep in mind, that the returned old values may have nothing to do with the current LP solution

Parameters
colLP column
downstores dual bound after branching column down, or NULL
upstores dual bound after branching column up, or NULL
downvalidstores whether the returned down value is a valid dual bound, or NULL; otherwise, it can only be used as an estimate value
upvalidstores whether the returned up value is a valid dual bound, or NULL; otherwise, it can only be used as an estimate value
solvalstores LP solution value of column at last strong branching call, or NULL
lpobjvalstores LP objective value at last strong branching call, or NULL

Definition at line 4500 of file lp.c.

References NULL, SCIP_Col::sbdown, SCIP_Col::sbdownvalid, SCIP_Col::sblpobjval, SCIP_Col::sbsolval, SCIP_Col::sbup, and SCIP_Col::sbupvalid.

Referenced by SCIPgetVarStrongbranchLast().

SCIP_Longint SCIPcolGetStrongbranchLPAge ( SCIP_COL col,
SCIP_STAT stat 
)

if strong branching was already applied on the column at the current node, returns the number of LPs solved after the LP where the strong branching on this column was applied; if strong branching was not yet applied on the column at the current node, returns INT_MAX

Parameters
colLP column
statdynamic problem statistics

Definition at line 4532 of file lp.c.

References SCIP_Stat::lpcount, SCIP_Stat::nnodes, SCIP_Stat::nsbdivinglps, NULL, SCIP_Col::sbnode, SCIP_LONGINT_MAX, and SCIP_Col::validsblp.

Referenced by SCIPgetVarStrongbranchLPAge().

void SCIPcolMarkNotRemovableLocal ( SCIP_COL col,
SCIP_STAT stat 
)

marks a column to be not removable from the LP in the current node because it became obsolete

Parameters
colLP column
statproblem statistics

Definition at line 4544 of file lp.c.

References SCIP_Stat::nnodes, NULL, and SCIP_Col::obsoletenode.

Referenced by SCIPmarkColNotRemovableLocal().

static void rowCalcIdxsAndVals ( SCIP_ROW row,
SCIP_SET set 
)
static
static SCIP_Bool isIntegralScalar ( SCIP_Real  val,
SCIP_Real  scalar,
SCIP_Real  mindelta,
SCIP_Real  maxdelta,
SCIP_Real intval 
)
static

checks, whether the given scalar scales the given value to an integral number with error in the given bounds

Parameters
valvalue that should be scaled to an integral value
scalarscalar that should be tried
mindeltaminimal relative allowed difference of scaled coefficient s*c and integral i
maxdeltamaximal relative allowed difference of scaled coefficient s*c and integral i
intvalpointer to store the scaled integral value, or NULL

Definition at line 4683 of file lp.c.

References FALSE, NULL, SCIP_Real, SCIPrelDiff(), and TRUE.

Referenced by rowScale(), and SCIProwCalcIntegralScalar().

static SCIP_RETCODE rowScale ( SCIP_ROW row,
BMS_BLKMEM blkmem,
SCIP_SET set,
SCIP_EVENTQUEUE eventqueue,
SCIP_STAT stat,
SCIP_LP lp,
SCIP_Real  scaleval,
SCIP_Bool  integralcontvars,
SCIP_Real  minrounddelta,
SCIP_Real  maxrounddelta 
)
static

scales row with given factor, and rounds coefficients to integers if close enough; the constant is automatically moved to the sides; if the row's activity is proven to be integral, the sides are automatically rounded to the next integer

Parameters
rowLP row
blkmemblock memory
setglobal SCIP settings
eventqueueevent queue
statproblem statistics
lpcurrent LP data
scalevalvalue to scale row with
integralcontvarsshould the coefficients of the continuous variables also be made integral, if they are close to integral values?
minrounddeltaminimal relative difference of scaled coefficient s*c and integral i, upto which the integral is used instead of the scaled real coefficient
maxrounddeltamaximal relative difference of scaled coefficient s*c and integral i upto which the integral is used instead of the scaled real coefficient

Definition at line 4723 of file lp.c.

References colChgCoefPos(), SCIP_Row::cols, SCIP_Row::constant, debugRowPrint, FALSE, SCIP_Row::integral, isIntegralScalar(), SCIP_Col::lb, SCIP_Row::len, SCIP_Row::lhs, SCIP_Row::linkpos, SCIP_Row::local, SCIP_Row::modifiable, SCIP_Row::name, NULL, SCIP_Row::rhs, rowChgCoefPos(), SCIP_Col::rows, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPcolIsIntegral(), SCIPdebugMessage, SCIProwChgConstant(), SCIProwChgLhs(), SCIProwChgRhs(), SCIPsetInfinity(), SCIPsetIsEQ(), SCIPsetIsInfinity(), SCIPsetIsIntegral(), SCIPsetIsPositive(), SCIPsetIsZero(), SCIPsetSumCeil(), SCIPsetSumFloor(), SCIPvarGetLbGlobal(), SCIPvarGetUbGlobal(), TRUE, SCIP_Col::ub, SCIP_Row::validactivitylp, SCIP_Col::vals, SCIP_Row::vals, and SCIP_Col::var.

Referenced by SCIProwMakeIntegral().

SCIP_RETCODE SCIProwCreate ( SCIP_ROW **  row,
BMS_BLKMEM blkmem,
SCIP_SET set,
SCIP_STAT stat,
SCIP_LP lp,
const char *  name,
int  len,
SCIP_COL **  cols,
SCIP_Real vals,
SCIP_Real  lhs,
SCIP_Real  rhs,
SCIP_ROWORIGINTYPE  origintype,
void *  origin,
SCIP_Bool  local,
SCIP_Bool  modifiable,
SCIP_Bool  removable 
)

creates and captures an LP row

Parameters
rowpointer to LP row data
blkmemblock memory
setglobal SCIP settings
statproblem statistics
lpcurrent LP data
namename of row
lennumber of nonzeros in the row
colsarray with columns of row entries
valsarray with coefficients of row entries
lhsleft hand side of row
rhsright hand side of row
origintypetype of origin of row
originpointer to constraint handler or separator who created the row (NULL if unkown)
localis row only valid locally?
modifiableis row modifiable during node processing (subject to column generation)?
removableshould the row be removed from the LP due to aging or cleanup?

Definition at line 4894 of file lp.c.

References BMSallocBlockMemory, BMSallocBlockMemoryArray, BMSduplicateBlockMemoryArray, FALSE, SCIP_Col::index, SCIP_Stat::nrowidx, NULL, rowCalcNorms(), SCIP_ALLOC, SCIP_BASESTAT_BASIC, SCIP_CALL, SCIP_INVALID, SCIP_OKAY, SCIPeventfilterCreate(), SCIProwCapture(), SCIPsetInfinity(), SCIPsetIsIntegral(), SCIPsetIsZero(), SCIPsetRound(), SCIPvarIsIntegral(), TRUE, and SCIP_Col::var.

Referenced by SCIPcreateEmptyRowCons(), SCIPcreateEmptyRowSepa(), SCIPcreateEmptyRowUnspec(), SCIPcreateRowCons(), SCIPcreateRowSepa(), and SCIPcreateRowUnspec().

SCIP_RETCODE SCIProwFree ( SCIP_ROW **  row,
BMS_BLKMEM blkmem,
SCIP_SET set,
SCIP_LP lp 
)

frees an LP row

Parameters
rowpointer to LP row
blkmemblock memory
setglobal SCIP settings
lpcurrent LP data

Definition at line 5033 of file lp.c.

References BMSfreeBlockMemory, BMSfreeBlockMemoryArray, BMSfreeBlockMemoryArrayNull, BMSfreeBlockMemoryNull, NULL, rowUnlink(), SCIP_CALL, SCIP_OKAY, and SCIPeventfilterFree().

Referenced by SCIProwRelease().

void SCIProwPrint ( SCIP_ROW row,
SCIP_MESSAGEHDLR messagehdlr,
FILE *  file 
)

output row to file stream

Parameters
rowLP row
messagehdlrmessage handler
fileoutput file (or NULL for standard output)

Definition at line 5065 of file lp.c.

References SCIP_Row::cols, SCIP_Row::constant, SCIP_Row::len, SCIP_Row::lhs, SCIP_Row::name, NULL, REALABS, SCIP_Row::rhs, SCIP_DEFAULT_EPSILON, SCIP_VARSTATUS_COLUMN, SCIPmessageFPrintInfo(), SCIPvarGetName(), SCIPvarGetStatus(), SCIP_Row::vals, and SCIP_Col::var.

Referenced by SCIPprintRow().

void SCIProwCapture ( SCIP_ROW row)
SCIP_RETCODE SCIProwRelease ( SCIP_ROW **  row,
BMS_BLKMEM blkmem,
SCIP_SET set,
SCIP_LP lp 
)

decreases usage counter of LP row, and frees memory if necessary

Parameters
rowpointer to LP row
blkmemblock memory
setglobal SCIP settings
lpcurrent LP data

Definition at line 5118 of file lp.c.

References NULL, SCIP_CALL, SCIP_OKAY, SCIPdebugMessage, and SCIProwFree().

Referenced by cutFree(), forkFree(), lpDelRowset(), lpFlushDelRows(), pseudoforkFree(), SCIPlpFree(), SCIPlpShrinkRows(), SCIPreleaseRow(), SCIPsepastoreApplyCuts(), SCIPsepastoreClearCuts(), sepastoreAddCut(), sepastoreDelCut(), and subrootFree().

SCIP_RETCODE SCIProwAddCoef ( SCIP_ROW row,
BMS_BLKMEM blkmem,
SCIP_SET set,
SCIP_EVENTQUEUE eventqueue,
SCIP_LP lp,
SCIP_COL col,
SCIP_Real  val 
)

adds a previously non existing coefficient to an LP row

Parameters
rowLP row
blkmemblock memory
setglobal SCIP settings
eventqueueevent queue
lpcurrent LP data
colLP column
valvalue of coefficient

Definition at line 5175 of file lp.c.

References checkLinks, SCIP_Lp::diving, SCIP_Row::lppos, NULL, rowAddCoef(), SCIP_CALL, and SCIP_OKAY.

SCIP_RETCODE SCIProwDelCoef ( SCIP_ROW row,
BMS_BLKMEM blkmem,
SCIP_SET set,
SCIP_EVENTQUEUE eventqueue,
SCIP_LP lp,
SCIP_COL col 
)

deletes coefficient from row

Parameters
rowrow to be changed
blkmemblock memory
setglobal SCIP settings
eventqueueevent queue
lpcurrent LP data
colcoefficient to be deleted

Definition at line 5196 of file lp.c.

References checkLinks, colDelCoefPos(), SCIP_Row::cols, SCIP_Row::cols_index, SCIP_Row::delaysort, SCIP_Lp::diving, SCIP_Col::index, SCIP_Row::linkpos, SCIP_Row::lppos, SCIP_Row::name, NULL, rowDelCoefPos(), SCIP_Col::rows, rowSearchCoef(), SCIP_CALL, SCIP_INVALIDDATA, SCIP_OKAY, SCIPerrorMessage, SCIPsetIsEQ(), SCIPvarGetName(), SCIP_Col::vals, SCIP_Row::vals, and SCIP_Col::var.

SCIP_RETCODE SCIProwChgCoef ( SCIP_ROW row,
BMS_BLKMEM blkmem,
SCIP_SET set,
SCIP_EVENTQUEUE eventqueue,
SCIP_LP lp,
SCIP_COL col,
SCIP_Real  val 
)

changes or adds a coefficient to an LP row

Parameters
rowLP row
blkmemblock memory
setglobal SCIP settings
eventqueueevent queue
lpcurrent LP data
colLP column
valvalue of coefficient

Definition at line 5242 of file lp.c.

References checkLinks, colChgCoefPos(), SCIP_Row::cols, SCIP_Row::cols_index, SCIP_Row::delaysort, SCIP_Lp::diving, SCIP_Col::index, SCIP_Row::linkpos, SCIP_Row::lppos, NULL, rowAddCoef(), rowChgCoefPos(), SCIP_Col::rows, rowSearchCoef(), SCIP_CALL, SCIP_OKAY, SCIPsetIsEQ(), SCIP_Col::vals, and SCIP_Row::vals.

SCIP_RETCODE SCIProwIncCoef ( SCIP_ROW row,
BMS_BLKMEM blkmem,
SCIP_SET set,
SCIP_EVENTQUEUE eventqueue,
SCIP_LP lp,
SCIP_COL col,
SCIP_Real  incval 
)

increases value of an existing or non-existing coefficient in an LP row

Parameters
rowLP row
blkmemblock memory
setglobal SCIP settings
eventqueueevent queue
lpcurrent LP data
colLP column
incvalvalue to add to the coefficient

Definition at line 5294 of file lp.c.

References checkLinks, colChgCoefPos(), SCIP_Row::cols, SCIP_Row::cols_index, SCIP_Lp::diving, SCIP_Col::index, SCIP_Row::linkpos, SCIP_Row::lppos, NULL, rowAddCoef(), rowChgCoefPos(), SCIP_Col::rows, rowSearchCoef(), SCIP_CALL, SCIP_OKAY, SCIPsetIsEQ(), SCIPsetIsZero(), SCIP_Col::vals, and SCIP_Row::vals.

Referenced by SCIPvarAddToRow().

SCIP_RETCODE SCIProwChgConstant ( SCIP_ROW row,
BMS_BLKMEM blkmem,
SCIP_SET set,
SCIP_STAT stat,
SCIP_EVENTQUEUE eventqueue,
SCIP_LP lp,
SCIP_Real  constant 
)

changes constant value of a row

Parameters
rowLP row
blkmemblock memory
setglobal SCIP settings
statproblem statistics
eventqueueevent queue
lpcurrent LP data
constantnew constant value

Definition at line 5348 of file lp.c.

References SCIP_Row::constant, SCIP_Lp::diving, SCIP_Stat::domchgcount, SCIP_Row::lhs, SCIP_Row::lppos, SCIP_Row::maxactivity, SCIP_Row::minactivity, NULL, SCIP_Row::pseudoactivity, REALABS, SCIP_Row::rhs, rowEventConstantChanged(), rowSideChanged(), SCIP_CALL, SCIP_INVALID, SCIP_OKAY, SCIP_Real, SCIP_SIDETYPE_LEFT, SCIP_SIDETYPE_RIGHT, SCIPsetIsEQ(), SCIPsetIsInfinity(), SCIP_Row::validactivitybdsdomchg, and SCIP_Row::validpsactivitydomchg.

Referenced by rowScale(), and SCIProwAddConstant().

SCIP_RETCODE SCIProwAddConstant ( SCIP_ROW row,
BMS_BLKMEM blkmem,
SCIP_SET set,
SCIP_STAT stat,
SCIP_EVENTQUEUE eventqueue,
SCIP_LP lp,
SCIP_Real  addval 
)

add constant value to a row

Parameters
rowLP row
blkmemblock memory
setglobal SCIP settings
statproblem statistics
eventqueueevent queue
lpcurrent LP data
addvalconstant value to add to the row

Definition at line 5403 of file lp.c.

References SCIP_Row::constant, SCIP_Lp::diving, SCIP_Row::lhs, SCIP_Row::lppos, NULL, REALABS, SCIP_Row::rhs, SCIP_CALL, SCIP_OKAY, SCIProwChgConstant(), SCIPsetIsInfinity(), and SCIPsetIsZero().

Referenced by SCIPvarAddToRow().

SCIP_RETCODE SCIProwChgLhs ( SCIP_ROW row,
BMS_BLKMEM blkmem,
SCIP_SET set,
SCIP_EVENTQUEUE eventqueue,
SCIP_LP lp,
SCIP_Real  lhs 
)

changes left hand side of LP row

Parameters
rowLP row
blkmemblock memory
setglobal SCIP settings
eventqueueevent queue
lpcurrent LP data
lhsnew left hand side

Definition at line 5429 of file lp.c.

References SCIP_Lp::diving, SCIP_Row::lhs, NULL, rowEventSideChanged(), rowSideChanged(), SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIP_SIDETYPE_LEFT, and SCIPsetIsEQ().

Referenced by rowScale(), SCIPchgRowLhs(), SCIPchgRowLhsDive(), and SCIPlpEndDive().

SCIP_RETCODE SCIProwChgRhs ( SCIP_ROW row,
BMS_BLKMEM blkmem,
SCIP_SET set,
SCIP_EVENTQUEUE eventqueue,
SCIP_LP lp,
SCIP_Real  rhs 
)

changes right hand side of LP row

Parameters
rowLP row
blkmemblock memory
setglobal SCIP settings
eventqueueevent queue
lpcurrent LP data
rhsnew right hand side

Definition at line 5461 of file lp.c.

References SCIP_Lp::diving, NULL, SCIP_Row::rhs, rowEventSideChanged(), rowSideChanged(), SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIP_SIDETYPE_RIGHT, and SCIPsetIsEQ().

Referenced by rowScale(), SCIPchgRowRhs(), SCIPchgRowRhsDive(), and SCIPlpEndDive().

SCIP_RETCODE SCIProwChgLocal ( SCIP_ROW row,
SCIP_Bool  local 
)

changes the local flag of LP row

Parameters
rowLP row
localnew value for local flag

Definition at line 5493 of file lp.c.

References SCIP_Row::local, NULL, and SCIP_OKAY.

Referenced by sepastoreAddCut().

SCIP_RETCODE SCIProwCalcIntegralScalar ( SCIP_ROW row,
SCIP_SET set,
SCIP_Real  mindelta,
SCIP_Real  maxdelta,
SCIP_Longint  maxdnom,
SCIP_Real  maxscale,
SCIP_Bool  usecontvars,
SCIP_Real intscalar,
SCIP_Bool success 
)

tries to find a value, such that all row coefficients, if scaled with this value become integral

Parameters
rowLP row
setglobal SCIP settings
mindeltaminimal relative allowed difference of scaled coefficient s*c and integral i
maxdeltamaximal relative allowed difference of scaled coefficient s*c and integral i
maxdnommaximal denominator allowed in rational numbers
maxscalemaximal allowed scalar
usecontvarsshould the coefficients of the continuous variables also be made integral?
intscalarpointer to store scalar that would make the coefficients integral, or NULL
successstores whether returned value is valid

Definition at line 5510 of file lp.c.

References SCIP_Row::cols, SCIP_Row::cols_index, FALSE, isIntegralScalar(), SCIP_Row::len, MIN, nscalars, NULL, REALABS, scalars, SCIP_Bool, SCIP_INVALID, SCIP_Longint, SCIP_OKAY, SCIP_Real, SCIP_REAL_MAX, SCIP_VARSTATUS_COLUMN, SCIPcalcGreComDiv(), SCIPcolIsIntegral(), SCIPdebug, SCIPdebugMessage, SCIPrealToRational(), SCIProwGetName(), SCIPsetIsInfinity(), SCIPsetIsPositive(), SCIPsetIsZero(), SCIPvarGetCol(), SCIPvarGetStatus(), TRUE, SCIP_Row::vals, and SCIP_Col::var.

Referenced by SCIPcalcRowIntegralScalar(), and SCIProwMakeIntegral().

SCIP_RETCODE SCIProwMakeIntegral ( SCIP_ROW row,
BMS_BLKMEM blkmem,
SCIP_SET set,
SCIP_EVENTQUEUE eventqueue,
SCIP_STAT stat,
SCIP_LP lp,
SCIP_Real  mindelta,
SCIP_Real  maxdelta,
SCIP_Longint  maxdnom,
SCIP_Real  maxscale,
SCIP_Bool  usecontvars,
SCIP_Bool success 
)

tries to scale row, s.t. all coefficients become integral

Parameters
rowLP row
blkmemblock memory
setglobal SCIP settings
eventqueueevent queue
statproblem statistics
lpcurrent LP data
mindeltaminimal relative allowed difference of scaled coefficient s*c and integral i
maxdeltamaximal relative allowed difference of scaled coefficient s*c and integral i
maxdnommaximal denominator allowed in rational numbers
maxscalemaximal value to scale row with
usecontvarsshould the coefficients of the continuous variables also be made integral?
successstores whether row could be made rational

Definition at line 5745 of file lp.c.

References NULL, rowScale(), SCIP_CALL, SCIP_OKAY, SCIP_Real, and SCIProwCalcIntegralScalar().

Referenced by SCIPmakeRowIntegral().

static void rowMerge ( SCIP_ROW row,
SCIP_SET set 
)
static

sorts row, and merges equal column entries (resulting from lazy sorting and adding) into a single entry; removes zero entries from row the row must not be linked to the columns; otherwise, we would need to update the columns as well, which is too expensive

Parameters
rowrow to be sorted
setglobal SCIP settings

Definition at line 5813 of file lp.c.

References SCIP_Row::cols, SCIP_Row::cols_index, SCIP_Row::delaysort, SCIP_Col::index, SCIP_Row::integral, SCIP_Row::len, SCIP_Row::linkpos, SCIP_Row::lpcolssorted, SCIP_Row::name, SCIP_Row::nlpcols, SCIP_Row::nonlpcolssorted, NULL, SCIP_Row::nunlinked, rowCalcNorms(), SCIP_Real, SCIPcolIsIntegral(), SCIPdebugMessage, SCIProwSort(), SCIPsetIsIntegral(), SCIPsetIsZero(), SCIPsetRound(), TRUE, and SCIP_Row::vals.

Referenced by SCIProwForceSort().

void SCIProwDelaySort ( SCIP_ROW row)

enables delaying of row sorting

Parameters
rowLP row

Definition at line 5912 of file lp.c.

References SCIP_Row::delaysort, NULL, and TRUE.

Referenced by SCIPaddVarsToRow(), SCIPaddVarsToRowSameCoef(), and SCIPcacheRowExtensions().

void SCIProwForceSort ( SCIP_ROW row,
SCIP_SET set 
)

disables delaying of row sorting, sorts row and merges coefficients with equal columns

Parameters
rowLP row
setglobal SCIP settings

Definition at line 5923 of file lp.c.

References SCIP_Row::delaysort, FALSE, NULL, and rowMerge().

Referenced by SCIPaddVarsToRow(), SCIPaddVarsToRowSameCoef(), and SCIPflushRowExtensions().

void SCIProwRecalcLPActivity ( SCIP_ROW row,
SCIP_STAT stat 
)
SCIP_Real SCIProwGetLPActivity ( SCIP_ROW row,
SCIP_SET set,
SCIP_STAT stat,
SCIP_LP lp 
)

returns the activity of a row in the current LP solution

Parameters
rowLP row
setglobal SCIP settings
statproblem statistics
lpcurrent LP data

Definition at line 5988 of file lp.c.

References SCIP_Row::activity, SCIP_Stat::lpcount, MAX, MIN, NULL, SCIP_INVALID, SCIP_Real, SCIProwRecalcLPActivity(), SCIPsetInfinity(), SCIP_Row::validactivitylp, and SCIP_Lp::validsollp.

Referenced by SCIPgetRowActivity(), SCIPgetRowLPActivity(), SCIPgetRowSolActivity(), and SCIProwGetLPFeasibility().

SCIP_Real SCIProwGetLPFeasibility ( SCIP_ROW row,
SCIP_SET set,
SCIP_STAT stat,
SCIP_LP lp 
)

returns the feasibility of a row in the current LP solution: negative value means infeasibility

Parameters
rowLP row
setglobal SCIP settings
statproblem statistics
lpcurrent LP data

Definition at line 6018 of file lp.c.

References SCIP_Row::lhs, MIN, NULL, SCIP_Row::rhs, SCIP_Real, and SCIProwGetLPActivity().

Referenced by SCIPcutpoolSeparate(), SCIPgetRowFeasibility(), SCIPgetRowLPFeasibility(), SCIPgetRowSolFeasibility(), SCIProwGetLPEfficacy(), sepastoreApplyBdchg(), and sepastoreApplyCut().

SCIP_Real SCIProwGetRelaxFeasibility ( SCIP_ROW row,
SCIP_SET set,
SCIP_STAT stat 
)

returns the feasibility of a row in the relaxed solution solution: negative value means infeasibility

Parameters
rowLP row
setglobal SCIP settings
statproblem statistics

Definition at line 6038 of file lp.c.

References SCIP_Row::cols, SCIP_Row::constant, SCIP_Row::lhs, SCIP_Row::linkpos, SCIP_Col::lppos, MAX, MIN, SCIP_Row::nlpcols, NULL, SCIP_Row::nunlinked, SCIP_Row::rhs, SCIP_Real, SCIPsetInfinity(), SCIPvarGetRelaxSol(), SCIP_Row::vals, and SCIP_Col::var.

Referenced by SCIProwGetRelaxEfficacy(), sepastoreApplyBdchg(), and sepastoreApplyCut().

SCIP_Real SCIProwGetNLPFeasibility ( SCIP_ROW row,
SCIP_SET set,
SCIP_STAT stat 
)

returns the feasibility of a row in the current NLP solution: negative value means infeasibility

Parameters
rowLP row
setglobal SCIP settings
statproblem statistics

Definition at line 6100 of file lp.c.

References SCIP_Row::cols, SCIP_Row::constant, SCIP_Row::lhs, SCIP_Row::linkpos, SCIP_Col::lppos, MAX, MIN, SCIP_Row::nlpcols, NULL, SCIP_Row::nunlinked, SCIP_Row::rhs, SCIP_Real, SCIPsetInfinity(), SCIPvarGetNLPSol(), SCIP_Row::vals, and SCIP_Col::var.

Referenced by SCIProwGetNLPEfficacy(), sepastoreApplyBdchg(), and sepastoreApplyCut().

SCIP_Real SCIProwGetPseudoActivity ( SCIP_ROW row,
SCIP_SET set,
SCIP_STAT stat 
)

returns the pseudo activity of a row in the current pseudo solution

Parameters
rowLP row
setglobal SCIP settings
statproblem statistics

Definition at line 6186 of file lp.c.

References SCIP_Stat::domchgcount, MAX, MIN, NULL, SCIP_Row::pseudoactivity, SCIP_INVALID, SCIP_Real, SCIProwRecalcPseudoActivity(), SCIPsetInfinity(), and SCIP_Row::validpsactivitydomchg.

Referenced by SCIPgetRowActivity(), SCIPgetRowPseudoActivity(), SCIPgetRowSolActivity(), and SCIProwGetPseudoFeasibility().

SCIP_Real SCIProwGetPseudoFeasibility ( SCIP_ROW row,
SCIP_SET set,
SCIP_STAT stat 
)

returns the pseudo feasibility of a row in the current pseudo solution: negative value means infeasibility

Parameters
rowLP row
setglobal SCIP settings
statproblem statistics

Definition at line 6214 of file lp.c.

References SCIP_Row::lhs, MIN, NULL, SCIP_Row::rhs, SCIP_Real, and SCIProwGetPseudoActivity().

Referenced by SCIPgetRowFeasibility(), SCIPgetRowPseudoFeasibility(), and SCIPgetRowSolFeasibility().

SCIP_Real SCIProwGetSolActivity ( SCIP_ROW row,
SCIP_SET set,
SCIP_STAT stat,
SCIP_SOL sol 
)

returns the activity of a row for a given solution

Parameters
rowLP row
setglobal SCIP settings
statproblem statistics data
solprimal CIP solution

Definition at line 6230 of file lp.c.

References SCIP_Row::cols, SCIP_Row::constant, SCIP_Col::lb, SCIP_Row::len, SCIP_Row::lhs, SCIP_Row::linkpos, SCIP_Col::lppos, MAX, MIN, NULL, SCIP_Row::rhs, SCIP_Real, SCIP_UNKNOWN, SCIPsetInfinity(), SCIPsetIsInfinity(), SCIPsolGetVal(), SCIP_Col::ub, SCIP_Row::vals, and SCIP_Col::var.

Referenced by SCIPgetRowSolActivity(), SCIProwGetSolFeasibility(), and SCIPsolAdjustImplicitSolVals().

SCIP_Real SCIProwGetSolFeasibility ( SCIP_ROW row,
SCIP_SET set,
SCIP_STAT stat,
SCIP_SOL sol 
)

returns the feasibility of a row for the given solution

Parameters
rowLP row
setglobal SCIP settings
statproblem statistics data
solprimal CIP solution

Definition at line 6272 of file lp.c.

References SCIP_Row::lhs, MIN, NULL, SCIP_Row::rhs, SCIP_Real, and SCIProwGetSolActivity().

Referenced by SCIPcutpoolSeparate(), SCIPgetRowSolFeasibility(), and SCIProwGetSolEfficacy().

static void rowCalcActivityBounds ( SCIP_ROW row,
SCIP_SET set,
SCIP_STAT stat 
)
static

calculates minimal and maximal activity of row w.r.t. the column's bounds

Parameters
rowrow data
setglobal SCIP settings
statproblem statistics data

Definition at line 6290 of file lp.c.

References SCIP_Row::cols, SCIP_Row::constant, SCIP_Stat::domchgcount, EPSISINT, FALSE, SCIP_Row::integral, SCIP_Col::lb, SCIP_Row::len, SCIP_Row::linkpos, SCIP_Col::lppos, SCIP_Row::maxactivity, SCIP_Row::minactivity, NULL, REALABS, SCIP_Bool, SCIP_DEFAULT_SUMEPSILON, SCIP_Real, SCIPsetInfinity(), SCIPsetIsInfinity(), SCIP_Col::ub, SCIP_Row::validactivitybdsdomchg, and SCIP_Row::vals.

Referenced by SCIProwGetMaxActivity(), and SCIProwGetMinActivity().

SCIP_Real SCIProwGetMinActivity ( SCIP_ROW row,
SCIP_SET set,
SCIP_STAT stat 
)

returns the minimal activity of a row w.r.t. the columns' bounds

Parameters
rowLP row
setglobal SCIP settings
statproblem statistics data

Definition at line 6350 of file lp.c.

References SCIP_Stat::domchgcount, SCIP_Row::maxactivity, SCIP_Row::minactivity, NULL, rowCalcActivityBounds(), SCIP_INVALID, and SCIP_Row::validactivitybdsdomchg.

Referenced by SCIPaddCut(), SCIPgetRowMinActivity(), SCIPlpRemoveRedundantRows(), SCIProwIsRedundant(), sepastoreIsCutRedundant(), and sepastoreIsCutRedundantOrInfeasible().

SCIP_Real SCIProwGetMaxActivity ( SCIP_ROW row,
SCIP_SET set,
SCIP_STAT stat 
)

returns the maximal activity of a row w.r.t. the columns' bounds

Parameters
rowLP row
setglobal SCIP settings
statproblem statistics data

Definition at line 6371 of file lp.c.

References SCIP_Stat::domchgcount, SCIP_Row::maxactivity, SCIP_Row::minactivity, NULL, rowCalcActivityBounds(), SCIP_INVALID, and SCIP_Row::validactivitybdsdomchg.

Referenced by SCIPaddCut(), SCIPgetRowMaxActivity(), SCIPlpRemoveRedundantRows(), SCIProwIsRedundant(), sepastoreIsCutRedundant(), and sepastoreIsCutRedundantOrInfeasible().

SCIP_Bool SCIProwIsRedundant ( SCIP_ROW row,
SCIP_SET set,
SCIP_STAT stat 
)

returns whether the row is unmodifiable and redundant w.r.t. the columns' bounds

Parameters
rowLP row
setglobal SCIP settings
statproblem statistics data

Definition at line 6392 of file lp.c.

References FALSE, SCIP_Row::lhs, SCIP_Row::modifiable, NULL, SCIP_Row::rhs, SCIP_Real, SCIProwGetMaxActivity(), SCIProwGetMinActivity(), SCIPsetIsFeasGT(), SCIPsetIsFeasLT(), SCIPsetIsInfinity(), and TRUE.

Referenced by SCIPlpRemoveRedundantRows().

SCIP_Real SCIProwGetMaxval ( SCIP_ROW row,
SCIP_SET set 
)

gets maximal absolute value of row vector coefficients

Parameters
rowLP row
setglobal SCIP settings

Definition at line 6423 of file lp.c.

References SCIP_Row::len, SCIP_Row::maxval, NULL, SCIP_Row::nummaxval, and rowCalcIdxsAndVals().

Referenced by SCIP_DECL_HASHKEYVAL(), SCIPgetRowMaxCoef(), SCIProwGetLPEfficacy(), SCIProwGetNLPEfficacy(), SCIProwGetRelaxEfficacy(), and SCIProwGetSolEfficacy().

SCIP_Real SCIProwGetMinval ( SCIP_ROW row,
SCIP_SET set 
)

gets minimal absolute value of row vector's non-zero coefficients

Parameters
rowLP row
setglobal SCIP settings

Definition at line 6439 of file lp.c.

References SCIP_Row::len, SCIP_Row::minval, NULL, SCIP_Row::numminval, and rowCalcIdxsAndVals().

Referenced by SCIPgetRowMinCoef().

int SCIProwGetMaxidx ( SCIP_ROW row,
SCIP_SET set 
)

gets maximal column index of row entries

Parameters
rowLP row
setglobal SCIP settings

Definition at line 6455 of file lp.c.

References SCIP_Row::len, SCIP_Row::maxidx, NULL, rowCalcIdxsAndVals(), and SCIP_Row::validminmaxidx.

Referenced by SCIPcutpoolAddNewRow(), and SCIPcutpoolAddRow().

int SCIProwGetMinidx ( SCIP_ROW row,
SCIP_SET set 
)

gets minimal column index of row entries

Parameters
rowLP row
setglobal SCIP settings

Definition at line 6471 of file lp.c.

References SCIP_Row::len, SCIP_Row::minidx, NULL, rowCalcIdxsAndVals(), and SCIP_Row::validminmaxidx.

SCIP_Real SCIProwGetLPEfficacy ( SCIP_ROW row,
SCIP_SET set,
SCIP_STAT stat,
SCIP_LP lp 
)

returns row's efficacy with respect to the current LP solution: e = -feasibility/norm

Parameters
rowLP row
setglobal SCIP settings
statproblem statistics data
lpcurrent LP data

Definition at line 6487 of file lp.c.

References SCIP_Row::len, MAX, NULL, SCIP_Real, SCIPABORT, SCIPerrorMessage, SCIProwGetLPFeasibility(), SCIProwGetMaxval(), SCIProwGetNorm(), SCIProwGetSumNorm(), and SCIPsetSumepsilon().

Referenced by computeScore(), SCIPgetCutEfficacy(), and SCIProwIsLPEfficacious().

SCIP_Bool SCIProwIsLPEfficacious ( SCIP_ROW row,
SCIP_SET set,
SCIP_STAT stat,
SCIP_LP lp,
SCIP_Bool  root 
)

returns whether the row's efficacy with respect to the current LP solution is greater than the minimal cut efficacy

Parameters
rowLP row
setglobal SCIP settings
statproblem statistics data
lpcurrent LP data
rootshould the root's minimal cut efficacy be used?

Definition at line 6528 of file lp.c.

References SCIP_Real, SCIProwGetLPEfficacy(), and SCIPsetIsEfficacious().

Referenced by SCIPcutpoolSeparate(), and SCIPisCutEfficacious().

SCIP_Real SCIProwGetSolEfficacy ( SCIP_ROW row,
SCIP_SET set,
SCIP_STAT stat,
SCIP_SOL sol 
)

returns row's efficacy with respect to the given primal solution: e = -feasibility/norm

Parameters
rowLP row
setglobal SCIP settings
statproblem statistics data
solprimal CIP solution

Definition at line 6544 of file lp.c.

References SCIP_Row::len, MAX, NULL, SCIP_Real, SCIPABORT, SCIPerrorMessage, SCIProwGetMaxval(), SCIProwGetNorm(), SCIProwGetSolFeasibility(), SCIProwGetSumNorm(), and SCIPsetSumepsilon().

Referenced by SCIPgetCutEfficacy(), and SCIProwIsSolEfficacious().

SCIP_Bool SCIProwIsSolEfficacious ( SCIP_ROW row,
SCIP_SET set,
SCIP_STAT stat,
SCIP_SOL sol,
SCIP_Bool  root 
)

returns whether the row's efficacy with respect to the given primal solution is greater than the minimal cut efficacy

Parameters
rowLP row
setglobal SCIP settings
statproblem statistics data
solprimal CIP solution
rootshould the root's minimal cut efficacy be used?

Definition at line 6587 of file lp.c.

References SCIP_Real, SCIProwGetSolEfficacy(), and SCIPsetIsEfficacious().

Referenced by SCIPcutpoolSeparate(), and SCIPisCutEfficacious().

SCIP_Real SCIProwGetRelaxEfficacy ( SCIP_ROW row,
SCIP_SET set,
SCIP_STAT stat 
)

returns row's efficacy with respect to the relaxed solution: e = -feasibility/norm

Parameters
rowLP row
setglobal SCIP settings
statproblem statistics data

Definition at line 6603 of file lp.c.

References SCIP_Row::len, MAX, NULL, SCIP_Real, SCIPABORT, SCIPerrorMessage, SCIProwGetMaxval(), SCIProwGetNorm(), SCIProwGetRelaxFeasibility(), SCIProwGetSumNorm(), and SCIPsetSumepsilon().

Referenced by computeScore().

SCIP_Real SCIProwGetNLPEfficacy ( SCIP_ROW row,
SCIP_SET set,
SCIP_STAT stat 
)

returns row's efficacy with respect to the NLP solution: e = -feasibility/norm

Parameters
rowLP row
setglobal SCIP settings
statproblem statistics data

Definition at line 6643 of file lp.c.

References SCIP_Row::len, MAX, NULL, SCIP_Real, SCIPABORT, SCIPerrorMessage, SCIProwGetMaxval(), SCIProwGetNLPFeasibility(), SCIProwGetNorm(), SCIProwGetSumNorm(), and SCIPsetSumepsilon().

Referenced by computeScore().

static int SCIProwGetDiscreteScalarProduct ( SCIP_ROW row1,
SCIP_ROW row2 
)
static

returns the discrete scalar product of the coefficient vectors of the two given rows

Parameters
row1first LP row
row2second LP row

Definition at line 7044 of file lp.c.

References SCIP_Row::cols, SCIP_Row::cols_index, FALSE, SCIP_Col::index, SCIP_Row::len, SCIP_Row::lpcolssorted, SCIP_Col::lppos, MAX, SCIP_Row::nlpcols, SCIP_Row::nonlpcolssorted, NULL, SCIP_Row::nunlinked, SCIP_Bool, SCIProwSort(), SCIPswapPointers(), and TRUE.

Referenced by SCIProwGetParallelism().

SCIP_Real SCIProwGetObjParallelism ( SCIP_ROW row,
SCIP_SET set,
SCIP_LP lp 
)

gets parallelism of row with objective function: if the returned value is 1, the row is parallel to the objective function, if the value is 0, it is orthogonal to the objective function

Parameters
rowLP row
setglobal SCIP settings
lpcurrent LP data

Definition at line 7447 of file lp.c.

References checkRowObjprod, checkRowSqrnorm, MAX, MIN, NULL, SCIP_Row::objprod, SCIP_Lp::objsqrnorm, SCIP_Lp::objsqrnormunreliable, REALABS, SCIP_Real, SCIPlpRecalculateObjSqrNorm(), SCIPsetIsPositive(), SCIPsetIsSumGE(), SCIPsetIsSumLE(), and SCIP_Row::sqrnorm.

Referenced by sepastoreAddCut().

SCIP_RETCODE SCIProwCatchEvent ( SCIP_ROW row,
BMS_BLKMEM blkmem,
SCIP_SET set,
SCIP_EVENTTYPE  eventtype,
SCIP_EVENTHDLR eventhdlr,
SCIP_EVENTDATA eventdata,
int *  filterpos 
)

includes event handler with given data in row's event filter

Parameters
rowrow
blkmemblock memory
setglobal SCIP settings
eventtypeevent type to catch
eventhdlrevent handler to call for the event processing
eventdataevent data to pass to the event handler for the event processing
filterpospointer to store position of event filter entry, or NULL

Definition at line 7480 of file lp.c.

References SCIP_Row::eventfilter, SCIP_Row::name, NULL, SCIP_CALL, SCIP_EVENTTYPE_ROWCHANGED, SCIP_OKAY, SCIPdebugMessage, and SCIPeventfilterAdd().

Referenced by SCIPcatchRowEvent().

SCIP_RETCODE SCIProwDropEvent ( SCIP_ROW row,
BMS_BLKMEM blkmem,
SCIP_SET set,
SCIP_EVENTTYPE  eventtype,
SCIP_EVENTHDLR eventhdlr,
SCIP_EVENTDATA eventdata,
int  filterpos 
)

deletes event handler with given data from row's event filter

Parameters
rowrow
blkmemblock memory
setglobal SCIP settings
eventtypeevent type mask of dropped event
eventhdlrevent handler to call for the event processing
eventdataevent data to pass to the event handler for the event processing
filterposposition of event filter entry returned by SCIPvarCatchEvent(), or -1

Definition at line 7504 of file lp.c.

References SCIP_Row::eventfilter, SCIP_Row::name, NULL, SCIP_CALL, SCIP_OKAY, SCIPdebugMessage, and SCIPeventfilterDel().

Referenced by SCIPdropRowEvent().

void SCIProwMarkNotRemovableLocal ( SCIP_ROW row,
SCIP_STAT stat 
)

marks a row to be not removable from the LP in the current node because it became obsolete

Parameters
rowLP row
statproblem statistics

Definition at line 7525 of file lp.c.

References SCIP_Stat::nnodes, NULL, and SCIP_Row::obsoletenode.

Referenced by SCIPmarkRowNotRemovableLocal().

static void markColDeleted ( SCIP_COL col)
static

resets column data to represent a column not in the LP solver

Parameters
colcolumn to be marked deleted

Definition at line 7544 of file lp.c.

References SCIP_Col::basisstatus, FALSE, SCIP_Col::farkascoef, SCIP_Col::lpipos, NULL, SCIP_Col::primsol, SCIP_Col::redcost, SCIP_Col::sbdown, SCIP_Col::sbdownvalid, SCIP_Col::sbitlim, SCIP_Col::sbup, SCIP_Col::sbupvalid, SCIP_BASESTAT_ZERO, SCIP_INVALID, SCIP_Col::validfarkaslp, and SCIP_Col::validredcostlp.

Referenced by lpDelColset(), and lpFlushDelCols().

static void computeLPBounds ( SCIP_LP lp,
SCIP_SET set,
SCIP_COL col,
SCIP_Real  lpiinf,
SCIP_Real lb,
SCIP_Real ub 
)
static

computes for the given column the lower and upper bound that should be flushed into the LP depending on lazy bounds and diving mode; in diving mode, lazy bounds are ignored, i.e., the bounds are explicitly added to the LP in any case

Parameters
lpcurrent LP data
setglobal SCIP settings
colcolumn to compute bounds for
lpiinfinfinity value if the LP solver
lbpointer to store the new lower bound
ubpointer to store the new upper bound

Definition at line 7615 of file lp.c.

References SCIP_Col::lazylb, SCIP_Col::lazyub, SCIP_Col::lb, NULL, SCIPlpDiving(), SCIPsetIsGE(), SCIPsetIsInfinity(), SCIPsetIsLE(), and SCIP_Col::ub.

Referenced by lpFlushAddCols(), and lpFlushChgCols().

static void markRowDeleted ( SCIP_ROW row)
static

resets row data to represent a row not in the LP solver

Parameters
rowrow to be marked deleted

Definition at line 7806 of file lp.c.

References SCIP_Row::activity, SCIP_Row::basisstatus, SCIP_Row::dualfarkas, SCIP_Row::dualsol, SCIP_Row::lpipos, NULL, SCIP_BASESTAT_BASIC, SCIP_INVALID, and SCIP_Row::validactivitylp.

Referenced by lpDelRowset(), and lpFlushDelRows().

static SCIP_RETCODE lpFlushDelRows ( SCIP_LP lp,
BMS_BLKMEM blkmem,
SCIP_SET set 
)
static
static void colUpdateAddLP ( SCIP_COL col,
SCIP_SET set 
)
static

updates link data after addition of column

Parameters
colLP column
setglobal SCIP settings

Definition at line 8441 of file lp.c.

References SCIP_Row::cols, FALSE, SCIP_Col::len, SCIP_Col::linkpos, SCIP_Row::linkpos, SCIP_Row::lpcolssorted, SCIP_Col::lppos, SCIP_Row::nlpcols, NULL, rowAddNorms(), SCIP_Col::rows, rowSwapCoefs(), and SCIP_Row::vals.

Referenced by SCIPlpAddCol().

static void rowUpdateAddLP ( SCIP_ROW row)
static

updates link data after addition of row

Parameters
rowLP row

Definition at line 8481 of file lp.c.

References SCIP_Row::cols, colSwapCoefs(), FALSE, SCIP_Row::len, SCIP_Col::linkpos, SCIP_Row::linkpos, SCIP_Row::lppos, SCIP_Col::lprowssorted, SCIP_Col::nlprows, NULL, and SCIP_Col::rows.

Referenced by SCIPlpAddRow().

static void colUpdateDelLP ( SCIP_COL col,
SCIP_SET set 
)
static

updates link data after removal of column

Parameters
colLP column
setglobal SCIP settings

Definition at line 8516 of file lp.c.

References SCIP_Row::cols, FALSE, SCIP_Col::len, SCIP_Col::linkpos, SCIP_Row::linkpos, SCIP_Col::lppos, SCIP_Row::nlpcols, SCIP_Row::nonlpcolssorted, NULL, rowDelNorms(), SCIP_Col::rows, rowSwapCoefs(), TRUE, and SCIP_Row::vals.

Referenced by lpDelColset(), and SCIPlpShrinkCols().

static void rowUpdateDelLP ( SCIP_ROW row)
static

updates link data after removal of row

Parameters
rowLP row

Definition at line 8555 of file lp.c.

References SCIP_Row::cols, colSwapCoefs(), FALSE, SCIP_Row::len, SCIP_Col::linkpos, SCIP_Row::linkpos, SCIP_Row::lppos, SCIP_Col::nlprows, SCIP_Col::nonlprowssorted, NULL, and SCIP_Col::rows.

Referenced by lpDelRowset(), and SCIPlpShrinkRows().

static SCIP_RETCODE allocDiveChgSideArrays ( SCIP_LP lp,
int  initsize 
)
static
Parameters
lpLP data object
initsizeinitial size of the arrays

Definition at line 8589 of file lp.c.

References BMSallocMemoryArray, SCIP_Lp::divechgrows, SCIP_Lp::divechgsides, SCIP_Lp::divechgsidessize, SCIP_Lp::divechgsidetypes, SCIP_Lp::ndivechgsides, NULL, SCIP_ALLOC, and SCIP_OKAY.

Referenced by SCIPlpCreate().

static SCIP_RETCODE reallocDiveChgSideArrays ( SCIP_LP lp,
int  minsize,
SCIP_Real  growfact 
)
static
Parameters
lpLP data object
minsizeminimal number of elements
growfactgrowing factor

Definition at line 8611 of file lp.c.

References BMSreallocMemoryArray, SCIP_Lp::divechgrows, SCIP_Lp::divechgsides, SCIP_Lp::divechgsidessize, SCIP_Lp::divechgsidetypes, MAX, SCIP_Lp::ndivechgsides, NULL, SCIP_ALLOC, and SCIP_OKAY.

Referenced by SCIPlpRecordOldRowSideDive().

static void freeDiveChgSideArrays ( SCIP_LP lp)
static
SCIP_RETCODE SCIPlpFree ( SCIP_LP **  lp,
BMS_BLKMEM blkmem,
SCIP_SET set,
SCIP_EVENTQUEUE eventqueue,
SCIP_EVENTFILTER eventfilter 
)

frees LP data object

Parameters
lppointer to LP data object
blkmemblock memory
setglobal SCIP settings
eventqueueevent queue
eventfilterglobal event filter

Definition at line 8890 of file lp.c.

References BMSfreeMemory, BMSfreeMemoryArrayNull, BMSfreeMemoryNull, freeDiveChgSideArrays(), NULL, SCIP_CALL, SCIP_OKAY, SCIPlpClear(), SCIPlpiFree(), and SCIProwRelease().

Referenced by freeTransform().

SCIP_RETCODE SCIPlpReset ( SCIP_LP lp,
BMS_BLKMEM blkmem,
SCIP_SET set,
SCIP_STAT stat,
SCIP_EVENTQUEUE eventqueue,
SCIP_EVENTFILTER eventfilter 
)

resets the LP to the empty LP by removing all columns and rows from LP, releasing all rows, and flushing the changes to the LP solver

Parameters
lpLP data
blkmemblock memory
setglobal SCIP settings
statproblem statistics
eventqueueevent queue
eventfilterglobal event filter

Definition at line 8934 of file lp.c.

References SCIP_Lp::dualfeasible, FALSE, SCIP_Lp::lastlpalgo, SCIP_Stat::lpcount, SCIP_Lp::lpobjval, SCIP_Lp::lpsolstat, NULL, SCIP_Lp::primalfeasible, SCIP_CALL, SCIP_LPALGO_DUALSIMPLEX, SCIP_LPSOLSTAT_OPTIMAL, SCIP_OKAY, SCIPlpClear(), SCIPlpFlush(), SCIP_Lp::solisbasic, SCIP_Lp::solved, TRUE, SCIP_Lp::validfarkaslp, and SCIP_Lp::validsollp.

Referenced by freeSolve(), and initSolve().

static void checkLazyColArray ( SCIP_LP lp,
SCIP_SET set 
)
static

method checks if all columns in the lazycols array have at least one lazy bound and also have a counter part in the cols array; furthermore, it is checked if columns in the cols array which have a lazy bound have a counter part in the lazycols array

Parameters
lpLP data
setglobal SCIP settings

Definition at line 9093 of file lp.c.

References SCIP_Lp::cols, FALSE, SCIP_Lp::lazycols, SCIP_Col::lazylb, SCIP_Col::lazyub, SCIP_Lp::ncols, SCIP_Lp::nlazycols, NULL, SCIP_Bool, SCIPsetIsInfinity(), and TRUE.

Referenced by lpDelColset(), and SCIPlpShrinkCols().

SCIP_RETCODE SCIPlpShrinkRows ( SCIP_LP lp,
BMS_BLKMEM blkmem,
SCIP_SET set,
SCIP_EVENTQUEUE eventqueue,
SCIP_EVENTFILTER eventfilter,
int  newnrows 
)

removes and releases all rows after the given number of rows from the LP

Parameters
lpLP data
blkmemblock memory
setglobal SCIP settings
eventqueueevent queue
eventfilterglobal event filter
newnrowsnew number of rows in the LP

Definition at line 9217 of file lp.c.

References checkLinks, SCIP_Row::cols, SCIP_EventFilter::eventmask, FALSE, SCIP_Lp::flushed, SCIP_EventFilter::len, SCIP_Row::len, SCIP_Row::lpdepth, SCIP_Lp::lpifirstchgrow, SCIP_Row::lppos, MIN, SCIP_Lp::nremovablerows, SCIP_Lp::nrows, NULL, SCIP_Row::removable, SCIP_Lp::rows, rowUpdateDelLP(), SCIP_CALL, SCIP_EVENTTYPE_ROWDELETEDLP, SCIP_OKAY, SCIPdebugMessage, SCIPeventCreateRowDeletedLP(), SCIPeventqueueAdd(), SCIProwRelease(), and SCIProwUnlock().

Referenced by focusnodeToFork(), SCIPlpClear(), SCIPlpEndDive(), SCIPtreeLoadLP(), and treeBacktrackProbing().

SCIP_RETCODE SCIPlpClear ( SCIP_LP lp,
BMS_BLKMEM blkmem,
SCIP_SET set,
SCIP_EVENTQUEUE eventqueue,
SCIP_EVENTFILTER eventfilter 
)

removes all columns and rows from LP, releases all rows

Parameters
lpLP data
blkmemblock memory
setglobal SCIP settings
eventqueueevent queue
eventfilterglobal event filter

Definition at line 9283 of file lp.c.

References SCIP_Lp::diving, NULL, SCIP_CALL, SCIP_OKAY, SCIPdebugMessage, SCIPlpShrinkCols(), and SCIPlpShrinkRows().

Referenced by SCIPlpFree(), SCIPlpReset(), and SCIPtreeLoadLP().

void SCIPlpMarkSize ( SCIP_LP lp)

remembers number of columns and rows to track the newly added ones

Parameters
lpcurrent LP data

Definition at line 9302 of file lp.c.

References SCIP_Lp::diving, SCIP_Lp::firstnewcol, SCIP_Lp::firstnewrow, SCIP_Lp::ncols, SCIP_Lp::nrows, and NULL.

Referenced by SCIPnodeFocus(), SCIPtreeLoadLP(), and treeCreateProbingNode().

void SCIPlpSetSizeMark ( SCIP_LP lp,
int  nrows,
int  ncols 
)

sets the remembered number of columns and rows to the given values

Parameters
lpcurrent LP data
nrowsnumber of rows to set the size marker to
ncolsnumber of columns to set the size marker to

Definition at line 9314 of file lp.c.

References SCIP_Lp::diving, SCIP_Lp::firstnewcol, SCIP_Lp::firstnewrow, and NULL.

Referenced by treeBacktrackProbing().

SCIP_RETCODE SCIPlpGetBasisInd ( SCIP_LP lp,
int *  basisind 
)

gets all indices of basic columns and rows: index i >= 0 corresponds to column i, index i < 0 to row -i-1

Parameters
lpLP data
basisindpointer to store basis indices ready to keep number of rows entries

Definition at line 9328 of file lp.c.

References SCIP_Lp::flushed, SCIP_Lp::lpi, NULL, SCIP_CALL, SCIP_OKAY, SCIPlpiGetBasisInd(), SCIP_Lp::solisbasic, and SCIP_Lp::solved.

Referenced by SCIPgetLPBasisInd().

SCIP_RETCODE SCIPlpGetBase ( SCIP_LP lp,
int *  cstat,
int *  rstat 
)

gets current basis status for columns and rows; arrays must be large enough to store the basis status

Parameters
lpLP data
cstatarray to store column basis status, or NULL
rstatarray to store row basis status, or NULL

Definition at line 9345 of file lp.c.

References SCIP_Lp::flushed, SCIP_Lp::lpi, NULL, SCIP_CALL, SCIP_OKAY, SCIPlpiGetBase(), SCIP_Lp::solisbasic, and SCIP_Lp::solved.

SCIP_RETCODE SCIPlpGetBInvRow ( SCIP_LP lp,
int  r,
SCIP_Real coef,
int *  inds,
int *  ninds 
)

gets a row from the inverse basis matrix B^-1

Parameters
lpLP data
rrow number
coefpointer to store the coefficients of the row
indsarray to store the non-zero indices, or NULL
nindspointer to store the number of non-zero indices, or NULL (-1: if we do not store sparsity informations)

Definition at line 9362 of file lp.c.

References SCIP_Lp::flushed, SCIP_Lp::lpi, NULL, SCIP_CALL, SCIP_OKAY, SCIPlpiGetBInvRow(), SCIP_Lp::solisbasic, and SCIP_Lp::solved.

Referenced by SCIPgetLPBInvRow().

SCIP_RETCODE SCIPlpGetBInvCol ( SCIP_LP lp,
int  c,
SCIP_Real coef,
int *  inds,
int *  ninds 
)

gets a column from the inverse basis matrix B^-1

Parameters
lpLP data
ccolumn number of B^-1; this is NOT the number of the column in the LP returned by SCIPcolGetLPPos(); you have to call SCIPgetBasisInd() to get the array which links the B^-1 column numbers to the row and column numbers of the LP! c must be between 0 and nrows-1, since the basis has the size nrows * nrows
coefpointer to store the coefficients of the column
indsarray to store the non-zero indices, or NULL
nindspointer to store the number of non-zero indices, or NULL (-1: if we do not store sparsity informations)

Definition at line 9384 of file lp.c.

References SCIP_Lp::flushed, SCIP_Lp::lpi, NULL, SCIP_CALL, SCIP_OKAY, SCIPlpiGetBInvCol(), SCIP_Lp::solisbasic, and SCIP_Lp::solved.

Referenced by SCIPgetLPBInvCol().

SCIP_RETCODE SCIPlpGetBInvARow ( SCIP_LP lp,
int  r,
SCIP_Real binvrow,
SCIP_Real coef,
int *  inds,
int *  ninds 
)

gets a row from the product of inverse basis matrix B^-1 and coefficient matrix A (i.e. from B^-1 * A)

Parameters
lpLP data
rrow number
binvrowrow in B^-1 from prior call to SCIPlpGetBInvRow(), or NULL
coefpointer to store the coefficients of the row
indsarray to store the non-zero indices, or NULL
nindspointer to store the number of non-zero indices, or NULL (-1: if we do not store sparsity informations)

Definition at line 9410 of file lp.c.

References SCIP_Lp::flushed, SCIP_Lp::lpi, NULL, SCIP_CALL, SCIP_OKAY, SCIPlpiGetBInvARow(), SCIP_Lp::solisbasic, and SCIP_Lp::solved.

Referenced by SCIPgetLPBInvARow().

SCIP_RETCODE SCIPlpGetBInvACol ( SCIP_LP lp,
int  c,
SCIP_Real coef,
int *  inds,
int *  ninds 
)

gets a column from the product of inverse basis matrix B^-1 and coefficient matrix A (i.e. from B^-1 * A), i.e., it computes B^-1 * A_c with A_c being the c'th column of A

Parameters
lpLP data
ccolumn number which can be accessed by SCIPcolGetLPPos()
coefpointer to store the coefficients of the column
indsarray to store the non-zero indices, or NULL
nindspointer to store the number of non-zero indices, or NULL (-1: if we do not store sparsity informations)

Definition at line 9435 of file lp.c.

References SCIP_Lp::flushed, SCIP_Lp::lpi, NULL, SCIP_CALL, SCIP_OKAY, SCIPlpiGetBInvACol(), SCIP_Lp::solisbasic, and SCIP_Lp::solved.

Referenced by SCIPgetLPBInvACol().

SCIP_RETCODE SCIPlpSumRows ( SCIP_LP lp,
SCIP_SET set,
SCIP_PROB prob,
SCIP_Real weights,
SCIP_REALARRAY sumcoef,
SCIP_Real sumlhs,
SCIP_Real sumrhs 
)

calculates a weighted sum of all LP rows; for negative weights, the left and right hand side of the corresponding LP row are swapped in the summation

Parameters
lpLP data
setglobal SCIP settings
probproblem data
weightsrow weights in row summation
sumcoefarray to store sum coefficients indexed by variables' probindex
sumlhspointer to store the left hand side of the row summation
sumrhspointer to store the right hand side of the row summation

Definition at line 9459 of file lp.c.

References SCIP_Row::cols, SCIP_Row::cols_index, SCIP_Row::constant, FALSE, SCIP_Row::len, SCIP_Row::lhs, SCIP_Lp::nrows, NULL, SCIP_Prob::nvars, SCIP_Row::rhs, SCIP_Lp::rows, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_VARSTATUS_COLUMN, SCIPrealarrayClear(), SCIPrealarrayExtend(), SCIPrealarrayIncVal(), SCIPsetInfinity(), SCIPsetIsInfinity(), SCIPsetIsZero(), SCIPvarGetCol(), SCIPvarGetProbindex(), SCIPvarGetStatus(), SCIP_Row::vals, SCIP_Col::var, and SCIP_Col::var_probindex.

Referenced by SCIPsumLPRows().

static SCIP_Real getMaxAbsWeightCalcSparsity ( SCIP_SET set,
SCIP_LP lp,
SCIP_Real weights,
int *  rowinds,
int *  nrowinds,
int *  rowlensum 
)
static

returns the maximum absolute row weight in the given weight vector, and calculates the sparsity pattern of the weights

Parameters
setglobal SCIP settings
lpLP data
weightsrow weights in row summation
rowindsarray to store sparsity pattern of used rows; size lp->nrows
nrowindspointer to store number of used rows
rowlensumpointer to store total number of non-zeros in used rows

Definition at line 9546 of file lp.c.

References MAX, SCIP_Lp::nrows, NULL, REALABS, SCIP_Lp::rows, SCIP_Real, SCIProwGetNNonz(), and SCIPsetIsZero().

Referenced by sumMIRRow(), and sumStrongCGRow().

static SCIP_Real getMaxAbsWeight ( SCIP_SET set,
SCIP_LP lp,
SCIP_Real weights,
int *  rowinds,
int *  nrowinds,
int *  rowlensum 
)
static

returns the maximum absolute row weight in the given weight vector using given sparsity pattern

Parameters
setglobal SCIP settings
lpLP data
weightsrow weights in row summation
rowindsarray of sparsity pattern of used rows; size lp->nrows
nrowindspointer to store number of used rows
rowlensumpointer to store total number of non-zeros in used rows

Definition at line 9591 of file lp.c.

References MAX, NULL, REALABS, SCIP_Lp::rows, SCIP_Real, SCIProwGetNNonz(), and SCIPsetIsZero().

Referenced by sumMIRRow(), and sumStrongCGRow().

static void addRowToAggregation ( SCIP_SET set,
SCIP_Real mircoef,
SCIP_Real mirrhs,
int *  slacksign,
SCIP_Bool varused,
int *  varinds,
int *  nvarinds,
SCIP_ROW row,
SCIP_Real  weight,
SCIP_Bool  uselhs 
)
static

adds a single row to an aggregation

Parameters
setglobal SCIP settings
mircoefarray of aggregation coefficients: must be of size prob->nvars
mirrhspointer to store the right hand side of the MIR row
slacksignstores the sign of the row's slack variable in summation
varusedarray to flag variables that appear in the MIR constraint; size prob->nvars
varindsarray to store sparsity pattern of non-zero MIR coefficients; size prob->nvars
nvarindspointer to store number of non-zero MIR coefficients
rowrow to add to the aggregation
weightweight of row in aggregation
uselhsTRUE if lhs should be used, FALSE if rhs should be used

Definition at line 9638 of file lp.c.

References SCIP_Row::cols, SCIP_Row::constant, SCIP_Row::integral, SCIP_Row::len, SCIP_Row::lhs, SCIP_Row::lppos, NULL, SCIP_Row::rhs, SCIP_Real, SCIP_VARSTATUS_COLUMN, SCIPsetFeasCeil(), SCIPsetFeasFloor(), SCIPvarGetCol(), SCIPvarGetProbindex(), SCIPvarGetStatus(), TRUE, SCIP_Row::vals, SCIP_Col::var, and SCIP_Col::var_probindex.

Referenced by sumMIRRow(), and sumStrongCGRow().

static void sumMIRRow ( SCIP_SET set,
SCIP_PROB prob,
SCIP_LP lp,
SCIP_Real weights,
SCIP_Real  knownmaxweight,
int *  sidetypes,
SCIP_Real  scale,
SCIP_Bool  allowlocal,
int  maxmksetcoefs,
SCIP_Real  maxweightrange,
SCIP_Bool  compress,
SCIP_Real mircoef,
SCIP_Real mirrhs,
int *  slacksign,
SCIP_Bool varused,
int *  varinds,
int *  nvarinds,
int *  rowinds,
int *  nrowinds,
SCIP_Bool emptyrow,
SCIP_Bool localrowsused,
SCIP_Bool rowtoolong,
int *  cutrank 
)
static

builds a weighted sum of rows, and decides whether to use the left or right hand side of the rows in summation

Parameters
setglobal SCIP settings
probproblem data
lpLP data
weightsrow weights in row summation
knownmaxweightlargest magnitude of weights. Set to 0 if compress == TRUE
sidetypesspecify row side type (-1 = lhs, 0 = unkown, 1 = rhs) or NULL for automatic choices
scaleadditional scaling factor multiplied to all rows
allowlocalshould local rows be included, resulting in a locally valid summation?
maxmksetcoefsmaximal number of nonzeros allowed in aggregated base inequality
maxweightrangemaximal valid range max(|weights|)/min(|weights|) of row weights
compressif rowinds is unknown and weights should be compressed
mircoefarray to store MIR coefficients: must be of size prob->nvars
mirrhspointer to store the right hand side of the MIR row
slacksignstores the sign of the row's slack variable in summation
varusedarray to flag variables that appear in the MIR constraint; size prob->nvars
varindsarray to store sparsity pattern of non-zero MIR coefficients; size prob->nvars
nvarindspointer to store number of non-zero MIR coefficients
rowindsarray to store sparsity pattern of used rows; size lp->nrows
nrowindspointer to store number of used rows
emptyrowpointer to store whether the returned row is empty
localrowsusedpointer to store whether local rows were used in summation
rowtoolongpointer to store whether the aggregated row is too long and thus invalid
cutrankpointer to store the rank of the returned aggregation; or NULL

Definition at line 9709 of file lp.c.

References addRowToAggregation(), BMSclearMemoryArray, SCIP_Row::cols, SCIP_Row::cols_index, SCIP_Row::constant, debugRowPrint, FALSE, getMaxAbsWeight(), getMaxAbsWeightCalcSparsity(), SCIP_Row::len, SCIP_Row::lhs, SCIP_Row::local, MAX, SCIP_Row::modifiable, NULL, SCIP_Prob::nvars, SCIP_Row::rank, REALABS, SCIP_Row::rhs, SCIP_Lp::rows, SCIP_Bool, SCIP_Real, SCIPdebugMessage, SCIProwGetName(), SCIPsetIsInfinity(), SCIPsetIsSumZero(), SCIPsetIsZero(), TRUE, and SCIP_Row::vals.

Referenced by SCIPlpCalcMIR().

static void cleanupMIRRow ( SCIP_SET set,
SCIP_PROB prob,
SCIP_Real mircoef,
SCIP_Real mirrhs,
SCIP_Bool varused,
int *  varinds,
int *  nvarinds,
SCIP_Bool  cutislocal 
)
static

removes all nearly-zero coefficients from MIR row and relaxes the right hand side correspondingly in order to prevent numerical rounding errors

Parameters
setglobal SCIP settings
probproblem data
mircoefarray to store MIR coefficients: must be of size nvars
mirrhspointer to store the right hand side of the MIR row
varusedarray to flag variables that appear in the MIR constraint
varindssparsity pattern of non-zero MIR coefficients
nvarindspointer to number of non-zero MIR coefficients
cutislocalis the cut only valid locally?

Definition at line 9900 of file lp.c.

References FALSE, NULL, SCIP_Bool, SCIP_Real, SCIPdebugMessage, SCIPsetInfinity(), SCIPsetIsInfinity(), SCIPsetIsNegative(), SCIPsetIsPositive(), SCIPsetIsSumZero(), SCIPvarGetLbGlobal(), SCIPvarGetLbLocal(), SCIPvarGetName(), SCIPvarGetUbGlobal(), SCIPvarGetUbLocal(), and SCIP_Prob::vars.

Referenced by SCIPlpCalcMIR(), and SCIPlpCalcStrongCG().

static void findBestLb ( SCIP_SET set,
SCIP_STAT stat,
SCIP_VAR var,
SCIP_SOL sol,
SCIP_Bool  usevbds,
SCIP_Bool  allowlocal,
SCIP_Real bestlb,
int *  bestlbtype 
)
static

finds the best lower bound of the variable to use for MIR transformation

Parameters
setglobal SCIP settings
statproblem statistics
varproblem variable
solthe solution that should be separated, or NULL for LP solution
usevbdsshould variable bounds be used in bound transformation?
allowlocalshould local information allowed to be used, resulting in a local cut?
bestlbpointer to store best bound value
bestlbtypepointer to store best bound type

Definition at line 9968 of file lp.c.

References NULL, SCIP_Real, SCIP_VARTYPE_CONTINUOUS, SCIPsetIsGE(), SCIPsetIsGT(), SCIPvarGetClosestVlb(), SCIPvarGetLbGlobal(), SCIPvarGetLbLocal(), SCIPvarGetProbindex(), SCIPvarGetType(), and SCIPvarGetVlbVars().

Referenced by transformMIRRow().

static void findBestUb ( SCIP_SET set,
SCIP_STAT stat,
SCIP_VAR var,
SCIP_SOL sol,
SCIP_Bool  usevbds,
SCIP_Bool  allowlocal,
SCIP_Real bestub,
int *  bestubtype 
)
static

finds the best upper bound of the variable to use for MIR transformation

Parameters
setglobal SCIP settings
statproblem statistics
varproblem variable
solthe solution that should be separated, or NULL for LP solution
usevbdsshould variable bounds be used in bound transformation?
allowlocalshould local information allowed to be used, resulting in a local cut?
bestubpointer to store best bound value
bestubtypepointer to store best bound type

Definition at line 10024 of file lp.c.

References NULL, SCIP_Real, SCIP_VARTYPE_CONTINUOUS, SCIPsetIsLE(), SCIPsetIsLT(), SCIPvarGetClosestVub(), SCIPvarGetProbindex(), SCIPvarGetType(), SCIPvarGetUbGlobal(), SCIPvarGetUbLocal(), and SCIPvarGetVubVars().

Referenced by transformMIRRow().

static SCIP_RETCODE transformMIRRow ( SCIP_SET set,
SCIP_STAT stat,
SCIP_PROB prob,
SCIP_SOL sol,
SCIP_Real  boundswitch,
SCIP_Bool  usevbds,
SCIP_Bool  allowlocal,
SCIP_Bool  fixintegralrhs,
int *  boundsfortrans,
SCIP_BOUNDTYPE boundtypesfortrans,
SCIP_Real  minfrac,
SCIP_Real  maxfrac,
SCIP_Real mircoef,
SCIP_Real mirrhs,
SCIP_Bool varused,
int *  varinds,
int *  nvarinds,
int *  varsign,
int *  boundtype,
SCIP_Bool freevariable,
SCIP_Bool localbdsused 
)
static

Transform equation $ a \cdot x = b; lb \leq x \leq ub $ into standard form $ a^\prime \cdot x^\prime = b,\; 0 \leq x^\prime \leq ub' $.

Transform variables (lb or ub):

\[ \begin{array}{llll} 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}\\ 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} \end{array} \]

and move the constant terms $ a_j\, lb_j $ or $ a_j\, ub_j $ to the rhs.

Transform variables (vlb or vub):

\[ \begin{array}{llll} 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.} \\ 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.} \end{array} \]

move the constant terms $ a_j\, dl_j $ or $ a_j\, du_j $ to the rhs, and update the coefficient of the VLB variable:

\[ \begin{array}{ll} a_{zl_j} := a_{zl_j} + a_j\, bl_j,& \mbox{or} \\ a_{zu_j} := a_{zu_j} + a_j\, bu_j & \end{array} \]

Parameters
setglobal SCIP settings
statproblem statistics
probproblem data
solthe solution that should be separated, or NULL for LP solution
boundswitchfraction of domain up to which lower bound is used in transformation
usevbdsshould variable bounds be used in bound transformation?
allowlocalshould local information allowed to be used, resulting in a local cut?
fixintegralrhsshould complementation tried to be adjusted such that rhs gets fractional?
boundsfortransbounds that should be used for transformed variables: vlb_idx/vub_idx, -1 for global lb/ub, -2 for local lb/ub, or -3 for using closest bound; NULL for using closest bound for all variables
boundtypesfortranstype of bounds that should be used for transformed variables; NULL for using closest bound for all variables
minfracminimal fractionality of rhs to produce MIR cut for
maxfracmaximal fractionality of rhs to produce MIR cut for
mircoefarray to store MIR coefficients: must be of size nvars
mirrhspointer to store the right hand side of the MIR row
varusedarray to flag variables that appear in the MIR constraint
varindssparsity pattern of non-zero MIR coefficients
nvarindspointer to number of non-zero MIR coefficients
varsignstores the sign of the transformed variable in summation
boundtypestores the bound used for transformed variable: vlb/vub_idx, or -1 for global lb/ub, or -2 for local lb/ub
freevariablestores whether a free variable was found in MIR row -> invalid summation
localbdsusedpointer to store whether local bounds were used in transformation

Definition at line 10105 of file lp.c.

References FALSE, findBestLb(), findBestUb(), NULL, SCIP_Prob::nvars, REALABS, SCIP_BASESTAT_ZERO, SCIP_Bool, SCIP_BOUNDTYPE_LOWER, SCIP_BOUNDTYPE_UPPER, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIP_VARTYPE_CONTINUOUS, SCIPcolGetBasisStatus(), SCIPdebugMessage, SCIPsetAllocBufferArray, SCIPsetFrac(), SCIPsetFreeBufferArray, SCIPsetIsGE(), SCIPsetIsGT(), SCIPsetIsInfinity(), SCIPsetIsLT(), SCIPsetIsZero(), SCIPsetSumFrac(), SCIPsolGetVal(), SCIPsortDownInt(), SCIPvarGetCol(), SCIPvarGetLbGlobal(), SCIPvarGetLbLocal(), SCIPvarGetLPSol(), SCIPvarGetName(), SCIPvarGetNVlbs(), SCIPvarGetNVubs(), SCIPvarGetProbindex(), SCIPvarGetType(), SCIPvarGetUbGlobal(), SCIPvarGetUbLocal(), SCIPvarGetVlbCoefs(), SCIPvarGetVlbConstants(), SCIPvarGetVlbVars(), SCIPvarGetVubCoefs(), SCIPvarGetVubConstants(), SCIPvarGetVubVars(), SCIPvarIsActive(), TRUE, and SCIP_Prob::vars.

Referenced by SCIPlpCalcMIR().

static void roundMIRRow ( SCIP_SET set,
SCIP_PROB prob,
SCIP_Real mircoef,
SCIP_Real mirrhs,
SCIP_Bool varused,
int *  varinds,
int *  nvarinds,
int *  varsign,
int *  boundtype,
SCIP_Real  f0 
)
static

Calculate fractionalities $ f_0 := b - down(b), f_j := a^\prime_j - down(a^\prime_j) $, and derive MIR cut $ \tilde{a} \cdot x' \leq down(b) $

\[ \begin{array}{rll} integers :& \tilde{a}_j = down(a^\prime_j), & if \qquad f_j \leq f_0 \\ & \tilde{a}_j = down(a^\prime_j) + (f_j - f_0)/(1 - f_0),& if \qquad f_j > f_0 \\ continuous:& \tilde{a}_j = 0, & if \qquad a^\prime_j \geq 0 \\ & \tilde{a}_j = a^\prime_j/(1 - f_0), & if \qquad a^\prime_j < 0 \end{array} \]

Transform inequality back to $ \hat{a} \cdot x \leq rhs $:

(lb or ub):

\[ \begin{array}{lllll} 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} \\ 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} \end{array} \]

and move the constant terms

\[ \begin{array}{cl} -\tilde{a}_j \cdot lb_j = -\hat{a}_j \cdot lb_j,& \mbox{or} \\ \tilde{a}_j \cdot ub_j = -\hat{a}_j \cdot ub_j & \end{array} \]

to the rhs.

(vlb or vub):

\[ \begin{array}{lllll} 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)} \\ 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)} \end{array} \]

move the constant terms

\[ \begin{array}{cl} -\tilde{a}_j\, dl_j = -\hat{a}_j\, dl_j,& \mbox{or} \\ \tilde{a}_j\, du_j = -\hat{a}_j\, du_j & \end{array} \]

to the rhs, and update the VB variable coefficients:

\[ \begin{array}{ll} \hat{a}_{zl_j} := \hat{a}_{zl_j} - \tilde{a}_j\, bl_j = \hat{a}_{zl_j} - \hat{a}_j\, bl_j,& \mbox{or} \\ \hat{a}_{zu_j} := \hat{a}_{zu_j} + \tilde{a}_j\, bu_j = \hat{a}_{zu_j} - \hat{a}_j\, bu_j & \end{array} \]

Parameters
setglobal SCIP settings
probproblem data
mircoefarray to store MIR coefficients: must be of size nvars
mirrhspointer to store the right hand side of the MIR row
varusedarray to flag variables that appear in the MIR constraint
varindssparsity pattern of non-zero MIR coefficients
nvarindspointer to number of non-zero MIR coefficients
varsignstores the sign of the transformed variable in summation
boundtypestores the bound used for transformed variable (vlb/vub_idx or -1 for lb/ub)
f0fractional value of rhs

Definition at line 10640 of file lp.c.

References FALSE, NULL, SCIP_Real, SCIPsetFloor(), SCIPsetIsInfinity(), SCIPsetIsSumLE(), SCIPsetIsZero(), SCIPsortDownInt(), SCIPvarGetLbGlobal(), SCIPvarGetLbLocal(), SCIPvarGetNVlbs(), SCIPvarGetNVubs(), SCIPvarGetProbindex(), SCIPvarGetUbGlobal(), SCIPvarGetUbLocal(), SCIPvarGetVlbCoefs(), SCIPvarGetVlbConstants(), SCIPvarGetVlbVars(), SCIPvarGetVubCoefs(), SCIPvarGetVubConstants(), SCIPvarGetVubVars(), SCIPvarIsActive(), SCIPvarIsIntegral(), TRUE, and SCIP_Prob::vars.

Referenced by SCIPlpCalcMIR().

static void substituteMIRRow ( SCIP_SET set,
SCIP_STAT stat,
SCIP_LP lp,
SCIP_Real weights,
SCIP_Real  scale,
SCIP_Real mircoef,
SCIP_Real mirrhs,
int *  slacksign,
SCIP_Bool varused,
int *  varinds,
int *  nvarinds,
int *  rowinds,
int  nrowinds,
SCIP_Real  f0 
)
static

substitute aggregated slack variables:

The coefficient of the slack variable s_r is equal to the row's weight times the slack's sign, because the slack variable only appears in its own row: $ a^\prime_r = scale * weight[r] * slacksign[r]. $

Depending on the slacks type (integral or continuous), its coefficient in the cut calculates as follows:

\[ \begin{array}{rll} integers : & \hat{a}_r = \tilde{a}_r = down(a^\prime_r), & \mbox{if}\qquad f_r <= f0 \\ & \hat{a}_r = \tilde{a}_r = down(a^\prime_r) + (f_r - f0)/(1 - f0),& \mbox{if}\qquad f_r > f0 \\ continuous:& \hat{a}_r = \tilde{a}_r = 0, & \mbox{if}\qquad a^\prime_r >= 0 \\ & \hat{a}_r = \tilde{a}_r = a^\prime_r/(1 - f0), & \mbox{if}\qquad a^\prime_r < 0 \end{array} \]

Substitute $ \hat{a}_r \cdot s_r $ by adding $ \hat{a}_r $ times the slack's definition to the cut.

Parameters
setglobal SCIP settings
statproblem statistics
lpLP data
weightsrow weights in row summation
scaleadditional scaling factor multiplied to all rows
mircoefarray to store MIR coefficients: must be of size nvars
mirrhspointer to store the right hand side of the MIR row
slacksignstores the sign of the row's slack variable in summation
varusedarray to flag variables that appear in the MIR constraint
varindssparsity pattern of non-zero MIR coefficients
nvarindspointer to number of non-zero MIR coefficients
rowindssparsity pattern of used rows
nrowindsnumber of used rows
f0fractional value of rhs

Definition at line 10827 of file lp.c.

References SCIP_Row::cols, SCIP_Row::cols_index, SCIP_Row::constant, SCIP_Row::integral, SCIP_Row::len, SCIP_Row::lhs, NULL, SCIP_Prob::nvars, SCIP_Row::rhs, SCIP_Lp::rows, SCIP_Real, SCIP_VARSTATUS_COLUMN, SCIPdebugMessage, SCIPdebugPrintf, SCIPsetFeasCeil(), SCIPsetFeasFloor(), SCIPsetFloor(), SCIPsetIsFeasIntegral(), SCIPsetIsInfinity(), SCIPsetIsLE(), SCIPsetIsZero(), SCIPsolGetVal(), SCIPvarGetCol(), SCIPvarGetLPSol(), SCIPvarGetName(), SCIPvarGetProbindex(), SCIPvarGetStatus(), TRUE, SCIP_Row::vals, SCIP_Col::var, SCIP_Col::var_probindex, and SCIP_Prob::vars.

Referenced by SCIPlpCalcMIR().

static SCIP_Real getMIRRowActivity ( SCIP_SET set,
SCIP_STAT stat,
SCIP_PROB prob,
SCIP_SOL sol,
SCIP_Real mircoef,
int *  varinds,
int  nvarinds 
)
static

calculates the activity of the given MIR cut

Parameters
setglobal SCIP settings
statproblem statistics
probproblem data
solthe solution that should be separated, or NULL for LP solution
mircoefarray to store MIR coefficients: must be of size nvars
varindssparsity pattern of non-zero MIR coefficients
nvarindsnumber of non-zero MIR coefficients

Definition at line 11012 of file lp.c.

References NULL, SCIP_Real, SCIPsolGetVal(), SCIPvarGetLPSol(), and SCIP_Prob::vars.

Referenced by SCIPlpCalcMIR(), and SCIPlpCalcStrongCG().

SCIP_RETCODE SCIPlpCalcMIR ( SCIP_LP lp,
SCIP_SET set,
SCIP_STAT stat,
SCIP_PROB prob,
SCIP_SOL sol,
SCIP_Real  boundswitch,
SCIP_Bool  usevbds,
SCIP_Bool  allowlocal,
SCIP_Bool  fixintegralrhs,
int *  boundsfortrans,
SCIP_BOUNDTYPE boundtypesfortrans,
int  maxmksetcoefs,
SCIP_Real  maxweightrange,
SCIP_Real  minfrac,
SCIP_Real  maxfrac,
SCIP_Real weights,
SCIP_Real  maxweight,
int *  weightinds,
int  nweightinds,
int  rowlensum,
int *  sidetypes,
SCIP_Real  scale,
SCIP_Real mksetcoefs,
SCIP_Bool mksetcoefsvalid,
SCIP_Real mircoef,
SCIP_Real mirrhs,
SCIP_Real cutactivity,
SCIP_Bool success,
SCIP_Bool cutislocal,
int *  cutrank 
)
Parameters
lpLP data
setglobal SCIP settings
statproblem statistics
probproblem data
solthe solution that should be separated, or NULL for LP solution
boundswitchfraction of domain up to which lower bound is used in transformation
usevbdsshould variable bounds be used in bound transformation?
allowlocalshould local information allowed to be used, resulting in a local cut?
fixintegralrhsshould complementation tried to be adjusted such that rhs gets fractional?
boundsfortransbounds that should be used for transformed variables: vlb_idx/vub_idx, -1 for global lb/ub, -2 for local lb/ub, or -3 for using closest bound; NULL for using closest bound for all variables
boundtypesfortranstype of bounds that should be used for transformed variables; NULL for using closest bound for all variables
maxmksetcoefsmaximal number of nonzeros allowed in aggregated base inequality
maxweightrangemaximal valid range max(|weights|)/min(|weights|) of row weights
minfracminimal fractionality of rhs to produce MIR cut for
maxfracmaximal fractionality of rhs to produce MIR cut for
weightsrow weights in row summation
maxweightlargest magnitude of weights; set to -1 if sparsity information is unknown
weightindssparsity pattern of weights; size nrowinds; NULL if sparsity info is unknown
nweightindsnumber of nonzeros in weights; -1 if rowinds is NULL
rowlensumtotal number of non-zeros in used rows (row associated with nonzero weight coefficient); -1 if unknown
sidetypesspecify row side type (-1 = lhs, 0 = unkown, 1 = rhs) or NULL for automatic choices
scaleadditional scaling factor multiplied to all rows
mksetcoefsarray to store mixed knapsack set coefficients: size nvars; or NULL
mksetcoefsvalidpointer to store whether mixed knapsack set coefficients are valid; or NULL
mircoefarray to store MIR coefficients: must be of size nvars
mirrhspointer to store the right hand side of the MIR row
cutactivitypointer to store the activity of the resulting cut
successpointer to store whether the returned coefficients are a valid MIR cut
cutislocalpointer to store whether the returned cut is only valid locally
cutrankpointer to store the rank of the returned cut; or NULL

Definition at line 11043 of file lp.c.

References BMScopyMemoryArray, cleanupMIRRow(), FALSE, getMIRRowActivity(), MAXCMIRSCALE, SCIP_Lp::nrows, NULL, SCIP_Prob::nvars, REALABS, roundMIRRow(), SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPdebug, SCIPdebugMessage, SCIPsetAllocBufferArray, SCIPsetDuplicateBufferArray, SCIPsetFreeBufferArray, SCIPsetIsZero(), SCIPsetSumFloor(), SCIP_Lp::solved, substituteMIRRow(), sumMIRRow(), transformMIRRow(), and TRUE.

Referenced by SCIPcalcMIR().

static void sumStrongCGRow ( SCIP_SET set,
SCIP_PROB prob,
SCIP_LP lp,
SCIP_Real weights,
SCIP_Real  scale,
SCIP_Bool  allowlocal,
int  maxmksetcoefs,
SCIP_Real  maxweightrange,
SCIP_Real strongcgcoef,
SCIP_Real strongcgrhs,
int *  slacksign,
SCIP_Bool varused,
int *  varinds,
int *  nvarinds,
int *  rowinds,
int *  nrowinds,
SCIP_Bool emptyrow,
SCIP_Bool localrowsused,
SCIP_Bool rowtoolong,
int *  cutrank 
)
static

builds a weighted sum of rows, and decides whether to use the left or right hand side of the rows in summation

Parameters
setglobal SCIP settings
probproblem data
lpLP data
weightsrow weights in row summation
scaleadditional scaling factor multiplied to all rows
allowlocalshould local rows be included, resulting in a locally valid summation?
maxmksetcoefsmaximal number of nonzeros allowed in aggregated base inequality
maxweightrangemaximal valid range max(|weights|)/min(|weights|) of row weights
strongcgcoefarray to store strong CG coefficients: must be of size prob->nvars
strongcgrhspointer to store the right hand side of the strong CG row
slacksignstores the sign of the row's slack variable in summation
varusedarray to flag variables that appear in the MIR constraint; size prob->nvars
varindsarray to store sparsity pattern of non-zero MIR coefficients; size prob->nvars
nvarindspointer to store number of non-zero MIR coefficients
rowindsarray to store sparsity pattern of used rows; size lp->nrows
nrowindspointer to store number of used rows
emptyrowpointer to store whether the returned row is empty
localrowsusedpointer to store whether local rows were used in summation
rowtoolongpointer to store whether the aggregated row is too long and thus invalid
cutrankpointer to store the rank of the returned aggregation; or NULL

Definition at line 11280 of file lp.c.

References addRowToAggregation(), BMSclearMemoryArray, SCIP_Row::cols, SCIP_Row::cols_index, SCIP_Row::constant, debugRowPrint, FALSE, getMaxAbsWeight(), getMaxAbsWeightCalcSparsity(), SCIP_Row::integral, SCIP_Row::len, SCIP_Row::lhs, SCIP_Row::local, MAX, SCIP_Row::modifiable, NULL, SCIP_Prob::nvars, SCIP_Row::rank, SCIP_Row::rhs, SCIP_Lp::rows, SCIP_Bool, SCIP_Real, SCIPdebugMessage, SCIProwGetName(), SCIPsetIsInfinity(), SCIPsetIsSumZero(), SCIPsetIsZero(), TRUE, and SCIP_Row::vals.

Referenced by SCIPlpCalcStrongCG().

static void transformStrongCGRow ( SCIP_SET set,
SCIP_STAT stat,
SCIP_PROB prob,
SCIP_Real  boundswitch,
SCIP_Bool  usevbds,
SCIP_Bool  allowlocal,
SCIP_Real strongcgcoef,
SCIP_Real strongcgrhs,
SCIP_Bool varused,
int *  varinds,
int *  nvarinds,
int *  varsign,
int *  boundtype,
SCIP_Bool freevariable,
SCIP_Bool localbdsused 
)
static

Transform equation $ a*x == b $, $ lb <= x <= ub $ into standard form $ a^\prime*x^\prime == b$, $ 0 <= x^\prime <= ub^\prime $.

Transform variables (lb or ub):

\[ \begin{array}{llll} 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} \\ 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} \end{array} \]

and move the constant terms $ a_j * lb_j $ or $ a_j * ub_j $ to the rhs.

Transform variables (vlb or vub):

\[ \begin{array}{llll} 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.} \\ 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.} \end{array} \]

move the constant terms $ a_j * dl_j $ or $ a_j * du_j $ to the rhs, and update the coefficient of the VLB variable:

\[ \begin{array}{ll} a_{zl_j} := a_{zl_j} + a_j * bl_j,& \mbox{or} \\ a_{zu_j} := a_{zu_j} + a_j * bu_j& \end{array} \]

Parameters
setglobal SCIP settings
statproblem statistics
probproblem data
boundswitchfraction of domain up to which lower bound is used in transformation
usevbdsshould variable bounds be used in bound transformation?
allowlocalshould local information allowed to be used, resulting in a local cut?
strongcgcoefarray to store strong CG coefficients: must be of size nvars
strongcgrhspointer to store the right hand side of the strong CG row
varusedarray to flag variables that appear in the MIR constraint
varindssparsity pattern of non-zero MIR coefficients
nvarindspointer to number of non-zero MIR coefficients
varsignstores the sign of the transformed variable in summation
boundtypestores the bound used for transformed variable: vlb/vub_idx, or -1 for global lb/ub, or -2 for local lb/ub
freevariablestores whether a free variable was found in strong CG row -> invalid summation
localbdsusedpointer to store whether local bounds were used in transformation

Definition at line 11476 of file lp.c.

References FALSE, NULL, SCIP_Prob::nvars, SCIP_Bool, SCIP_Real, SCIP_VARTYPE_CONTINUOUS, SCIPdebugMessage, SCIPsetIsGE(), SCIPsetIsGT(), SCIPsetIsInfinity(), SCIPsetIsLE(), SCIPsetIsLT(), SCIPsetIsZero(), SCIPsortDownInt(), SCIPvarGetClosestVlb(), SCIPvarGetClosestVub(), SCIPvarGetLbGlobal(), SCIPvarGetLbLocal(), SCIPvarGetLPSol(), SCIPvarGetName(), SCIPvarGetNVlbs(), SCIPvarGetNVubs(), SCIPvarGetProbindex(), SCIPvarGetType(), SCIPvarGetUbGlobal(), SCIPvarGetUbLocal(), SCIPvarGetVlbCoefs(), SCIPvarGetVlbConstants(), SCIPvarGetVlbVars(), SCIPvarGetVubCoefs(), SCIPvarGetVubConstants(), SCIPvarGetVubVars(), SCIPvarIsActive(), TRUE, and SCIP_Prob::vars.

Referenced by SCIPlpCalcStrongCG().

static void roundStrongCGRow ( SCIP_SET set,
SCIP_PROB prob,
SCIP_Real strongcgcoef,
SCIP_Real strongcgrhs,
SCIP_Bool varused,
int *  varinds,
int *  nvarinds,
int *  varsign,
int *  boundtype,
SCIP_Real  f0,
SCIP_Real  k 
)
static

Calculate fractionalities $ f_0 := b - down(b) $, $ f_j := a^\prime_j - down(a^\prime_j) $ and integer $ k >= 1 $ with $ 1/(k + 1) <= f_0 < 1/k $ and $ (=> k = up(1/f_0) + 1) $ 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)$ $ (=> p_j = up( k*(f_j - f_0)/(1 - f_0) )) $ and derive strong CG cut $ \tilde{a}*x^\prime <= down(b) $

\[ \begin{array}{rll} integers : & \tilde{a}_j = down(a^\prime_j) &, if \qquad f_j <= f_0 \\ & \tilde{a}_j = down(a^\prime_j) + p_j/(k + 1) &, if \qquad f_j > f_0 \\ continuous:& \tilde{a}_j = 0 &, if \qquad a^\prime_j >= 0 \\ & \mbox{no strong CG cut found} &, if \qquad a^\prime_j < 0 \end{array} \]

Transform inequality back to $ \hat{a}*x <= rhs $:

(lb or ub):

\[ \begin{array}{lllll} 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} \\ 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} \end{array} \]

and move the constant terms

\[ \begin{array}{rl} -\tilde{a}_j * lb_j == -\hat{a}_j * lb_j, & \mbox{or} \\ \tilde{a}_j * ub_j == -\hat{a}_j * ub_j & \end{array} \]

to the rhs.

(vlb or vub):

\[ \begin{array}{lllll} 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)} \\ 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)} \end{array} \]

move the constant terms

\[ \begin{array}{rl} -\tilde{a}_j * dl_j == -\hat{a}_j * dl_j,& \mbox{or} \\ \tilde{a}_j * du_j == -\hat{a}_j * du_j & \end{array} \]

to the rhs, and update the VB variable coefficients:

\[ \begin{array}{ll} \hat{a}_{zl_j} := \hat{a}_{zl_j} - \tilde{a}_j * bl_j == \hat{a}_{zl_j} - \hat{a}_j * bl_j,& \mbox{or} \\ \hat{a}_{zu_j} := \hat{a}_{zu_j} + \tilde{a}_j * bu_j == \hat{a}_{zu_j} - \hat{a}_j * bu_j & \end{array} \]

Parameters
setglobal SCIP settings
probproblem data
strongcgcoefarray to store strong CG coefficients: must be of size nvars
strongcgrhspointer to store the right hand side of the strong CG row
varusedarray to flag variables that appear in the MIR constraint
varindssparsity pattern of non-zero MIR coefficients
nvarindspointer to number of non-zero MIR coefficients
varsignstores the sign of the transformed variable in summation
boundtypestores the bound used for transformed variable (vlb/vub_idx or -1 for lb/ub)
f0fractional value of rhs
kfactor to strengthen strongcg cut

Definition at line 11802 of file lp.c.

References FALSE, SCIP_Prob::ncontvars, NULL, SCIP_Prob::nvars, SCIP_Real, SCIP_VARTYPE_CONTINUOUS, SCIPsetCeil(), SCIPsetFloor(), SCIPsetIsInfinity(), SCIPsetIsSumLE(), SCIPsetIsZero(), SCIPsortDownInt(), SCIPvarGetLbGlobal(), SCIPvarGetLbLocal(), SCIPvarGetProbindex(), SCIPvarGetType(), SCIPvarGetUbGlobal(), SCIPvarGetUbLocal(), SCIPvarIsIntegral(), and SCIP_Prob::vars.

Referenced by SCIPlpCalcStrongCG().

static void substituteStrongCGRow ( SCIP_SET set,
SCIP_STAT stat,
SCIP_LP lp,
SCIP_Real weights,
SCIP_Real  scale,
SCIP_Real strongcgcoef,
SCIP_Real strongcgrhs,
int *  slacksign,
SCIP_Bool varused,
int *  varinds,
int *  nvarinds,
int *  rowinds,
int  nrowinds,
SCIP_Real  f0,
SCIP_Real  k 
)
static

substitute aggregated slack variables:

The coefficient of the slack variable s_r is equal to the row's weight times the slack's sign, because the slack variable only appears in its own row: $ a^\prime_r = scale * weight[r] * slacksign[r] $.

Depending on the slacks type (integral or continuous), its coefficient in the cut calculates as follows:

\[ \begin{array}{rll} integers: & \hat{a}_r = \tilde{a}_r = down(a^\prime_r) &, if \qquad f_r <= f0 \\ & \hat{a}_r = \tilde{a}_r = down(a^\prime_r) + p_r/(k + 1) &, if \qquad f_r > f0 \\ continuous:& \hat{a}_r = \tilde{a}_r = 0 &, if \qquad a^\prime_r >= 0 \\ & \mbox{no strong CG cut found} &, if \qquad a^\prime_r < 0 \end{array} \]

Substitute $ \hat{a}_r * s_r $ by adding $ \hat{a}_r $ times the slack's definition to the cut.

Parameters
setglobal SCIP settings
statproblem statistics
lpLP data
weightsrow weights in row summation
scaleadditional scaling factor multiplied to all rows
strongcgcoefarray to store strong CG coefficients: must be of size nvars
strongcgrhspointer to store the right hand side of the strong CG row
slacksignstores the sign of the row's slack variable in summation
varusedarray to flag variables that appear in the MIR constraint
varindssparsity pattern of non-zero MIR coefficients
nvarindspointer to number of non-zero MIR coefficients
rowindssparsity pattern of used rows
nrowindsnumber of used rows
f0fractional value of rhs
kfactor to strengthen strongcg cut

Definition at line 11981 of file lp.c.

References SCIP_Row::cols, SCIP_Row::cols_index, SCIP_Row::constant, SCIP_Row::integral, SCIP_Row::len, SCIP_Row::lhs, NULL, SCIP_Row::rhs, SCIP_Lp::rows, SCIP_Real, SCIP_VARSTATUS_COLUMN, SCIPsetCeil(), SCIPsetFeasCeil(), SCIPsetFeasFloor(), SCIPsetFloor(), SCIPsetIsInfinity(), SCIPsetIsLE(), SCIPsetIsZero(), SCIPvarGetCol(), SCIPvarGetProbindex(), SCIPvarGetStatus(), TRUE, SCIP_Row::vals, SCIP_Col::var, and SCIP_Col::var_probindex.

Referenced by SCIPlpCalcStrongCG().

SCIP_RETCODE SCIPlpCalcStrongCG ( SCIP_LP lp,
SCIP_SET set,
SCIP_STAT stat,
SCIP_PROB prob,
SCIP_Real  boundswitch,
SCIP_Bool  usevbds,
SCIP_Bool  allowlocal,
int  maxmksetcoefs,
SCIP_Real  maxweightrange,
SCIP_Real  minfrac,
SCIP_Real  maxfrac,
SCIP_Real weights,
int *  rowinds,
int  nrowinds,
SCIP_Real  scale,
SCIP_Real strongcgcoef,
SCIP_Real strongcgrhs,
SCIP_Real cutactivity,
SCIP_Bool success,
SCIP_Bool cutislocal,
int *  cutrank 
)
Parameters
lpLP data
setglobal SCIP settings
statproblem statistics
probproblem data
boundswitchfraction of domain up to which lower bound is used in transformation
usevbdsshould variable bounds be used in bound transformation?
allowlocalshould local information allowed to be used, resulting in a local cut?
maxmksetcoefsmaximal number of nonzeros allowed in aggregated base inequality
maxweightrangemaximal valid range max(|weights|)/min(|weights|) of row weights
minfracminimal fractionality of rhs to produce strong CG cut for
maxfracmaximal fractionality of rhs to produce strong CG cut for
weightsrow weights in row summation
rowindsarray to store indices of non-zero entries of the weights array, or NULL
nrowindsnumber of non-zero entries in weights array, -1 if rowinds is NULL
scaleadditional scaling factor multiplied to all rows
strongcgcoefarray to store strong CG coefficients: must be of size nvars
strongcgrhspointer to store the right hand side of the strong CG row
cutactivitypointer to store the activity of the resulting cut
successpointer to store whether the returned coefficients are a valid strong CG cut
cutislocalpointer to store whether the returned cut is only valid locally
cutrankpointer to store the rank of the returned cut; or NULL

Definition at line 12136 of file lp.c.

References cleanupMIRRow(), FALSE, getMIRRowActivity(), SCIP_Lp::nrows, NULL, SCIP_Prob::nvars, roundStrongCGRow(), SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPdebug, SCIPdebugMessage, SCIPsetAllocBufferArray, SCIPsetCeil(), SCIPsetFreeBufferArray, SCIPsetIsZero(), SCIPsetSumFloor(), SCIP_Lp::solved, substituteStrongCGRow(), sumStrongCGRow(), transformStrongCGRow(), and TRUE.

Referenced by SCIPcalcStrongCG().

SCIP_RETCODE SCIPlpGetState ( SCIP_LP lp,
BMS_BLKMEM blkmem,
SCIP_LPISTATE **  lpistate 
)

stores LP state (like basis information) into LP state object

Parameters
lpLP data
blkmemblock memory
lpistatepointer to LP state information (like basis information)

Definition at line 12339 of file lp.c.

References SCIP_Lp::flushed, SCIP_Lp::lpi, SCIP_Lp::nlpicols, SCIP_Lp::nlpirows, NULL, SCIP_CALL, SCIP_OKAY, SCIPlpiGetState(), and SCIP_Lp::solved.

Referenced by forkCreate(), forkFree(), probingnodeUpdate(), and SCIPtreeStartProbing().

SCIP_RETCODE SCIPlpSetState ( SCIP_LP lp,
BMS_BLKMEM blkmem,
SCIP_SET set,
SCIP_EVENTQUEUE eventqueue,
SCIP_LPISTATE lpistate,
SCIP_Bool  wasprimfeas,
SCIP_Bool  wasdualfeas 
)

loads LP state (like basis information) into solver

Parameters
lpLP data
blkmemblock memory
setglobal SCIP settings
eventqueueevent queue
lpistateLP state information (like basis information)
wasprimfeasprimal feasibility when LP state information was stored
wasdualfeasdual feasibility when LP state information was stored

Definition at line 12363 of file lp.c.

References SCIP_Lp::dualfeasible, FALSE, SCIP_Lp::flushed, SCIP_Lp::lpi, NULL, SCIP_Lp::primalfeasible, SCIP_CALL, SCIP_OKAY, SCIPlpFlush(), SCIPlpiHasStateBasis(), SCIPlpiSetState(), SCIP_Lp::solisbasic, and SCIP_Lp::solved.

Referenced by SCIPlpEndDive(), SCIPtreeEndProbing(), SCIPtreeLoadLPState(), and SCIPtreeLoadProbingLPState().

SCIP_RETCODE SCIPlpFreeState ( SCIP_LP lp,
BMS_BLKMEM blkmem,
SCIP_LPISTATE **  lpistate 
)

frees LP state information

Parameters
lpLP data
blkmemblock memory
lpistatepointer to LP state information (like basis information)

Definition at line 12401 of file lp.c.

References SCIP_Lp::lpi, NULL, SCIP_CALL, SCIP_OKAY, and SCIPlpiFreeState().

Referenced by forkReleaseLPIState(), probingnodeFree(), probingnodeUpdate(), SCIPlpEndDive(), SCIPtreeEndProbing(), and subrootReleaseLPIState().

SCIP_RETCODE SCIPlpGetNorms ( SCIP_LP lp,
BMS_BLKMEM blkmem,
SCIP_LPINORMS **  lpinorms 
)

stores pricing norms into LP norms object

Parameters
lpLP data
blkmemblock memory
lpinormspointer to LP pricing norms information

Definition at line 12418 of file lp.c.

References SCIP_Lp::flushed, SCIP_Lp::lpi, SCIP_Lp::nlpicols, SCIP_Lp::nlpirows, NULL, SCIP_CALL, SCIP_OKAY, SCIPlpiGetNorms(), and SCIP_Lp::solved.

Referenced by SCIPtreeStartProbing().

SCIP_RETCODE SCIPlpSetNorms ( SCIP_LP lp,
BMS_BLKMEM blkmem,
SCIP_LPINORMS lpinorms 
)

loads pricing norms from LP norms object into solver

Parameters
lpLP data
blkmemblock memory
lpinormsLP pricing norms information

Definition at line 12442 of file lp.c.

References SCIP_Lp::flushed, SCIP_Lp::lpi, NULL, SCIP_CALL, SCIP_OKAY, and SCIPlpiSetNorms().

Referenced by SCIPtreeEndProbing(), and SCIPtreeLoadProbingLPState().

SCIP_RETCODE SCIPlpFreeNorms ( SCIP_LP lp,
BMS_BLKMEM blkmem,
SCIP_LPINORMS **  lpinorms 
)

frees pricing norms information

Parameters
lpLP data
blkmemblock memory
lpinormspointer to LP pricing norms information

Definition at line 12462 of file lp.c.

References SCIP_Lp::lpi, NULL, SCIP_CALL, SCIP_OKAY, and SCIPlpiFreeNorms().

Referenced by SCIPtreeEndProbing().

SCIP_RETCODE SCIPlpSetCutoffbound ( SCIP_LP lp,
SCIP_SET set,
SCIP_PROB prob,
SCIP_Real  cutoffbound 
)
static const char* lpalgoName ( SCIP_LPALGO  lpalgo)
static

returns the name of the given LP algorithm

Parameters
lpalgoLP algorithm

Definition at line 12522 of file lp.c.

References SCIP_LPALGO_BARRIER, SCIP_LPALGO_BARRIERCROSSOVER, SCIP_LPALGO_DUALSIMPLEX, SCIP_LPALGO_PRIMALSIMPLEX, SCIPABORT, and SCIPerrorMessage.

Referenced by lpAlgorithm(), lpSolve(), and lpSolveStable().

static SCIP_RETCODE lpPrimalSimplex ( SCIP_LP lp,
SCIP_SET set,
SCIP_STAT stat,
SCIP_Bool  resolve,
SCIP_Bool  keepsol,
SCIP_Bool lperror 
)
static

calls LPI to perform primal simplex, measures time and counts iterations, gets basis feasibility status

Parameters
lpcurrent LP data
setglobal SCIP settings
statproblem statistics
resolveis this a resolving call (starting with feasible basis)?
keepsolshould the old LP solution be kept if no iterations were performed?
lperrorpointer to store whether an unresolved LP error occurred

Definition at line 12545 of file lp.c.

References SCIP_Lp::diving, SCIP_Stat::divinglptime, FALSE, SCIP_Lp::flushed, SCIP_Stat::lastdivenode, SCIP_Lp::lastlpalgo, SCIP_Stat::lpcount, SCIP_Lp::lpi, SCIP_Lp::lpidualfeastol, SCIP_Lp::lpifastmip, SCIP_Lp::lpifeastol, SCIP_Lp::lpifromscratch, SCIP_Lp::lpipresolving, SCIP_Lp::lpiscaling, SCIP_Lp::lpiuobjlim, SCIP_Lp::ncols, SCIP_Stat::ndivinglpiterations, SCIP_Stat::ndivinglps, SCIP_Stat::nlpiterations, SCIP_Stat::nlps, SCIP_Stat::nnodes, SCIP_Stat::nprimallpiterations, SCIP_Stat::nprimallps, SCIP_Stat::nprimalresolvelpiterations, SCIP_Stat::nprimalresolvelps, SCIP_Stat::nprimalzeroitlps, SCIP_Lp::nrows, SCIP_Stat::nsbdivinglpiterations, SCIP_Stat::nsbdivinglps, NULL, SCIP_Stat::primallptime, SCIP_Stat::primalzeroittime, SCIP_Lp::probing, SCIP_CALL, SCIP_LPALGO_PRIMALSIMPLEX, SCIP_LPERROR, SCIP_MAXSTRLEN, SCIP_OKAY, SCIP_Real, SCIPclockGetTime(), SCIPclockStart(), SCIPclockStop(), SCIPdebugMessage, SCIPlpGetIterations(), SCIPlpiSolvePrimal(), SCIPlpWrite(), SCIPmessagePrintInfo(), SCIPsnprintf(), SCIP_Lp::solisbasic, SCIP_Lp::strongbranchprobing, SCIP_Stat::strongbranchtime, TRUE, SCIP_Lp::validfarkaslp, and SCIP_Lp::validsollp.

Referenced by lpAlgorithm().

static SCIP_RETCODE lpDualSimplex ( SCIP_LP lp,
SCIP_SET set,
SCIP_STAT stat,
SCIP_Bool  resolve,
SCIP_Bool  keepsol,
SCIP_Bool lperror 
)
static

calls LPI to perform dual simplex, measures time and counts iterations

Parameters
lpcurrent LP data
setglobal SCIP settings
statproblem statistics
resolveis this a resolving call (starting with feasible basis)?
keepsolshould the old LP solution be kept if no iterations were performed?
lperrorpointer to store whether an unresolved LP error occurred

Definition at line 12686 of file lp.c.

References SCIP_Lp::diving, SCIP_Stat::divinglptime, SCIP_Stat::duallptime, SCIP_Stat::dualzeroittime, FALSE, SCIP_Lp::flushed, SCIP_Stat::lastdivenode, SCIP_Lp::lastlpalgo, SCIP_Stat::lpcount, SCIP_Lp::lpi, SCIP_Lp::lpidualfeastol, SCIP_Lp::lpifastmip, SCIP_Lp::lpifeastol, SCIP_Lp::lpifromscratch, SCIP_Lp::lpipresolving, SCIP_Lp::lpiscaling, SCIP_Lp::lpiuobjlim, SCIP_Lp::ncols, SCIP_Stat::ndivinglpiterations, SCIP_Stat::ndivinglps, SCIP_Stat::nduallpiterations, SCIP_Stat::nduallps, SCIP_Stat::ndualresolvelpiterations, SCIP_Stat::ndualresolvelps, SCIP_Stat::ndualzeroitlps, SCIP_Stat::nlpiterations, SCIP_Stat::nlps, SCIP_Stat::nnodes, SCIP_Lp::nrows, SCIP_Stat::nsbdivinglpiterations, SCIP_Stat::nsbdivinglps, NULL, SCIP_Lp::probing, SCIP_CALL, SCIP_LPALGO_DUALSIMPLEX, SCIP_LPERROR, SCIP_MAXSTRLEN, SCIP_OKAY, SCIP_Real, SCIPclockGetTime(), SCIPclockStart(), SCIPclockStop(), SCIPdebugMessage, SCIPlpGetIterations(), SCIPlpiSolveDual(), SCIPlpWrite(), SCIPmessagePrintInfo(), SCIPsnprintf(), SCIP_Lp::solisbasic, SCIP_Lp::strongbranchprobing, SCIP_Stat::strongbranchtime, TRUE, SCIP_Lp::validfarkaslp, and SCIP_Lp::validsollp.

Referenced by lpAlgorithm().

static SCIP_RETCODE lpLexDualSimplex ( SCIP_LP lp,
SCIP_SET set,
SCIP_STAT stat,
SCIP_Bool  resolve,
SCIP_Bool  keepsol,
SCIP_Bool lperror 
)
static

calls LPI to perform lexicographic dual simplex to find a lexicographically minimal optimal solution, measures time and counts iterations

We follow the approach of the following paper to find a lexicographically minimal optimal solution:

Zanette, Fischetti, Balas
Can pure cutting plane algorithms work?
IPCO 2008, Bertinoro, Italy.

We do, however, not aim for the exact lexicographically minimal optimal solutions, but perform a heuristic, i.e., we limit the number of components which are minimized.

More precisely, we first solve the problem with the dual simplex algorithm. Then we fix those nonbasic variables to their current value (i.e., one of the bounds except maybe for free variables) that have nonzero reduced cost. This fixes the objective function value, because only pivots that will not change the objective are allowed afterwards.

Then the not yet fixed variables are considered in turn. If they are at their lower bounds and nonbasic, they are fixed to this bound, since their value cannot be decreased further. Once a candidate is found, we set the objective to minimize this variable. We run the primal simplex algorithm (since the objective is changed the solution is not dual feasible anymore; if variables out of the basis have been fixed to their lower bound, the basis is also not primal feasible anymore). After the optimization, we again fix nonbasic variables that have nonzero reduced cost. We then choose the next variable and iterate.

We stop the process once we do not find candidates or have performed a maximum number of iterations.

Parameters
lpcurrent LP data
setglobal SCIP settings
statproblem statistics
resolveis this a resolving call (starting with feasible basis)?
keepsolshould the old LP solution be kept if no iterations were performed?
lperrorpointer to store whether an unresolved LP error occurred

Definition at line 12860 of file lp.c.

References SCIP_Lp::diving, SCIP_Stat::divinglptime, SCIP_Stat::duallptime, SCIP_Stat::dualzeroittime, FALSE, SCIP_Lp::flushed, SCIP_Stat::lastdivenode, SCIP_Lp::lastlpalgo, SCIP_Stat::lexduallptime, SCIP_Stat::lpcount, SCIP_Lp::lpi, SCIP_Lp::lpifromscratch, SCIP_Lp::ncols, SCIP_Stat::ndivinglpiterations, SCIP_Stat::ndivinglps, SCIP_Stat::nduallpiterations, SCIP_Stat::nduallps, SCIP_Stat::ndualresolvelpiterations, SCIP_Stat::ndualresolvelps, SCIP_Stat::ndualzeroitlps, SCIP_Stat::nlexduallpiterations, SCIP_Stat::nlexduallps, SCIP_Stat::nlexdualresolvelpiterations, SCIP_Stat::nlexdualresolvelps, SCIP_Lp::nlpicols, SCIP_Lp::nlpirows, SCIP_Stat::nlpiterations, SCIP_Stat::nlps, SCIP_Stat::nnodes, SCIP_Lp::nrows, SCIP_Stat::nsbdivinglpiterations, SCIP_Stat::nsbdivinglps, NULL, SCIP_Lp::probing, SCIP_BASESTAT_BASIC, SCIP_BASESTAT_LOWER, SCIP_BASESTAT_UPPER, SCIP_BASESTAT_ZERO, SCIP_Bool, SCIP_CALL, SCIP_LPALGO_DUALSIMPLEX, SCIP_LPERROR, SCIP_OKAY, SCIP_Real, SCIPABORT, SCIPclockGetTime(), SCIPclockStart(), SCIPclockStop(), SCIPdebugMessage, SCIPerrorMessage, SCIPlpGetIterations(), SCIPlpiChgBounds(), SCIPlpiChgObj(), SCIPlpiChgSides(), SCIPlpiGetBase(), SCIPlpiGetBounds(), SCIPlpiGetObj(), SCIPlpiGetSides(), SCIPlpiGetSol(), SCIPlpiIsOptimal(), SCIPlpiSolveDual(), SCIPlpiSolvePrimal(), SCIPsetAllocBufferArray, SCIPsetFreeBufferArray, SCIPsetIsDualfeasZero(), SCIPsetIsFeasEQ(), SCIPsetIsFeasPositive(), SCIPsetIsFeasZero(), SCIPsetIsInfinity(), SCIPsetIsIntegral(), SCIP_Lp::solisbasic, SCIP_Lp::strongbranchprobing, SCIP_Stat::strongbranchtime, TRUE, SCIP_Lp::validfarkaslp, and SCIP_Lp::validsollp.

Referenced by lpAlgorithm().

static SCIP_RETCODE lpBarrier ( SCIP_LP lp,
SCIP_SET set,
SCIP_STAT stat,
SCIP_Bool  crossover,
SCIP_Bool  keepsol,
SCIP_Bool lperror 
)
static

calls LPI to perform barrier, measures time and counts iterations, gets basis feasibility status

Parameters
lpcurrent LP data
setglobal SCIP settings
statproblem statistics
crossovershould crossover be performed?
keepsolshould the old LP solution be kept if no iterations were performed?
lperrorpointer to store whether an unresolved LP error occurred

Definition at line 13458 of file lp.c.

References SCIP_Stat::barrierlptime, SCIP_Stat::barrierzeroittime, SCIP_Lp::diving, SCIP_Stat::divinglptime, SCIP_Stat::duallptime, FALSE, SCIP_Lp::flushed, SCIP_Stat::lastdivenode, SCIP_Lp::lastlpalgo, SCIP_Stat::lpcount, SCIP_Lp::lpi, SCIP_Lp::lpibarrierconvtol, SCIP_Lp::lpidualfeastol, SCIP_Lp::lpifastmip, SCIP_Lp::lpifeastol, SCIP_Lp::lpifromscratch, SCIP_Lp::lpipresolving, SCIP_Lp::lpiscaling, SCIP_Lp::lpiuobjlim, SCIP_Stat::nbarrierlpiterations, SCIP_Stat::nbarrierlps, SCIP_Stat::nbarrierzeroitlps, SCIP_Lp::ncols, SCIP_Stat::ndivinglpiterations, SCIP_Stat::ndivinglps, SCIP_Stat::nlpiterations, SCIP_Stat::nlps, SCIP_Stat::nnodes, SCIP_Lp::nrows, SCIP_Stat::nsbdivinglpiterations, SCIP_Stat::nsbdivinglps, NULL, SCIP_Lp::probing, SCIP_CALL, SCIP_LPALGO_BARRIER, SCIP_LPALGO_BARRIERCROSSOVER, SCIP_LPERROR, SCIP_MAXSTRLEN, SCIP_OKAY, SCIP_Real, SCIPclockGetTime(), SCIPclockStart(), SCIPclockStop(), SCIPdebugMessage, SCIPlpGetIterations(), SCIPlpiSolveBarrier(), SCIPlpWrite(), SCIPmessagePrintInfo(), SCIPsnprintf(), SCIP_Lp::solisbasic, SCIP_Lp::strongbranchprobing, SCIP_Stat::strongbranchtime, TRUE, SCIP_Lp::validfarkaslp, and SCIP_Lp::validsollp.

Referenced by lpAlgorithm().

static SCIP_RETCODE lpAlgorithm ( SCIP_LP lp,
SCIP_SET set,
SCIP_STAT stat,
SCIP_LPALGO  lpalgo,
SCIP_Bool  resolve,
SCIP_Bool  keepsol,
SCIP_Bool timelimit,
SCIP_Bool lperror 
)
static

solves the LP with the given algorithm

Parameters
lpcurrent LP data
setglobal SCIP settings
statproblem statistics
lpalgoLP algorithm that should be applied
resolveis this a resolving call (starting with feasible basis)?
keepsolshould the old LP solution be kept if no iterations were performed?
timelimitpointer to store whether the time limit was hit
lperrorpointer to store whether an unresolved LP error occurred

Definition at line 13595 of file lp.c.

References SCIP_Lp::dualfeasible, FALSE, SCIP_Lp::flushed, SCIP_Lp::installing, lpalgoName(), lpBarrier(), lpDualSimplex(), SCIP_Lp::lpi, lpLexDualSimplex(), lpPrimalSimplex(), lpSetRealpar(), SCIP_Stat::maxdepth, NULL, SCIP_Lp::primalfeasible, SCIP_Bool, SCIP_CALL, SCIP_INVALIDDATA, SCIP_LPALGO_BARRIER, SCIP_LPALGO_BARRIERCROSSOVER, SCIP_LPALGO_DUALSIMPLEX, SCIP_LPALGO_PRIMALSIMPLEX, SCIP_LPPAR_LPTILIM, SCIP_OKAY, SCIP_Real, SCIPclockGetTime(), SCIPdebugMessage, SCIPerrorMessage, SCIPlpiGetSolFeasibility(), SCIPsetInfinity(), SCIP_Stat::solvingtime, and TRUE.

Referenced by lpSolveStable().

static SCIP_RETCODE lpSolveStable ( SCIP_LP lp,
SCIP_SET set,
SCIP_MESSAGEHDLR messagehdlr,
SCIP_STAT stat,
SCIP_PROB prob,
SCIP_LPALGO  lpalgo,
int  itlim,
int  harditlim,
SCIP_Bool  resolve,
int  fastmip,
SCIP_Bool  tightprimfeastol,
SCIP_Bool  tightdualfeastol,
SCIP_Bool  fromscratch,
SCIP_Bool  keepsol,
SCIP_Bool timelimit,
SCIP_Bool lperror 
)
static

solves the LP with the given LP algorithm, and tries to resolve numerical problems

Parameters
lpcurrent LP data
setglobal SCIP settings
messagehdlrmessage handler
statproblem statistics
probproblem data
lpalgoLP algorithm that should be applied
itlimmaximal number of LP iterations to perform in first LP calls (before solving from scratch), or -1 for no limit
harditlimmaximal number of LP iterations to perform (hard limit for all LP calls), or -1 for no limit
resolveis this a resolving call (starting with feasible basis)?
fastmipwhich FASTMIP setting of LP solver should be used?
tightprimfeastolshould a tighter primal feasibility tolerance be used?
tightdualfeastolshould a tighter dual feasibility tolerance be used?
fromscratchshould the LP be solved from scratch without using current basis?
keepsolshould the old LP solution be kept if no iterations were performed?
timelimitpointer to store whether the time limit was hit
lperrorpointer to store whether an unresolved LP error occurred

Definition at line 13677 of file lp.c.

References SCIP_Lp::cutoffbound, FALSE, FEASTOLTIGHTFAC, SCIP_Lp::flushed, getFiniteLooseObjval(), SCIP_Lp::looseobjvalinf, lpalgoName(), lpAlgorithm(), SCIP_Lp::lpi, lpSetBarrierconvtol(), lpSetConditionLimit(), lpSetDualfeastol(), lpSetFastmip(), lpSetFeastol(), lpSetFromscratch(), lpSetIterationLimit(), lpSetLPInfo(), lpSetPresolving(), lpSetPricingChar(), lpSetRowrepswitch(), lpSetScaling(), lpSetThreads(), lpSetTiming(), lpSetUobjlim(), SCIP_Stat::nlps, SCIP_Stat::nnodes, NULL, SCIP_Bool, SCIP_CALL, SCIP_ERROR, SCIP_LPALGO_DUALSIMPLEX, SCIP_LPALGO_PRIMALSIMPLEX, SCIP_OKAY, SCIP_VERBLEVEL_FULL, SCIP_VERBLEVEL_HIGH, SCIPerrorMessage, SCIPlpiIgnoreInstability(), SCIPlpiIsIterlimExc(), SCIPlpiIsStable(), SCIPmessagePrintVerbInfo(), SCIPsetBarrierconvtol(), SCIPsetDualfeastol(), SCIPsetIsInfinity(), SCIPsetLpfeastol(), and TRUE.

Referenced by lpSolve().

static void adjustLPobjval ( SCIP_LP lp,
SCIP_SET set,
SCIP_MESSAGEHDLR messagehdlr 
)
static

adjust the LP objective value if its greater/less than +/- SCIPsetInfinity()

Parameters
lpcurrent LP data
setglobal SCIP settings
messagehdlrmessage handler

Definition at line 14111 of file lp.c.

References SCIP_Lp::adjustlpval, SCIP_Lp::lpobjval, NULL, SCIPmessagePrintWarning(), SCIPsetInfinity(), SCIPsetIsInfinity(), and TRUE.

Referenced by lpSolve().

static SCIP_RETCODE lpSolve ( SCIP_LP lp,
SCIP_SET set,
SCIP_MESSAGEHDLR messagehdlr,
SCIP_STAT stat,
SCIP_PROB prob,
SCIP_LPALGO  lpalgo,
int  resolveitlim,
int  harditlim,
SCIP_Bool  needprimalray,
SCIP_Bool  needdualray,
SCIP_Bool  resolve,
int  fastmip,
SCIP_Bool  tightprimfeastol,
SCIP_Bool  tightdualfeastol,
SCIP_Bool  fromscratch,
SCIP_Bool  keepsol,
SCIP_Bool lperror 
)
static

solves the LP with the given algorithm and evaluates return status

Parameters
lpcurrent LP data
setglobal SCIP settings
messagehdlrmessage handler
statproblem statistics
probproblem data
lpalgoLP algorithm that should be applied
resolveitlimmaximal number of LP iterations to perform in resolving calls, or -1 for no limit
harditlimmaximal number of LP iterations to perform (hard limit for all LP calls), or -1 for no limit
needprimalrayif the LP is unbounded, do we need a primal ray?
needdualrayif the LP is infeasible, do we need a dual ray?
resolveis this a resolving call (starting with feasible basis)?
fastmipwhich FASTMIP setting of LP solver should be used?
tightprimfeastolshould a tighter primal feasibility tolerance be used?
tightdualfeastolshould a tighter dual feasibility tolerance be used?
fromscratchshould the LP be solved from scratch without using current basis?
keepsolshould the old LP solution be kept if no iterations were performed?
lperrorpointer to store whether an unresolved LP error occurred

Definition at line 14142 of file lp.c.

References adjustLPobjval(), checkLinks, SCIP_Lp::cutoffbound, SCIP_Lp::dualfeasible, FALSE, SCIP_Lp::flushed, getFiniteLooseObjval(), SCIP_Lp::lastlpalgo, lpalgoName(), lpCutoffDisabled, SCIP_Lp::lpi, SCIP_Lp::lpiuobjlim, SCIP_Lp::lpobjval, SCIP_Lp::lpsolstat, lpSolveStable(), SCIP_Stat::nlps, SCIP_Stat::nnodes, NULL, SCIP_Lp::primalfeasible, SCIP_Bool, SCIP_CALL, SCIP_LPALGO_DUALSIMPLEX, SCIP_LPALGO_PRIMALSIMPLEX, SCIP_LPERROR, SCIP_LPSOLSTAT_ERROR, SCIP_LPSOLSTAT_INFEASIBLE, SCIP_LPSOLSTAT_ITERLIMIT, SCIP_LPSOLSTAT_NOTSOLVED, SCIP_LPSOLSTAT_OBJLIMIT, SCIP_LPSOLSTAT_OPTIMAL, SCIP_LPSOLSTAT_TIMELIMIT, SCIP_LPSOLSTAT_UNBOUNDEDRAY, SCIP_OKAY, SCIP_VERBLEVEL_FULL, SCIPdebugMessage, SCIPerrorMessage, SCIPlpiExistsPrimalRay(), SCIPlpiGetInternalStatus(), SCIPlpiGetObjval(), SCIPlpiHasDualRay(), SCIPlpiHasPrimalRay(), SCIPlpiIsDualFeasible(), SCIPlpiIsIterlimExc(), SCIPlpiIsObjlimExc(), SCIPlpiIsOptimal(), SCIPlpiIsPrimalFeasible(), SCIPlpiIsPrimalInfeasible(), SCIPlpiIsTimelimExc(), SCIPmessagePrintVerbInfo(), SCIPsetInfinity(), SCIPsetIsGE(), SCIPsetIsInfinity(), SCIPsetIsLE(), SCIP_Lp::solved, and TRUE.

Referenced by lpFlushAndSolve(), and SCIPlpSolveAndEval().

static SCIP_RETCODE lpFlushAndSolve ( SCIP_LP lp,
BMS_BLKMEM blkmem,
SCIP_SET set,
SCIP_MESSAGEHDLR messagehdlr,
SCIP_STAT stat,
SCIP_PROB prob,
SCIP_EVENTQUEUE eventqueue,
int  resolveitlim,
int  harditlim,
SCIP_Bool  needprimalray,
SCIP_Bool  needdualray,
int  fastmip,
SCIP_Bool  tightprimfeastol,
SCIP_Bool  tightdualfeastol,
SCIP_Bool  fromscratch,
SCIP_Bool  keepsol,
SCIP_Bool lperror 
)
static

flushes the LP and solves it with the primal or dual simplex algorithm, depending on the current basis feasibility

Parameters
lpcurrent LP data
blkmemblock memory
setglobal SCIP settings
messagehdlrmessage handler
statproblem statistics
probproblem data
eventqueueevent queue
resolveitlimmaximal number of LP iterations to perform in resolving calls, or -1 for no limit
harditlimmaximal number of LP iterations to perform (hard limit for all LP calls), or -1 for no limit
needprimalrayif the LP is unbounded, do we need a primal ray?
needdualrayif the LP is infeasible, do we need a dual ray?
fastmipwhich FASTMIP setting of LP solver should be used?
tightprimfeastolshould a tighter primal feasibility tolerance be used?
tightdualfeastolshould a tighter dual feasibility tolerance be used?
fromscratchshould the LP be solved from scratch without using current basis?
keepsolshould the old LP solution be kept if no iterations were performed?
lperrorpointer to store whether an unresolved LP error occurred

Definition at line 14313 of file lp.c.

References SCIP_Lp::dualfeasible, SCIP_Lp::flushaddedcols, SCIP_Lp::flushdeletedcols, lpSolve(), NULL, SCIP_Lp::primalfeasible, SCIP_Bool, SCIP_CALL, SCIP_LPALGO_BARRIER, SCIP_LPALGO_BARRIERCROSSOVER, SCIP_LPALGO_DUALSIMPLEX, SCIP_LPALGO_PRIMALSIMPLEX, SCIP_OKAY, SCIP_PARAMETERWRONGVAL, SCIPdebugMessage, SCIPerrorMessage, SCIPlpFlush(), SCIP_Lp::solisbasic, and SCIP_Lp::solved.

Referenced by SCIPlpSolveAndEval().

static void checkLazyBounds ( SCIP_LP lp,
SCIP_SET set 
)
static

checks if the lazy bounds are valid

Parameters
lpLP data
setglobal SCIP settings

Definition at line 14402 of file lp.c.

References SCIP_Lp::flushed, SCIP_Lp::lazycols, SCIP_Col::lazylb, SCIP_Col::lazyub, SCIP_Lp::nlazycols, SCIP_Col::primsol, SCIPsetIsFeasGE(), SCIPsetIsFeasLE(), and SCIPsetIsInfinity().

Referenced by SCIPlpSolveAndEval().

static SCIP_RETCODE updateLazyBounds ( SCIP_LP lp,
SCIP_SET set 
)
static

marks all lazy columns to be changed; this is needed for reloading/removing bounds of these columns before and after diving

Parameters
lpLP data
setglobal SCIP settings

Definition at line 14429 of file lp.c.

References SCIP_Lp::diving, SCIP_Lp::divinglazyapplied, SCIP_Col::flushedlb, SCIP_Col::flushedub, insertColChgcols(), SCIP_Lp::lazycols, SCIP_Col::lazylb, SCIP_Col::lazyub, SCIP_Col::lb, SCIP_Col::lbchanged, SCIP_Lp::lpi, SCIP_Lp::nlazycols, SCIP_CALL, SCIP_OKAY, SCIPdebugMessage, SCIPlpiInfinity(), SCIPsetIsGT(), SCIPsetIsInfinity(), SCIPsetIsLT(), TRUE, SCIP_Col::ub, and SCIP_Col::ubchanged.

Referenced by SCIPlpEndDive(), and SCIPlpSolveAndEval().

static int lpGetResolveItlim ( SCIP_SET set,
SCIP_STAT stat,
int  itlim 
)
static

returns the iteration limit for an LP resolving call

Parameters
setglobal SCIP settings
statdynamic problem statistics
itlimhard iteration limit

Definition at line 14491 of file lp.c.

References MAX, MIN, SCIP_Stat::nlpiterations, SCIP_Stat::nlps, SCIP_Stat::nrootlpiterations, SCIP_Stat::nrootlps, and SCIP_Real.

Referenced by SCIPlpSolveAndEval().

SCIP_RETCODE SCIPlpSolveAndEval ( SCIP_LP lp,
SCIP_SET set,
SCIP_MESSAGEHDLR messagehdlr,
BMS_BLKMEM blkmem,
SCIP_STAT stat,
SCIP_EVENTQUEUE eventqueue,
SCIP_EVENTFILTER eventfilter,
SCIP_PROB prob,
SCIP_Longint  itlim,
SCIP_Bool  limitresolveiters,
SCIP_Bool  aging,
SCIP_Bool  keepsol,
SCIP_Bool lperror 
)

solves the LP with simplex algorithm, and copy the solution into the column's data

Parameters
lpLP data
setglobal SCIP settings
messagehdlrmessage handler
blkmemblock memory buffers
statproblem statistics
eventqueueevent queue
eventfilterglobal event filter
probproblem data
itlimmaximal number of LP iterations to perform, or -1 for no limit
limitresolveitersshould LP iterations for resolving calls be limited? (limit is computed within the method w.r.t. the average LP iterations)
agingshould aging and removal of obsolete cols/rows be applied?
keepsolshould the old LP solution be kept if no iterations were performed?
lperrorpointer to store whether an unresolved LP error occurred

Definition at line 14511 of file lp.c.

References checkLazyBounds(), SCIP_Lp::cutoffbound, SCIP_Lp::diving, SCIP_Lp::divinglazyapplied, SCIP_Lp::dualfeasible, FALSE, SCIP_Lp::flushaddedcols, SCIP_Lp::flushdeletedcols, SCIP_Lp::flushed, getFiniteLooseObjval(), SCIP_Lp::lastlpalgo, lpCutoffDisabled, lpFlushAndSolve(), lpGetResolveItlim(), SCIP_Lp::lpi, SCIP_Lp::lpifromscratch, SCIP_Lp::lpihasfastmip, SCIP_Lp::lpiuobjlim, SCIP_Lp::lpobjval, lpSetFromscratch(), SCIP_Lp::lpsolstat, lpSolve(), MIN, SCIP_Stat::nclockskipsleft, SCIP_Lp::ncols, SCIP_Lp::nlazycols, SCIP_Stat::nlps, SCIP_Stat::nnodes, SCIP_Lp::nrows, NULL, SCIP_Prob::nvars, SCIP_Lp::primalfeasible, SCIP_Lp::probing, SCIP_Bool, SCIP_CALL, SCIP_ERROR, SCIP_Longint, SCIP_LPALGO_DUALSIMPLEX, SCIP_LPALGO_PRIMALSIMPLEX, SCIP_LPERROR, SCIP_LPSOLSTAT_ERROR, SCIP_LPSOLSTAT_INFEASIBLE, SCIP_LPSOLSTAT_ITERLIMIT, SCIP_LPSOLSTAT_NOTSOLVED, SCIP_LPSOLSTAT_OBJLIMIT, SCIP_LPSOLSTAT_OPTIMAL, SCIP_LPSOLSTAT_TIMELIMIT, SCIP_LPSOLSTAT_UNBOUNDEDRAY, SCIP_OKAY, SCIP_Real, SCIP_STATUS_TIMELIMIT, SCIP_VERBLEVEL_FULL, SCIP_VERBLEVEL_HIGH, SCIPdebugMessage, SCIPerrorMessage, SCIPlpFlush(), SCIPlpGetDualfarkas(), SCIPlpGetLPI(), SCIPlpGetSol(), SCIPlpGetSolstat(), SCIPlpGetUnboundedSol(), SCIPlpiGetObjval(), SCIPlpiHasDualRay(), SCIPlpiInfinity(), SCIPlpiIsObjlimExc(), SCIPlpRemoveNewObsoletes(), SCIPlpUpdateAges(), SCIPmessagePrintVerbInfo(), SCIPmessagePrintWarning(), SCIPprobAllColsInLP(), SCIPsetGetCharParam(), SCIPsetInfinity(), SCIPsetIsFeasNegative(), SCIPsetIsGE(), SCIPsetIsLT(), SCIPsetSetCharParam(), SCIPsolveIsStopped(), SCIP_Lp::solved, SCIP_Stat::status, TRUE, and updateLazyBounds().

Referenced by focusnodeToFork(), priceAndCutLoop(), SCIPlpEndDive(), SCIPpriceLoop(), SCIPsolveDiveLP(), SCIPtreeEndProbing(), separationRoundResolveLP(), solveNodeInitialLP(), solveNodeLP(), and solveProbingLP().

SCIP_Real SCIPlpGetObjval ( SCIP_LP lp,
SCIP_SET set,
SCIP_PROB prob 
)

gets objective value of current LP

Note
This method returns the objective value of the current LP solution, which might be primal or dual infeasible if a limit was hit during solving. It must not be used as a dual bound if the LP solution status is SCIP_LPSOLSTAT_ITERLIMIT or SCIP_LPSOLSTAT_TIMELIMIT.
Parameters
lpcurrent LP data
setglobal SCIP settings
probproblem data

Definition at line 15076 of file lp.c.

References SCIP_Lp::flushed, SCIP_Lp::looseobjval, SCIP_Lp::looseobjvalid, SCIP_Lp::looseobjvalinf, SCIP_Lp::lpobjval, SCIP_Lp::nloosevars, NULL, recomputeLooseObjectiveValue(), SCIP_INVALID, SCIPsetInfinity(), SCIPsetIsInfinity(), and SCIP_Lp::solved.

Referenced by analyzeStrongbranch(), forkCreate(), forkFree(), priceAndCutLoop(), propAndSolve(), SCIPcolGetStrongbranch(), SCIPcolGetStrongbranches(), SCIPgetLPObjval(), SCIPgetSolOrigObj(), SCIPgetSolTransObj(), SCIPlpSetCutoffbound(), SCIPnodeUpdateLowerboundLP(), SCIPprobUpdateBestRootSol(), SCIPsolLinkLPSol(), solveNodeInitialLP(), solveNodeLP(), and updatePseudocost().

SCIP_Real SCIPlpGetColumnObjval ( SCIP_LP lp)

gets part of objective value of current LP that results from COLUMN variables only

Parameters
lpcurrent LP data

Definition at line 15104 of file lp.c.

References SCIP_Lp::flushed, SCIP_Lp::lpobjval, NULL, SCIP_INVALID, and SCIP_Lp::solved.

Referenced by SCIPgetLPColumnObjval(), and SCIPlpStoreRootObjval().

SCIP_Real SCIPlpGetLooseObjval ( SCIP_LP lp,
SCIP_SET set,
SCIP_PROB prob 
)

gets part of objective value of current LP that results from LOOSE variables only

Parameters
lpcurrent LP data
setglobal SCIP settings
probproblem data

Definition at line 15115 of file lp.c.

References SCIP_Lp::flushed, getFiniteLooseObjval(), SCIP_Lp::looseobjval, SCIP_Lp::looseobjvalinf, SCIP_Lp::nloosevars, NULL, SCIP_INVALID, SCIPsetInfinity(), and SCIP_Lp::solved.

Referenced by performStrongbranchWithPropagation(), SCIPgetLPLooseObjval(), SCIPlpStoreRootObjval(), and SCIPsolLinkLPSol().

void SCIPlpStoreRootObjval ( SCIP_LP lp,
SCIP_SET set,
SCIP_PROB prob 
)

remembers the current LP objective value as root solution value

Parameters
lpcurrent LP data
setglobal SCIP settings
probproblem data

Definition at line 15135 of file lp.c.

References NULL, SCIP_Lp::rootlooseobjval, SCIP_Lp::rootlpobjval, SCIPlpGetColumnObjval(), and SCIPlpGetLooseObjval().

Referenced by SCIPprobStoreRootSol().

void SCIPlpInvalidateRootObjval ( SCIP_LP lp)

invalidates the root LP solution value

Parameters
lpcurrent LP data

Definition at line 15148 of file lp.c.

References NULL, SCIP_Lp::rootlooseobjval, SCIP_Lp::rootlpobjval, and SCIP_INVALID.

Referenced by freeSolve().

void SCIPlpRecomputeLocalAndGlobalPseudoObjval ( SCIP_LP lp,
SCIP_SET set,
SCIP_PROB prob 
)
SCIP_Real SCIPlpGetGlobalPseudoObjval ( SCIP_LP lp,
SCIP_SET set,
SCIP_PROB prob 
)

gets the global pseudo objective value; that is all variables set to their best (w.r.t. the objective function) global bound

Parameters
lpcurrent LP data
setglobal SCIP settings
probproblem data

Definition at line 15227 of file lp.c.

References SCIP_Lp::glbpseudoobjval, SCIP_Lp::glbpseudoobjvalid, SCIP_Lp::glbpseudoobjvalinf, NULL, recomputeGlbPseudoObjectiveValue(), SCIPsetInfinity(), and SCIPsetIsInfinity().

Referenced by SCIPgetGlobalPseudoObjval(), and solveNode().

SCIP_Real SCIPlpGetPseudoObjval ( SCIP_LP lp,
SCIP_SET set,
SCIP_PROB prob 
)

gets the pseudo objective value for the current search node; that is all variables set to their best (w.r.t. the objective function) local bound

Parameters
lpcurrent LP data
setglobal SCIP settings
probproblem data

Definition at line 15256 of file lp.c.

References NULL, SCIP_Lp::pseudoobjval, SCIP_Lp::pseudoobjvalid, SCIP_Lp::pseudoobjvalinf, recomputePseudoObjectiveValue(), SCIPsetInfinity(), and SCIPsetIsInfinity().

Referenced by applyBounding(), enforceConstraints(), SCIPconflictAnalyzePseudo(), SCIPgetPseudoObjval(), SCIPgetSolOrigObj(), SCIPgetSolTransObj(), SCIPprimalHeuristics(), SCIPsolLinkPseudoSol(), and solveNode().

SCIP_Real SCIPlpGetModifiedPseudoObjval ( SCIP_LP lp,
SCIP_SET set,
SCIP_PROB prob,
SCIP_VAR var,
SCIP_Real  oldbound,
SCIP_Real  newbound,
SCIP_BOUNDTYPE  boundtype 
)

gets pseudo objective value, if a bound of the given variable would be modified in the given way

Parameters
lpcurrent LP data
setglobal SCIP settings
probproblem data
varproblem variable
oldboundold value for bound
newboundnew value for bound
boundtypetype of bound: lower or upper bound

Definition at line 15283 of file lp.c.

References getFinitePseudoObjval(), SCIP_Lp::pseudoobjvalinf, REALABS, SCIP_Real, SCIPsetInfinity(), SCIPsetIsInfinity(), SCIPsetIsZero(), SCIPvarGetBestBoundType(), and SCIPvarGetObj().

Referenced by SCIPnodeAddBoundinfer().

SCIP_Real SCIPlpGetModifiedProvedPseudoObjval ( SCIP_LP lp,
SCIP_SET set,
SCIP_VAR var,
SCIP_Real  oldbound,
SCIP_Real  newbound,
SCIP_BOUNDTYPE  boundtype 
)

gets pseudo objective value, if a bound of the given variable would be modified in the given way; perform calculations with interval arithmetic to get an exact lower bound

Parameters
lpcurrent LP data
setglobal SCIP settings
varproblem variable
oldboundold value for bound
newboundnew value for bound
boundtypetype of bound: lower or upper bound

Definition at line 15323 of file lp.c.

References SCIP_Lp::pseudoobjval, SCIP_Lp::pseudoobjvalid, SCIP_Lp::pseudoobjvalinf, REALABS, SCIP_Real, SCIPintervalAdd(), SCIPintervalGetInf(), SCIPintervalMul(), SCIPintervalSet(), SCIPintervalSub(), SCIPsetInfinity(), SCIPsetIsInfinity(), SCIPsetIsZero(), SCIPvarGetBestBoundType(), and SCIPvarGetObj().

Referenced by SCIPnodeAddBoundinfer().

static void getObjvalDeltaObj ( SCIP_SET set,
SCIP_Real  oldobj,
SCIP_Real  newobj,
SCIP_Real  lb,
SCIP_Real  ub,
SCIP_Real deltaval,
int *  deltainf 
)
static

compute the objective delta due the new objective coefficient

Parameters
setglobal SCIP settings
oldobjold objective value of variable
newobjnew objective value of variable
lblower bound of variable
ubupper bound of variable
deltavalpointer to store the delta value
deltainfpointer to store the number of variables with infinite best bound

Definition at line 15381 of file lp.c.

References REALABS, SCIPsetIsEQ(), SCIPsetIsInfinity(), SCIPsetIsNegative(), and SCIPsetIsPositive().

Referenced by SCIPlpUpdateVarObj().

static void getObjvalDeltaLb ( SCIP_SET set,
SCIP_Real  obj,
SCIP_Real  oldlb,
SCIP_Real  newlb,
SCIP_Real deltaval,
int *  deltainf 
)
static

compute the objective delta due the new lower bound

Parameters
setglobal SCIP settings
objobjective value of variable
oldlbold lower bound of variable
newlbnew lower bound of variable
deltavalpointer to store the delta value
deltainfpointer to store the number of variables with infinite best bound

Definition at line 15513 of file lp.c.

References REALABS, SCIPsetIsInfinity(), and SCIPsetIsPositive().

Referenced by SCIPlpUpdateVarLb(), and SCIPlpUpdateVarLbGlobal().

static void getObjvalDeltaUb ( SCIP_SET set,
SCIP_Real  obj,
SCIP_Real  oldub,
SCIP_Real  newub,
SCIP_Real deltaval,
int *  deltainf 
)
static

compute the objective delta due the new upper bound

Parameters
setglobal SCIP settings
objobjective value of variable
oldubold upper bound of variable
newubnew upper bound of variable
deltavalpointer to store the delta value
deltainfpointer to store the number of variables with infinite best bound

Definition at line 15554 of file lp.c.

References REALABS, SCIPsetIsInfinity(), and SCIPsetIsNegative().

Referenced by SCIPlpUpdateVarUb(), and SCIPlpUpdateVarUbGlobal().

static void lpUpdateObjval ( SCIP_LP lp,
SCIP_SET set,
SCIP_VAR var,
SCIP_Real  deltaval,
int  deltainf,
SCIP_Bool  local,
SCIP_Bool  loose,
SCIP_Bool  global 
)
static

updates current pseudo and loose objective values for a change in a variable's objective value or bounds

Parameters
lpcurrent LP data
setglobal SCIP settings
varproblem variable that changed
deltavaldelta value in the objective function
deltainfdelta value for the number of variables with infinite best bound
localshould the local pseudo objective value be updated?
looseshould the loose objective value be updated?
globalshould the global pseudo objective value be updated?

Definition at line 15595 of file lp.c.

References FALSE, SCIP_Lp::glbpseudoobjval, SCIP_Lp::glbpseudoobjvalid, SCIP_Lp::glbpseudoobjvalinf, SCIP_Lp::looseobjval, SCIP_Lp::looseobjvalid, SCIP_Lp::looseobjvalinf, NULL, SCIP_Lp::pseudoobjval, SCIP_Lp::pseudoobjvalid, SCIP_Lp::pseudoobjvalinf, REALABS, SCIP_Lp::relglbpseudoobjval, SCIP_Lp::rellooseobjval, SCIP_Lp::relpseudoobjval, SCIP_VARSTATUS_LOOSE, SCIPsetIsUpdateUnreliable(), SCIPvarGetStatus(), and TRUE.

Referenced by lpUpdateVarColumn(), lpUpdateVarLoose(), SCIPlpUpdateVarLb(), SCIPlpUpdateVarLbGlobal(), SCIPlpUpdateVarObj(), SCIPlpUpdateVarUb(), and SCIPlpUpdateVarUbGlobal().

static SCIP_RETCODE lpUpdateVarProved ( SCIP_LP lp,
SCIP_SET set,
SCIP_VAR var,
SCIP_Real  oldobj,
SCIP_Real  oldlb,
SCIP_Real  oldub,
SCIP_Real  newobj,
SCIP_Real  newlb,
SCIP_Real  newub 
)
static

updates current pseudo and loose objective values for a change in a variable's objective value or bounds; pseudo objective value is calculated with interval arithmetics to get a proved lower bound

Parameters
lpcurrent LP data
setglobal SCIP settings
varproblem variable that changed
oldobjold objective value of variable
oldlbold objective value of variable
oldubold objective value of variable
newobjnew objective value of variable
newlbnew objective value of variable
newubnew objective value of variable

Definition at line 15677 of file lp.c.

References SCIP_Lp::looseobjval, SCIP_Lp::looseobjvalinf, NULL, SCIP_Lp::pseudoobjval, SCIP_Lp::pseudoobjvalinf, REALABS, SCIP_INVALIDDATA, SCIP_OKAY, SCIP_VARSTATUS_COLUMN, SCIP_VARSTATUS_LOOSE, SCIPerrorMessage, SCIPintervalAdd(), SCIPintervalGetInf(), SCIPintervalMul(), SCIPintervalSet(), SCIPintervalSub(), SCIPsetInfinity(), SCIPsetIsInfinity(), SCIPvarGetProbindex(), and SCIPvarGetStatus().

Referenced by SCIPlpUpdateVarLb(), SCIPlpUpdateVarObj(), and SCIPlpUpdateVarUb().

SCIP_RETCODE SCIPlpUpdateVarObj ( SCIP_LP lp,
SCIP_SET set,
SCIP_VAR var,
SCIP_Real  oldobj,
SCIP_Real  newobj 
)

updates current pseudo and loose objective value for a change in a variable's objective value

Parameters
lpcurrent LP data
setglobal SCIP settings
varproblem variable that changed
oldobjold objective value of variable
newobjnew objective value of variable

Definition at line 15790 of file lp.c.

References FALSE, getObjvalDeltaObj(), lpUpdateObjval(), lpUpdateVarProved(), NULL, SCIP_Lp::probing, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIP_VARSTATUS_COLUMN, SCIP_VARSTATUS_LOOSE, SCIPsetIsEQ(), SCIPvarGetLbGlobal(), SCIPvarGetLbLocal(), SCIPvarGetProbindex(), SCIPvarGetStatus(), SCIPvarGetUbGlobal(), SCIPvarGetUbLocal(), and TRUE.

Referenced by SCIPeventProcess(), SCIPlpUpdateAddVar(), and SCIPlpUpdateDelVar().

SCIP_RETCODE SCIPlpUpdateVarLbGlobal ( SCIP_LP lp,
SCIP_SET set,
SCIP_VAR var,
SCIP_Real  oldlb,
SCIP_Real  newlb 
)

updates current root pseudo objective value for a global change in a variable's lower bound

Parameters
lpcurrent LP data
setglobal SCIP settings
varproblem variable that changed
oldlbold lower bound of variable
newlbnew lower bound of variable

Definition at line 15844 of file lp.c.

References FALSE, getObjvalDeltaLb(), lpUpdateObjval(), NULL, SCIP_OKAY, SCIP_Real, SCIPsetIsEQ(), SCIPsetIsPositive(), SCIPvarGetObj(), and TRUE.

Referenced by SCIPeventProcess().

SCIP_RETCODE SCIPlpUpdateVarLb ( SCIP_LP lp,
SCIP_SET set,
SCIP_VAR var,
SCIP_Real  oldlb,
SCIP_Real  newlb 
)

updates current pseudo and loose objective value for a change in a variable's lower bound

Parameters
lpcurrent LP data
setglobal SCIP settings
varproblem variable that changed
oldlbold lower bound of variable
newlbnew lower bound of variable

Definition at line 15872 of file lp.c.

References FALSE, getObjvalDeltaLb(), lpUpdateObjval(), lpUpdateVarProved(), NULL, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIP_VARSTATUS_COLUMN, SCIP_VARSTATUS_LOOSE, SCIPsetIsEQ(), SCIPsetIsPositive(), SCIPvarGetObj(), SCIPvarGetProbindex(), SCIPvarGetStatus(), SCIPvarGetUbLocal(), and TRUE.

Referenced by SCIPeventProcess().

SCIP_RETCODE SCIPlpUpdateVarUbGlobal ( SCIP_LP lp,
SCIP_SET set,
SCIP_VAR var,
SCIP_Real  oldub,
SCIP_Real  newub 
)

updates current root pseudo objective value for a global change in a variable's upper bound

Parameters
lpcurrent LP data
setglobal SCIP settings
varproblem variable that changed
oldubold upper bound of variable
newubnew upper bound of variable

Definition at line 15913 of file lp.c.

References FALSE, getObjvalDeltaUb(), lpUpdateObjval(), NULL, SCIP_OKAY, SCIP_Real, SCIPsetIsEQ(), SCIPsetIsNegative(), SCIPvarGetObj(), and TRUE.

Referenced by SCIPeventProcess().

SCIP_RETCODE SCIPlpUpdateVarUb ( SCIP_LP lp,
SCIP_SET set,
SCIP_VAR var,
SCIP_Real  oldub,
SCIP_Real  newub 
)

updates current pseudo objective value for a change in a variable's upper bound

Parameters
lpcurrent LP data
setglobal SCIP settings
varproblem variable that changed
oldubold upper bound of variable
newubnew upper bound of variable

Definition at line 15940 of file lp.c.

References FALSE, getObjvalDeltaUb(), lpUpdateObjval(), lpUpdateVarProved(), NULL, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIP_VARSTATUS_COLUMN, SCIP_VARSTATUS_LOOSE, SCIPsetIsEQ(), SCIPsetIsNegative(), SCIPvarGetLbLocal(), SCIPvarGetObj(), SCIPvarGetProbindex(), SCIPvarGetStatus(), and TRUE.

Referenced by SCIPeventProcess().

SCIP_RETCODE SCIPlpUpdateAddVar ( SCIP_LP lp,
SCIP_SET set,
SCIP_VAR var 
)

informs LP, that given variable was added to the problem

Parameters
lpcurrent LP data
setglobal SCIP settings
varvariable that is now a LOOSE problem variable

Definition at line 15981 of file lp.c.

References SCIP_Lp::nloosevars, NULL, SCIP_CALL, SCIP_OKAY, SCIP_VARSTATUS_COLUMN, SCIP_VARSTATUS_LOOSE, SCIPlpUpdateVarObj(), SCIPvarGetObj(), SCIPvarGetProbindex(), and SCIPvarGetStatus().

Referenced by SCIPprobAddVar().

SCIP_RETCODE SCIPlpUpdateDelVar ( SCIP_LP lp,
SCIP_SET set,
SCIP_VAR var 
)

informs LP, that given variable is to be deleted from the problem

Parameters
lpcurrent LP data
setglobal SCIP settings
varvariable that will be deleted from the problem

Definition at line 16002 of file lp.c.

References NULL, SCIP_CALL, SCIP_OKAY, SCIP_VARSTATUS_COLUMN, SCIP_VARSTATUS_LOOSE, SCIPlpDecNLoosevars(), SCIPlpUpdateVarObj(), SCIPvarGetObj(), SCIPvarGetProbindex(), and SCIPvarGetStatus().

Referenced by SCIPprobPerformVarDeletions().

static SCIP_RETCODE lpUpdateVarColumn ( SCIP_LP lp,
SCIP_SET set,
SCIP_VAR var 
)
static

informs LP, that given formerly loose problem variable is now a column variable

Parameters
lpcurrent LP data
setglobal SCIP settings
varproblem variable that changed from LOOSE to COLUMN

Definition at line 16026 of file lp.c.

References FALSE, SCIP_Lp::looseobjvalinf, lpUpdateObjval(), SCIP_Lp::nloosevars, NULL, SCIP_OKAY, SCIP_Real, SCIP_VARSTATUS_COLUMN, SCIPlpDecNLoosevars(), SCIPsetIsInfinity(), SCIPsetIsNegative(), SCIPsetIsPositive(), SCIPvarGetLbLocal(), SCIPvarGetObj(), SCIPvarGetProbindex(), SCIPvarGetStatus(), SCIPvarGetUbLocal(), and TRUE.

Referenced by SCIPlpUpdateVarColumn().

static SCIP_RETCODE lpUpdateVarColumnProved ( SCIP_LP lp,
SCIP_SET set,
SCIP_VAR var 
)
static

informs LP, that given formerly loose problem variable is now a column variable pseudo objective value is calculated with interval arithmetics to get a proved lower bound

Parameters
lpcurrent LP data
setglobal SCIP settings
varproblem variable that changed from LOOSE to COLUMN

Definition at line 16073 of file lp.c.

References SCIP_Lp::looseobjval, SCIP_Lp::looseobjvalinf, SCIP_Lp::nloosevars, NULL, SCIP_OKAY, SCIP_Real, SCIP_VARSTATUS_COLUMN, SCIPintervalGetInf(), SCIPintervalMul(), SCIPintervalSet(), SCIPintervalSub(), SCIPsetInfinity(), SCIPsetIsInfinity(), SCIPsetIsNegative(), SCIPvarGetLbLocal(), SCIPvarGetObj(), SCIPvarGetProbindex(), SCIPvarGetStatus(), and SCIPvarGetUbLocal().

Referenced by SCIPlpUpdateVarColumn().

SCIP_RETCODE SCIPlpUpdateVarColumn ( SCIP_LP lp,
SCIP_SET set,
SCIP_VAR var 
)

informs LP, that given formerly loose problem variable is now a column variable

Parameters
lpcurrent LP data
setglobal SCIP settings
varproblem variable that changed from LOOSE to COLUMN

Definition at line 16138 of file lp.c.

References lpUpdateVarColumn(), lpUpdateVarColumnProved(), NULL, SCIP_CALL, and SCIP_OKAY.

Referenced by SCIPvarColumn().

static SCIP_RETCODE lpUpdateVarLoose ( SCIP_LP lp,
SCIP_SET set,
SCIP_VAR var 
)
static

informs LP, that given formerly column problem variable is now again a loose variable

Parameters
lpcurrent LP data
setglobal SCIP settings
varproblem variable that changed from COLUMN to LOOSE

Definition at line 16160 of file lp.c.

References FALSE, SCIP_Lp::looseobjvalinf, lpUpdateObjval(), SCIP_Lp::nloosevars, NULL, SCIP_OKAY, SCIP_Real, SCIP_VARSTATUS_LOOSE, SCIPsetIsInfinity(), SCIPsetIsNegative(), SCIPsetIsPositive(), SCIPvarGetLbLocal(), SCIPvarGetObj(), SCIPvarGetProbindex(), SCIPvarGetStatus(), SCIPvarGetUbLocal(), and TRUE.

Referenced by SCIPlpUpdateVarLoose().

static SCIP_RETCODE lpUpdateVarLooseProved ( SCIP_LP lp,
SCIP_SET set,
SCIP_VAR var 
)
static

informs LP, that given formerly column problem variable is now again a loose variable pseudo objective value is calculated with interval arithmetics to get a proved lower bound

Parameters
lpcurrent LP data
setglobal SCIP settings
varproblem variable that changed from COLUMN to LOOSE

Definition at line 16205 of file lp.c.

References SCIP_Lp::looseobjval, SCIP_Lp::looseobjvalinf, SCIP_Lp::nloosevars, NULL, SCIP_OKAY, SCIP_Real, SCIP_VARSTATUS_LOOSE, SCIPintervalAdd(), SCIPintervalGetInf(), SCIPintervalMul(), SCIPintervalSet(), SCIPsetInfinity(), SCIPsetIsInfinity(), SCIPsetIsNegative(), SCIPvarGetLbLocal(), SCIPvarGetObj(), SCIPvarGetProbindex(), SCIPvarGetStatus(), and SCIPvarGetUbLocal().

Referenced by SCIPlpUpdateVarLoose().

SCIP_RETCODE SCIPlpUpdateVarLoose ( SCIP_LP lp,
SCIP_SET set,
SCIP_VAR var 
)

informs LP, that given formerly column problem variable is now again a loose variable

Parameters
lpcurrent LP data
setglobal SCIP settings
varproblem variable that changed from COLUMN to LOOSE

Definition at line 16262 of file lp.c.

References lpUpdateVarLoose(), lpUpdateVarLooseProved(), NULL, SCIP_CALL, and SCIP_OKAY.

Referenced by SCIPvarLoose().

void SCIPlpDecNLoosevars ( SCIP_LP lp)

decrease the number of loose variables by one

Parameters
lpcurrent LP data

Definition at line 16283 of file lp.c.

References SCIP_Lp::looseobjval, SCIP_Lp::looseobjvalinf, SCIP_Lp::nloosevars, and NULL.

Referenced by lpUpdateVarColumn(), SCIPlpUpdateDelVar(), SCIPvarFix(), and SCIPvarMultiaggregate().

SCIP_RETCODE SCIPlpGetSol ( SCIP_LP lp,
SCIP_SET set,
SCIP_STAT stat,
SCIP_Bool primalfeasible,
SCIP_Bool dualfeasible 
)
SCIP_RETCODE SCIPlpGetUnboundedSol ( SCIP_LP lp,
SCIP_SET set,
SCIP_STAT stat,
SCIP_Bool primalfeasible,
SCIP_Bool rayfeasible 
)
SCIP_RETCODE SCIPlpGetPrimalRay ( SCIP_LP lp,
SCIP_SET set,
SCIP_Real ray 
)

returns primal ray proving the unboundedness of the current LP

Parameters
lpcurrent LP data
setglobal SCIP settings
rayarray for storing primal ray values, they are stored w.r.t. the problem index of the variables, so the size of this array should be at least number of active variables (all entries have to be initialized to 0 before)

Definition at line 16765 of file lp.c.

References SCIP_Lp::flushed, SCIP_Lp::lpi, SCIP_Lp::lpicols, SCIP_Lp::lpobjval, SCIP_Lp::lpsolstat, SCIP_Lp::nlpicols, NULL, SCIP_CALL, SCIP_LPERROR, SCIP_LPSOLSTAT_UNBOUNDEDRAY, SCIP_OKAY, SCIP_Real, SCIPdebugMessage, SCIPerrorMessage, SCIPlpiGetPrimalRay(), SCIPlpiHasPrimalRay(), SCIPsetAllocBufferArray, SCIPsetFreeBufferArray, SCIPsetIsInfinity(), SCIPvarGetProbindex(), SCIP_Lp::solved, and SCIP_Col::var.

Referenced by updatePrimalRay().

SCIP_RETCODE SCIPlpGetIterations ( SCIP_LP lp,
int *  iterations 
)

get number of iterations used in last LP solve

Parameters
lpcurrent LP data
iterationspointer to store the iteration count

Definition at line 16888 of file lp.c.

References SCIP_Lp::lpi, NULL, SCIP_CALL, SCIP_OKAY, and SCIPlpiGetIterations().

Referenced by lpBarrier(), lpDualSimplex(), lpLexDualSimplex(), and lpPrimalSimplex().

SCIP_RETCODE SCIPlpUpdateAges ( SCIP_LP lp,
SCIP_STAT stat 
)

increases age of columns with solution value 0.0 and basic rows with activity not at its bounds, resets age of non-zero columns and sharp rows

Parameters
lpcurrent LP data
statproblem statistics

Definition at line 16903 of file lp.c.

References SCIP_Row::activeinlpcounter, SCIP_Col::age, SCIP_Row::age, SCIP_Lp::cols, SCIP_Lp::flushed, SCIP_Stat::lpcount, SCIP_Lp::lpicols, SCIP_Lp::lpirows, SCIP_Lp::ncols, SCIP_Lp::nlpicols, SCIP_Lp::nlpirows, SCIP_Row::nlpsaftercreation, SCIP_Lp::nrows, NULL, SCIP_Lp::rows, SCIP_OKAY, SCIPdebugMessage, SCIP_Lp::solved, and SCIP_Lp::validsollp.

Referenced by SCIPlpSolveAndEval().

static SCIP_RETCODE lpRemoveObsoleteCols ( SCIP_LP lp,
SCIP_SET set,
SCIP_STAT stat,
int  firstcol 
)
static

removes all non-basic columns, that are too old, beginning with the given firstcol

Parameters
lpcurrent LP data
setglobal SCIP settings
statproblem statistics
firstcolfirst column to check for clean up

Definition at line 17156 of file lp.c.

References SCIP_Col::age, SCIP_Col::basisstatus, BMSclearMemoryArray, SCIP_Lp::cols, SCIP_Lp::diving, SCIP_Lp::flushed, lpDelColset(), SCIP_Lp::lpicols, SCIP_Lp::ncols, SCIP_Lp::nlpicols, SCIP_Stat::nnodes, SCIP_Lp::nremovablecols, NULL, SCIP_Col::obsoletenode, SCIP_BASESTAT_BASIC, SCIP_CALL, SCIP_OKAY, SCIPcolGetBestBound(), SCIPdebugMessage, SCIPsetAllocBufferArray, SCIPsetFreeBufferArray, SCIPsetIsZero(), SCIPvarGetName(), and SCIP_Lp::solisbasic.

Referenced by SCIPlpRemoveAllObsoletes(), and SCIPlpRemoveNewObsoletes().

static SCIP_RETCODE lpRemoveObsoleteRows ( SCIP_LP lp,
BMS_BLKMEM blkmem,
SCIP_SET set,
SCIP_STAT stat,
SCIP_EVENTQUEUE eventqueue,
SCIP_EVENTFILTER eventfilter,
int  firstrow 
)
static

removes all basic rows, that are too old, beginning with the given firstrow

Parameters
lpcurrent LP data
blkmemblock memory buffers
setglobal SCIP settings
statproblem statistics
eventqueueevent queue
eventfilterglobal event filter
firstrowfirst row to check for clean up

Definition at line 17232 of file lp.c.

References SCIP_Row::age, SCIP_Row::basisstatus, BMSclearMemoryArray, SCIP_Lp::diving, SCIP_Lp::flushed, lpDelRowset(), SCIP_Lp::lpirows, SCIP_Lp::nlpirows, SCIP_Stat::nnodes, SCIP_Lp::nremovablerows, SCIP_Lp::nrows, NULL, SCIP_Row::obsoletenode, SCIP_Lp::rows, SCIP_BASESTAT_BASIC, SCIP_CALL, SCIP_OKAY, SCIPdebugMessage, SCIPsetAllocBufferArray, SCIPsetFreeBufferArray, and SCIP_Lp::solisbasic.

Referenced by SCIPlpRemoveAllObsoletes(), and SCIPlpRemoveNewObsoletes().

SCIP_RETCODE SCIPlpRemoveNewObsoletes ( SCIP_LP lp,
BMS_BLKMEM blkmem,
SCIP_SET set,
SCIP_STAT stat,
SCIP_EVENTQUEUE eventqueue,
SCIP_EVENTFILTER eventfilter 
)

removes all non-basic columns and basic rows in the part of the LP created at the current node, that are too old

Parameters
lpcurrent LP data
blkmemblock memory buffers
setglobal SCIP settings
statproblem statistics
eventqueueevent queue
eventfilterglobal event filter

Definition at line 17308 of file lp.c.

References SCIP_Lp::diving, SCIP_Lp::firstnewcol, SCIP_Lp::firstnewrow, lpRemoveObsoleteCols(), lpRemoveObsoleteRows(), SCIP_Lp::ncols, SCIP_Lp::nrows, NULL, SCIP_CALL, SCIP_LPSOLSTAT_OPTIMAL, SCIP_OKAY, SCIPdebugMessage, SCIPlpGetSolstat(), and SCIP_Lp::solved.

Referenced by SCIPlpSolveAndEval().

SCIP_RETCODE SCIPlpRemoveAllObsoletes ( SCIP_LP lp,
BMS_BLKMEM blkmem,
SCIP_SET set,
SCIP_STAT stat,
SCIP_EVENTQUEUE eventqueue,
SCIP_EVENTFILTER eventfilter 
)

removes all non-basic columns and basic rows in whole LP, that are too old

Parameters
lpcurrent LP data
blkmemblock memory buffers
setglobal SCIP settings
statproblem statistics
eventqueueevent queue
eventfilterglobal event filter

Definition at line 17339 of file lp.c.

References SCIP_Lp::diving, lpRemoveObsoleteCols(), lpRemoveObsoleteRows(), SCIP_Lp::ncols, SCIP_Lp::nrows, NULL, SCIP_CALL, SCIP_LPSOLSTAT_OPTIMAL, SCIP_OKAY, SCIPdebugMessage, SCIPlpGetSolstat(), and SCIP_Lp::solved.

Referenced by focusnodeToFork().

static SCIP_RETCODE lpCleanupCols ( SCIP_LP lp,
SCIP_SET set,
SCIP_STAT stat,
int  firstcol 
)
static

removes all non-basic columns at 0.0 beginning with the given firstcol

Parameters
lpcurrent LP data
setglobal SCIP settings
statproblem statistics
firstcolfirst column to check for clean up

Definition at line 17370 of file lp.c.

References BMSclearMemoryArray, SCIP_Lp::cols, SCIP_Lp::diving, SCIP_Lp::flushed, SCIP_Stat::lpcount, lpDelColset(), SCIP_Lp::lpicols, SCIP_Lp::ncols, SCIP_Lp::nlpicols, SCIP_Lp::nremovablecols, NULL, SCIP_BASESTAT_BASIC, SCIP_CALL, SCIP_OKAY, SCIPcolGetBestBound(), SCIPdebugMessage, SCIPsetAllocBufferArray, SCIPsetFreeBufferArray, SCIPsetIsZero(), SCIP_Lp::solisbasic, and SCIP_Lp::validsollp.

Referenced by SCIPlpCleanupAll(), and SCIPlpCleanupNew().

static SCIP_RETCODE lpCleanupRows ( SCIP_LP lp,
BMS_BLKMEM blkmem,
SCIP_SET set,
SCIP_STAT stat,
SCIP_EVENTQUEUE eventqueue,
SCIP_EVENTFILTER eventfilter,
int  firstrow 
)
static

removes all basic rows beginning with the given firstrow

Parameters
lpcurrent LP data
blkmemblock memory buffers
setglobal SCIP settings
statproblem statistics
eventqueueevent queue
eventfilterglobal event filter
firstrowfirst row to check for clean up

Definition at line 17437 of file lp.c.

References BMSclearMemoryArray, SCIP_Lp::diving, SCIP_Lp::flushed, SCIP_Stat::lpcount, lpDelRowset(), SCIP_Lp::lpirows, SCIP_Lp::ncols, SCIP_Lp::nlpicols, SCIP_Lp::nlpirows, SCIP_Lp::nremovablerows, SCIP_Lp::nrows, NULL, SCIP_Lp::rows, SCIP_BASESTAT_BASIC, SCIP_CALL, SCIP_OKAY, SCIPdebugMessage, SCIPsetAllocBufferArray, SCIPsetFreeBufferArray, SCIP_Lp::solisbasic, and SCIP_Lp::validsollp.

Referenced by SCIPlpCleanupAll(), and SCIPlpCleanupNew().

SCIP_RETCODE SCIPlpCleanupNew ( SCIP_LP lp,
BMS_BLKMEM blkmem,
SCIP_SET set,
SCIP_STAT stat,
SCIP_EVENTQUEUE eventqueue,
SCIP_EVENTFILTER eventfilter,
SCIP_Bool  root 
)

removes all non-basic columns at 0.0 and basic rows in the part of the LP created at the current node

Parameters
lpcurrent LP data
blkmemblock memory buffers
setglobal SCIP settings
statproblem statistics
eventqueueevent queue
eventfilterglobal event filter
rootare we at the root node?

Definition at line 17508 of file lp.c.

References SCIP_Lp::diving, SCIP_Lp::firstnewcol, SCIP_Lp::firstnewrow, SCIP_Lp::lastlpalgo, lpCleanupCols(), lpCleanupRows(), SCIP_Lp::ncols, SCIP_Lp::nrows, NULL, SCIP_Bool, SCIP_CALL, SCIP_LPSOLSTAT_OPTIMAL, SCIP_OKAY, SCIPdebugMessage, SCIPlpGetSolstat(), SCIP_Lp::solisbasic, and SCIP_Lp::solved.

Referenced by focusnodeToFork().

SCIP_RETCODE SCIPlpCleanupAll ( SCIP_LP lp,
BMS_BLKMEM blkmem,
SCIP_SET set,
SCIP_STAT stat,
SCIP_EVENTQUEUE eventqueue,
SCIP_EVENTFILTER eventfilter,
SCIP_Bool  root 
)

removes all non-basic columns at 0.0 and basic rows in the whole LP

Parameters
lpcurrent LP data
blkmemblock memory buffers
setglobal SCIP settings
statproblem statistics
eventqueueevent queue
eventfilterglobal event filter
rootare we at the root node?

Definition at line 17547 of file lp.c.

References SCIP_Lp::diving, SCIP_Lp::lastlpalgo, lpCleanupCols(), lpCleanupRows(), SCIP_Lp::ncols, SCIP_Lp::nrows, NULL, SCIP_Bool, SCIP_CALL, SCIP_LPSOLSTAT_OPTIMAL, SCIP_OKAY, SCIPdebugMessage, SCIPlpGetSolstat(), SCIP_Lp::solisbasic, and SCIP_Lp::solved.

Referenced by focusnodeToFork().

SCIP_RETCODE SCIPlpRemoveRedundantRows ( SCIP_LP lp,
BMS_BLKMEM blkmem,
SCIP_SET set,
SCIP_STAT stat,
SCIP_EVENTQUEUE eventqueue,
SCIP_EVENTFILTER eventfilter 
)

removes all redundant rows that were added at the current node

Parameters
lpcurrent LP data
blkmemblock memory buffers
setglobal SCIP settings
statproblem statistics
eventqueueevent queue
eventfilterglobal event filter

Definition at line 17586 of file lp.c.

References SCIP_Row::basisstatus, BMSclearMemoryArray, SCIP_Lp::diving, SCIP_Lp::firstnewrow, SCIP_Lp::flushed, SCIP_Stat::lpcount, lpDelRowset(), SCIP_Lp::lpirows, SCIP_Lp::ncols, SCIP_Lp::nlpicols, SCIP_Lp::nlpirows, SCIP_Lp::nrows, NULL, SCIP_Lp::rows, SCIP_BASESTAT_BASIC, SCIP_CALL, SCIP_OKAY, SCIPdebugMessage, SCIProwGetLhs(), SCIProwGetMaxActivity(), SCIProwGetMinActivity(), SCIProwGetName(), SCIProwGetRhs(), SCIProwIsRedundant(), SCIPsetAllocBufferArray, SCIPsetFreeBufferArray, SCIP_Lp::solisbasic, and SCIP_Lp::validsollp.

Referenced by priceAndCutLoop().

SCIP_RETCODE SCIPlpEndDive ( SCIP_LP lp,
BMS_BLKMEM blkmem,
SCIP_SET set,
SCIP_MESSAGEHDLR messagehdlr,
SCIP_STAT stat,
SCIP_EVENTQUEUE eventqueue,
SCIP_EVENTFILTER eventfilter,
SCIP_PROB prob,
SCIP_VAR **  vars,
int  nvars 
)

quits LP diving and resets bounds and objective values of columns to the current node's values

Parameters
lpcurrent LP data
blkmemblock memory
setglobal SCIP settings
messagehdlrmessage handler
statproblem statistics
eventqueueevent queue
eventfilterglobal event filter
probproblem data
varsarray with all active variables
nvarsnumber of active variables

Definition at line 17761 of file lp.c.

References colRestoreSolVals(), SCIP_Lp::cols, SCIP_Lp::divechgrows, SCIP_Lp::divechgsides, SCIP_Lp::divechgsidetypes, SCIP_Lp::divelpistate, SCIP_Lp::divelpwasdualfeas, SCIP_Lp::divelpwasprimfeas, SCIP_Lp::diving, SCIP_Lp::divinglazyapplied, SCIP_Lp::divinglpiitlim, SCIP_Lp::divingobjchg, FALSE, SCIP_Lp::flushed, SCIP_Col::lb, SCIP_Stat::lpcount, SCIP_LpSolVals::lpissolved, lpRestoreSolVals(), lpSetIterationLimit(), SCIP_LpSolVals::lpsolstat, SCIP_Lp::ncols, SCIP_Lp::ndivechgsides, SCIP_Lp::ndivingrows, SCIP_Lp::nlazycols, SCIP_Stat::nlps, SCIP_Stat::nnodes, SCIP_Lp::nrows, NULL, SCIP_Col::obj, SCIP_Lp::resolvelperror, rowRestoreSolVals(), SCIP_Lp::rows, SCIP_Bool, SCIP_CALL, SCIP_LPSOLSTAT_INFEASIBLE, SCIP_LPSOLSTAT_ITERLIMIT, SCIP_LPSOLSTAT_OBJLIMIT, SCIP_LPSOLSTAT_OPTIMAL, SCIP_LPSOLSTAT_TIMELIMIT, SCIP_LPSOLSTAT_UNBOUNDEDRAY, SCIP_OKAY, SCIP_Real, SCIP_SIDETYPE_LEFT, SCIP_VARSTATUS_COLUMN, SCIP_VERBLEVEL_FULL, SCIPcolChgLb(), SCIPcolChgObj(), SCIPcolChgUb(), SCIPdebugMessage, SCIPlpFlush(), SCIPlpFreeState(), SCIPlpGetSolstat(), SCIPlpSetState(), SCIPlpShrinkRows(), SCIPlpSolveAndEval(), SCIPmessagePrintVerbInfo(), SCIProwChgLhs(), SCIProwChgRhs(), SCIPsetIsEQ(), SCIPvarGetCol(), SCIPvarGetLbLocal(), SCIPvarGetObj(), SCIPvarGetStatus(), SCIPvarGetUbLocal(), SCIP_Lp::storedsolvals, TRUE, SCIP_Col::ub, updateLazyBounds(), and SCIP_Col::var.

Referenced by SCIPendDive().

SCIP_RETCODE SCIPlpRecordOldRowSideDive ( SCIP_LP lp,
SCIP_ROW row,
SCIP_SIDETYPE  sidetype 
)

records a current row side such that any change will be undone after diving

Parameters
lpLP data object
rowrow affected by the change
sidetypeside type

Definition at line 17943 of file lp.c.

References SCIP_Lp::divechgrows, SCIP_Lp::divechgsides, SCIP_Lp::divechgsidessize, SCIP_Lp::divechgsidetypes, DIVESTACKGROWFACT, SCIP_Row::lhs, SCIP_Lp::ndivechgsides, NULL, reallocDiveChgSideArrays(), SCIP_Row::rhs, SCIP_CALL, SCIP_OKAY, and SCIP_SIDETYPE_LEFT.

Referenced by SCIPchgRowLhsDive(), and SCIPchgRowRhsDive().

SCIP_RETCODE SCIPlpStartProbing ( SCIP_LP lp)

informs the LP that probing mode was initiated

Parameters
lpcurrent LP data

Definition at line 17967 of file lp.c.

References NULL, SCIP_Lp::probing, SCIP_OKAY, SCIP_Lp::strongbranching, SCIP_Lp::strongbranchprobing, and TRUE.

Referenced by SCIPtreeStartProbing().

SCIP_RETCODE SCIPlpEndProbing ( SCIP_LP lp)

informs the LP that probing mode was finished

Parameters
lpcurrent LP data

Definition at line 17982 of file lp.c.

References FALSE, NULL, SCIP_Lp::probing, SCIP_OKAY, SCIP_Lp::strongbranching, and SCIP_Lp::strongbranchprobing.

Referenced by SCIPtreeEndProbing().

void SCIPlpStartStrongbranchProbing ( SCIP_LP lp)

informs the LP that the probing mode is now used for strongbranching

Parameters
lpcurrent LP data

Definition at line 17997 of file lp.c.

References NULL, SCIP_Lp::probing, SCIP_Lp::strongbranching, SCIP_Lp::strongbranchprobing, and TRUE.

Referenced by SCIPstartStrongbranch().

void SCIPlpEndStrongbranchProbing ( SCIP_LP lp)

informs the LP that the probing mode is not used for strongbranching anymore

Parameters
lpcurrent LP data

Definition at line 18010 of file lp.c.

References FALSE, NULL, SCIP_Lp::probing, SCIP_Lp::strongbranching, and SCIP_Lp::strongbranchprobing.

Referenced by SCIPendStrongbranch().

static SCIP_RETCODE provedBound ( SCIP_LP lp,
SCIP_SET set,
SCIP_Bool  usefarkas,
SCIP_Real bound 
)
static

calculates y*b + min{(c - y*A)*x | lb <= x <= ub} for given vectors y and c; the vector b is defined with b[i] = lhs[i] if y[i] >= 0, b[i] = rhs[i] if y[i] < 0 Calculating this value in interval arithmetics gives a proved lower LP bound for the following reason (assuming, we have only left hand sides): min{cx | b <= Ax, lb <= x <= ub} >= min{cx | yb <= yAx, lb <= x <= ub} (restriction in minimum is relaxed) == yb + min{cx - yb | yb <= yAx, lb <= x <= ub} (added yb - yb == 0) >= yb + min{cx - yAx | yb <= yAx, lb <= x <= ub} (because yAx >= yb inside minimum) >= yb + min{cx - yAx | lb <= x <= ub} (restriction in minimum is relaxed)

Parameters
lpcurrent LP data
setglobal SCIP settings
usefarkasuse y = dual Farkas and c = 0 instead of y = dual solution and c = obj?
boundresult of interval arithmetic minimization

Definition at line 18033 of file lp.c.

References SCIP_Lp::cols, SCIP_Row::constant, SCIP_Row::dualfarkas, SCIP_Row::dualsol, SCIP_Col::lb, SCIP_Row::lhs, SCIP_Col::linkpos, SCIP_Row::lppos, SCIP_Lp::ncols, SCIP_Col::nlprows, SCIP_Lp::nrows, NULL, SCIP_Col::nunlinked, SCIP_Col::obj, SCIP_Row::rhs, SCIP_Col::rows, SCIP_Lp::rows, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPcolGetLb(), SCIPcolGetUb(), SCIPintervalAdd(), SCIPintervalGetInf(), SCIPintervalMul(), SCIPintervalSet(), SCIPintervalSetBounds(), SCIPintervalSub(), SCIPsetAllocBufferArray, SCIPsetFreeBufferArray, SCIPsetInfinity(), SCIPsetIsFeasNegative(), SCIPsetIsFeasPositive(), SCIP_Lp::solved, SCIP_Col::ub, and SCIP_Col::vals.

Referenced by SCIPlpGetProvedLowerbound(), and SCIPlpIsInfeasibilityProved().

SCIP_RETCODE SCIPlpGetProvedLowerbound ( SCIP_LP lp,
SCIP_SET set,
SCIP_Real bound 
)

gets proven lower (dual) bound of last LP solution

Parameters
lpcurrent LP data
setglobal SCIP settings
boundpointer to store proven dual bound

Definition at line 18143 of file lp.c.

References FALSE, provedBound(), SCIP_CALL, SCIP_OKAY, and SCIPdebugMessage.

Referenced by SCIPnodeUpdateLowerboundLP(), and solveNodeInitialLP().

SCIP_RETCODE SCIPlpIsInfeasibilityProved ( SCIP_LP lp,
SCIP_SET set,
SCIP_Bool proved 
)

gets proven dual bound of last LP solution

Parameters
lpcurrent LP data
setglobal SCIP settings
provedpointer to store whether infeasibility is proven

Definition at line 18157 of file lp.c.

References NULL, provedBound(), SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPdebugMessage, and TRUE.

SCIP_RETCODE SCIPlpWrite ( SCIP_LP lp,
const char *  fname 
)

writes LP to a file

Parameters
lpcurrent LP data
fnamefile name

Definition at line 18179 of file lp.c.

References SCIP_Lp::flushed, SCIP_Lp::lpi, NULL, SCIP_CALL, SCIP_OKAY, and SCIPlpiWriteLP().

Referenced by lpBarrier(), lpDualSimplex(), lpPrimalSimplex(), and SCIPwriteLP().

SCIP_RETCODE SCIPlpWriteMip ( SCIP_LP lp,
SCIP_SET set,
SCIP_MESSAGEHDLR messagehdlr,
const char *  fname,
SCIP_Bool  genericnames,
SCIP_Bool  origobj,
SCIP_OBJSENSE  objsense,
SCIP_Real  objscale,
SCIP_Real  objoffset,
SCIP_Bool  lazyconss 
)

writes MIP relaxation of the current B&B node to a file

Note
the transformed problem in SCIP is always a minimization problem
Parameters
lpcurrent LP data
setglobal SCIP settings
messagehdlrmessage handler
fnamefile name
genericnamesshould generic names like x_i and row_j be used in order to avoid troubles with reserved symbols?
origobjshould the original objective function be used?
objsenseobjective sense
objscaleobjective scaling factor
objoffsetobjective offset, e.g., caused by variable fixings in presolving
lazyconssoutput removable rows as lazy constraints?

Definition at line 18194 of file lp.c.

References SCIP_Row::cols, SCIP_Lp::cols, SCIP_Row::constant, SCIP_Lp::flushed, SCIP_Col::lb, SCIP_Row::lhs, SCIP_Col::lppos, SCIP_Row::lppos, SCIP_Row::name, SCIP_Var::name, SCIP_Lp::ncols, SCIP_Row::nlpcols, SCIP_Lp::nrows, NULL, SCIP_Col::obj, REALABS, SCIP_Row::rhs, SCIP_Lp::rows, SCIP_ERROR, SCIP_FILECREATEERROR, SCIP_MAXSTRLEN, SCIP_OBJSENSE_MINIMIZE, SCIP_OKAY, SCIP_Real, SCIPdebugMessage, SCIPerrorMessage, SCIPmessageFPrintInfo(), SCIPmessagePrintWarning(), SCIPprintSysError(), SCIProwIsRemovable(), SCIPsetIsEQ(), SCIPsetIsInfinity(), SCIPsnprintf(), SCIPvarIsIntegral(), SCIP_Col::ub, SCIP_Row::vals, and SCIP_Col::var.

Referenced by SCIPwriteMIP().

SCIP_COL** SCIPlpGetCols ( SCIP_LP lp)

gets array with columns of the LP

Parameters
lpcurrent LP data

Definition at line 19168 of file lp.c.

References SCIP_Lp::cols, and NULL.

Referenced by branchcandCalcLPCands(), forkFree(), SCIPcomputeLPRelIntPoint(), SCIPgetLPCols(), SCIPgetLPColsData(), and SCIPsolLinkLPSol().

SCIP_ROW** SCIPlpGetRows ( SCIP_LP lp)

gets array with rows of the LP

Parameters
lpcurrent LP data

Definition at line 19188 of file lp.c.

References NULL, and SCIP_Lp::rows.

Referenced by conflictAnalyzeLP(), forkFree(), SCIPgetLPRows(), SCIPgetLPRowsData(), undoBdchgsDualfarkas(), and undoBdchgsDualsol().

int SCIPlpGetNRows ( SCIP_LP lp)
SCIP_COL** SCIPlpGetNewcols ( SCIP_LP lp)

gets array with newly added columns after the last mark

Parameters
lpcurrent LP data

Definition at line 19208 of file lp.c.

References SCIP_Lp::cols, SCIP_Lp::firstnewcol, SCIP_Lp::ncols, and NULL.

Referenced by forkCreate(), and pseudoforkCreate().

int SCIPlpGetNNewcols ( SCIP_LP lp)

gets number of newly added columns after the last mark

Parameters
lpcurrent LP data

Definition at line 19219 of file lp.c.

References SCIP_Lp::firstnewcol, SCIP_Lp::ncols, and NULL.

Referenced by focusnodeCleanupVars(), focusnodeToFork(), focusnodeToJunction(), forkCreate(), pseudoforkCreate(), and SCIPnodeFocus().

SCIP_ROW** SCIPlpGetNewrows ( SCIP_LP lp)

gets array with newly added rows after the last mark

Parameters
lpcurrent LP data

Definition at line 19230 of file lp.c.

References SCIP_Lp::firstnewrow, SCIP_Lp::nrows, NULL, and SCIP_Lp::rows.

Referenced by forkCreate(), and pseudoforkCreate().

int SCIPlpGetNNewrows ( SCIP_LP lp)

gets number of newly added rows after the last mark

Parameters
lpcurrent LP data

Definition at line 19241 of file lp.c.

References SCIP_Lp::firstnewrow, SCIP_Lp::nrows, and NULL.

Referenced by focusnodeToFork(), forkCreate(), pseudoforkCreate(), and SCIPnodeFocus().

void SCIPlpRecalculateObjSqrNorm ( SCIP_SET set,
SCIP_LP lp 
)

recalculates Euclidean norm of objective function vector of column variables if it have gotten unreliable during calculation

Parameters
setglobal SCIP settings
lpLP data

Definition at line 19252 of file lp.c.

References SCIP_Lp::cols, FALSE, MAX, SCIP_Lp::ncols, NULL, SCIP_Lp::objsqrnorm, SCIP_Lp::objsqrnormunreliable, and SCIPsetIsGE().

Referenced by SCIPgetObjNorm(), and SCIProwGetObjParallelism().

SCIP_Real SCIPlpGetObjNorm ( SCIP_LP lp)

gets Euclidean norm of objective function vector of column variables, only use this method if lp->objsqrnormunreliable == FALSE, so probably you have to call SCIPlpRecalculateObjSqrNorm before

Parameters
lpLP data

Definition at line 19283 of file lp.c.

References NULL, SCIP_Lp::objsqrnorm, and SCIP_Lp::objsqrnormunreliable.

Referenced by SCIPgetObjNorm().

void SCIPlpSetRootLPIsRelax ( SCIP_LP lp,
SCIP_Bool  isrelax 
)

sets whether the root lp is a relaxation of the problem and its optimal objective value is a global lower bound

Parameters
lpLP data
isrelaxis the root lp a relaxation of the problem?

Definition at line 19295 of file lp.c.

References NULL, and SCIP_Lp::rootlpisrelax.

Referenced by SCIPprobStoreRootSol().

SCIP_Bool SCIPlpIsRootLPRelax ( SCIP_LP lp)

returns whether the root lp is a relaxation of the problem and its optimal objective value is a global lower bound

Parameters
lpLP data

Definition at line 19306 of file lp.c.

References NULL, and SCIP_Lp::rootlpisrelax.

Referenced by SCIPisRootLPRelax().

SCIP_Real SCIPlpGetRootObjval ( SCIP_LP lp)

gets the objective value of the root node LP; returns SCIP_INVALID if the root node LP was not (yet) solved

Parameters
lpLP data

Definition at line 19316 of file lp.c.

References MIN, NULL, SCIP_Lp::rootlooseobjval, SCIP_Lp::rootlpobjval, and SCIP_INVALID.

Referenced by SCIPgetLPRootObjval().

SCIP_Real SCIPlpGetRootColumnObjval ( SCIP_LP lp)

gets part of the objective value of the root node LP that results from COLUMN variables only; returns SCIP_INVALID if the root node LP was not (yet) solved

Parameters
lpLP data

Definition at line 19328 of file lp.c.

References NULL, and SCIP_Lp::rootlpobjval.

Referenced by SCIPgetLPRootColumnObjval().

SCIP_Real SCIPlpGetRootLooseObjval ( SCIP_LP lp)

gets part of the objective value of the root node LP that results from LOOSE variables only; returns SCIP_INVALID if the root node LP was not (yet) solved

Parameters
lpLP data

Definition at line 19340 of file lp.c.

References NULL, and SCIP_Lp::rootlooseobjval.

Referenced by SCIPgetLPRootLooseObjval().

SCIP_LPI* SCIPlpGetLPI ( SCIP_LP lp)

gets the LP solver interface

Parameters
lpcurrent LP data

Definition at line 19350 of file lp.c.

References SCIP_Lp::lpi, and NULL.

Referenced by conflictAnalyzeLP(), SCIPconflictAnalyzeLP(), SCIPgetLPI(), SCIPlpSolveAndEval(), SCIPprintLPSolutionQuality(), solveNodeLP(), undoBdchgsDualfarkas(), and undoBdchgsDualsol().

void SCIPlpSetIsRelax ( SCIP_LP lp,
SCIP_Bool  relax 
)

sets whether the current LP is a relaxation of the current problem and its optimal objective value is a local lower bound

Parameters
lpLP data
relaxis the current lp a relaxation?

Definition at line 19360 of file lp.c.

References SCIP_Lp::isrelax, and NULL.

Referenced by SCIPpriceLoop(), SCIPtreeEndProbing(), and solveProbingLP().

SCIP_Bool SCIPlpIsRelax ( SCIP_LP lp)

returns whether the current LP is a relaxation of the problem for which it has been solved and its solution value a valid local lower bound?

Parameters
lpLP data

Definition at line 19373 of file lp.c.

References SCIP_Lp::isrelax, and NULL.

Referenced by priceAndCutLoop(), propAndSolve(), SCIPendDive(), SCIPisLPRelax(), SCIPprobStoreRootSol(), SCIPtreeEndProbing(), solveNodeInitialLP(), and updateEstimate().

SCIP_Bool SCIPlpIsSolved ( SCIP_LP lp)

returns whether the current LP is flushed and solved

Parameters
lpcurrent LP data

Definition at line 19383 of file lp.c.

References SCIP_Lp::flushed, NULL, and SCIP_Lp::solved.

Referenced by priceAndCutLoop(), SCIPendDive(), SCIPlinkLPSol(), SCIPsolCreateLPSol(), and SCIPsolLinkCurrentSol().

SCIP_Bool SCIPlpIsSolBasic ( SCIP_LP lp)

returns whether the current LP solution is a basic solution

Parameters
lpcurrent LP data

Definition at line 19393 of file lp.c.

References NULL, and SCIP_Lp::solisbasic.

Referenced by SCIPgetLPBasisInd(), SCIPgetLPBInvACol(), SCIPgetLPBInvARow(), SCIPgetLPBInvCol(), SCIPgetLPBInvRow(), SCIPisLPSolBasic(), SCIPprobUpdateBestRootSol(), SCIPvarGetImplRedcost(), and SCIPvarGetRedcost().

SCIP_Bool SCIPlpDivingObjChanged ( SCIP_LP lp)

returns whether the LP is in diving mode and the objective value of at least one column was changed

Parameters
lpcurrent LP data

Definition at line 19413 of file lp.c.

References SCIP_Lp::divingobjchg, and NULL.

Referenced by conflictAnalyzeBoundexceedingLP(), conflictAnalyzeInfeasibleLP(), conflictAnalyzeLP(), SCIPchgVarObjProbing(), SCIPlpSetCutoffbound(), SCIPsolLinkLPSol(), SCIPsolveDiveLP(), and SCIPtreeEndProbing().

void SCIPlpMarkDivingObjChanged ( SCIP_LP lp)

marks the diving LP to have a changed objective function

Parameters
lpcurrent LP data

Definition at line 19423 of file lp.c.

References SCIP_Lp::diving, SCIP_Lp::divingobjchg, NULL, SCIP_Lp::probing, and TRUE.

Referenced by SCIPchgVarObjDive(), SCIPchgVarObjProbing(), and SCIPpropagateProbing().

void SCIPlpUnmarkDivingObjChanged ( SCIP_LP lp)

marks the diving LP to not have a changed objective function anymore

Parameters
lpcurrent LP data

Definition at line 19434 of file lp.c.

References SCIP_Lp::diving, SCIP_Lp::divingobjchg, FALSE, NULL, and SCIP_Lp::probing.

Referenced by SCIPpropagateProbing(), and treeBacktrackProbing().

SCIP_Bool SCIPlpDivingRowsChanged ( SCIP_LP lp)
Parameters
lpcurrent LP data

Definition at line 19445 of file lp.c.

References SCIP_Lp::diving, SCIP_Lp::ndivechgsides, and NULL.

Referenced by SCIPsolveDiveLP().

SCIP_RETCODE SCIPlpComputeRelIntPoint ( SCIP_SET set,
SCIP_MESSAGEHDLR messagehdlr,
SCIP_LP lp,
SCIP_PROB prob,
SCIP_Bool  relaxrows,
SCIP_Bool  inclobjcutoff,
SCIP_Real  timelimit,
int  iterlimit,
SCIP_Real point,
SCIP_Bool success 
)

compute relative interior point

We use the approach of

R. Freund, R. Roundy, M. J. Todd
"Identifying the Set of Always-Active Constraints in a System of Linear Inequalities by a Single Linear Program"
Tech. Rep, No. 1674-85, Sloan School, M.I.T., 1985

to compute a relative interior point for the current LP.

Assume the original LP looks as follows:

\[ \begin{array}{rrl} \min & c^T x &\\ & A x & \geq a\\ & B x & \leq b\\ & D x & = d. \end{array} \]

Note that bounds should be included in the system.

To find an interior point the following LP does the job:

\[ \begin{array}{rrl} \max & 1^T y &\\ & A x - y - \alpha a & \geq 0\\ & B x + y - \alpha b & \leq 0\\ & D x - \alpha d & = 0\\ & 0 \leq y & \leq 1\\ & \alpha & \geq 1. \end{array} \]

If the original LP is feasible, this LP is feasible as well. Any optimal solution yields the relative interior point $x^*_j/\alpha^*$. Note that this will just produce some relative interior point. It does not produce a particular relative interior point, e.g., one that maximizes the distance to the boundary in some norm.

Parameters
setglobal SCIP settings
messagehdlrmessage handler
lpLP data
probproblem data
relaxrowsshould the rows be relaxed
inclobjcutoffshould a row for the objective cutoff be included
timelimittime limit for LP solver
iterlimititeration limit for LP solver
pointarray to store relative interior point on exit
successbuffer to indicate whether interior point was successfully computed

Definition at line 19490 of file lp.c.

References BMSclearMemoryArray, SCIP_Row::cols, SCIP_Lp::cols, SCIP_Row::constant, SCIP_Lp::cutoffbound, FALSE, getFiniteLooseObjval(), SCIP_Col::lb, SCIP_Row::lhs, SCIP_Lp::looseobjval, SCIP_Lp::looseobjvalinf, SCIP_Row::lpcolssorted, SCIP_Col::lppos, MAX, SCIP_Lp::ncols, SCIP_Row::nlpcols, SCIP_Lp::nrows, NULL, SCIP_Col::obj, REALABS, SCIP_Row::rhs, SCIP_Lp::rows, rowSortLP(), SCIP_CALL, SCIP_INVALID, SCIP_LPPAR_DUALFEASTOL, SCIP_LPPAR_FEASTOL, SCIP_LPPAR_LPITLIM, SCIP_LPPAR_LPTILIM, SCIP_OBJSEN_MAXIMIZE, SCIP_OKAY, SCIP_PARAMETERUNKNOWN, SCIP_Real, SCIPdebugMessage, SCIPlpiAddCols(), SCIPlpiAddRows(), SCIPlpiCreate(), SCIPlpiFree(), SCIPlpiGetNCols(), SCIPlpiGetSol(), SCIPlpiInfinity(), SCIPlpiIsIterlimExc(), SCIPlpiIsOptimal(), SCIPlpiIsTimelimExc(), SCIPlpiSetIntpar(), SCIPlpiSetRealpar(), SCIPlpiSolveDual(), SCIPlpiWriteLP(), SCIPmessagePrintWarning(), SCIProwIsModifiable(), SCIPsetAllocBufferArray, SCIPsetDualfeastol(), SCIPsetFreeBufferArray, SCIPsetIsEQ(), SCIPsetIsFeasEQ(), SCIPsetIsFeasGE(), SCIPsetIsFeasGT(), SCIPsetIsFeasLT(), SCIPsetIsFeasZero(), SCIPsetIsInfinity(), SCIPsetLpfeastol(), TRUE, SCIP_Col::ub, and SCIP_Row::vals.

Referenced by SCIPcomputeLPRelIntPoint().

Variable Documentation

const SCIP_Real scalars[] = {3.0, 5.0, 7.0, 9.0, 11.0, 13.0, 15.0, 17.0, 19.0}
static

additional scalars that are tried in integrality scaling

Definition at line 5506 of file lp.c.

Referenced by multiAggregateBinvar(), SCIP_DECL_PRESOLEXEC(), SCIPconflictAddBound(), SCIProwCalcIntegralScalar(), SCIPsolGetRayVal(), SCIPsolGetVal(), tightenVarsBoundsSOS1(), and writeExpandedSolutions().

const int nscalars = 9
static

Definition at line 5507 of file lp.c.

Referenced by SCIProwCalcIntegralScalar().