Scippy

UG

Ubiquity Generator framework

ScipParaObjCommPointHdlr Class Reference

#include <scipParaObjCommPointHdlr.h>

+ Inheritance diagram for ScipParaObjCommPointHdlr:

Public Member Functions

 ScipParaObjCommPointHdlr (UG::ParaComm *comm, ScipParaSolver *solver, ScipParaObjLimitUpdator *updator)
 
 ScipParaObjCommPointHdlr (UG::ParaComm *comm, ScipParaSolver *solver, SCIP *subScip, SCIP *inOriginalScip, bool inCloned)
 
 ~ScipParaObjCommPointHdlr ()
 
void resetCommPointHdlr ()
 
ObjCloneable * clone (SCIP *scip) const
 
SCIP_Bool iscloneable (void) const
 
bool isColne ()
 
void setOriginalNodeSelectionStrategy ()
 
virtual SCIP_RETCODE scip_free (SCIP *scip, SCIP_EVENTHDLR *eventhdlr)
 
virtual SCIP_RETCODE scip_init (SCIP *scip, SCIP_EVENTHDLR *eventhdlr)
 
void issueInterrupt ()
 
bool isInterrupting ()
 
virtual SCIP_RETCODE scip_exit (SCIP *scip, SCIP_EVENTHDLR *eventhdlr)
 
virtual SCIP_RETCODE scip_initsol (SCIP *scip, SCIP_EVENTHDLR *eventhdlr)
 
virtual SCIP_RETCODE scip_exitsol (SCIP *scip, SCIP_EVENTHDLR *eventhdlr)
 
virtual SCIP_RETCODE scip_delete (SCIP *scip, SCIP_EVENTHDLR *eventhdlr, SCIP_EVENTDATA **eventdata)
 
virtual SCIP_RETCODE scip_exec (SCIP *scip, SCIP_EVENTHDLR *eventhdlr, SCIP_EVENT *event, SCIP_EVENTDATA *eventdata)
 

Private Member Functions

void processNewSolution (SCIP *scip, SCIP_EVENT *event)
 
bool checkRootNodeSolvabilityAndSendParaNode (SCIP *scip)
 
void sendNode (SCIP *scip, SCIP_NODE *node, int depth, int nBranchVars, SCIP_VAR **branchVars, SCIP_Real *branchBounds, SCIP_BOUNDTYPE *boundTypes)
 
void changeSearchStrategy (SCIP *scip)
 
bool ifFeasibleInOriginalProblem (SCIP *scip, int nNewBranchVars, SCIP_VAR **newBranchVars, SCIP_Real *newBranchBounds)
 

Private Attributes

UG::ParaCommparaComm
 
ScipParaSolverscipParaSolver
 
ScipParaObjLimitUpdatorscipParaObjLimitUpdator
 
SCIP * scipToCheckRootSolvability
 
SCIP * originalScip
 
bool needToSendNode
 
bool originalSelectionStrategy
 
SCIP_Longint previousNNodesSolved
 
SCIP_Longint previousLpIter
 
const char * changeNodeSelName
 
bool cloned
 
bool interrupting
 
bool startedCollectingNodesForInitialRampUp
 

Detailed Description

C++ wrapper object for event handlers

Definition at line 54 of file scipParaObjCommPointHdlr.h.

Constructor & Destructor Documentation

◆ ScipParaObjCommPointHdlr() [1/2]

◆ ScipParaObjCommPointHdlr() [2/2]

ScipParaObjCommPointHdlr ( UG::ParaComm comm,
ScipParaSolver solver,
SCIP *  subScip,
SCIP *  inOriginalScip,
bool  inCloned 
)

◆ ~ScipParaObjCommPointHdlr()

destructor

Definition at line 136 of file scipParaObjCommPointHdlr.h.

Member Function Documentation

◆ changeSearchStrategy()

◆ checkRootNodeSolvabilityAndSendParaNode()

◆ clone()

ObjCloneable* clone ( SCIP *  scip) const

clone method, used to copy plugins which are not constraint handlers or variable pricer plugins

Parameters
scipSCIP data structure

Definition at line 154 of file scipParaObjCommPointHdlr.h.

