functions to manage exact LP relaxation
| 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
| 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 assert(), FALSE, NULL, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_ROWORIGINTYPE_CONS, SCIPcheckStage, SCIProwExactCreate(), SCIProwGetOriginCons(), SCIProwGetOrigintype(), and TRUE.
Referenced by createRows().
| 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
| 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_Bool, SCIP_CALL, SCIP_OKAY, SCIPcheckStage, SCIProwExactCreate(), and TRUE.
Referenced by getObjectiveRow().
| SCIP_RETCODE SCIPcreateRowExactFromRow | ( | SCIP * | scip, |
| SCIP_ROW * | fprow ) |
creates and captures an exact LP row from an existing fp row
Definition at line 285 of file scip_lpexact.c.
References assert(), FALSE, NULL, SCIP_Row::rowexact, SCIP_CALL, SCIP_OKAY, SCIPcheckStage, SCIProwExactCreateFromRow(), and TRUE.
Referenced by addCut().
| 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
| 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 assert(), FALSE, NULL, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIPcheckStage, SCIProwExactGenerateFpRows(), and TRUE.
Referenced by createRows().
| SCIP_RETCODE SCIPcaptureRowExact | ( | SCIP * | scip, |
| SCIP_ROWEXACT * | row ) |
increases usage counter of exact LP row
Definition at line 88 of file scip_lpexact.c.
References FALSE, SCIP_CALL, SCIP_OKAY, SCIPcheckStage, SCIProwExactCapture(), and TRUE.
Referenced by createRows().
| SCIP_RETCODE SCIPreleaseRowExact | ( | SCIP * | scip, |
| SCIP_ROWEXACT ** | row ) |
decreases usage counter of LP row, and frees memory if necessary
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().
| SCIP_RETCODE SCIPchgRowExactLhs | ( | SCIP * | scip, |
| SCIP_ROWEXACT * | row, | ||
| SCIP_RATIONAL * | lhs ) |
changes left hand side of exact LP row
Definition at line 131 of file scip_lpexact.c.
References assert(), FALSE, SCIP_RowExact::lppos, SCIP_CALL, SCIP_OKAY, SCIPcheckStage, SCIPlpExactDiving(), SCIProwExactChgLhs(), and TRUE.
Referenced by chgLhs().
| SCIP_RETCODE SCIPchgRowExactRhs | ( | SCIP * | scip, |
| SCIP_ROWEXACT * | row, | ||
| SCIP_RATIONAL * | rhs ) |
changes right hand side of exact LP row
Definition at line 155 of file scip_lpexact.c.
References assert(), FALSE, SCIP_RowExact::lppos, SCIP_CALL, SCIP_OKAY, SCIPcheckStage, SCIPlpExactDiving(), SCIProwExactChgRhs(), and TRUE.
Referenced by chgRhs().
| 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
| 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 assert(), FALSE, SCIP_RowExact::fprow, NULL, nvars, SCIP_Row::rowexact, SCIP_CALL, SCIP_OKAY, SCIPcheckStage, SCIPdebug, SCIPgetMessagehdlr(), SCIProwExactDelaySort(), SCIProwExactEnsureSize(), SCIProwExactForceSort(), SCIProwExactPrint(), SCIProwGetNNonz(), SCIProwPrint(), SCIPvarAddToRowExact(), TRUE, and vars.
Referenced by addCoef(), and createRows().
| 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
| 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_Bool, SCIP_CALL_ABORT, SCIP_Real, SCIPcheckStage, SCIProwExactGetSolActivityWithErrorbound(), sol, and TRUE.
Referenced by consdataComputeSolActivityWithErrorbound().
| 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
| 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, result, SCIP_Bool, SCIP_CALL, SCIP_CALL_ABORT, SCIP_OKAY, SCIPcheckStage, SCIPrationalSetRational(), SCIProwExactGetLPActivity(), SCIProwExactGetPseudoActivity(), SCIProwExactGetSolActivity(), SCIPtreeHasCurrentNodeLP(), sol, and TRUE.
Referenced by checkCons(), and SCIPgetActivityExactLinear().
| 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
Definition at line 335 of file scip_lpexact.c.
References FALSE, NULL, result, SCIP_CALL, SCIP_CALL_ABORT, SCIP_OKAY, SCIPcheckStage, SCIProwExactGetLPFeasibility(), SCIProwExactGetPseudoFeasibility(), SCIProwExactGetSolFeasibility(), SCIPtreeHasCurrentNodeLP(), sol, and TRUE.
Referenced by SCIPgetFeasibilityExactLinear().
| SCIP_RETCODE SCIPprintRowExact | ( | SCIP * | scip, |
| SCIP_ROWEXACT * | row, | ||
| FILE * | file ) |
output exact row to file stream via the message handler system
Definition at line 419 of file scip_lpexact.c.
References assert(), FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIPcheckStage, SCIProwExactPrint(), and TRUE.
Referenced by addRelaxation(), and rowExactCreateFromRowLimitEncodingLength().
returns whether the exact lp was solved
Definition at line 456 of file scip_lpexact.c.
References assert(), NULL, and SCIP_Bool.
Referenced by checkCons(), enforceConstraint(), and SCIPlinkLPSolExact().
| SCIP_LPSOLSTAT SCIPgetLPExactSolstat | ( | SCIP * | scip | ) |
gets solution status of current exact LP
scip is in one of the following stages:
See SCIP_STAGE for a complete list of all possible solving stages.
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().
| void SCIPgetLPExactObjval | ( | SCIP * | scip, |
| SCIP_RATIONAL * | result ) |
gets objective value of current exact LP (which is the sum of column and loose objective value)
scip is in one of the following stages:
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)
scip is in one of the following stages:
See SCIP_STAGE for a complete list of all possible solving stages.
Definition at line 445 of file scip_lpexact.c.
References FALSE, result, SCIP_CALL_ABORT, SCIPcheckStage, SCIPlpExactGetObjval(), and TRUE.
Referenced by SCIPsolveExactDiveLP().
| SCIP_RETCODE SCIPchgVarLbExactDive | ( | SCIP * | scip, |
| SCIP_VAR * | var, | ||
| SCIP_RATIONAL * | newbound ) |
changes variable's lower bound in current exact dive
scip is in one of the following stages:
See SCIP_STAGE for a complete list of all possible solving stages.
Definition at line 710 of file scip_lpexact.c.
References assert(), FALSE, NULL, SCIP_CALL, SCIP_INVALIDCALL, SCIP_OKAY, SCIPcheckStage, SCIPerrorMessage, SCIPlpExactDiving(), SCIPvarChgLbExactDive(), TRUE, and var.
Referenced by SCIP_DECL_CONSCHECK().
| SCIP_RETCODE SCIPchgVarUbExactDive | ( | SCIP * | scip, |
| SCIP_VAR * | var, | ||
| SCIP_RATIONAL * | newbound ) |
changes variable's upper bound in current exact dive
scip is in one of the following stages:
See SCIP_STAGE for a complete list of all possible solving stages.
Definition at line 742 of file scip_lpexact.c.
References assert(), FALSE, NULL, SCIP_CALL, SCIP_INVALIDCALL, SCIP_OKAY, SCIPcheckStage, SCIPerrorMessage, SCIPlpExactDiving(), SCIPvarChgUbExactDive(), TRUE, and var.
Referenced by SCIP_DECL_CONSCHECK().
| 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
scip is in one of the following stages:
See SCIP_STAGE for a complete list of all possible solving stages.
| 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 assert(), cutoff, FALSE, lperror, NULL, objval, SCIP_Bool, 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().
| SCIP_RETCODE SCIPstartExactDive | ( | SCIP * | scip | ) |
initiates exact LP diving, making methods SCIPchgVarObjExactDive(), SCIPchgVarLbExactDive(), and SCIPchgVarUbExactDive() available
scip is in one of the following stages:
See SCIP_STAGE for a complete list of all possible solving stages.
Definition at line 502 of file scip_lpexact.c.
References assert(), 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().
checks if exact diving mode is possible at this point in time
scip is in one of the following stages:
See SCIP_STAGE for a complete list of all possible solving stages.
Definition at line 551 of file scip_lpexact.c.
References assert(), FALSE, NULL, SCIP_Bool, SCIP_CALL_ABORT, SCIP_NODETYPE_FOCUSNODE, SCIPcheckStage, SCIPgetCurrentNode(), SCIPlpDiving(), SCIPlpExactDiving(), SCIPlpIsSolved(), SCIPnodeGetType(), SCIPtreeProbing(), and TRUE.
Referenced by SCIP_DECL_CONSCHECK().
returns whether we are in exact diving mode
scip is in one of the following stages:
See SCIP_STAGE for a complete list of all possible solving stages.
Definition at line 594 of file scip_lpexact.c.
References assert(), FALSE, NULL, SCIP_Bool, SCIP_CALL_ABORT, SCIPcheckStage, SCIPlpExactDiving(), and TRUE.
Referenced by SCIP_DECL_CONSCHECK().
| SCIP_RETCODE SCIPendExactDive | ( | SCIP * | scip | ) |
quits exact LP diving and resets bounds and objective values of columns to the current node's values
scip is in one of the following stages:
See SCIP_STAGE for a complete list of all possible solving stages.
Definition at line 615 of file scip_lpexact.c.
References assert(), FALSE, NULL, SCIP_CALL, SCIP_INVALIDCALL, SCIP_OKAY, SCIPcheckStage, SCIPendDive(), SCIPerrorMessage, SCIPlpExactDiving(), SCIPlpExactEndDive(), SCIPlpSetCutoffbound(), and TRUE.
Referenced by SCIP_DECL_CONSCHECK().
| SCIP_RETCODE SCIPwriteLPexact | ( | SCIP * | scip, |
| const char * | filename ) |
writes current exact LP to a file
scip is in one of the following stages:
See SCIP_STAGE for a complete list of all possible solving stages.
Definition at line 774 of file scip_lpexact.c.
References cutoff, FALSE, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIPcheckStage, SCIPconstructCurrentLP(), SCIPlpExactFlush(), SCIPlpExactSyncLPs(), SCIPlpExactWrite(), SCIPtreeIsFocusNodeLPConstructed(), and TRUE.