Scippy

SCIP

Solving Constraint Integer Programs

Detailed Description

methods to build and access LP relaxation information

See also
methods to interact with LP columns and LP rows

Modules

 LP Column
 public methods for LP columns
 
 LP Row
 public methods for LP rows
 
 Cuts and Cutpools
 common methods used to manipulate, generate, and strengthen cuts and to organize the cutpool
 
 LP Diving
 methods to initiate and conduct LP diving
 

Functions

SCIP_Bool SCIPhasCurrentNodeLP (SCIP *scip)
 
SCIP_Bool SCIPisLPConstructed (SCIP *scip)
 
SCIP_RETCODE SCIPconstructLP (SCIP *scip, SCIP_Bool *cutoff)
 
SCIP_RETCODE SCIPflushLP (SCIP *scip)
 
SCIP_LPSOLSTAT SCIPgetLPSolstat (SCIP *scip)
 
SCIP_Bool SCIPisLPPrimalReliable (SCIP *scip)
 
SCIP_Bool SCIPisLPDualReliable (SCIP *scip)
 
SCIP_Bool SCIPisLPRelax (SCIP *scip)
 
SCIP_Real SCIPgetLPObjval (SCIP *scip)
 
SCIP_Real SCIPgetLPColumnObjval (SCIP *scip)
 
SCIP_Real SCIPgetLPLooseObjval (SCIP *scip)
 
SCIP_Real SCIPgetGlobalPseudoObjval (SCIP *scip)
 
SCIP_Real SCIPgetPseudoObjval (SCIP *scip)
 
SCIP_Bool SCIPisRootLPRelax (SCIP *scip)
 
SCIP_Real SCIPgetLPRootObjval (SCIP *scip)
 
SCIP_Real SCIPgetLPRootColumnObjval (SCIP *scip)
 
SCIP_Real SCIPgetLPRootLooseObjval (SCIP *scip)
 
SCIP_Real SCIPgetLPFeastol (SCIP *scip)
 
void SCIPsetLPFeastol (SCIP *scip, SCIP_Real newfeastol)
 
void SCIPresetLPFeastol (SCIP *scip)
 
SCIP_RETCODE SCIPgetLPColsData (SCIP *scip, SCIP_COL ***cols, int *ncols)
 
SCIP_COL ** SCIPgetLPCols (SCIP *scip)
 
int SCIPgetNLPCols (SCIP *scip)
 
int SCIPgetNUnfixedLPCols (SCIP *scip)
 
SCIP_RETCODE SCIPgetLPRowsData (SCIP *scip, SCIP_ROW ***rows, int *nrows)
 
SCIP_ROW ** SCIPgetLPRows (SCIP *scip)
 
int SCIPgetNLPRows (SCIP *scip)
 
SCIP_Bool SCIPallColsInLP (SCIP *scip)
 
SCIP_Bool SCIPisLPSolBasic (SCIP *scip)
 
SCIP_RETCODE SCIPgetLPBasisInd (SCIP *scip, int *basisind)
 
SCIP_RETCODE SCIPgetLPBInvRow (SCIP *scip, int r, SCIP_Real *coefs, int *inds, int *ninds)
 
SCIP_RETCODE SCIPgetLPBInvCol (SCIP *scip, int c, SCIP_Real *coefs, int *inds, int *ninds)
 
SCIP_RETCODE SCIPgetLPBInvARow (SCIP *scip, int r, SCIP_Real *binvrow, SCIP_Real *coefs, int *inds, int *ninds)
 
SCIP_RETCODE SCIPgetLPBInvACol (SCIP *scip, int c, SCIP_Real *coefs, int *inds, int *ninds)
 
SCIP_RETCODE SCIPsumLPRows (SCIP *scip, SCIP_Real *weights, SCIP_REALARRAY *sumcoef, SCIP_Real *sumlhs, SCIP_Real *sumrhs)
 
SCIP_RETCODE SCIPinterruptLP (SCIP *scip, SCIP_Bool interrupt)
 
SCIP_RETCODE SCIPwriteLP (SCIP *scip, const char *filename)
 
SCIP_RETCODE SCIPwriteMIP (SCIP *scip, const char *filename, SCIP_Bool genericnames, SCIP_Bool origobj, SCIP_Bool lazyconss)
 
SCIP_RETCODE SCIPgetLPI (SCIP *scip, SCIP_LPI **lpi)
 
SCIP_RETCODE SCIPprintLPSolutionQuality (SCIP *scip, FILE *file)
 
SCIP_RETCODE SCIPcomputeLPRelIntPoint (SCIP *scip, SCIP_Bool relaxrows, SCIP_Bool inclobjcutoff, SCIP_Real timelimit, int iterlimit, SCIP_SOL **point)
 

Function Documentation

◆ SCIPhasCurrentNodeLP()

SCIP_Bool SCIPhasCurrentNodeLP ( SCIP scip)

returns, whether the LP was or is to be solved in the current node

Returns
whether the LP was or is to be solved in the current node.
Precondition
This method can be called if scip is in one of the following stages:

See SCIP_STAGE for a complete list of all possible solving stages.

Parameters
scipSCIP data structure

Definition at line 83 of file scip_lp.c.