References ScipParaSolver::getScip(), and ScipParaObjCommPointHdlr::ScipParaObjCommPointHdlr().

◆ ifFeasibleInOriginalProblem()

bool ifFeasibleInOriginalProblem ( SCIP *  scip,
int  nNewBranchVars,
SCIP_VAR **  newBranchVars,
SCIP_Real *  newBranchBounds 
)
private

◆ iscloneable()

SCIP_Bool iscloneable ( void  ) const

returns whether the objective plugin is copyable

Definition at line 161 of file scipParaObjCommPointHdlr.h.

◆ isColne()

bool isColne ( )

Definition at line 169 of file scipParaObjCommPointHdlr.h.

References ScipParaObjCommPointHdlr::cloned.

◆ isInterrupting()

bool isInterrupting ( )

◆ issueInterrupt()

void issueInterrupt ( )

Definition at line 236 of file scipParaObjCommPointHdlr.h.

Referenced by ScipParaSolver::issueInterruptSolve().

◆ processNewSolution()

void processNewSolution ( SCIP *  scip,
SCIP_EVENT *  event 
)
private

◆ resetCommPointHdlr()

void resetCommPointHdlr ( )

◆ scip_delete()

virtual SCIP_RETCODE scip_delete ( SCIP *  scip,
SCIP_EVENTHDLR *  eventhdlr,
SCIP_EVENTDATA **  eventdata 
)
virtual

frees specific constraint data

Parameters
scipSCIP data structure
eventhdlrthe event handler itself
eventdatapointer to the event data to free

Definition at line 284 of file scipParaObjCommPointHdlr.h.

References ScipParaObjCommPointHdlr::scip_exec().

◆ scip_exec()

SCIP_RETCODE scip_exec ( SCIP *  scip,
SCIP_EVENTHDLR *  eventhdlr,
SCIP_EVENT *  event,
SCIP_EVENTDATA *  eventdata 
)
virtual

execution method of event handler

Processes the event. The method is called every time an event occurs, for which the event handler is responsible. Event handlers may declare themselves resposible for events by calling the corresponding SCIPcatch...() method. This method creates an event filter object to point to the given event handler and event data.

set cutoff value

if root node is solved, set root node time

when a problem is solved at root, its root node process time is set on paraSolver main loop

set cutoff value

Parameters
scipSCIP data structure
eventhdlrthe event handler itself
eventevent to process
eventdatauser data for the event

Definition at line 121 of file scipParaObjCommPointHdlr.cpp.

