37#ifndef __SCIP_PARA_INITIATOR_H__
38#define __SCIP_PARA_INITIATOR_H__
49#include "objscip/objscip.h"
51#include "scip/scipdefplugins.h"
53#include "ugs/ugsParaCommMpi.h"
126#ifndef SCIP_THREADSAFE_MESSAGEHDLRS
129 SCIP_CALL_ABORT( SCIPsetDefaultMessagehdlr() );
130 SCIP_CALL_ABORT( SCIPfreeObjMessagehdlr(&
messagehdlr) );
150 SCIP_CALL_ABORT( SCIPprintStatistics(
scip, NULL) );
154 SCIP_CALL_ABORT( SCIPfree(&
scip) );
160 BMScheckEmptyMemory();
205 return SCIPgetNSols(
scip);
235 double getGap(
double dualBoundValue);
242 SCIP_CALL_ABORT( SCIPgetRealParam(
scip,
"limits/absgap",&
absgap ) );
251 SCIP_CALL_ABORT( SCIPgetRealParam(inScip,
"limits/absgap",&gapValue ) );
261 SCIP_CALL_ABORT( SCIPgetRealParam(
scip,
"limits/gap",&
gap ) );
270 SCIP_CALL_ABORT( SCIPgetRealParam(inScip,
"limits/gap",&gapValue ) );
303 return ( SCIPgetBestSol(
scip) != NULL );
338 (*userPlugins)(inScip);
347 SCIP_STAGE stage = SCIPgetStage(
scip);
349 if(stage == SCIP_STAGE_PRESOLVING || stage == SCIP_STAGE_SOLVING)
350 SCIP_CALL_ABORT( SCIPinterruptSolve(
scip) );
355 bool readUgsIncumbentSolution(UGS::UgsParaCommMpi *ugsComm,
int source);
358 void writeUgsIncumbentSolution(UGS::UgsParaCommMpi *ugsComm);
Base class of initiator that maintains original problem and incumbent solution.
void sendSolverInitializationMessage()
bool tryToSetIncumbentSolution(UG::BbParaSolution *sol, bool checksol)
double convertToInternalValue(double externalValue)
void outputFinalSolverStatistics(std::ostream *os, double time)
void generateRacingRampUpParameterSets(int nParamSets, UG::ParaRacingRampUpParamSet **racingRampUpParamSets)
void writeSolverParameters(std::ostream *os)
void writeSolution(const std::string &message)
UG::BbParaSolution * getGlobalBestIncumbentSolution()
UG::BbParaDiffSubproblem * makeRootNodeDiffSubproblem()
void writeCheckpointSolution(const std::string &filename)
char * racingSettingsName
ScipParaInitiator(UG::ParaComm *inComm, UG::ParaTimer *inTimer)
double getAbsgapValue(SCIP *inScip)
SCIP_MESSAGEHDLR * messagehdlr
void setInitialStatOnDiffSubproblem(int minDepth, int maxDepth, UG::BbParaDiffSubproblem *diffSubproblem)
double getGap(double dualBoundValue)
bool isFeasibleSolution()
double readSolutionFromCheckpointFile(char *afterCheckpointingSolutionFileName)
ScipDiffParamSet * scipDiffParamSet
UG::ParaInstance * getParaInstance()
void printSolverVersion(std::ostream *os)
double getAbsgap(double dualBoundValue)
double convertToExternalValue(double internalValue)
ScipUserPlugins * userPlugins
void writeParaInstance(const std::string &filename)
void setDualBound(double bound)
void setFinalSolverStatus(UG::FinalSolverState status)
virtual int init(UG::ParaParamSet *paraParams, int argc, char **argv)
void setUserPlugins(ScipUserPlugins *inUi)
double getGapValue(SCIP *inScip)
void outputProblemInfo(int *nNonLinearConsHdlrs)
void setNumberOfNodesSolved(long long n)
ScipParaInstance * instance
int reInit(int nRestartedRacing)
virtual ~ScipParaInitiator()
ScipParaSolution * solution
void accumulateInitialStat(UG::ParaInitialStat *initialStat)
UG::FinalSolverState finalState
UG::ParaParamSet * paraParams
ScipDiffParamSet * scipDiffParamSetRoot
bool onlyLinearConsHandler()
void includeUserPlugins(SCIP *inScip)
char * getSolutionFileName()
double convertToInternalValue(double externalValue)
double convertToExternalValue(double internalValue)
Class for the difference between instance and subproblem.
BbParaInitiator(ParaComm *inComm, ParaTimer *inTimer)
constructor
Base class of communicator object.
class for initial statistics collecting after racing
bool getBoolParamValue(int param)
get bool parameter value
class ParaRacingRampUpParamSet (parameter set for racing ramp-up)
ScipParaInitiator * ScipParaInitiatorPtr
FinalSolverState
Final status of computation.
Defines for UG Framework.
SCIP parameter set to be transferred ( Only keep difference between default settings ).
ParaComm extension for SCIP solver.
ParaInitialStat extension for SCIP solver.
ParaInstance extenstion for SCIP solver.
ParaSolution extension for SCIP solver.