Scippy

SCIP

Solving Constraint Integer Programs

Row methods

Detailed Description

Functions

 SCIP_DECL_SORTPTRCOMP (SCIProwComp)
 
void SCIProwLock (SCIP_ROW *row)
 
void SCIProwUnlock (SCIP_ROW *row)
 
SCIP_Real SCIProwGetScalarProduct (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)
 
void SCIProwSort (SCIP_ROW *row)
 
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)
 
SCIP_Longint SCIProwGetActiveLPCount (SCIP_ROW *row)
 
SCIP_Longint SCIProwGetNLPsAfterCreation (SCIP_ROW *row)
 
void SCIProwChgRank (SCIP_ROW *row, int rank)
 

Function Documentation

SCIP_DECL_SORTPTRCOMP ( SCIProwComp  )

comparison method for sorting rows by non-decreasing index

Definition at line 901 of file lp.c.

References NULL, and SCIProwGetIndex().

void SCIProwLock ( SCIP_ROW row)

locks an unmodifiable row, which forbids further changes; has no effect on modifiable rows

Parameters
rowLP row

Definition at line 5144 of file lp.c.

References SCIP_Row::modifiable, SCIP_Row::name, SCIP_Row::nlocks, NULL, SCIP_Row::nuses, and SCIPdebugMessage.

Referenced by SCIPcutpoolAddNewRow(), and SCIPlpAddRow().

void SCIProwUnlock ( SCIP_ROW row)

unlocks a lock of an unmodifiable row; a row with no sealed lock may be modified; has no effect on modifiable rows

Parameters
rowLP row

Definition at line 5159 of file lp.c.

References SCIP_Row::modifiable, SCIP_Row::name, SCIP_Row::nlocks, NULL, SCIP_Row::nuses, and SCIPdebugMessage.

Referenced by cutpoolDelCut(), lpDelRowset(), SCIPcutpoolClear(), and SCIPlpShrinkRows().

SCIP_Real SCIProwGetScalarProduct ( SCIP_ROW row1,
SCIP_ROW row2 
)

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

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

Note
the scalar product is computed w.r.t. the current LP columns only
Parameters
row1first LP row
row2second LP row

Definition at line 6687 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, SCIP_Real, SCIProwSort(), SCIPswapPointers(), TRUE, and SCIP_Row::vals.

Referenced by SCIProwGetParallelism().

SCIP_Real SCIProwGetParallelism ( SCIP_ROW row1,
SCIP_ROW row2,
char  orthofunc 
)

returns the degree of parallelism between the hyperplanes defined by the two row vectors v, w: p = |v*w|/(|v|*|w|); the hyperplanes are parallel, iff p = 1, they are orthogonal, iff p = 0

Parameters
row1first LP row
row2second LP row
orthofuncfunction used for calc. scalar prod. ('e'uclidean, 'd'iscrete)

Definition at line 7403 of file lp.c.

References REALABS, SCIP_Real, SCIPABORT, SCIPerrorMessage, SCIProwGetDiscreteScalarProduct(), SCIProwGetNNonz(), SCIProwGetNorm(), SCIProwGetScalarProduct(), and sqrt().

Referenced by createCGCutCMIR(), createCGCutDirect(), createCGCutStrongCG(), and SCIProwGetOrthogonality().

SCIP_Real SCIProwGetOrthogonality ( SCIP_ROW row1,
SCIP_ROW row2,
char  orthofunc 
)

returns the degree of orthogonality between the hyperplanes defined by the two row vectors v, w: o = 1 - |v*w|/(|v|*|w|); the hyperplanes are orthogonal, iff p = 1, they are parallel, iff p = 0

Parameters
row1first LP row
row2second LP row
orthofuncfunction used for calc. scalar prod. ('e'uclidean, 'd'iscrete)

Definition at line 7435 of file lp.c.

References SCIProwGetParallelism().

Referenced by sepastoreUpdateOrthogonalities().

