Scippy

SCIP

Solving Constraint Integer Programs

Detailed Description

helper functions for concurrent scip solvers

Author
Leona Gottwald

Definition in file concurrent.h.

#include "scip/type_concurrent.h"
#include "scip/type_scip.h"
#include "scip/type_concsolver.h"
#include "scip/type_sol.h"
#include "scip/type_var.h"
#include "scip/type_syncstore.h"
#include "scip/def.h"

Go to the source code of this file.

Functions

SCIP_RETCODE SCIPcreateConcurrent (SCIP *scip, SCIP_CONCSOLVER *concsolver, int *varperm)
 
int SCIPgetNConcurrentSolvers (SCIP *scip)
 
SCIP_CONCSOLVER ** SCIPgetConcurrentSolvers (SCIP *scip)
 
SCIP_RETCODE SCIPaddConcurrentSolver (SCIP *scip, SCIP_CONCSOLVER *concsolver)
 
SCIP_RETCODE SCIPfreeConcurrent (SCIP *scip)
 
SCIP_RETCODE SCIPincrementConcurrentTime (SCIP *scip, SCIP_Real val)
 
SCIP_RETCODE SCIPsynchronize (SCIP *scip)
 
SCIP_RETCODE SCIPaddConcurrentSol (SCIP *scip, SCIP_SOL *sol)
 
SCIP_RETCODE SCIPaddConcurrentBndchg (SCIP *scip, SCIP_VAR *var, SCIP_Real val, SCIP_BOUNDTYPE bndtype)
 
SCIP_RETCODE SCIPcopySolStats (SCIP_SOL *source, SCIP_SOL *target)
 
SCIP_RETCODE SCIPcopyConcurrentSolvingStats (SCIP *source, SCIP *target)
 
int SCIPgetConcurrentVaridx (SCIP *scip, SCIP_VAR *var)
 
SCIP_Bool SCIPIsConcurrentSolNew (SCIP *scip, SCIP_SOL *sol)
 
SCIP_BOUNDSTORESCIPgetConcurrentGlobalBoundChanges (SCIP *scip)
 
SCIP_RETCODE SCIPconcurrentSolve (SCIP *scip)
 
void SCIPdisableConcurrentBoundStorage (SCIP *scip)
 
void SCIPenableConcurrentBoundStorage (SCIP *scip)
 
SCIP_Longint SCIPgetConcurrentMemTotal (SCIP *scip)
 
SCIP_Real SCIPgetConcurrentDualbound (SCIP *scip)
 
SCIP_Real SCIPgetConcurrentPrimalbound (SCIP *scip)
 
SCIP_Real SCIPgetConcurrentGap (SCIP *scip)
 
SCIP_Longint SCIPgetConcurrentNTightenedBnds (SCIP *scip)
 
SCIP_Longint SCIPgetConcurrentNTightenedIntBnds (SCIP *scip)
 

Function Documentation

◆ SCIPcreateConcurrent()

◆ SCIPgetNConcurrentSolvers()

int SCIPgetNConcurrentSolvers ( SCIP scip)

get number of initialized concurrent solvers

Parameters
scipSCIP datastructure

Definition at line 116 of file concurrent.c.

References SCIP_Set::nconcsolvers, NULL, and Scip::set.

Referenced by SCIPconcsolverCreateInstance(), SCIPprintConcsolverStatistics(), SCIPsolveConcurrent(), SCIPsolveIsStopped(), and SCIPsyncstoreInit().

◆ SCIPgetConcurrentSolvers()

SCIP_CONCSOLVER** SCIPgetConcurrentSolvers ( SCIP scip)

gets the concurrent solvers

gets the initialized concurrent solvers

Parameters
scipSCIP datastructure

Definition at line 127 of file concurrent.c.

References SCIP_Set::concsolvers, NULL, and Scip::set.

Referenced by SCIPprintConcsolverStatistics().

◆ SCIPaddConcurrentSolver()

SCIP_RETCODE SCIPaddConcurrentSolver ( SCIP scip,
SCIP_CONCSOLVER concsolver 
)

adds a concurrent solver

adds an initialized concurrent solver

Parameters
scipSCIP datastructure
concsolverconcurrent solver of given SCIP instance

Definition at line 138 of file concurrent.c.

References NULL, SCIP_CALL, SCIP_OKAY, SCIPsetIncludeConcsolver(), and Scip::set.

Referenced by SCIPconcsolverCreateInstance().