References FALSE, SCIP_CALL_ABORT, SCIPcheckStage(), SCIPtreeHasCurrentNodeLP(), Scip::tree, and TRUE.

Referenced by applyVbounds(), DECL_CHANGESUBSCIP(), DECL_VARFIXINGS(), enforcePseudo(), execRelpscost(), getVariableRedcostScore(), SCIP_DECL_BRANCHEXECPS(), SCIP_DECL_DISPOUTPUT(), SCIP_DECL_HEUREXEC(), and SCIPperformGenericDivingAlgorithm().

◆ SCIPisLPConstructed()

SCIP_Bool SCIPisLPConstructed ( SCIP scip)

returns, whether the LP of the current node is already constructed

Returns
whether the LP of the current node is already constructed.
Precondition
This method can be called if scip is in one of the following stages:

See SCIP_STAGE for a complete list of all possible solving stages.

Parameters
scipSCIP data structure

Definition at line 101 of file scip_lp.c.

References FALSE, SCIP_CALL_ABORT, SCIPcheckStage(), SCIPtreeIsFocusNodeLPConstructed(), Scip::tree, and TRUE.

Referenced by applyVbounds(), createNewSol(), SCIP_DECL_HEUREXEC(), SCIPbendersComputeSubproblemLowerbound(), and SCIPbendersSolveSubproblemLP().

◆ SCIPconstructLP()

SCIP_RETCODE SCIPconstructLP ( SCIP scip,
SCIP_Bool cutoff 
)

makes sure that the LP of the current node is loaded and may be accessed through the LP information methods

Warning
Contructing the LP might change the amount of variables known in the transformed problem and therefore also the variables array of SCIP (returned by SCIPgetVars() and SCIPgetVarsData()), so it might be necessary to call one of the later method after this one
Returns
SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.
Precondition
This method can be called if scip is in one of the following stages:

See SCIP_STAGE for a complete list of all possible solving stages.

Parameters
scipSCIP data structure
cutoffpointer to store whether the node can be cut off

Definition at line 124 of file scip_lp.c.

References Scip::branchcand, Scip::cliquetable, Scip::cutpool, Scip::eventfilter, Scip::eventqueue, FALSE, Scip::lp, Scip::mem, Scip::origprob, Scip::pricestore, SCIP_Mem::probmem, Scip::reopt, SCIP_CALL, SCIP_OKAY, SCIPcheckStage(), SCIPconstructCurrentLP(), Scip::sepastore, Scip::set, Scip::stat, Scip::transprob, Scip::tree, and TRUE.

Referenced by applyVbounds(), initialiseSubproblem(), and SCIP_DECL_HEUREXEC().

◆ SCIPflushLP()

SCIP_RETCODE SCIPflushLP ( SCIP scip)

makes sure that the LP of the current node is flushed

Returns
SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.
Precondition
This method can be called if scip is in one of the following stages:

See SCIP_STAGE for a complete list of all possible solving stages.

Parameters
scipSCIP data structure

Definition at line 148 of file scip_lp.c.

References Scip::eventqueue, FALSE, Scip::lp, Scip::mem, SCIP_Mem::probmem, SCIP_CALL, SCIP_OKAY, SCIPcheckStage(), SCIPlpFlush(), Scip::set, Scip::transprob, and TRUE.

Referenced by applyVbounds(), and SCIP_DECL_HEUREXEC().

◆ SCIPgetLPSolstat()

SCIP_LPSOLSTAT SCIPgetLPSolstat ( SCIP scip)

gets solution status of current LP

Returns
the solution status of current LP.
Precondition
This method can be called if scip is in one of the following stages:

See SCIP_STAGE for a complete list of all possible solving stages.

Parameters
scipSCIP data structure

Definition at line 168 of file scip_lp.c.

References FALSE, Scip::lp, SCIP_CALL_ABORT, SCIP_LPSOLSTAT_NOTSOLVED, SCIPcheckStage(), SCIPlpGetSolstat(), SCIPtreeIsFocusNodeLPConstructed(), Scip::tree, and TRUE.

Referenced by analyzeStrongbranch(), applyBoundHeur(), applyVbounds(), collectEstLst(), computeStandardLPFeasibilityCut(), DECL_CHANGESUBSCIP(), DECL_VARFIXINGS(), execRelpscost(), executeBranchingRecursive(), executeHeuristic(), fixAndPropagate(), fixDiscreteVars(), getDualBranchscore(), getNLPFracVars(), getVariableRedcostScore(), performLPRandRounding(), performLPSimpleRounding(), performStrongbranchSOS1(), performStrongbranchWithPropagation(), polishSolution(), runVanillaStrongBranching(), SCIP_DECL_BENDERSCUTEXEC(), SCIP_DECL_BRANCHEXECLP(), SCIP_DECL_CONSCHECK(), SCIP_DECL_CONSENFOLP(), SCIP_DECL_DISPOUTPUT(), SCIP_DECL_EVENTEXEC(), SCIP_DECL_HEUREXEC(), SCIP_DECL_NLHDLRENFO(), SCIP_DECL_PRICERREDCOST(), SCIP_DECL_SEPAEXECLP(), SCIPapplyHeurSubNlp(), SCIPbendersComputeSubproblemLowerbound(), SCIPbendersExec(), SCIPbendersSolveSubproblemLP(), SCIPconsBendersEnforceSolution(), SCIPperformGenericDivingAlgorithm(), SCIPselectVarPseudoStrongBranching(), SCIPselectVarStrongBranching(), SCIPvisualUpdateChild(), selectVarMultAggrBranching(), solveBilinearLP(), solveLp(), tryOneOpt(), and trySolCandidate().