void SCIProwSort ( SCIP_ROW row)

sorts row entries such that LP columns precede non-LP columns and inside both parts lower column indices precede higher ones

Parameters
rowrow to be sorted

Definition at line 5780 of file lp.c.

References SCIP_Row::cols, SCIP_Row::delaysort, SCIP_Col::index, SCIP_Row::nlpcols, NULL, rowSortLP(), and rowSortNonLP().

Referenced by rowMerge(), SCIP_DECL_HASHKEYEQ(), SCIProwGetDiscreteScalarProduct(), and SCIProwGetScalarProduct().

int SCIProwGetNLPNonz ( SCIP_ROW row)

get number of nonzero entries in row vector, that correspond to columns currently in the SCIP_LP;

Warning
This method is only applicable on rows, that are completely linked to their columns (e.g. a row that is in the current LP and the LP was solved, or a row that was in a solved LP and didn't change afterwards
Parameters
rowLP row

Definition at line 18850 of file lp.c.

References SCIP_Row::nlpcols, NULL, and SCIP_Row::nunlinked.

Referenced by addFlowrowToCommodity(), aggregation(), cleanupNetwork(), collectIncidentFlowCols(), computeCut(), constructSNFRelaxation(), createSubscip(), deleteCommodity(), extractCapacities(), extractCapacityRows(), extractFlowRows(), extractNodes(), findUncapacitatedArcs(), generateClusterCuts(), getFlowrowFit(), getNodeSimilarityScore(), getZerohalfWeightvectorFromSelectedRowsBitarray(), identifySourcesTargets(), initMatrix(), mcfnetworkExtract(), mcfnetworkFill(), nodepairqueueCreate(), nodepartitionIsConnected(), selectRounding(), selectShifting(), and separateCuts().

SCIP_Real SCIProwGetSumNorm ( SCIP_ROW row)

gets sum norm of row vector (sum of absolute values of coefficients)

Parameters
rowLP row

Definition at line 18903 of file lp.c.

References checkRowSumnorm, NULL, and SCIP_Row::sumnorm.

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

SCIP_Real SCIProwGetDualfarkas ( SCIP_ROW row)

gets the dual Farkas coefficient of a row in an infeasible LP

Parameters
rowLP row

Definition at line 18948 of file lp.c.

References SCIP_Row::dualfarkas, SCIP_Row::lppos, and NULL.

Referenced by SCIPgetDualfarkasKnapsack(), SCIPgetDualfarkasLogicor(), SCIPgetDualfarkasSetppc(), and SCIPgetDualfarkasVarbound().

SCIP_BASESTAT SCIProwGetBasisStatus ( SCIP_ROW row)

gets the basis status of a row in the LP solution; only valid for LPs with status SCIP_LPSOLSTAT_OPTIMAL and with SCIPisLPSolBasic(scip) == TRUE; returns SCIP_BASESTAT_BASIC for rows not in the current SCIP_LP

Parameters
rowLP row

Definition at line 18963 of file lp.c.

References SCIP_Row::basisstatus, SCIP_Row::lppos, NULL, and SCIP_BASESTAT_BASIC.

Referenced by generateDisjCutSOS1(), getSimplexCoefficients(), and SCIP_DECL_SEPAEXECLP().

int SCIProwGetIndex ( SCIP_ROW row)

gets unique index of row

Parameters
rowLP row

Definition at line 18984 of file lp.c.

References SCIP_Row::index, and NULL.

Referenced by calcBranchScore(), checkConstraintMatching(), determineBound(), SCIP_DECL_SORTPTRCOMP(), varColCompare(), and varProcessBoundChanges().

int SCIProwGetAge ( SCIP_ROW row)

gets age of row

Parameters
rowLP row

Definition at line 18994 of file lp.c.

References SCIP_Row::age, and NULL.

Referenced by createSubscip().

int SCIProwGetRank ( SCIP_ROW row)

gets rank of row

Parameters
rowLP row

Definition at line 19004 of file lp.c.

References NULL, and SCIP_Row::rank.

Referenced by addCut(), computeCut(), createCGCutCMIR(), createCGCutStrongCG(), evaluateCutNumerics(), and getVarRank().

SCIP_Bool SCIProwIsIntegral ( SCIP_ROW row)

returns TRUE iff the activity of the row (without the row's constant) is always integral in a feasible solution

Parameters
rowLP row

Definition at line 19014 of file lp.c.

References SCIP_Row::integral, and NULL.

Referenced by computeCut(), createSubscip(), and SCIP_DECL_SEPAEXECLP().

SCIP_Bool SCIProwIsRemovable ( SCIP_ROW row)

returns TRUE iff row is removable from the LP (due to aging or cleanup)

Parameters
rowLP row

Definition at line 19044 of file lp.c.

References NULL, and SCIP_Row::removable.

Referenced by cutpoolDelCut(), SCIPcutpoolAddNewRow(), and SCIPlpWriteMip().

SCIP_ROWORIGINTYPE SCIProwGetOrigintype ( SCIP_ROW row)

returns type of origin that created the row

Parameters
rowLP row

Definition at line 19054 of file lp.c.

References NULL, and SCIP_Row::origintype.

SCIP_CONSHDLR* SCIProwGetOriginCons ( SCIP_ROW row)

returns origin constraint handler that created the row (NULL if not available)

Parameters
rowLP row

Definition at line 19064 of file lp.c.

References NULL, SCIP_Row::origin, SCIP_Row::origintype, and SCIP_ROWORIGINTYPE_CONS.

Referenced by SCIPcutpoolSeparate().

SCIP_SEPA* SCIProwGetOriginSepa ( SCIP_ROW row)

returns origin separator that created the row (NULL if not available)

Parameters
rowLP row

Definition at line 19079 of file lp.c.

References NULL, SCIP_Row::origin, SCIP_Row::origintype, and SCIP_ROWORIGINTYPE_SEPA.

Referenced by computeCut(), createSubscip(), and SCIPcutpoolSeparate().

SCIP_Bool SCIProwIsInGlobalCutpool ( SCIP_ROW row)

returns TRUE iff row is member of the global cut pool

Parameters
rowLP row

Definition at line 19094 of file lp.c.

References SCIP_Row::inglobalcutpool, and NULL.

Referenced by computeScore().

int SCIProwGetLPDepth ( SCIP_ROW row)

gets depth in the tree where the row entered the LP, or -1 if it is not in LP

Parameters
rowLP row

Definition at line 19115 of file lp.c.

References SCIP_Row::lpdepth, SCIP_Row::lppos, and NULL.

SCIP_Longint SCIProwGetActiveLPCount ( SCIP_ROW row)

returns the number of times that this row has been sharp in an optimal LP solution

Parameters
rowrow

Definition at line 19148 of file lp.c.

References SCIP_Row::activeinlpcounter, and NULL.

Referenced by SCIPcutGetLPActivityQuot().

SCIP_Longint SCIProwGetNLPsAfterCreation ( SCIP_ROW row)

returns the number of LPs since this row has been created

Parameters
rowrow

Definition at line 19158 of file lp.c.

References SCIP_Row::nlpsaftercreation, and NULL.

Referenced by SCIPcutGetLPActivityQuot().

void SCIProwChgRank ( SCIP_ROW row,
int  rank 
)

changes the rank of LP row

Parameters
rowLP row
ranknew value for rank

Definition at line 19137 of file lp.c.

References NULL, and SCIP_Row::rank.

Referenced by addCut(), createCGCutCMIR(), createCGCutDirect(), createCGCutStrongCG(), createZerohalfCutFromZerohalfWeightvector(), generateOddCycleCut(), newsolCliqueAddRow(), and SCIP_DECL_SEPAEXECLP().