References UG::AllowableRegressionRatioInMerging, ScipParaSolver::allowCollectingMode(), UG::BreakFirstSubtree, ScipParaObjCommPointHdlr::changeSearchStrategy(), ScipParaObjCommPointHdlr::checkRootNodeSolvabilityAndSendParaNode(), ScipParaObjCommPointHdlr::cloned, UG::CommunicateTighterBoundsInRacing, UG::ControlCollectingModeOnSolverSide, DEF_SCIP_PARA_COMM, UG::Deterministic, UG::DualBoundGainBranchRatio, UG::DualBoundGainTest, UG::EventWeightedDeterministic, UG::FinalCheckpointGeneratingTime, UG::GenerateReducedCheckpointFiles, BbParaSolver::getAggresivePresolvingDepth(), BbParaSolver::getAggresivePresolvingStopDepth(), BbParaSolver::getAverageDualBoundGain(), BbParaSolver::getBigDualGapSubtreeHandlingStrategy(), ParaParamSet::getBoolParamValue(), BbParaSolver::getBoundGapForCollectingMode(), BbParaSolver::getBoundGapForStopSolving(), BbParaSolver::getCurrentNode(), BbParaSolver::getCurrentSolivingNodeMergingStatus(), BbParaSolver::getCurrentSolvingNodeInitialDualBound(), ParaSolver::getDeterministicTimer(), ParaDeterministicTimer::getElapsedTime(), BbParaSolver::getElapsedTimeOfNodeSolving(), BbParaSolver::getGlobalBestIncumbentValue(), ParaParamSet::getIntParamValue(), BbParaSolver::getLcBestDualBoundValue(), BbParaSolver::getNSendInCollectingMode(), BbParaSolver::getNStopSolvingMode(), ScipParaSolver::getOffsetDepth(), ScipParaSolver::getOrgVarLb(), ScipParaSolver::getOrgVarUb(), ScipParaSolver::getOriginalIndex(), ScipParaSolver::getOriginalPriority(), BbParaSolver::getParaParamSet(), ParaSolver::getPreviousCommTime(), ScipParaSolver::getProbIndex(), ParaComm::getRank(), BbParaSolver::getRank(), ParaParamSet::getRealParamValue(), ScipParaSolver::getSimplexIter(), BbParaSolver::getSubMipDepth(), BbParaSolver::getTargetBound(), BbParaSolver::getThresholdValue(), ScipParaSolver::getTightenedVarLb(), ScipParaSolver::getTightenedVarUb(), BbParaSolver::getTimeStopSolvingMode(), ScipParaObjCommPointHdlr::interrupting, BbParaSolver::iReceiveMessages(), BbParaSolver::isAggressiveCollecting(), BbParaSolver::isAggressivePresolvingSpecified(), BbParaSolver::isAnotherNodeIsRequested(), BbParaSolver::isBreaking(), BbParaSolver::isCollecingInterrupt(), BbParaSolver::isCollectingAllNodes(), ScipParaSolver::isCollectingModeProhibited(), BbParaSolver::isDualBoundGainTestNeeded(), BbParaSolver::isEnoughGainObtained(), BbParaSolver::isGivenGapReached(), BbParaSolver::isGlobalIncumbentUpdated(), BbParaSolver::isInCollectingMode(), ScipParaSolver::isInterrupting(), BbParaSolver::isManyNodesCollectionRequested(), ScipParaSolver::isOriginalIndeciesMap(), ScipParaSolver::isProbIndeciesMap(), BbParaSolver::isRacingInterruptRequested(), BbParaSolver::isRacingRampUp(), BbParaSolver::isRacingStage(), ParaSolver::isRacingWinner(), ParaSolver::isRampUp(), ParaTask::isRootTask(), ParaSolver::isTerminationRequested(), BbParaSolver::isTransferLimitReached(), UG::KeepNodesDepth, ScipParaObjCommPointHdlr::needToSendNode, BbParaSolver::newParaNodeExists(), UG::NoAlternateSolving, UG::NotificationInterval, BbParaSolver::notificationIsNecessary(), UG::NumberOfNodesKeepingInRootSolver, ScipParaObjCommPointHdlr::originalScip, ScipParaObjCommPointHdlr::originalSelectionStrategy, PARA_COMM_CALL, UG::ParaBYTE, ScipParaObjCommPointHdlr::paraComm, UG::ParaDOUBLE, UG::ParaINT, BbParaSolver::passToken(), ScipParaObjCommPointHdlr::previousLpIter, ScipParaObjCommPointHdlr::previousNNodesSolved, ScipParaObjCommPointHdlr::processNewSolution(), UG::RampUpPhaseProcess, REALABS, BbParaSolver::resetBreakingInfo(), ScipParaObjCommPointHdlr::scipParaObjLimitUpdator, ScipParaObjCommPointHdlr::scipParaSolver, ParaComm::send(), BbParaSolver::sendAnotherNodeRequest(), BbParaSolver::sendLocalSolution(), BbParaSolver::sendSolverState(), BbParaSolver::setNotEnoughGain(), ScipParaSolver::setNPreviousNodesLeft(), ParaSolver::setPreviousCommTime(), BbParaSolver::setRootNodeSimplexIter(), BbParaSolver::setRootNodeTime(), BbParaSolver::setSendBackAllNodes(), ScipParaSolver::setTightenedVarLb(), ScipParaSolver::setTightenedVarUb(), ScipParaObjCommPointHdlr::startedCollectingNodesForInitialRampUp, UG::TagAllowToBeInCollectingMode, UG::TagLbBoundTightenedBound, UG::TagLbBoundTightenedIndex, UG::TagUbBoundTightenedBound, UG::TagUbBoundTightenedIndex, THROW_LOGICAL_ERROR2, ParaDeterministicTimer::update(), ScipParaObjLimitUpdator::update(), ParaSolver::updatePendingSolution(), BbParaSolver::waitMessageIfNecessary(), and BbParaSolver::waitToken().

