Scippy

SCIP

Solving Constraint Integer Programs

Detailed Description

public solving methods

Author
Tobias Achterberg
Timo Berthold
Gerald Gamrath
Leona Gottwald
Stefan Heinz
Gregor Hendel
Thorsten Koch
Alexander Martin
Marc Pfetsch
Michael Winkler
Kati Wolter

Definition in file scip_solve.c.

#include "blockmemshell/memory.h"
#include "scip/branch.h"
#include "scip/clock.h"
#include "scip/compr.h"
#include "scip/concsolver.h"
#include "scip/concurrent.h"
#include "scip/conflict.h"
#include "scip/conflictstore.h"
#include "scip/cons.h"
#include "scip/cutpool.h"
#include "scip/dcmp.h"
#include "scip/debug.h"
#include "scip/event.h"
#include "scip/implics.h"
#include "scip/interrupt.h"
#include "scip/lp.h"
#include "scip/nlp.h"
#include "scip/presol.h"
#include "scip/pricestore.h"
#include "scip/primal.h"
#include "scip/prob.h"
#include "scip/prop.h"
#include "scip/pub_branch.h"
#include "scip/pub_compr.h"
#include "scip/pub_cons.h"
#include "scip/pub_heur.h"
#include "scip/pub_message.h"
#include "scip/pub_misc.h"
#include "scip/pub_misc_select.h"
#include "scip/pub_presol.h"
#include "scip/pub_prop.h"
#include "scip/pub_sol.h"
#include "scip/pub_var.h"
#include "scip/relax.h"
#include "scip/reopt.h"
#include "scip/scip_benders.h"
#include "scip/scip_branch.h"
#include "scip/scip_concurrent.h"
#include "scip/scip_cons.h"
#include "scip/scip_general.h"
#include "scip/scip_lp.h"
#include "scip/scip_mem.h"
#include "scip/scip_message.h"
#include "scip/scip_numerics.h"
#include "scip/scip_param.h"
#include "scip/scip_prob.h"
#include "scip/scip_randnumgen.h"
#include "scip/scip_sol.h"
#include "scip/scip_solve.h"
#include "scip/scip_solvingstats.h"
#include "scip/scip_timing.h"
#include "scip/scip_tree.h"
#include "scip/scip_var.h"
#include "scip/sepastore.h"
#include "scip/set.h"
#include "scip/sol.h"
#include "scip/solve.h"
#include "scip/stat.h"
#include "scip/struct_event.h"
#include "scip/struct_mem.h"
#include "scip/struct_primal.h"
#include "scip/struct_prob.h"
#include "scip/struct_scip.h"
#include "scip/struct_set.h"
#include "scip/struct_stat.h"
#include "scip/struct_tree.h"
#include "scip/syncstore.h"
#include "scip/tree.h"
#include "scip/var.h"
#include "scip/visual.h"

Go to the source code of this file.

Functions

static SCIP_RETCODE calcNonZeros (SCIP *scip, SCIP_Longint *nchecknonzeros, SCIP_Longint *nactivenonzeros, SCIP_Bool *approxchecknonzeros, SCIP_Bool *approxactivenonzeros)
 
SCIP_RETCODE SCIPtransformProb (SCIP *scip)
 
static SCIP_RETCODE initPresolve (SCIP *scip)
 
static SCIP_RETCODE exitPresolve (SCIP *scip, SCIP_Bool solved, SCIP_Bool *infeasible)
 
static SCIP_RETCODE presolveRound (SCIP *scip, SCIP_PRESOLTIMING *timing, SCIP_Bool *unbounded, SCIP_Bool *infeasible, SCIP_Bool lastround, int *presolstart, int presolend, int *propstart, int propend, int *consstart, int consend)
 
static SCIP_RETCODE presolve (SCIP *scip, SCIP_Bool *unbounded, SCIP_Bool *infeasible, SCIP_Bool *vanished)
 
static SCIP_RETCODE transformSols (SCIP *scip)
 