◆ SCIPfreeConcurrent()

◆ SCIPincrementConcurrentTime()

SCIP_RETCODE SCIPincrementConcurrentTime ( SCIP scip,
SCIP_Real  val 
)

◆ SCIPsynchronize()

SCIP_RETCODE SCIPsynchronize ( SCIP scip)

◆ SCIPaddConcurrentSol()

SCIP_RETCODE SCIPaddConcurrentSol ( SCIP scip,
SCIP_SOL sol 
)

pass a solution to the given SCIP instance using that was received via synchronization by using the sync heuristic

Parameters
scipSCIP datastructure
solsolution

Definition at line 371 of file concurrent.c.

References Scip::concurrent, SCIP_Concurrent::heursync, NULL, SCIP_CALL, SCIP_OKAY, and SCIPheurSyncPassSol().

Referenced by SCIP_DECL_CONCSOLVERSYNCREAD().

◆ SCIPaddConcurrentBndchg()

SCIP_RETCODE SCIPaddConcurrentBndchg ( SCIP scip,
SCIP_VAR var,
SCIP_Real  val,
SCIP_BOUNDTYPE  bndtype 
)

adds a global boundchange to the given SCIP, by passing it to the sync propagator

Parameters
scipSCIP data structure
varvariable for bound
valvalue of bound
bndtypetype of bound

Definition at line 386 of file concurrent.c.

References Scip::concurrent, SCIP_Concurrent::mainscip, NULL, SCIP_Concurrent::propsync, SCIP_CALL, SCIP_OKAY, and SCIPpropSyncAddBndchg().

Referenced by SCIP_DECL_CONCSOLVERSYNCREAD().

◆ SCIPcopySolStats()

SCIP_RETCODE SCIPcopySolStats ( SCIP_SOL source,
SCIP_SOL target 
)

copy the nodenumber, depth, time, and runnumber of one solution to another one

Parameters
sourcesource for solution statistics
targettarget for solution statistics

Definition at line 404 of file concurrent.c.

References SCIP_Sol::depth, SCIP_Sol::nodenum, NULL, SCIP_Sol::runnum, SCIP_OKAY, and SCIP_Sol::time.

Referenced by SCIP_DECL_CONCSOLVERCOPYSOLVINGDATA().

◆ SCIPcopyConcurrentSolvingStats()

SCIP_RETCODE SCIPcopyConcurrentSolvingStats ( SCIP source,
SCIP target 
)

copy solving statistics

Parameters
sourceSCIP data structure
targettarget SCIP data structure

Definition at line 539 of file concurrent.c.