◆ SCIPisLPPrimalReliable()

SCIP_Bool SCIPisLPPrimalReliable ( SCIP scip)

returns whether the current LP solution passed the primal feasibility check

Returns
whether the current LP solution passed the primal feasibility check.
Precondition
This method can be called if scip is in one of the following stages:

See SCIP_STAGE for a complete list of all possible solving stages.

returns whether the current LP solution passed the primal feasibility check

Returns
whether the current LP solution passed the primal feasibility check.
Precondition
This method can be called if scip is in one of the following stages:

See SCIP_STAGE for a complete list of all possible solving stages.

Parameters
scipSCIP data structure

Definition at line 189 of file scip_lp.c.

References FALSE, Scip::lp, SCIP_CALL_ABORT, SCIPcheckStage(), SCIPlpIsPrimalReliable(), and TRUE.

◆ SCIPisLPDualReliable()

SCIP_Bool SCIPisLPDualReliable ( SCIP scip)

returns whether the current LP solution passed the dual feasibility check

Returns
whether the current LP solution passed the dual feasibility check.
Precondition
This method can be called if scip is in one of the following stages:

See SCIP_STAGE for a complete list of all possible solving stages.

Parameters
scipSCIP data structure

Definition at line 207 of file scip_lp.c.

References FALSE, Scip::lp, SCIP_CALL_ABORT, SCIPcheckStage(), SCIPlpIsDualReliable(), and TRUE.

Referenced by propagateRedcostBinvar(), propagateRedcostVar(), propagateRootRedcostBinvar(), and propagateRootRedcostVar().

◆ SCIPisLPRelax()

SCIP_Bool SCIPisLPRelax ( SCIP scip)

returns whether the current lp is a relaxation of the current problem and its optimal objective value is a local lower bound

Returns
whether the current lp is a relaxation of the current problem and its optimal objective value is a local lower bound.
Precondition
This method can be called if scip is in one of the following stages:

See SCIP_STAGE for a complete list of all possible solving stages.

Parameters
scipSCIP data structure

Definition at line 225 of file scip_lp.c.

References FALSE, Scip::lp, SCIP_CALL_ABORT, SCIPcheckStage(), SCIPlpIsRelax(), and TRUE.

Referenced by performStrongbranchWithPropagation().

◆ SCIPgetLPObjval()

SCIP_Real SCIPgetLPObjval ( SCIP scip)

gets objective value of current LP (which is the sum of column and loose objective value)

Returns
the objective value of current LP (which is the sum of column and loose objective value).
Precondition
This method can be called if scip is in one of the following stages:
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 returned by SCIPgetLPSolstat() is SCIP_LPSOLSTAT_ITERLIMIT or SCIP_LPSOLSTAT_TIMELIMIT.

See SCIP_STAGE for a complete list of all possible solving stages.

Parameters
scipSCIP data structure

Definition at line 247 of file scip_lp.c.

References FALSE, Scip::lp, SCIP_CALL_ABORT, SCIPcheckStage(), SCIPlpGetObjval(), Scip::set, Scip::transprob, and TRUE.

Referenced by applyVbounds(), execRelpscost(), executeStrongBranching(), getBranchingDecisionStrongbranchSOS1(), getDualBranchscore(), performLPRandRounding(), performLPSimpleRounding(), performStrongbranchSOS1(), performStrongbranchWithPropagation(), runVanillaStrongBranching(), SCIP_DECL_BRANCHEXECLP(), SCIP_DECL_DISPOUTPUT(), SCIP_DECL_HEUREXEC(), SCIP_DECL_PRICERREDCOST(), SCIP_DECL_SEPAEXECLP(), SCIPperformGenericDivingAlgorithm(), SCIPselectVarPseudoStrongBranching(), SCIPselectVarStrongBranching(), SCIPsolveDiveLP(), SCIPtryStrongbranchLPSol(), selectVarMultAggrBranching(), separateCuts(), and solveProbingLP().

◆ SCIPgetLPColumnObjval()

SCIP_Real SCIPgetLPColumnObjval ( SCIP scip)

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

Returns
the part of objective value of current LP that results from COLUMN variables only.
Precondition
This method can be called if scip is in one of the following stages:

See SCIP_STAGE for a complete list of all possible solving stages.

Parameters
scipSCIP data structure

Definition at line 265 of file scip_lp.c.

References FALSE, Scip::lp, SCIP_CALL_ABORT, SCIPcheckStage(), SCIPlpGetColumnObjval(), and TRUE.

◆ SCIPgetLPLooseObjval()

SCIP_Real SCIPgetLPLooseObjval ( SCIP scip)

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

Returns
part of objective value of current LP that results from LOOSE variables only.
Precondition
This method can be called if scip is in one of the following stages:

