37 #ifndef __BB_PARA_INITIATOR_H__ 38 #define __BB_PARA_INITIATOR_H__ 50 #include "ugs/ugsDef.h" 51 #include "ugs/ugsParaCommMpi.h" 85 gzstream::igzstream checkpointTasksStream;
99 solvedAtReInit(false),
122 bool onlyBoundChanges
128 if( paraNode->read(
paraComm, checkpointTasksStream, onlyBoundChanges) )
135 checkpointTasksStream.close();
171 assert(tightenedVarLbs);
172 tightenedVarLbs[i] = v;
186 assert(tightenedVarUbs);
187 tightenedVarUbs[i] = v;
201 if( tightenedVarLbs )
203 return tightenedVarLbs[i];
220 if( tightenedVarUbs )
222 return tightenedVarUbs[i];
238 assert( (tightenedVarLbs && tightenedVarUbs) || ( (!tightenedVarLbs) && (!tightenedVarUbs) ) );
239 return ( tightenedVarLbs != 0 );
287 double dualBoundValue
295 double dualBoundValue
387 #endif // __BB_PARA_INITIATOR_HPP__ ParaComm * paraComm
communicator used
virtual BbParaDiffSubproblem * makeRootNodeDiffSubproblem()=0
make DiffSubproblem object for root node
initial nodes were generated
returns the current git hash of UG
virtual BbParaSolution * getGlobalBestIncumbentSolution()=0
get global best incumbent solution
virtual void setInitialStatOnDiffSubproblem(int minDepth, int maxDepth, BbParaDiffSubproblem *diffSubproblem)
set initial status on DiffSubproblem
double * tightenedVarUbs
array of tightened upper bound of variable
virtual bool tryToSetIncumbentSolution(BbParaSolution *sol, bool checksol)=0
try to set incumbent solution
virtual double getAbsgap(double dualBoundValue)=0
get absolute gap of dual bound value
void setTightenedVarUbs(int i, double v)
set tightened variable upper bound TODO: this function should be in inherited class ...
double getTightenedVarLbs(int i)
get tightened variable lower bound TODO: this function should be in inherited class ...
virtual void setNumberOfNodesSolved(long long n)=0
set number of nodes solved
bool solvedAtInit
solved at init
requested subproblem was solved
double getTightenedVarUbs(int i)
get tightened variable upper bound TODO: this function should be in inherited class ...
virtual void setDualBound(double bound)=0
set final dual bound
bool isSolvedAtReInit()
check if problem is solved at reInit or not
virtual double convertToExternalValue(double internalValue)=0
convert objective function value to external value TODO: this function may be in inherited class ...
double * tightenedVarLbs
array of tightened lower bound of variable
FinalSolverState
Final status of computation.
virtual int getNSolutions()=0
get the number of incumbent solutions
virtual double getAbsgapValue()=0
get absgap value specified
void setTightenedVarLbs(int i, double v)
set tightened variable lower bound TODO: this function should be in inherited class ...
hard time limit is reached
given gap is reached for the computation
virtual void setFinalSolverStatus(FinalSolverState status)=0
set final solver status
Class for the difference between instance and subproblem.
bool isSolvedAtInit()
check if problem is solved at init or not
memory limit is reached in a solver
virtual double getGapValue()=0
get gap value specified
computing was interrupted
virtual bool isFeasibleSolution()=0
check if feasible solution exists or not
virtual ParaTask * createParaTask()=0
create ParaTask object by default constructor
BbParaInitiator(ParaComm *inComm, ParaTimer *inTimer)
constructor
Base class of initiator that maintains original problem and incumbent solution.
virtual void accumulateInitialStat(ParaInitialStat *initialStat)
accumulate initial status
class for initial statistics collecting after racing
ParaInitiator * ParaInitiatorPtr
virtual ~BbParaInitiator()
destructor
virtual bool canGenerateSpecialCutOffValue()
check if solver can generate special cut off value or not
bool solvedAtReInit
solved at reInit
virtual double getGap(double dualBoundValue)=0
get relative gap of dual bound value
Base class of communicator object.
virtual bool isObjIntegral()
check if objective function value is always integral or not
bool areTightenedVarBounds()
check if there are tightened lower or upper bound TODO: this function should be in inherited class ...