static SCIP_RETCODE initSolve (SCIP *scip, SCIP_Bool solved)
 
static SCIP_RETCODE freeSolve (SCIP *scip, SCIP_Bool restart)
 
static SCIP_RETCODE freeReoptSolve (SCIP *scip)
 
static SCIP_RETCODE freeTransform (SCIP *scip)
 
static SCIP_RETCODE freeTransforming (SCIP *scip)
 
static SCIP_RETCODE displayRelevantStats (SCIP *scip)
 
static SCIP_RETCODE compressReoptTree (SCIP *scip)
 
static SCIP_RETCODE prepareReoptimization (SCIP *scip)
 
SCIP_RETCODE SCIPpresolve (SCIP *scip)
 
SCIP_RETCODE SCIPsolve (SCIP *scip)
 
SCIP_RETCODE SCIPsolveParallel (SCIP *scip)
 
SCIP_RETCODE SCIPsolveConcurrent (SCIP *scip)
 
SCIP_RETCODE SCIPenableReoptimization (SCIP *scip, SCIP_Bool enable)
 
SCIP_RETCODE SCIPaddReoptDualBndchg (SCIP *scip, SCIP_NODE *node, SCIP_VAR *var, SCIP_Real newbound, SCIP_Real oldbound)
 
SCIP_SOLSCIPgetReoptLastOptSol (SCIP *scip)
 
SCIP_RETCODE SCIPgetReoptOldObjCoef (SCIP *scip, SCIP_VAR *var, int run, SCIP_Real *objcoef)
 
SCIP_RETCODE SCIPfreeSolve (SCIP *scip, SCIP_Bool restart)
 
SCIP_RETCODE SCIPfreeReoptSolve (SCIP *scip)
 
SCIP_RETCODE SCIPfreeTransform (SCIP *scip)
 
SCIP_RETCODE SCIPinterruptSolve (SCIP *scip)
 
SCIP_Bool SCIPisSolveInterrupted (SCIP *scip)
 
SCIP_RETCODE SCIPrestartSolve (SCIP *scip)
 
SCIP_Bool SCIPisReoptEnabled (SCIP *scip)
 
SCIP_RETCODE SCIPgetReoptSolsRun (SCIP *scip, int run, SCIP_SOL **sols, int solssize, int *nsols)
 
void SCIPresetReoptSolMarks (SCIP *scip)
 
SCIP_RETCODE SCIPcheckReoptRestart (SCIP *scip, SCIP_NODE *node, SCIP_Bool *restart)
 
SCIP_Bool SCIPisInRestart (SCIP *scip)
 

Function Documentation

◆ calcNonZeros()

static SCIP_RETCODE calcNonZeros ( SCIP scip,
SCIP_Longint nchecknonzeros,
SCIP_Longint nactivenonzeros,
SCIP_Bool approxchecknonzeros,
SCIP_Bool approxactivenonzeros 
)
static

calculates number of nonzeros in problem

Parameters
scipSCIP data structure
nchecknonzerospointer to store number of non-zeros in all check constraints
nactivenonzerospointer to store number of non-zeros in all active constraints
approxchecknonzerospointer to store if the number of non-zeros in all check constraints is only a lowerbound
approxactivenonzerospointer to store if the number of non-zeros in all active constraints is only a lowerbound

Definition at line 118 of file scip_solve.c.

References FALSE, h, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIPconsGetNVars(), SCIPconshdlrGetCheckConss(), SCIPconshdlrGetConss(), SCIPconshdlrGetNActiveConss(), SCIPconshdlrGetNCheckConss(), SCIPconsIsActive(), SCIPconsIsChecked(), and TRUE.

Referenced by presolve(), and SCIPtransformProb().

◆ initPresolve()

◆ exitPresolve()

◆ presolveRound()