See SCIP_STAGE for a complete list of all possible solving stages.

Parameters
scipSCIP data structure

Definition at line 283 of file scip_lp.c.

References FALSE, Scip::lp, SCIP_CALL_ABORT, SCIPcheckStage(), SCIPlpGetLooseObjval(), Scip::set, Scip::transprob, and TRUE.

◆ SCIPgetGlobalPseudoObjval()

SCIP_Real SCIPgetGlobalPseudoObjval ( SCIP scip)

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

Returns
the global pseudo objective value; that is all variables set to their best (w.r.t. the objective function) global bound.
Precondition
This method can be called if scip is in one of the following stages:

See SCIP_STAGE for a complete list of all possible solving stages.

Parameters
scipSCIP data structure

Definition at line 308 of file scip_lp.c.

References FALSE, Scip::lp, SCIP_CALL_ABORT, SCIPcheckStage(), SCIPlpGetGlobalPseudoObjval(), Scip::set, Scip::transprob, and TRUE.

Referenced by propagateCutoffboundGlobally(), and resolvePropagation().

◆ SCIPgetPseudoObjval()

SCIP_Real SCIPgetPseudoObjval ( SCIP scip)

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

Returns
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.
Precondition
This method can be called if scip is in one of the following stages:

See SCIP_STAGE for a complete list of all possible solving stages.

Parameters
scipSCIP data structure

Definition at line 333 of file scip_lp.c.

References FALSE, Scip::lp, SCIP_CALL_ABORT, SCIPcheckStage(), SCIPlpGetPseudoObjval(), Scip::set, Scip::transprob, and TRUE.

Referenced by applyOptcumulative(), SCIP_DECL_DISPOUTPUT(), and SCIP_DECL_PRESOLEXEC().

◆ SCIPisRootLPRelax()

SCIP_Bool SCIPisRootLPRelax ( SCIP scip)

returns whether the root lp is a relaxation of the problem and its optimal objective value is a global lower bound

Returns
whether the root lp is a relaxation of the problem and its optimal objective value is a global lower bound.
Precondition
This method can be called if scip is in one of the following stages:

See SCIP_STAGE for a complete list of all possible solving stages.

Parameters
scipSCIP data structure

Definition at line 351 of file scip_lp.c.

References FALSE, Scip::lp, SCIP_CALL_ABORT, SCIPcheckStage(), SCIPlpIsRootLPRelax(), and TRUE.

◆ SCIPgetLPRootObjval()

SCIP_Real SCIPgetLPRootObjval ( SCIP scip)

gets the objective value of the root node LP or SCIP_INVALID if the root node LP was not (yet) solved

Returns
the objective value of the root node LP or SCIP_INVALID if the root node LP was not (yet) solved.
Precondition
This method can be called if scip is in one of the following stages:

See SCIP_STAGE for a complete list of all possible solving stages.

Parameters
scipSCIP data structure

Definition at line 372 of file scip_lp.c.

References FALSE, Scip::lp, SCIP_CALL_ABORT, SCIPcheckStage(), SCIPlpGetRootObjval(), and TRUE.

◆ SCIPgetLPRootColumnObjval()

SCIP_Real SCIPgetLPRootColumnObjval ( SCIP scip)

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

Returns
the part of the objective value of the root node LP that results from COLUMN variables only; or SCIP_INVALID if the root node LP was not (yet) solved.
Precondition
This method can be called if scip is in one of the following stages:

See SCIP_STAGE for a complete list of all possible solving stages.

Parameters
scipSCIP data structure

Definition at line 395 of file scip_lp.c.

References FALSE, Scip::lp, SCIP_CALL_ABORT, SCIPcheckStage(), SCIPlpGetRootColumnObjval(), and TRUE.

◆ SCIPgetLPRootLooseObjval()

SCIP_Real SCIPgetLPRootLooseObjval ( SCIP scip)

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

Returns
the part of the objective value of the root node LP that results from LOOSE variables only; or SCIP_INVALID if the root node LP was not (yet) solved.
Precondition
This method can be called if scip is in one of the following stages:

See SCIP_STAGE for a complete list of all possible solving stages.

Parameters
scipSCIP data structure

Definition at line 418 of file scip_lp.c.

References FALSE, Scip::lp, SCIP_CALL_ABORT, SCIPcheckStage(), SCIPlpGetRootLooseObjval(), and TRUE.

◆ SCIPgetLPFeastol()

SCIP_Real SCIPgetLPFeastol ( SCIP scip)

gets current primal feasibility tolerance of LP

Parameters
scipSCIP data structure

Definition at line 428 of file scip_lp.c.

References FALSE, Scip::lp, SCIP_CALL_ABORT, SCIPcheckStage(), SCIPlpGetFeastol(), and TRUE.

Referenced by addCut(), consEnfo(), SCIP_DECL_NLHDLRENFO(), SCIPcomputeFacetVertexPolyhedralNonlinear(), SCIPlpfeastol(), and SCIPprocessRowprepNonlinear().

◆ SCIPsetLPFeastol()

void SCIPsetLPFeastol ( SCIP scip,
SCIP_Real  newfeastol 
)

sets primal feasibility tolerance of LP