References SCIP_Stat::barrierlptime, SCIP_Stat::barrierzeroittime, SCIP_Stat::bestsolnode, SCIP_Stat::conflictlptime, SCIP_Stat::divinglptime, SCIP_Stat::domchgcount, SCIP_Stat::duallptime, SCIP_Stat::dualrefintegral, SCIP_Stat::dualzeroittime, SCIP_Stat::firstlpdualbound, SCIP_Stat::firstlptime, SCIP_Stat::firstprimalbound, SCIP_Stat::firstprimaldepth, SCIP_Stat::firstprimalheur, SCIP_Stat::firstprimaltime, SCIP_Stat::firstsolgap, SCIP_Heur::heurclock, SCIP_Stat::lastbranchdir, SCIP_Stat::lastbranchvalue, SCIP_Stat::lastconflictnode, SCIP_Stat::lastdispnode, SCIP_Stat::lastdivenode, SCIP_Stat::lastdualbound, SCIP_Stat::lastlowerbound, SCIP_Stat::lastprimalbound, SCIP_Stat::lastsblpsolstats, SCIP_Sepa::lastsepanode, SCIP_Stat::lastsolgap, SCIP_Stat::lastupperbound, SCIP_Stat::lexduallptime, SCIP_Stat::lpcount, SCIP_Stat::lpsoltime, MAX, SCIP_Sepa::maxbounddist, SCIP_Stat::maxcopytime, SCIP_Stat::maxdepth, SCIP_Stat::maxtotaldepth, SCIP_Stat::mincopytime, SCIP_Stat::nactivatednodes, SCIP_Presol::naddconss, SCIP_Presol::naddholes, SCIP_Presol::naggrvars, SCIP_Stat::nbacktracks, SCIP_Stat::nbarrierlpiterations, SCIP_Stat::nbarrierlps, SCIP_Stat::nbarrierzeroitlps, SCIP_Primal::nbestsolsfound, SCIP_Heur::nbestsolsfound, SCIP_Stat::nboundchgs, SCIP_Prop::ncalls, SCIP_Sepa::ncalls, SCIP_Presol::ncalls, SCIP_Heur::ncalls, SCIP_Presol::nchgbds, SCIP_Presol::nchgcoefs, SCIP_Presol::nchgsides, SCIP_Presol::nchgvartypes, SCIP_Stat::nconflictlpiterations, SCIP_Stat::nconflictlps, SCIP_Stat::nconfrestarts, SCIP_Sepa::nconssfound, SCIP_Stat::ncopies, SCIP_Stat::ncreatednodes, SCIP_Stat::ncreatednodesrun, SCIP_Prop::ncutoffs, SCIP_Sepa::ncutoffs, SCIP_Sepa::ncutsaddeddirect, SCIP_Sepa::ncutsaddedviapool, SCIP_Sepa::ncutsapplieddirect, SCIP_Sepa::ncutsappliedviapool, SCIP_Sepa::ncutsfound, SCIP_Stat::ndeactivatednodes, SCIP_Stat::ndelayedcutoffs, SCIP_Presol::ndelconss, SCIP_Stat::ndivesetcalls, SCIP_Stat::ndivesetlpiterations, SCIP_Stat::ndivesetlps, SCIP_Stat::ndivinglpiterations, SCIP_Stat::ndivinglps, SCIP_Prop::ndomredsfound, SCIP_Sepa::ndomredsfound, SCIP_Stat::nduallpiterations, SCIP_Stat::nduallps, SCIP_Stat::ndualresolvelpiterations, SCIP_Stat::ndualresolvelps, SCIP_Stat::ndualzeroitlps, SCIP_Stat::nearlybacktracks, SCIP_Stat::nexternalsolsfound, SCIP_Stat::nfeasleaves, SCIP_Presol::nfixedvars, SCIP_Stat::nholechgs, SCIP_Stat::ninfeasleaves, SCIP_Stat::ninitconssadded, SCIP_Stat::ninitlpiterations, SCIP_Stat::ninitlps, SCIP_Stat::ninternalnodes, SCIP_Stat::nisstoppedcalls, SCIP_Stat::nlexduallpiterations, SCIP_Stat::nlexduallps, SCIP_Stat::nlexdualresolvelpiterations, SCIP_Stat::nlexdualresolvelps, SCIP_Primal::nlimsolsfound, SCIP_Stat::nlpbestsolsfound, SCIP_Stat::nlpiterations, SCIP_Stat::nlps, SCIP_Stat::nlpsolsfound, SCIP_Stat::nlpsoltime, SCIP_Stat::nnlps, SCIP_Stat::nnodelpiterations, SCIP_Stat::nnodelps, SCIP_Stat::nnodes, SCIP_Stat::nnodesaboverefbound, SCIP_Stat::nnodesbeforefirst, SCIP_Stat::nnz, SCIP_Stat::nobjleaves, SCIP_Stat::nodeactivationtime, SCIP_Stat::npresoladdconss, SCIP_Stat::npresoladdholes, SCIP_Stat::npresolaggrvars, SCIP_Stat::npresolchgbds, SCIP_Stat::npresolchgcoefs, SCIP_Stat::npresolchgsides, SCIP_Stat::npresolchgvartypes, SCIP_Stat::npresoldelconss, SCIP_Stat::npresolfixedvars, SCIP_Stat::npresolrounds, SCIP_Stat::npresolroundsext, SCIP_Stat::npresolroundsfast, SCIP_Stat::npresolroundsmed, SCIP_Stat::npresolupgdconss, SCIP_Stat::npricerounds, SCIP_Stat::nprimallpiterations, SCIP_Stat::nprimallps, SCIP_Stat::nprimalresolvelpiterations, SCIP_Stat::nprimalresolvelps, SCIP_Stat::nprimalzeroitlps, SCIP_Stat::nprobboundchgs, SCIP_Stat::nprobholechgs, SCIP_Stat::npsbestsolsfound, SCIP_Stat::npssolsfound, SCIP_Stat::nreoptruns, SCIP_Stat::nrepropboundchgs, SCIP_Stat::nrepropcutoffs, SCIP_Stat::nreprops, SCIP_Prop::nrespropcalls, SCIP_Stat::nrootboundchgs, SCIP_Stat::nrootboundchgsrun, SCIP_Sepa::nrootcalls, SCIP_Stat::nrootfirstlpiterations, SCIP_Stat::nrootintfixings, SCIP_Stat::nrootintfixingsrun, SCIP_Stat::nrootlpiterations, SCIP_Stat::nrootlps, SCIP_Stat::nrootsblpiterations, SCIP_Stat::nrootstrongbranchs, SCIP_Stat::nruns, SCIP_Stat::nrunsbeforefirst, SCIP_Stat::nsbbestsolsfound, SCIP_Stat::nsbdivinglpiterations, SCIP_Stat::nsbdivinglps, SCIP_Stat::nsbdowndomchgs, SCIP_Stat::nsblpiterations, SCIP_Stat::nsbsolsfound, SCIP_Stat::nsbtimesiterlimhit, SCIP_Stat::nsbupdomchgs, SCIP_Stat::nseparounds, SCIP_Primal::nsolsfound, SCIP_Heur::nsolsfound, SCIP_Stat::nstrongbranchs, SCIP_Stat::ntotalinternalnodes, SCIP_Stat::ntotalnodes, NULL, SCIP_Presol::nupgdconss, Scip::origprob, SCIP_Stat::plungedepth, SCIP_Presol::presolclock, SCIP_Prop::presoltime, SCIP_Stat::presolvingtime, SCIP_Stat::presolvingtimeoverall, SCIP_Stat::previntegralevaltime, SCIP_Stat::previousdualrefgap, SCIP_Stat::previousgap, SCIP_Stat::previousprimalrefgap, SCIP_Stat::prevrunnvars, Scip::primal, SCIP_Stat::primaldualintegral, SCIP_Stat::primallptime, SCIP_Stat::primalrefintegral, SCIP_Stat::primalzeroittime, SCIP_Prop::proptime, SCIP_Stat::pseudosoltime, SCIP_Stat::referencebound, SCIP_Stat::reoptupdatetime, SCIP_Prop::resproptime, SCIP_Stat::rootlowerbound, SCIP_Stat::rootlpbestestimate, SCIP_Prop::sbproptime, SCIP_Stat::sbsoltime, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPfindHeur(), SCIPfindPresol(), SCIPfindProp(), SCIPfindSepa(), SCIPgetClockTime(), SCIPgetDualbound(), SCIPgetHeurs(), SCIPgetNHeurs(), SCIPgetNPresols(), SCIPgetNProps(), SCIPgetNSepas(), SCIPgetPresols(), SCIPgetProps(), SCIPgetRootNode(), SCIPgetSepas(), SCIPheurGetName(), SCIPpresolGetName(), SCIPprobExternObjval(), SCIPprobSetDualbound(), SCIPpropGetName(), SCIPsepaGetName(), SCIPsetClockTime(), SCIPupdateNodeLowerbound(), SCIP_Sepa::sepaclock, Scip::set, SCIP_Presol::setuptime, SCIP_Prop::setuptime, SCIP_Sepa::setuptime, SCIP_Heur::setuptime, SCIP_Stat::solvingtimeoverall, SCIP_Set::stage, Scip::stat, SCIP_Stat::status, SCIP_Stat::strongbranchtime, SCIP_Stat::strongpropclock, SCIP_Stat::totaldivesetdepth, Scip::transprob, and SCIP_Stat::vsidsweight.

