Detailed Description
methods to manage exact LP relaxation
Function Documentation
◆ SCIPcreateEmptyRowConsExact()
| SCIP_RETCODE SCIPcreateEmptyRowConsExact | ( | SCIP * | scip, |
| SCIP_ROWEXACT ** | rowexact, | ||
| SCIP_ROW * | fprow, | ||
| SCIP_ROW * | fprowrhs, | ||
| SCIP_RATIONAL * | lhs, | ||
| SCIP_RATIONAL * | rhs, | ||
| SCIP_Bool | isfprelaxable | ||
| ) |
creates and captures an LP row without any coefficients from a constraint handler
- 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 one of the following stages of the SCIP solving process:
- Parameters
-
scip SCIP data structure rowexact pointer to row fprow corresponding fp-row fprowrhs rhs-part of fp-relaxation of this row if necessary, NULL otherwise lhs left hand side of row rhs right hand side of row isfprelaxable is it possible to create an fp relaxation of this row?
Definition at line 228 of file scip_lpexact.c.
References FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIP_ROWORIGINTYPE_CONS, SCIPcheckStage, SCIProwExactCreate(), SCIProwGetOriginCons(), SCIProwGetOrigintype(), and TRUE.
Referenced by createRows().
◆ SCIPcreateRowExact()
| SCIP_RETCODE SCIPcreateRowExact | ( | SCIP * | scip, |
| SCIP_ROWEXACT ** | row, | ||
| SCIP_ROW * | fprow, | ||
| int | len, | ||
| SCIP_COLEXACT ** | cols, | ||
| SCIP_RATIONAL ** | vals, | ||
| SCIP_RATIONAL * | lhs, | ||
| SCIP_RATIONAL * | rhs, | ||
| SCIP_Bool | isfprelaxable | ||
| ) |
creates and captures an exact LP row
- 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 one of the following stages of the SCIP solving process:
- Parameters
-
scip SCIP data structure row pointer to row fprow corresponding fp approximation/relaxation len number of nonzeros in the row cols array with columns of row entries vals array with coefficients of row entries lhs left hand side of row rhs right hand side of row isfprelaxable is it possible to make fp-relaxation of this row
Definition at line 256 of file scip_lpexact.c.
References FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIPcheckStage, SCIProwExactCreate(), and TRUE.
Referenced by getObjectiveRow().
◆ SCIPcreateRowExactFromRow()
| SCIP_RETCODE SCIPcreateRowExactFromRow | ( | SCIP * | scip, |
| SCIP_ROW * | fprow | ||
| ) |
creates and captures an exact LP row from an existing fp row
- 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 one of the following stages of the SCIP solving process:
- Parameters
-
scip SCIP data structure fprow corresponding fp approximation/relaxation
Definition at line 285 of file scip_lpexact.c.
References FALSE, NULL, SCIP_Row::rowexact, SCIP_CALL, SCIP_OKAY, SCIPcheckStage, SCIProwExactCreateFromRow(), and TRUE.
Referenced by addCut().
◆ SCIPgenerateFpRowsFromRowExact()
| SCIP_RETCODE SCIPgenerateFpRowsFromRowExact | ( | SCIP * | scip, |
| SCIP_ROWEXACT * | row, | ||
| SCIP_ROW * | rowlhs, | ||
| SCIP_ROW * | rowrhs, | ||
| SCIP_Bool * | onerowrelax, | ||
| SCIP_Bool * | hasfprelax | ||
| ) |
generates two fprows that are a relaxation of the exact row wrt the lhs/rhs, respectively
- 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 one of the following stages of the SCIP solving process:
- Parameters
-
scip SCIP data structure row SCIP exact row rowlhs fp row-relaxation wrt lhs rowrhs fp row-relaxation wrt rhs onerowrelax is one row enough to represent the exact row hasfprelax is it possible to generate relaxations at all for this row?
Definition at line 309 of file scip_lpexact.c.
References FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIPcheckStage, SCIProwExactGenerateFpRows(), and TRUE.
Referenced by createRows().
◆ SCIPcaptureRowExact()
| SCIP_RETCODE SCIPcaptureRowExact | ( | SCIP * | scip, |
| SCIP_ROWEXACT * | row | ||
| ) |
increases usage counter of exact LP row
- 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 one of the following stages of the SCIP solving process:
- Parameters
-
scip SCIP data structure row row to capture
Definition at line 88 of file scip_lpexact.c.
References FALSE, SCIP_CALL, SCIP_OKAY, SCIPcheckStage, SCIProwExactCapture(), and TRUE.
Referenced by createRows().
◆ SCIPreleaseRowExact()
| SCIP_RETCODE SCIPreleaseRowExact | ( | SCIP * | scip, |
| SCIP_ROWEXACT ** | row | ||
| ) |
decreases usage counter of LP row, and frees memory if necessary
- 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 one of the following stages of the SCIP solving process:
- Parameters
-
scip SCIP data structure row pointer to LP row
Definition at line 110 of file scip_lpexact.c.
References FALSE, SCIP_CALL, SCIP_OKAY, SCIPcheckStage, SCIProwExactRelease(), and TRUE.
Referenced by SCIP_DECL_CONSEXITSOL(), and SCIPgetDualProof().
◆ SCIPchgRowExactLhs()
| SCIP_RETCODE SCIPchgRowExactLhs | ( | SCIP * | scip, |
| SCIP_ROWEXACT * | row, | ||
| SCIP_RATIONAL * | lhs | ||
| ) |
changes left hand side of exact LP row
- 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 one of the following stages of the SCIP solving process:
- Parameters
-
scip SCIP data structure row LP row lhs new left hand side
Definition at line 131 of file scip_lpexact.c.
References FALSE, SCIP_RowExact::lppos, SCIP_CALL, SCIP_OKAY, SCIPcheckStage, SCIPlpExactDiving(), SCIProwExactChgLhs(), and TRUE.
Referenced by chgLhs().
◆ SCIPchgRowExactRhs()
| SCIP_RETCODE SCIPchgRowExactRhs | ( | SCIP * | scip, |
| SCIP_ROWEXACT * | row, | ||
| SCIP_RATIONAL * | rhs | ||
| ) |
changes right hand side of exact LP row
- 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 one of the following stages of the SCIP solving process:
- Parameters
-
scip SCIP data structure row LP row rhs new right hand side
Definition at line 155 of file scip_lpexact.c.
References FALSE, SCIP_RowExact::lppos, SCIP_CALL, SCIP_OKAY, SCIPcheckStage, SCIPlpExactDiving(), SCIProwExactChgRhs(), and TRUE.
Referenced by chgRhs().
◆ SCIPaddVarsToRowExact()
| SCIP_RETCODE SCIPaddVarsToRowExact | ( | SCIP * | scip, |
| SCIP_ROWEXACT * | row, | ||
| int | nvars, | ||
| SCIP_VAR ** | vars, | ||
| SCIP_RATIONAL ** | vals | ||
| ) |
resolves variables to columns and adds them with the coefficients to the row; this method caches the row extensions and flushes them afterwards to gain better performance
- 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.
- Attention
- If a coefficients absolute value is below the SCIP epsilon tolerance, the variable with its value is not added.
- Precondition
- this method can be called in one of the following stages of the SCIP solving process:
- Parameters
-
scip SCIP data structure row LP row nvars number of variables to add to the row vars problem variables to add vals values of coefficients
Definition at line 182 of file scip_lpexact.c.
References FALSE, SCIP_RowExact::fprow, NULL, SCIP_Row::rowexact, SCIP_CALL, SCIP_OKAY, SCIPcheckStage, SCIPdebug, SCIPgetMessagehdlr(), SCIProwExactDelaySort(), SCIProwExactEnsureSize(), SCIProwExactForceSort(), SCIProwExactPrint(), SCIProwGetNNonz(), SCIProwPrint(), SCIPvarAddToRowExact(), and TRUE.
Referenced by addCoef(), and createRows().
◆ SCIPgetRowSolActivityWithErrorboundExact()
| SCIP_Bool SCIPgetRowSolActivityWithErrorboundExact | ( | SCIP * | scip, |
| SCIP_ROWEXACT * | row, | ||
| SCIP_SOL * | sol, | ||
| SCIP_Real * | activity, | ||
| SCIP_Real * | errorbound | ||
| ) |
returns the activity of a row for the given primal solution with running error analysis
- Returns
- the activitiy of a row for the given primal solution and the error bound of the activity; returns true on success
- Precondition
- this method can be called in one of the following stages of the SCIP solving process:
- Parameters
-
scip SCIP data structure row LP row sol primal CIP solution activity the approximate activity errorbound the error bound
Definition at line 396 of file scip_lpexact.c.
References FALSE, SCIP_CALL_ABORT, SCIPcheckStage, SCIProwExactGetSolActivityWithErrorbound(), and TRUE.
Referenced by consdataComputeSolActivityWithErrorbound().
◆ SCIPgetRowSolActivityExact()
| SCIP_RETCODE SCIPgetRowSolActivityExact | ( | SCIP * | scip, |
| SCIP_ROWEXACT * | row, | ||
| SCIP_SOL * | sol, | ||
| SCIP_Bool | useexact, | ||
| SCIP_RATIONAL * | result | ||
| ) |
returns the activity of a row for the given primal solution
- Returns
- the activitiy of a row for the given primal solution
- Precondition
- this method can be called in one of the following stages of the SCIP solving process:
- Parameters
-
scip SCIP data structure row LP row sol primal CIP solution useexact true if sol should be considered instead of sol result result pointer
Definition at line 367 of file scip_lpexact.c.
References FALSE, NULL, SCIP_CALL, SCIP_CALL_ABORT, SCIP_OKAY, SCIPcheckStage, SCIPrationalSetRational(), SCIProwExactGetLPActivity(), SCIProwExactGetPseudoActivity(), SCIProwExactGetSolActivity(), SCIPtreeHasCurrentNodeLP(), and TRUE.
Referenced by checkCons(), and SCIPgetActivityExactLinear().
◆ SCIPgetRowSolFeasibilityExact()
| SCIP_RETCODE SCIPgetRowSolFeasibilityExact | ( | SCIP * | scip, |
| SCIP_ROWEXACT * | row, | ||
| SCIP_SOL * | sol, | ||
| SCIP_RATIONAL * | result | ||
| ) |
returns the feasibility of a row for the given primal solution
- Returns
- the feasibility of a row for the given primal solution
- Precondition
- this method can be called in one of the following stages of the SCIP solving process:
- Parameters
-
scip SCIP data structure row LP row sol primal CIP solution result result pointer
Definition at line 335 of file scip_lpexact.c.
References FALSE, NULL, SCIP_CALL, SCIP_CALL_ABORT, SCIP_OKAY, SCIPcheckStage, SCIProwExactGetLPFeasibility(), SCIProwExactGetPseudoFeasibility(), SCIProwExactGetSolFeasibility(), SCIPtreeHasCurrentNodeLP(), and TRUE.
Referenced by SCIPgetFeasibilityExactLinear().
◆ SCIPprintRowExact()
| SCIP_RETCODE SCIPprintRowExact | ( | SCIP * | scip, |
| SCIP_ROWEXACT * | row, | ||
| FILE * | file | ||
| ) |
output exact row to file stream via the message handler system
- 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 one of the following stages of the SCIP solving process:
- Parameters
-
scip SCIP data structure row LP row file output file (or NULL for standard output)
Definition at line 419 of file scip_lpexact.c.
References FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIPcheckStage, SCIProwExactPrint(), and TRUE.
Referenced by addRelaxation(), and rowExactCreateFromRowLimitEncodingLength().
◆ SCIPlpExactIsSolved()
returns whether the exact lp was solved
- Parameters
-
scip SCIP data structure
Definition at line 456 of file scip_lpexact.c.
References NULL.
Referenced by checkCons(), enforceConstraint(), and SCIPlinkLPSolExact().
◆ SCIPgetLPExactSolstat()
| SCIP_LPSOLSTAT SCIPgetLPExactSolstat | ( | SCIP * | scip | ) |
gets solution status of current exact LP
- Returns
- the solution status of current exact LP.
- Precondition
- This method can be called if
scipis in one of the following stages:
See SCIP_STAGE for a complete list of all possible solving stages.
- Parameters
-
scip SCIP data structure
Definition at line 475 of file scip_lpexact.c.
References FALSE, SCIP_CALL_ABORT, SCIP_LPSOLSTAT_NOTSOLVED, SCIPcheckStage, SCIPlpExactGetSolstat(), SCIPtreeIsFocusNodeLPConstructed(), and TRUE.
Referenced by SCIP_DECL_CONSCHECK().
◆ SCIPgetLPExactObjval()
| void SCIPgetLPExactObjval | ( | SCIP * | scip, |
| SCIP_RATIONAL * | result | ||
| ) |
gets objective value of current exact LP (which is the sum of column and loose objective value)
- Precondition
- This method can be called if
scipis 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 exact LP solution status returned by SCIPgetLPExactSolstat() is SCIP_LPSOLSTAT_ITERLIMIT or SCIP_LPSOLSTAT_TIMELIMIT.
See SCIP_STAGE for a complete list of all possible solving stages.
gets objective value of current exact LP (which is the sum of column and loose objective value)
- Precondition
- This method can be called if
scipis in one of the following stages:
- Note
- This method returns the objective value of the current exact 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 exact LP solution status returned by SCIPgetLPExactSolstat() is SCIP_LPSOLSTAT_ITERLIMIT or SCIP_LPSOLSTAT_TIMELIMIT.
See SCIP_STAGE for a complete list of all possible solving stages.
- Parameters
-
scip SCIP data structure result result pointer
Definition at line 445 of file scip_lpexact.c.
References FALSE, SCIP_CALL_ABORT, SCIPcheckStage, SCIPlpExactGetObjval(), and TRUE.
Referenced by SCIPsolveExactDiveLP().
◆ SCIPchgVarLbExactDive()
| SCIP_RETCODE SCIPchgVarLbExactDive | ( | SCIP * | scip, |
| SCIP_VAR * | var, | ||
| SCIP_RATIONAL * | newbound | ||
| ) |
changes variable's lower bound in current exact dive
- 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
scipis in one of the following stages:
See SCIP_STAGE for a complete list of all possible solving stages.
- Parameters
-
scip SCIP data structure var variable to change the bound for newbound new value for bound
Definition at line 710 of file scip_lpexact.c.
References FALSE, NULL, SCIP_CALL, SCIP_INVALIDCALL, SCIP_OKAY, SCIPcheckStage, SCIPerrorMessage, SCIPlpExactDiving(), SCIPvarChgLbExactDive(), and TRUE.
Referenced by SCIP_DECL_CONSCHECK().
◆ SCIPchgVarUbExactDive()
| SCIP_RETCODE SCIPchgVarUbExactDive | ( | SCIP * | scip, |
| SCIP_VAR * | var, | ||
| SCIP_RATIONAL * | newbound | ||
| ) |
changes variable's upper bound in current exact dive
- 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
scipis in one of the following stages:
See SCIP_STAGE for a complete list of all possible solving stages.
- Parameters
-
scip SCIP data structure var variable to change the bound for newbound new value for bound
Definition at line 742 of file scip_lpexact.c.
References FALSE, NULL, SCIP_CALL, SCIP_INVALIDCALL, SCIP_OKAY, SCIPcheckStage, SCIPerrorMessage, SCIPlpExactDiving(), SCIPvarChgUbExactDive(), and TRUE.
Referenced by SCIP_DECL_CONSCHECK().
◆ SCIPsolveExactDiveLP()
| SCIP_RETCODE SCIPsolveExactDiveLP | ( | SCIP * | scip, |
| int | itlim, | ||
| SCIP_Bool * | lperror, | ||
| SCIP_Bool * | cutoff | ||
| ) |
solves the exact LP of the current dive; no separation or pricing is applied
- 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
scipis in one of the following stages:
See SCIP_STAGE for a complete list of all possible solving stages.
- Parameters
-
scip SCIP data structure itlim maximal number of LP iterations to perform, or -1 for no limit lperror pointer to store whether an unresolved LP error occurred cutoff pointer to store whether the diving LP was infeasible or the objective limit was reached (or NULL, if not needed)
Definition at line 653 of file scip_lpexact.c.
References FALSE, NULL, SCIP_CALL, SCIP_INVALIDCALL, SCIP_Longint, SCIP_LPSOLSTAT_INFEASIBLE, SCIP_LPSOLSTAT_OBJLIMIT, SCIP_LPSOLSTAT_OPTIMAL, SCIP_OKAY, SCIPcheckStage, SCIPerrorMessage, SCIPgetCutoffboundExact(), SCIPgetLPExactObjval(), SCIPlpExactDiving(), SCIPlpExactGetSolstat(), SCIPlpExactSolveAndEval(), SCIPrationalCreateBuffer(), SCIPrationalFreeBuffer(), SCIPrationalIsGE(), and TRUE.
Referenced by SCIP_DECL_CONSCHECK().
◆ SCIPstartExactDive()
| SCIP_RETCODE SCIPstartExactDive | ( | SCIP * | scip | ) |
initiates exact LP diving, making methods SCIPchgVarObjExactDive(), SCIPchgVarLbExactDive(), and SCIPchgVarUbExactDive() available
- 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
scipis in one of the following stages:
See SCIP_STAGE for a complete list of all possible solving stages.
- Note
- In parallel to exact LP diving, this method also starts the regular LP diving mode by calling SCIPstartDive().
- Parameters
-
scip SCIP data structure
Definition at line 502 of file scip_lpexact.c.
References FALSE, NULL, SCIP_CALL, SCIP_INVALIDCALL, SCIP_NODETYPE_FOCUSNODE, SCIP_OKAY, SCIPcheckStage, SCIPerrorMessage, SCIPgetCurrentNode(), SCIPlpDiving(), SCIPlpExactDiving(), SCIPlpExactStartDive(), SCIPnodeGetType(), SCIPstartDive(), SCIPtreeProbing(), and TRUE.
Referenced by SCIP_DECL_CONSCHECK().
◆ SCIPisExactDivePossible()
checks if exact diving mode is possible at this point in time
- 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
scipis in one of the following stages:
See SCIP_STAGE for a complete list of all possible solving stages.
- Note
- In parallel to exact LP diving, this method also starts the regular LP diving mode by calling SCIPstartDive().
- Parameters
-
scip SCIP data structure
Definition at line 551 of file scip_lpexact.c.
References FALSE, NULL, SCIP_CALL_ABORT, SCIP_NODETYPE_FOCUSNODE, SCIPcheckStage, SCIPgetCurrentNode(), SCIPlpDiving(), SCIPlpExactDiving(), SCIPlpIsSolved(), SCIPnodeGetType(), SCIPtreeProbing(), and TRUE.
Referenced by SCIP_DECL_CONSCHECK().
◆ SCIPinExactDive()
returns whether we are in exact diving mode
- Returns
- whether we are in exact diving mode.
- Precondition
- This method can be called if
scipis in one of the following stages:
See SCIP_STAGE for a complete list of all possible solving stages.
- Parameters
-
scip SCIP data structure
Definition at line 594 of file scip_lpexact.c.
References FALSE, NULL, SCIP_CALL_ABORT, SCIPcheckStage, SCIPlpExactDiving(), and TRUE.
Referenced by SCIP_DECL_CONSCHECK().
◆ SCIPendExactDive()
| SCIP_RETCODE SCIPendExactDive | ( | SCIP * | scip | ) |
quits exact LP diving and resets bounds and objective values of columns to the current node's 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
scipis in one of the following stages:
See SCIP_STAGE for a complete list of all possible solving stages.
- Parameters
-
scip SCIP data structure
Definition at line 615 of file scip_lpexact.c.
References FALSE, NULL, SCIP_CALL, SCIP_INVALIDCALL, SCIP_OKAY, SCIPcheckStage, SCIPendDive(), SCIPerrorMessage, SCIPlpExactDiving(), SCIPlpExactEndDive(), SCIPlpSetCutoffbound(), and TRUE.
Referenced by SCIP_DECL_CONSCHECK().
◆ SCIPwriteLPexact()
| SCIP_RETCODE SCIPwriteLPexact | ( | SCIP * | scip, |
| const char * | filename | ||
| ) |
writes current exact 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
scipis in one of the following stages:
See SCIP_STAGE for a complete list of all possible solving stages.
- Parameters
-
scip SCIP data structure filename file name
Definition at line 774 of file scip_lpexact.c.
References FALSE, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIPcheckStage, SCIPconstructCurrentLP(), SCIPlpExactFlush(), SCIPlpExactSyncLPs(), SCIPlpExactWrite(), SCIPtreeIsFocusNodeLPConstructed(), and TRUE.