Parameters
scipSCIP data structure
newfeastolnew primal feasibility tolerance for LP

Definition at line 438 of file scip_lp.c.

References FALSE, Scip::lp, SCIP_CALL_ABORT, SCIPcheckStage(), SCIPlpSetFeastol(), Scip::set, and TRUE.

Referenced by consEnfo(), and SCIPchgLpfeastol().

◆ SCIPresetLPFeastol()

void SCIPresetLPFeastol ( SCIP scip)

resets primal feasibility tolerance of LP

Sets primal feasibility tolerance to min of numerics/lpfeastolfactor * numerics/feastol and relaxfeastol.

Parameters
scipSCIP data structure

Definition at line 452 of file scip_lp.c.

References FALSE, Scip::lp, SCIP_CALL_ABORT, SCIPcheckStage(), SCIPlpResetFeastol(), Scip::set, and TRUE.

◆ SCIPgetLPColsData()

SCIP_RETCODE SCIPgetLPColsData ( SCIP scip,
SCIP_COL ***  cols,
int *  ncols 
)

gets current LP columns along with the current number of LP columns

Returns
SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.
Precondition
This method can be called if scip is in one of the following stages:

See SCIP_STAGE for a complete list of all possible solving stages.

Parameters
scipSCIP data structure
colspointer to store the array of LP columns, or NULL
ncolspointer to store the number of LP columns, or NULL

Definition at line 471 of file scip_lp.c.

References FALSE, Scip::lp, NULL, SCIP_CALL, SCIP_OKAY, SCIPcheckStage(), SCIPlpGetCols(), SCIPlpGetNCols(), SCIPtreeIsFocusNodeLPConstructed(), Scip::tree, and TRUE.

Referenced by buildMod2Matrix(), computeCut(), createCGCutDirect(), createCGMIPprimalsols(), createSubscip(), extractCapacities(), extractNodes(), generateAverageNBRay(), mcfnetworkExtract(), mcfnetworkFill(), SCIP_DECL_BRANCHEXECLP(), SCIP_DECL_HEUREXEC(), SCIP_DECL_SEPAEXECLP(), and storeDenseTableauRow().

◆ SCIPgetLPCols()

SCIP_COL** SCIPgetLPCols ( SCIP scip)

gets current LP columns

Returns
the current LP columns.
Precondition
This method can be called if scip is in one of the following stages:

See SCIP_STAGE for a complete list of all possible solving stages.

Parameters
scipSCIP data structure

Definition at line 506 of file scip_lp.c.

References FALSE, Scip::lp, NULL, SCIP_CALL_ABORT, SCIPcheckStage(), SCIPlpGetCols(), SCIPtreeIsFocusNodeLPConstructed(), Scip::tree, and TRUE.

Referenced by addCols(), computeIntercut(), computeMonoidalStrengthCoef(), computeNegCutcoefs(), computeStrengthenedIntercut(), constructCutRow(), createAndStoreSparseRays(), findUncapacitatedArcs(), getNextFlowrow(), and mcfnetworkFill().

◆ SCIPgetNLPCols()

◆ SCIPgetNUnfixedLPCols()

int SCIPgetNUnfixedLPCols ( SCIP scip)

gets current number of unfixed LP columns

Returns
the current number of unfixed LP columns.
Precondition
This method can be called if scip is in one of the following stages:

See SCIP_STAGE for a complete list of all possible solving stages.

Parameters
scipSCIP data structure

Definition at line 548 of file scip_lp.c.

References FALSE, Scip::lp, SCIP_Set::num_epsilon, SCIP_CALL_ABORT, SCIPcheckStage(), SCIPlpGetNUnfixedCols(), SCIPtreeIsFocusNodeLPConstructed(), Scip::set, Scip::tree, and TRUE.

Referenced by applyBoundHeur(), applyVbounds(), and SCIP_DECL_HEUREXEC().

◆ SCIPgetLPRowsData()

SCIP_RETCODE SCIPgetLPRowsData ( SCIP scip,
SCIP_ROW ***  rows,
int *  nrows 
)

gets current LP rows along with the current number of LP rows

Returns
SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.
Precondition
This method can be called if scip is in one of the following stages:

See SCIP_STAGE for a complete list of all possible solving stages.

Parameters
scipSCIP data structure
rowspointer to store the array of LP rows, or NULL
nrowspointer to store the number of LP rows, or NULL

Definition at line 570 of file scip_lp.c.

References FALSE, Scip::lp, NULL, SCIP_CALL, SCIP_OKAY, SCIPcheckStage(), SCIPlpGetNRows(), SCIPlpGetRows(), SCIPtreeIsFocusNodeLPConstructed(), Scip::tree, and TRUE.

Referenced by aggregation(), buildMod2Matrix(), cleanupNetwork(), computeCut(), createCGCutCMIR(), createCGCutStrongCG(), createCGMIPprimalsols(), createRows(), createSubscip(), extractCapacities(), extractCapacityRows(), extractFlowRows(), extractNodes(), generateAverageNBRay(), generateAverageRay(), initMatrix(), mcfnetworkExtract(), mcfnetworkFill(), mod2MatrixTransformContRows(), SCIP_DECL_BRANCHEXECLP(), SCIP_DECL_HEUREXEC(), SCIP_DECL_SEPAEXECLP(), SCIPaggrRowSumRows(), SCIPapplyLockFixings(), separateCuts(), setupAggregationData(), and storeDenseTableauRow().