Referenced by SCIP_DECL_CONCSOLVERCOPYSOLVINGDATA().

◆ SCIPgetConcurrentVaridx()

int SCIPgetConcurrentVaridx ( SCIP scip,
SCIP_VAR var 
)

get variable index of original variable that is the same between concurrent solvers

Parameters
scipSCIP data structure
varvariable

Definition at line 422 of file concurrent.c.

References Scip::concurrent, NULL, SCIPgetNOrigVars(), SCIPvarGetIndex(), SCIPvarIsOriginal(), and SCIP_Concurrent::varperm.

Referenced by SCIP_DECL_EVENTEXEC().

◆ SCIPIsConcurrentSolNew()

SCIP_Bool SCIPIsConcurrentSolNew ( SCIP scip,
SCIP_SOL sol 
)

has the solution been created after the last synchronization point

is the solution new since the last synchronization point

Parameters
scipSCIP data structure
solthe solution

Definition at line 438 of file concurrent.c.

References Scip::concurrent, NULL, SCIPsolGetIndex(), and SCIP_Concurrent::solidx.

Referenced by SCIP_DECL_CONCSOLVERSYNCWRITE().

◆ SCIPgetConcurrentGlobalBoundChanges()

SCIP_BOUNDSTORE* SCIPgetConcurrentGlobalBoundChanges ( SCIP scip)