static SCIP_RETCODE presolveRound ( SCIP scip,
SCIP_PRESOLTIMING timing,
SCIP_Bool unbounded,
SCIP_Bool infeasible,
SCIP_Bool  lastround,
int *  presolstart,
int  presolend,
int *  propstart,
int  propend,
int *  consstart,
int  consend 
)
static

applies one round of presolving with the given presolving timing

This method will always be called with presoltiming fast first. It iterates over all presolvers, propagators, and constraint handlers and calls their presolving callbacks with timing fast. If enough reductions are found, it returns and the next presolving round will be started (again with timing fast). If the fast presolving does not find enough reductions, this methods calls itself recursively with presoltiming medium. Again, it calls the presolving callbacks of all presolvers, propagators, and constraint handlers with timing medium. If enough reductions are found, it returns and the next presolving round will be started (with timing fast). Otherwise, it is called recursively with presoltiming exhaustive. In exhaustive presolving, presolvers, propagators, and constraint handlers are called w.r.t. their priority, but this time, we stop as soon as enough reductions were found and do not necessarily call all presolving methods. If we stop, we return and another presolving round is started with timing fast.

Parameters
scipSCIP data structure
timingpointer to current presolving timing
unboundedpointer to store whether presolving detected unboundedness
infeasiblepointer to store whether presolving detected infeasibility
lastroundis this the last presolving round due to a presolving round limit?
presolstartpointer to get the presolver to start exhaustive presolving with in the current round and store the one to start with in the next round
presolendlast presolver to treat in exhaustive presolving
propstartpointer to get the propagator to start exhaustive presolving with in the current round and store the one to start with in the next round
propendlast propagator to treat in exhaustive presolving
consstartpointer to get the constraint handler to start exhaustive presolving with in the current round and store the one to start with in the next round
consendlast constraint handler to treat in exhaustive presolving

Definition at line 652 of file scip_solve.c.

References BMSgetNUsedBufferMemory(), FALSE, NULL, presolveRound(), SCIP_Bool, SCIP_CALL, SCIP_CUTOFF, SCIP_EVENTTYPE_PRESOLVEROUND, SCIP_HEURTIMING_DURINGPRESOLLOOP, SCIP_INVALID, SCIP_OKAY, SCIP_PRESOLTIMING_EXHAUSTIVE, SCIP_PRESOLTIMING_FAST, SCIP_PRESOLTIMING_FINAL, SCIP_PRESOLTIMING_MEDIUM, SCIP_UNBOUNDED, SCIP_VERBLEVEL_FULL, SCIP_VERBLEVEL_HIGH, SCIPbuffer(), SCIPcleanbuffer(), SCIPcliquetableCleanup(), SCIPconshdlrGetName(), SCIPconshdlrPresolve(), SCIPdebugMsg, SCIPeventChgType(), SCIPeventProcess(), SCIPgetBestSol(), SCIPgetNSols(), SCIPgetSolOrigObj(), SCIPgetSolvingTime(), SCIPheurGetName(), SCIPisPresolveFinished(), SCIPmessagePrintVerbInfo(), SCIPpresolExec(), SCIPpresolGetName(), SCIPpresolGetPriority(), SCIPprimalHeuristics(), SCIPprobPerformVarDeletions(), SCIPpropGetName(), SCIPpropGetPresolPriority(), SCIPpropPresol(), SCIPsolGetHeur(), and TRUE.

Referenced by presolve(), and presolveRound().

◆ presolve()

static SCIP_RETCODE presolve ( SCIP scip,
SCIP_Bool unbounded,
SCIP_Bool infeasible,
SCIP_Bool vanished 
)
static

loops through the included presolvers and constraint's presolve methods, until changes are too few

Parameters
scipSCIP data structure
unboundedpointer to store whether presolving detected unboundedness
infeasiblepointer to store whether presolving detected infeasibility
vanishedpointer to store whether the problem vanished in presolving

Definition at line 1110 of file scip_solve.c.