◆ SCIPgetLPRows()

◆ SCIPgetNLPRows()

◆ SCIPallColsInLP()

SCIP_Bool SCIPallColsInLP ( SCIP scip)

returns TRUE iff all columns, i.e. every variable with non-empty column w.r.t. all ever created rows, are present in the LP, and FALSE, if there are additional already existing columns, that may be added to the LP in pricing

Returns
TRUE iff all columns, i.e. every variable with non-empty column w.r.t. all ever created rows, are present in the LP, and FALSE, if there are additional already existing columns, that may be added to the LP in pricing.
Precondition
This method can be called if scip is in one of the following stages:

See SCIP_STAGE for a complete list of all possible solving stages.

Parameters
scipSCIP data structure

Definition at line 649 of file scip_lp.c.

References FALSE, Scip::lp, SCIP_CALL_ABORT, SCIPcheckStage(), SCIPprobAllColsInLP(), Scip::set, Scip::transprob, and TRUE.

Referenced by branch(), execRelpscost(), executeBranchingRecursive(), performRandRounding(), performSimpleRounding(), performStrongbranchWithPropagation(), runVanillaStrongBranching(), SCIP_DECL_BRANCHEXECLP(), SCIP_DECL_PROPEXEC(), SCIP_DECL_RELAXEXEC(), SCIPgetVarStrongbranchWithPropagation(), SCIPselectVarPseudoStrongBranching(), SCIPselectVarStrongBranching(), selectVarMultAggrBranching(), and selectVarRecursive().

◆ SCIPisLPSolBasic()

SCIP_Bool SCIPisLPSolBasic ( SCIP scip)

returns whether the current LP solution is basic, i.e. is defined by a valid simplex basis

Returns
whether the current LP solution is basic, i.e. is defined by a valid simplex basis.
Precondition
This method can be called if scip is in one of the following stages:

See SCIP_STAGE for a complete list of all possible solving stages.

Parameters
scipSCIP data structure

Definition at line 667 of file scip_lp.c.

References FALSE, Scip::lp, SCIP_CALL_ABORT, SCIPcheckStage(), SCIPlpIsSolBasic(), and TRUE.

Referenced by applyBoundHeur(), applyVbounds(), execRelpscost(), SCIP_DECL_BRANCHEXECLP(), SCIP_DECL_HEUREXEC(), SCIP_DECL_NLHDLRENFO(), SCIP_DECL_SEPAEXECLP(), and SCIPperformGenericDivingAlgorithm().

◆ SCIPgetLPBasisInd()

SCIP_RETCODE SCIPgetLPBasisInd ( SCIP scip,
int *  basisind 
)

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

Returns
SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.
Precondition
This method can be called if scip is in one of the following stages:

See SCIP_STAGE for a complete list of all possible solving stages.

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

Definition at line 686 of file scip_lp.c.

References FALSE, Scip::lp, SCIP_CALL, SCIP_INVALIDCALL, SCIP_OKAY, SCIPcheckStage(), SCIPerrorMessage, SCIPlpGetBasisInd(), SCIPlpIsSolBasic(), and TRUE.

Referenced by constructBasicVars2TableauRowMap(), createCGMIPprimalsols(), SCIP_DECL_BRANCHEXECLP(), SCIP_DECL_SEPAEXECLP(), and SCIPdummyDebugMethodForSun().

◆ SCIPgetLPBInvRow()

SCIP_RETCODE SCIPgetLPBInvRow ( SCIP scip,
int  r,
SCIP_Real coefs,
int *  inds,
int *  ninds 
)

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

Returns
SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.
Precondition
This method can be called if scip is in one of the following stages:

See SCIP_STAGE for a complete list of all possible solving stages.

Parameters
scipSCIP data structure
rrow number
coefsarray 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 714 of file scip_lp.c.

References FALSE, Scip::lp, SCIP_CALL, SCIP_INVALIDCALL, SCIP_OKAY, SCIPcheckStage(), SCIPdebugCheckBInvRow, SCIPerrorMessage, SCIPlpGetBInvRow(), SCIPlpIsSolBasic(), and TRUE.

Referenced by createCGMIPprimalsols(), getTableauRows(), SCIP_DECL_BRANCHEXECLP(), SCIP_DECL_SEPAEXECLP(), and storeDenseTableauRow().

◆ SCIPgetLPBInvCol()

SCIP_RETCODE SCIPgetLPBInvCol ( SCIP scip,
int  c,
SCIP_Real coefs,
int *  inds,
int *  ninds 
)

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

Returns
SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.
Precondition
This method can be called if scip is in one of the following stages:

See SCIP_STAGE for a complete list of all possible solving stages.

Parameters
scipSCIP data structure
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
coefsarray 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 749 of file scip_lp.c.

References FALSE, Scip::lp, SCIP_CALL, SCIP_INVALIDCALL, SCIP_OKAY, SCIPcheckStage(), SCIPerrorMessage, SCIPlpGetBInvCol(), SCIPlpIsSolBasic(), and TRUE.

