37 #ifndef __SCIP_PARA_INITIATOR_H__ 38 #define __SCIP_PARA_INITIATOR_H__ 49 #include "objscip/objscip.h" 50 #include "scip/scip.h" 51 #include "scip/scipdefplugins.h" 53 #include "ugs/ugsParaCommMpi.h" 103 :
UG::
BbParaInitiator(inComm, inTimer), paraParams(0), instance(0), solution(0), scipDiffParamSetRoot(0), scipDiffParamSet(0), messagehdlr(0), logfile(0),
104 solutionFile(0), transSolutionFile(0), scip(0), probname(0), settingsNameLC(0), settingsNameRoot(0), settingsName(0), racingSettingsName(0),
105 logname(0), isolname(0), generatedIsolname(0), solutionFileName(0), userPlugins(0), finalDualBound(-DBL_MAX), finalState(
UG::
Aborted), nSolved(0),
106 absgap(-1.0), gap(-1.0), objlimit(DBL_MAX)
125 #ifndef SCIP_THREADSAFE_MESSAGEHDLRS 128 SCIP_CALL_ABORT( SCIPsetDefaultMessagehdlr() );
129 SCIP_CALL_ABORT( SCIPfreeObjMessagehdlr(&messagehdlr) );
137 fclose(solutionFile);
139 if( transSolutionFile )
141 fclose(transSolutionFile);
149 SCIP_CALL_ABORT( SCIPprintStatistics(scip, NULL) );
153 SCIP_CALL_ABORT( SCIPfree(&scip) );
156 if( logfile != NULL )
159 BMScheckEmptyMemory();
204 return SCIPgetNSols(scip);
234 double getGap(
double dualBoundValue);
241 SCIP_CALL_ABORT( SCIPgetRealParam(scip,
"limits/absgap",&absgap ) );
251 SCIP_CALL_ABORT( SCIPgetRealParam(scip,
"limits/gap",&gap ) );
270 void writeCheckpointSolution(
const std::string& filename);
273 double readSolutionFromCheckpointFile(
char *afterCheckpointingSolutionFileName);
285 return ( SCIPgetBestSol(scip) != NULL );
320 (*userPlugins)(inScip);
329 SCIP_STAGE stage = SCIPgetStage(scip);
331 if(stage == SCIP_STAGE_PRESOLVING || stage == SCIP_STAGE_SOLVING)
332 SCIP_CALL_ABORT( SCIPinterruptSolve(scip) );
337 bool readUgsIncumbentSolution(UGS::UgsParaCommMpi *ugsComm,
int source);
340 void writeUgsIncumbentSolution(UGS::UgsParaCommMpi *ugsComm);
349 #endif // __SCIP_PARA_INITIATOR_H__ virtual ~ScipParaInitiator()
void printSolverVersion(std::ostream *os)
double getGap(double dualBoundValue)
ScipParaInstance * instance
void setInitialStatOnDiffSubproblem(int minDepth, int maxDepth, UG::BbParaDiffSubproblem *diffSubproblem)
void writeSolution(const std::string &message)
ParaInstance extenstion for SCIP solver.
ScipDiffParamSet * scipDiffParamSetRoot
UG::BbParaSolution * getGlobalBestIncumbentSolution()
UG::BbParaDiffSubproblem * makeRootNodeDiffSubproblem()
void accumulateInitialStat(UG::ParaInitialStat *initialStat)
ParaInitialStat extension for SCIP solver.
void sendSolverInitializationMessage()
ScipParaInitiator * ScipParaInitiatorPtr
ParaSolution extension for SCIP solver.
ScipUserPlugins * userPlugins
UG::ParaInstance * getParaInstance()
Defines for UG Framework.
int reInit(int nRestartedRacing)
void writeParaInstance(const std::string &filename)
ScipParaSolution * solution
void outputProblemInfo(int *nNonLinearConsHdlrs)
void setNumberOfNodesSolved(long long n)
FinalSolverState
Final status of computation.
void outputFinalSolverStatistics(std::ostream *os, double time)
ScipDiffParamSet * scipDiffParamSet
bool tryToSetIncumbentSolution(UG::BbParaSolution *sol, bool checksol)
ScipParaInitiator(UG::ParaComm *inComm, UG::ParaTimer *inTimer)
bool onlyLinearConsHandler()
Class for the difference between instance and subproblem.
void setFinalSolverStatus(UG::FinalSolverState status)
void writeSolverParameters(std::ostream *os)
SCIP parameter set to be transferred ( Only keep difference between default settings )...
char * racingSettingsName
double convertToInternalValue(double externalValue)
BbParaInitiator(ParaComm *inComm, ParaTimer *inTimer)
constructor
ParaComm extension for SCIP solver.
void setUserPlugins(ScipUserPlugins *inUi)
virtual int init(UG::ParaParamSet *paraParams, int argc, char **argv)
double convertToExternalValue(double internalValue)
double getAbsgap(double dualBoundValue)
class for initial statistics collecting after racing
UG::ParaParamSet * paraParams
SCIP_MESSAGEHDLR * messagehdlr
void includeUserPlugins(SCIP *inScip)
char * getSolutionFileName()
class ParaRacingRampUpParamSet (parameter set for racing ramp-up)
void generateRacingRampUpParameterSets(int nParamSets, UG::ParaRacingRampUpParamSet **racingRampUpParamSets)
double convertToInternalValue(double externalValue)
Base class of communicator object.
UG::FinalSolverState finalState
bool isFeasibleSolution()
void setDualBound(double bound)
double convertToExternalValue(double internalValue)
bool getBoolParamValue(int param)
for bool parameters