References BMSgetNUsedBufferMemory(), calcNonZeros(), exitPresolve(), FALSE, initPresolve(), MAX, NULL, presolveRound(), SCIP_Bool, SCIP_CALL, SCIP_HEURTIMING_BEFOREPRESOL, SCIP_INVALID, SCIP_Longint, SCIP_LONGINT_FORMAT, SCIP_OKAY, SCIP_PRESOLTIMING_EXHAUSTIVE, SCIP_PRESOLTIMING_FAST, SCIP_PRESOLTIMING_FINAL, SCIP_PRESOLTIMING_MEDIUM, SCIP_Real, SCIP_STAGE_PRESOLVED, SCIP_STAGE_PRESOLVING, SCIP_STAGE_TRANSFORMED, SCIP_STATUS_INFEASIBLE, SCIP_STATUS_INFORUNBD, SCIP_STATUS_OPTIMAL, SCIP_STATUS_UNBOUNDED, SCIP_STATUS_UNKNOWN, SCIP_VARSTATUS_MULTAGGR, SCIP_VERBLEVEL_FULL, SCIP_VERBLEVEL_HIGH, SCIP_VERBLEVEL_NORMAL, SCIPbuffer(), SCIPcleanbuffer(), SCIPcliquetableGetNCliques(), SCIPclockStart(), SCIPclockStop(), SCIPcreateSol(), SCIPdebugMsg, SCIPflattenVarAggregationGraph(), SCIPgetBestSol(), SCIPgetNConss(), SCIPgetNSols(), SCIPgetNVars(), SCIPgetSolOrigObj(), SCIPgetSolvingTime(), SCIPheurGetName(), SCIPisInfinity(), SCIPisPresolveFinished(), SCIPmessagePrintVerbInfo(), SCIPprimalHeuristics(), SCIPprimalUpdateObjlimit(), SCIPprobMarkNConss(), SCIPprobResortVars(), SCIPsetSortPresols(), SCIPsetSortPropsPresol(), SCIPsolGetHeur(), SCIPsolveIsStopped(), SCIPtrySolFree(), SCIPvarGetStatus(), and TRUE.

Referenced by SCIPlpiGetIntpar(), SCIPlpiSolveBarrier(), SCIPlpiSolveDual(), SCIPlpiSolvePrimal(), SCIPpresolve(), and SolveWSimplex().

◆ transformSols()

static SCIP_RETCODE transformSols ( SCIP scip)
static

tries to transform original solutions to the transformed problem space

Parameters
scipSCIP data structure

Definition at line 1397 of file scip_solve.c.

References NULL, SCIP_Bool, SCIP_CALL, SCIP_Longint, SCIP_OKAY, SCIP_Real, SCIP_VERBLEVEL_HIGH, SCIPallocBufferArray, SCIPdebugMsg, SCIPduplicateBufferArray, SCIPfreeBufferArray, SCIPgetNSols(), SCIPgetSols(), SCIPprimalTransformSol(), SCIPsolIsOriginal(), and SCIPverbMessage().

Referenced by initSolve().

◆ initSolve()

◆ freeSolve()

◆ freeReoptSolve()

static SCIP_RETCODE freeReoptSolve ( SCIP scip)
static

◆ freeTransform()

◆ freeTransforming()

static SCIP_RETCODE freeTransforming ( SCIP scip)
static

◆ displayRelevantStats()

◆ compressReoptTree()

static SCIP_RETCODE compressReoptTree ( SCIP scip)
static

calls compression based on the reoptimization structure after the presolving

Parameters
scipglobal SCIP settings

Definition at line 2165 of file scip_solve.c.

References SCIP_CALL, SCIP_DIDNOTFIND, SCIP_DIDNOTRUN, SCIP_OKAY, SCIP_Real, SCIP_SUCCESS, SCIP_VERBLEVEL_HIGH, SCIPcomprExec(), SCIPcomprGetName(), SCIPmessagePrintVerbInfo(), SCIPreoptGetNNodes(), and SCIPsetSortComprs().

Referenced by prepareReoptimization().

◆ prepareReoptimization()