◆ SCIPgetLPBInvARow()

SCIP_RETCODE SCIPgetLPBInvARow ( SCIP scip,
int  r,
SCIP_Real binvrow,
SCIP_Real coefs,
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)

Returns
SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.
Precondition
This method can be called if scip is in one of the following stages:

See SCIP_STAGE for a complete list of all possible solving stages.

Parameters
scipSCIP data structure
rrow number
binvrowrow in B^-1 from prior call to SCIPgetLPBInvRow(), or NULL
coefsarray 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 785 of file scip_lp.c.

References FALSE, Scip::lp, SCIP_CALL, SCIP_INVALIDCALL, SCIP_OKAY, SCIPcheckStage(), SCIPerrorMessage, SCIPlpGetBInvARow(), SCIPlpIsSolBasic(), and TRUE.

Referenced by getTableauRows(), SCIP_DECL_BRANCHEXECLP(), SCIP_DECL_SEPAEXECLP(), and storeDenseTableauRow().

◆ SCIPgetLPBInvACol()

SCIP_RETCODE SCIPgetLPBInvACol ( SCIP scip,
int  c,
SCIP_Real coefs,
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

Returns
SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.
Precondition
This method can be called if scip is in one of the following stages:

See SCIP_STAGE for a complete list of all possible solving stages.

Parameters
scipSCIP data structure
ccolumn number which can be accessed by SCIPcolGetLPPos()
coefsarray 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 819 of file scip_lp.c.

References FALSE, Scip::lp, SCIP_CALL, SCIP_INVALIDCALL, SCIP_OKAY, SCIPcheckStage(), SCIPerrorMessage, SCIPlpGetBInvACol(), SCIPlpIsSolBasic(), and TRUE.

Referenced by generateAverageRay().

◆ SCIPsumLPRows()

SCIP_RETCODE SCIPsumLPRows ( SCIP scip,
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

Returns
SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.
Precondition
This method can be called if scip is in one of the following stages:

See SCIP_STAGE for a complete list of all possible solving stages.

Parameters
scipSCIP data structure
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 852 of file scip_lp.c.

References FALSE, Scip::lp, SCIP_CALL, SCIP_OKAY, SCIPcheckStage(), SCIPlpSumRows(), Scip::set, Scip::transprob, and TRUE.

◆ SCIPinterruptLP()

SCIP_RETCODE SCIPinterruptLP ( SCIP scip,
SCIP_Bool  interrupt 
)

interrupts or disables the interrupt of the currently ongoing lp solve; if the lp is not currently constructed just returns with no effect

Returns
SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.
Precondition
This method can be called if scip is in one of the following stages:

See SCIP_STAGE for a complete list of all possible solving stages.

interrupts or disables the interrupt of the currently ongoing lp solve; if the lp is not currently constructed just returns with no effect

Returns
SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.
Precondition
This method can be called in any SCIP stage
Parameters
scipSCIP data structure
interruptTRUE if interrupt should be set, FALSE if it should be disabled

Definition at line 874 of file scip_lp.c.

References Scip::lp, NULL, SCIP_CALL, SCIP_OKAY, SCIPcheckStage(), SCIPlpInterrupt(), Scip::stat, TRUE, and SCIP_Stat::userinterrupt.

Referenced by SCIPpresolve(), and SCIPsolve().

◆ SCIPwriteLP()

SCIP_RETCODE SCIPwriteLP ( SCIP scip,
const char *  filename 
)

writes current LP to a file

Returns
SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.
Precondition
This method can be called if scip is in one of the following stages:

See SCIP_STAGE for a complete list of all possible solving stages.

Parameters
scipSCIP data structure
filenamefile name

Definition at line 901 of file scip_lp.c.

References Scip::branchcand, Scip::cliquetable, Scip::cutpool, Scip::eventfilter, Scip::eventqueue, FALSE, Scip::lp, Scip::mem, Scip::origprob, Scip::pricestore, SCIP_Mem::probmem, Scip::reopt, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIPcheckStage(), SCIPconstructCurrentLP(), SCIPlpFlush(), SCIPlpWrite(), SCIPtreeIsFocusNodeLPConstructed(), Scip::sepastore, Scip::set, Scip::stat, Scip::transprob, Scip::tree, and TRUE.

Referenced by SCIP_DECL_DIALOGEXEC(), and SCIP_DECL_HEUREXEC().

◆ SCIPwriteMIP()

SCIP_RETCODE SCIPwriteMIP ( SCIP scip,
const char *  filename,
SCIP_Bool  genericnames,
SCIP_Bool  origobj,
SCIP_Bool  lazyconss 
)

writes MIP relaxation of the current branch-and-bound node to a file

Returns
SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.
Precondition
This method can be called if scip is in one of the following stages:

See SCIP_STAGE for a complete list of all possible solving stages.

Parameters
scipSCIP data structure
filenamefile 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?
lazyconssoutput removable rows as lazy constraints?

Definition at line 935 of file scip_lp.c.

References Scip::eventqueue, FALSE, Scip::lp, Scip::mem, Scip::messagehdlr, SCIP_Prob::objoffset, SCIP_Prob::objscale, SCIP_Prob::objsense, Scip::origprob, SCIP_Mem::probmem, SCIP_CALL, SCIP_OKAY, SCIPcheckStage(), SCIPlpFlush(), SCIPlpWriteMip(), Scip::set, Scip::transprob, and TRUE.

Referenced by SCIP_DECL_DIALOGEXEC().

◆ SCIPgetLPI()

SCIP_RETCODE SCIPgetLPI ( SCIP scip,
SCIP_LPI **  lpi 
)

gets the LP interface of SCIP; with the LPI you can use all of the methods defined in lpi/lpi.h;

Warning
You have to make sure, that the full internal state of the LPI does not change or is recovered completely after the end of the method that uses the LPI. In particular, if you manipulate the LP or its solution (e.g. by calling one of the SCIPlpiAdd...() or one of the SCIPlpiSolve...() methods), you have to check in advance with SCIPlpiWasSolved() whether the LP is currently solved. If this is the case, you have to make sure, the internal solution status is recovered completely at the end of your method. This can be achieved by getting the LPI state before applying any LPI manipulations with SCIPlpiGetState() and restoring it afterwards with SCIPlpiSetState() and SCIPlpiFreeState(). Additionally you have to resolve the LP with the appropriate SCIPlpiSolve...() call in order to reinstall the internal solution status.
Make also sure, that all parameter values that you have changed are set back to their original values.
Returns
SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.
Precondition
This method can be called if scip is in one of the following stages:

See SCIP_STAGE for a complete list of all possible solving stages.

Parameters
scipSCIP data structure
lpipointer to store the LP interface

Definition at line 985 of file scip_lp.c.

References FALSE, Scip::lp, NULL, SCIP_CALL, SCIP_OKAY, SCIPcheckStage(), SCIPlpGetLPI(), and TRUE.

Referenced by performStrongbranchWithPropagation(), SCIP_DECL_DISPOUTPUT(), and selectVarRecursive().

◆ SCIPprintLPSolutionQuality()

SCIP_RETCODE SCIPprintLPSolutionQuality ( SCIP scip,
FILE *  file 
)

Displays quality information about the current LP solution. An LP solution need to be available. Information printed is subject to what the LP solver supports

Returns
SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.
Precondition
This method can be called if scip is in one of the following stages:

See SCIP_STAGE for a complete list of all possible solving stages.

Note
The printing process is done via the message handler system.

displays quality information about the current LP solution. An LP solution need to be available; information printed is subject to what the LP solver supports

Returns
SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.
Precondition
This method can be called if scip is in one of the following stages:

See SCIP_STAGE for a complete list of all possible solving stages.

Note
The printing process is done via the message handler system.
Parameters
scipSCIP data structure
fileoutput file (or NULL for standard output)

Definition at line 1021 of file scip_lp.c.

References FALSE, Scip::lp, Scip::messagehdlr, NULL, SCIP_CALL, SCIP_INVALID, SCIP_INVALIDCALL, SCIP_LPSOLQUALITY_ESTIMCONDITION, SCIP_LPSOLQUALITY_EXACTCONDITION, SCIP_OKAY, SCIP_Real, SCIP_STAGE_EXITPRESOLVE, SCIP_STAGE_INIT, SCIP_STAGE_INITPRESOLVE, SCIP_STAGE_PRESOLVED, SCIP_STAGE_PRESOLVING, SCIP_STAGE_PROBLEM, SCIP_STAGE_SOLVED, SCIP_STAGE_SOLVING, SCIP_STAGE_TRANSFORMED, SCIPcheckStage(), SCIPerrorMessage, SCIPlpGetLPI(), SCIPlpiGetRealSolQuality(), SCIPmessageFPrintInfo(), Scip::set, SCIP_Set::stage, and TRUE.

Referenced by SCIP_DECL_DIALOGEXEC().

◆ SCIPcomputeLPRelIntPoint()

SCIP_RETCODE SCIPcomputeLPRelIntPoint ( SCIP scip,
SCIP_Bool  relaxrows,
SCIP_Bool  inclobjcutoff,
SCIP_Real  timelimit,
int  iterlimit,
SCIP_SOL **  point 
)

compute relative interior point to current LP

See also
SCIPlpComputeRelIntPoint
Returns
SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.
Precondition
This method can be called if scip is in one of the following stages:

See SCIP_STAGE for a complete list of all possible solving stages.

Parameters
scipSCIP data structure
relaxrowsshould the rows be relaxed
inclobjcutoffshould a row for the objective cutoff be included
timelimittime limit for LP solver
iterlimititeration limit for LP solver
pointrelative interior point on exit

Definition at line 1094 of file scip_lp.c.

References FALSE, Scip::lp, Scip::messagehdlr, NULL, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPallocBufferArray, SCIPcheckStage(), SCIPcolGetVar(), SCIPcreateSol(), SCIPfreeBufferArray, SCIPlpComputeRelIntPoint(), SCIPlpGetCols(), SCIPlpGetNCols(), SCIPsetSolVal(), Scip::set, Scip::transprob, and TRUE.

Referenced by SCIP_DECL_SEPAEXECLP(), and setAndUpdateCorePoint().