Referenced by ScipParaObjCommPointHdlr::scip_delete().

◆ scip_exit()

virtual SCIP_RETCODE scip_exit ( SCIP *  scip,
SCIP_EVENTHDLR *  eventhdlr 
)
virtual

deinitialization method of event handler (called before transformed problem is freed)

Parameters
scipSCIP data structure
eventhdlrthe event handler itself

Definition at line 247 of file scipParaObjCommPointHdlr.h.

◆ scip_exitsol()

virtual SCIP_RETCODE scip_exitsol ( SCIP *  scip,
SCIP_EVENTHDLR *  eventhdlr 
)
virtual

solving process deinitialization method of event handler (called before branch and bound process data is freed)

This method is called before the branch and bound process is freed. The event handler should use this call to clean up its branch and bound data.

Parameters
scipSCIP data structure
eventhdlrthe event handler itself

Definition at line 275 of file scipParaObjCommPointHdlr.h.

◆ scip_free()

virtual SCIP_RETCODE scip_free ( SCIP *  scip,
SCIP_EVENTHDLR *  eventhdlr 
)
virtual

destructor of event handler to free user data (called when SCIP is exiting)

Parameters
scipSCIP data structure
eventhdlrthe event handler itself

Definition at line 178 of file scipParaObjCommPointHdlr.h.

◆ scip_init()

virtual SCIP_RETCODE scip_init ( SCIP *  scip,
SCIP_EVENTHDLR *  eventhdlr 
)
virtual

initialization method of event handler (called after problem was transformed)

Parameters
scipSCIP data structure
eventhdlrthe event handler itself

Definition at line 187 of file scipParaObjCommPointHdlr.h.

◆ scip_initsol()

virtual SCIP_RETCODE scip_initsol ( SCIP *  scip,
SCIP_EVENTHDLR *  eventhdlr 
)
virtual

solving process initialization method of event handler (called when branch and bound process is about to begin)

This method is called when the presolving was finished and the branch and bound process is about to begin. The event handler may use this call to initialize its branch and bound specific data.

Parameters
scipSCIP data structure
eventhdlrthe event handler itself

Definition at line 262 of file scipParaObjCommPointHdlr.h.

◆ sendNode()

void sendNode ( SCIP *  scip,
SCIP_NODE *  node,
int  depth,
int  nBranchVars,
SCIP_VAR **  branchVars,
SCIP_Real *  branchBounds,
SCIP_BOUNDTYPE *  boundTypes 
)
private

◆ setOriginalNodeSelectionStrategy()

void setOriginalNodeSelectionStrategy ( )

Member Data Documentation

◆ changeNodeSelName

const char* changeNodeSelName
private

◆ cloned

bool cloned
private

◆ interrupting

bool interrupting
private

◆ needToSendNode

◆ originalScip

SCIP* originalScip
private

Definition at line 60 of file scipParaObjCommPointHdlr.h.

Referenced by ScipParaObjCommPointHdlr::scip_exec().

◆ originalSelectionStrategy

bool originalSelectionStrategy
private

◆ paraComm

◆ previousLpIter

SCIP_Longint previousLpIter
private

Definition at line 65 of file scipParaObjCommPointHdlr.h.

Referenced by ScipParaObjCommPointHdlr::scip_exec().

◆ previousNNodesSolved

SCIP_Longint previousNNodesSolved
private

Definition at line 64 of file scipParaObjCommPointHdlr.h.

Referenced by ScipParaObjCommPointHdlr::scip_exec().

◆ scipParaObjLimitUpdator

ScipParaObjLimitUpdator* scipParaObjLimitUpdator
private

Definition at line 58 of file scipParaObjCommPointHdlr.h.

Referenced by ScipParaObjCommPointHdlr::scip_exec().

◆ scipParaSolver

◆ scipToCheckRootSolvability

SCIP* scipToCheckRootSolvability
private

◆ startedCollectingNodesForInitialRampUp

bool startedCollectingNodesForInitialRampUp
private

Definition at line 70 of file scipParaObjCommPointHdlr.h.

Referenced by ScipParaObjCommPointHdlr::scip_exec().