gets the global bound changes since the last synchronization point

gets the global lower bound changes since the last synchronization point

Parameters
scipSCIP data structure

Definition at line 451 of file concurrent.c.

References Scip::concurrent, SCIP_Concurrent::eventglobalbnd, NULL, and SCIPeventGlobalbndGetBoundChanges().

Referenced by SCIP_DECL_CONCSOLVERSYNCWRITE().

◆ SCIPconcurrentSolve()

◆ SCIPdisableConcurrentBoundStorage()

void SCIPdisableConcurrentBoundStorage ( SCIP scip)

disables storing global bound changes

Parameters
scipSCIP data structure

Definition at line 263 of file concurrent.c.

References Scip::concurrent, SCIP_Concurrent::eventglobalbnd, NULL, and SCIPeventGlobalbndDisableBoundStorage().

Referenced by applyBoundChanges().

◆ SCIPenableConcurrentBoundStorage()

void SCIPenableConcurrentBoundStorage ( SCIP scip)

enables storing global bound changes

Parameters
scipSCIP data structure

Definition at line 275 of file concurrent.c.

References Scip::concurrent, SCIP_Concurrent::eventglobalbnd, NULL, and SCIPeventGlobalbndEnableBoundStorage().

Referenced by applyBoundChanges().

◆ SCIPgetConcurrentMemTotal()

SCIP_Longint SCIPgetConcurrentMemTotal ( SCIP scip)

gets total memory usage of all concurrent solvers together

Parameters
scipSCIP data structure

Definition at line 287 of file concurrent.c.

References SCIP_Concurrent::concsolver, Scip::concurrent, SCIP_Concurrent::mainscip, MAX, NULL, SCIP_Longint, SCIPconcsolverGetMemTotal(), and SCIPgetMemTotal().

Referenced by SCIPsolveIsStopped().

◆ SCIPgetConcurrentDualbound()

SCIP_Real SCIPgetConcurrentDualbound ( SCIP scip)

gets the dualbound in the last synchronization

Parameters
scipSCIP data structure

Definition at line 305 of file concurrent.c.

References NULL, Scip::origprob, SCIPgetSyncstore(), SCIPprobExternObjval(), SCIPsyncstoreGetLastLowerbound(), Scip::set, and Scip::transprob.

Referenced by SCIP_DECL_DISPOUTPUT(), and SCIPgetConcurrentGap().

◆ SCIPgetConcurrentPrimalbound()

SCIP_Real SCIPgetConcurrentPrimalbound ( SCIP scip)

gets the primalbound in the last synchronization

Parameters
scipSCIP data structure

Definition at line 320 of file concurrent.c.

References NULL, Scip::origprob, SCIPgetSyncstore(), SCIPprobExternObjval(), SCIPsyncstoreGetLastUpperbound(), Scip::set, and Scip::transprob.

Referenced by SCIP_DECL_DISPOUTPUT(), and SCIPgetConcurrentGap().

◆ SCIPgetConcurrentGap()

SCIP_Real SCIPgetConcurrentGap ( SCIP scip)

gets the gap in the last synchronization

Parameters
scipSCIP data structure

Definition at line 335 of file concurrent.c.

References SCIP_Real, SCIPcomputeGap(), SCIPepsilon(), SCIPgetConcurrentDualbound(), SCIPgetConcurrentPrimalbound(), and SCIPinfinity().

Referenced by SCIP_DECL_DISPOUTPUT().

◆ SCIPgetConcurrentNTightenedBnds()

SCIP_Longint SCIPgetConcurrentNTightenedBnds ( SCIP scip)

gives the total number of tightened bounds received from other concurrent solvers

Parameters
scipSCIP data structure

Definition at line 349 of file concurrent.c.

References Scip::concurrent, NULL, SCIP_Concurrent::propsync, and SCIPpropSyncGetNTightenedBnds().

◆ SCIPgetConcurrentNTightenedIntBnds()

SCIP_Longint SCIPgetConcurrentNTightenedIntBnds ( SCIP scip)

gives the total number of tightened bounds for integer variables received from other concurrent solvers

Parameters
scipSCIP data structure

Definition at line 360 of file concurrent.c.

References Scip::concurrent, NULL, SCIP_Concurrent::propsync, and SCIPpropSyncGetNTightenedIntBnds().