15#ifndef MINOTAURSTOAHANDLER_H
16#define MINOTAURSTOAHANDLER_H
57 static const std::string me_;
72 ConstraintVector nlCons_;
145 {
return Branches();};
158 const DoubleVector &, ModVector &,
159 BrVarCandSet &, BrCandVector &,
bool &) {};
172 bool &,
double &) {
return 0;};
217 bool fixedNLP(
const double *lpx, EnginePtr &nlpe, ProblemPtr &minlp);
220 double newUb(std::vector<UInt> *varIdx,
221 std::vector<double>* varCoeff);
226 ConstraintConstIterator
consBegin()
const {
return nlCons_.begin(); }
229 ConstraintConstIterator
consEnd()
const {
return nlCons_.end(); }
232 void OACutToCons(
const double *lpx,
ConstraintPtr con,
double* rhs,
233 std::vector<UInt> *varIdx, std::vector<double>* varCoeff,
236 void OACutToObj(
const double *lpx,
double* rhs, std::vector<UInt> *varIdx,
237 std::vector<double>* varCoeff,
double ub,
EnginePtr nlpe);
244 void addInitLinearX_(
const double *x);
257 void fixInts_(
const double *x,
ProblemPtr minlp, std::stack<Modification *> &nlpMods);
264 void initLinear_(
bool *isInf);
270 void linearizeObj_();
277 void linearAt_(
FunctionPtr f,
double fval,
const double *x,
284 void cutToCons_(
ConstraintPtr con,
const double *nlpx,
const double *lpx,
double* rhs, std::vector<UInt> *varIdx,
285 std::vector<double>* varCoeff);
287 void addCut_(
const double *nlpx,
const double *lpx,
ConstraintPtr con,
double* rhs, std::vector<UInt> *varIdx,
288 std::vector<double>* varCoeff);
290 void objCutAtLpSol_(
const double *lpx,
double* rhs,
291 std::vector<UInt> *varIdx,
292 std::vector<double>* varCoeff,
double relobj);
294 void consCutAtLpSol_(
ConstraintPtr con,
const double *lpx,
double* rhs,
295 std::vector<UInt> *varIdx,
296 std::vector<double>* varCoeff);
302 void cutToObj_(
const double *nlpx,
const double *lpx,
303 double* rhs, std::vector<UInt> *varIdx,
304 std::vector<double>* varCoeff,
double relobj);
310 void relax_(
bool *is_inf);
316 void unfixInts_(
ProblemPtr minlp, std::stack<Modification *> &nlpMods);
322 void updateUb_(
SolutionPoolPtr s_pool,
double *nlp_val,
bool *sol_found);
326 typedef STOAHandler* STOAHandlerPtr;
Define the base class Engine.
Get information about a Function.
Define abstract base class for handlers of various kinds.
Declare the class MILPEngine for solving MILPs and getting solution.
Declare the base class Modification.
Define the TimerFactory and varios Timer classes.
Base class for describing candidates for branching on a node in branch-and-bound.
Definition BrCand.h:32
The Constraint class is used to manage a constraint.
Definition Constraint.h:61
Abstract base class to manage cuts in the relaxation.
Definition CutManager.h:42
Definition Environment.h:28
Base class for handling specific types of constraints or objective.
Definition Handler.h:49
The base class linear function is of the form c'x.
Definition LinearFunction.h:31
Definition MILPEngine.h:28
Definition Modification.h:29
Definition Relaxation.h:53
Handler for convex constraints, based on quesada-grossmann algorithm.
Definition STOAHandler.h:44
ModificationPtr getBrMod(BrCandPtr, DoubleVector &, RelaxationPtr, BranchDirection)
Does nothing.
Definition STOAHandler.h:162
UInt getNumCalls()
Return number of callbacks till now.
Definition STOAHandler.h:148
void relaxNodeInc(NodePtr, RelaxationPtr, bool *)
Create an incremental relaxation for a node.
Definition STOAHandler.h:197
void writeStats(std::ostream &out) const
Write statistics to ostream out.
Definition STOAHandler.cpp:820
void relaxInitFull(RelaxationPtr, SolutionPool *, bool *)
Create root relaxation if doing full node relaxations.
Definition STOAHandler.h:188
Branches getBranches(BrCandPtr, DoubleVector &, RelaxationPtr, SolutionPoolPtr)
Does nothing.
Definition STOAHandler.h:143
bool presolveNode(RelaxationPtr, NodePtr, SolutionPoolPtr, ModVector &, ModVector &)
Does nothing.
Definition STOAHandler.h:180
~STOAHandler()
Destroy.
Definition STOAHandler.cpp:90
void relaxNodeFull(NodePtr, RelaxationPtr, bool *)
Create a relaxation for a node, building from scratch.
Definition STOAHandler.h:194
void getBranchingCandidates(RelaxationPtr, const DoubleVector &, ModVector &, BrVarCandSet &, BrCandVector &, bool &)
Does nothing.
Definition STOAHandler.h:157
ConstraintConstIterator consEnd() const
Iterate over constraints. Returns the 'end' iterator.
Definition STOAHandler.h:229
void setCbTime(double timeval)
Set the time taken in callbacks till now.
Definition STOAHandler.h:154
void relaxInitInc(RelaxationPtr rel, SolutionPool *, bool *)
Create root relaxation if doing incremental node relaxations.
Definition STOAHandler.cpp:771
std::string getName() const
Return the name of the handler.
Definition STOAHandler.cpp:837
bool isFeasible(ConstSolutionPtr, RelaxationPtr, bool &, double &)
Check if a solution is feasible.
Definition STOAHandler.h:171
SolveStatus presolve(PreModQ *, bool *, Solution **)
Does nothing.
Definition STOAHandler.h:177
void separate(ConstSolutionPtr, NodePtr, RelaxationPtr, CutManager *, SolutionPoolPtr, ModVector &, ModVector &, bool *, SeparationStatus *)
add cuts to separate a given point.
Definition STOAHandler.h:201
double getCbTime()
Return the time taken in callbacks till now.
Definition STOAHandler.h:151
ConstraintConstIterator consBegin() const
Iterate over constraints. Returns the 'begin' iterator.
Definition STOAHandler.h:226
void postsolveGetX(const double *, UInt, DoubleVector *)
Does nothing.
Definition STOAHandler.h:185
Definition SolutionPool.h:28
Definition ActiveNodeStore.h:20
BranchDirection
Two directions for branching.
Definition Types.h:201
unsigned int UInt
Unsigned integer.
Definition Types.h:30
SeparationStatus
Status from separation routine:
Definition Types.h:217
EngineStatus
Different status that an external engine may report.
Definition Types.h:176
SolveStatus
Different states an algorithm like branch-and-bound can be in.
Definition Types.h:158
Definition STOAHandler.h:29
size_t nlpF
Number of nlps solved.
Definition STOAHandler.h:31
size_t cuts
Number of nlps hits engine iterations limit.
Definition STOAHandler.h:34
size_t nlpIL
Number of nlps infeasible.
Definition STOAHandler.h:33
size_t nlpI
Number of nlps feasible.
Definition STOAHandler.h:32