|
| LinearHandler () |
| Default constructor.
|
|
| LinearHandler (EnvPtr env, ProblemPtr problem) |
| Constructor.
|
|
| ~LinearHandler () |
| Destroy.
|
|
void | relaxInitFull (RelaxationPtr rel, SolutionPool *sp, bool *is_inf) |
| Create root relaxation if doing full node relaxations. More...
|
|
void | relaxInitInc (RelaxationPtr rel, SolutionPool *sp, bool *is_inf) |
| Create root relaxation if doing incremental node relaxations. More...
|
|
void | relaxNodeFull (NodePtr node, RelaxationPtr rel, bool *is_inf) |
| Create a relaxation for a node, building from scratch. More...
|
|
void | relaxNodeInc (NodePtr node, RelaxationPtr rel, bool *is_inf) |
| Create an incremental relaxation for a node. More...
|
|
bool | isFeasible (ConstSolutionPtr, RelaxationPtr, bool &, double &) |
|
bool | isNeeded () |
| Return true if this handler is needed for the problem. More...
|
|
void | separate (ConstSolutionPtr sol, NodePtr node, RelaxationPtr rel, CutManager *cutman, SolutionPoolPtr s_pool, ModVector &p_mods, ModVector &r_mods, bool *sol_found, SeparationStatus *status) |
|
virtual void | getBranchingCandidates (RelaxationPtr, const DoubleVector &, ModVector &, BrVarCandSet &, BrCandVector &, bool &) |
| Does nothing. More...
|
|
virtual ModificationPtr | getBrMod (BrCandPtr, DoubleVector &, RelaxationPtr, BranchDirection) |
| Does nothing. More...
|
|
virtual Branches | getBranches (BrCandPtr, DoubleVector &, RelaxationPtr, SolutionPoolPtr) |
| Does nothing. More...
|
|
virtual SolveStatus | presolve (PreModQ *pre_mods, bool *changed, Solution **sol) |
| Initial presolve. More...
|
|
virtual bool | presolveNode (RelaxationPtr p, NodePtr node, SolutionPoolPtr s_pool, ModVector &p_mods, ModVector &r_mods) |
| Presolve the problem and its relaxation at a node. More...
|
|
virtual std::string | getName () const |
| Return the name of the handler. More...
|
|
const LinPresolveOpts * | getOpts () const |
| Return a constant pointer to the presolve options.
|
|
void | setPreOptMaxIters (int val) |
| Maximum number of iterations.
|
|
void | setPreOptPurgeVars (bool val) |
| If True, purge fixed variables.
|
|
void | setPreOptPurgeCons (bool val) |
| If True, purge redundant constraints.
|
|
void | setPreOptDualFix (bool val) |
|
void | setPreOptCoeffImp (bool val) |
|
void | simplePresolve (ProblemPtr p, SolutionPoolPtr spool, ModVector &t_mods, SolveStatus &status) |
|
void | writePreStats (std::ostream &out) const |
| Write the presolve statistics.
|
|
void | writeStats (std::ostream &out) const |
| Write statistics to ostream out. More...
|
|
Public Member Functions inherited from Minotaur::Handler |
| Handler () |
| Default constructor.
|
|
virtual | ~Handler () |
| Destroy.
|
|
virtual void | addConstraint (ConstraintPtr newcon) |
| Add constraint to be handled by this handler. More...
|
|
virtual ConstraintVector::const_iterator | consBegin () const |
|
virtual ConstraintVector::const_iterator | consEnd () const |
|
virtual int | fixNodeErr (RelaxationPtr, ConstSolutionPtr, SolutionPoolPtr, bool &) |
|
virtual Branches | getBranches (BrCandPtr cand, DoubleVector &x, RelaxationPtr rel, SolutionPoolPtr s_pool)=0 |
| Return branches for branching. More...
|
|
virtual void | getBranchingCandidates (RelaxationPtr rel, const DoubleVector &x, ModVector &mods, BrVarCandSet &cands, BrCandVector &gencands, bool &is_inf)=0 |
| find branching candidates. More...
|
|
virtual ModificationPtr | getBrMod (BrCandPtr cand, DoubleVector &x, RelaxationPtr rel, BranchDirection dir)=0 |
| Get the modifcation that creates a given (up or down) branch. More...
|
|
virtual std::string | getName () const =0 |
| Return the name of the handler. More...
|
|
bool | getStrongerMods (RelaxationPtr rel, NodePtr node, SolutionPoolPtr s_pool, ModVector &p_mods, ModVector &r_mods) |
| do node presolve to get mods for stronger branching All params are presolveNode params.
|
|
virtual bool | isFeasible (ConstSolutionPtr sol, RelaxationPtr rel, bool &should_prune, double &inf_meas)=0 |
| Check if a solution is feasible. More...
|
|
virtual bool | isNeeded () |
| Return true if this handler is needed for the problem. More...
|
|
virtual SolveStatus | presolve (PreModQ *pre_mods, bool *changed, Solution **sol)=0 |
| Initial presolve. More...
|
|
virtual bool | presolveNode (RelaxationPtr rel, NodePtr node, SolutionPoolPtr s_pool, ModVector &p_mods, ModVector &r_mods)=0 |
| Presolve the problem and its relaxation at a node. More...
|
|
virtual bool | postSolveRootNode (RelaxationPtr, SolutionPoolPtr, ConstSolutionPtr, ModVector &, ModVector &) |
| At the root node post solve the problem and its relaxation. LP based bound tightening (OBBT) is employed here after filtering variables for which no OBBT is required. More...
|
|
virtual void | relaxInitFull (RelaxationPtr rel, SolutionPool *sp, bool *is_inf)=0 |
| Create root relaxation if doing full node relaxations. More...
|
|
virtual void | relaxInitInc (RelaxationPtr rel, SolutionPool *sp, bool *is_inf)=0 |
| Create root relaxation if doing incremental node relaxations. More...
|
|
virtual void | relaxNodeFull (NodePtr node, RelaxationPtr rel, bool *is_inf)=0 |
| Create a relaxation for a node, building from scratch. More...
|
|
virtual void | relaxNodeInc (NodePtr node, RelaxationPtr rel, bool *is_inf)=0 |
| Create an incremental relaxation for a node. More...
|
|
virtual void | removeCuts (RelaxationPtr, ConstSolutionPtr) |
|
virtual void | separate (ConstSolutionPtr sol, NodePtr node, RelaxationPtr rel, CutManager *cutman, SolutionPoolPtr s_pool, ModVector &p_mods, ModVector &r_mods, bool *sol_found, SeparationStatus *status)=0 |
| add cuts to separate a given point. More...
|
|
virtual void | setModFlags (bool mod_prob, bool mod_rel) |
| Tell the handler whether the problem will be modified or the relaxation will be modified or both. These modifications will be saved in the tree as well. More...
|
|
virtual void | simplePresolve (ProblemPtr, SolutionPoolPtr, ModVector &, SolveStatus &status) |
|
void | undoStrongerMods (ProblemPtr p, RelaxationPtr rel, ModVector &p_mods, ModVector &r_mods) |
| Undo Modifications made during stronger branching. More...
|
|
virtual void | writeStats (std::ostream &) const |
| Write statistics to ostream out. More...
|
|
|
void | chkIntToBin_ (VariablePtr v) |
|
void | chkSing_ (bool *changed) |
| Find variables that appear in exactly one constraint in linear form and do not appear in objective. Such a variable can be removed after changing the bounds on the constraint. More...
|
|
void | coeffImp_ (bool *changed) |
|
void | computeImpBounds_ (ConstraintPtr c, VariablePtr z, double zval, double *lb, double *ub) |
|
void | copyBndsFromRel_ (RelaxationPtr rel, ModVector &p_mods) |
|
void | delFixedVars_ (bool *changed) |
|
void | dualFix_ (bool *changed) |
|
void | domRows_ (bool *changed) |
|
void | dupRows_ (bool *changed) |
|
SolveStatus | checkBounds_ (ProblemPtr p) |
| check if lb <= ub for all variables and constraints.
|
|
void | changeBFlag_ (VariablePtr v) |
| change constraints flag for presolve
|
|
void | findLinVars_ () |
|
void | findAllBinCons_ () |
|
void | fixToCont_ () |
|
void | getLfBnds_ (LinearFunctionPtr lf, double *lo, double *up) |
|
void | getSingLfBnds_ (LinearFunctionPtr lf, double *lo, double *up) |
|
SolveStatus | linBndTighten_ (ProblemPtr p, bool apply_to_prob, ConstraintPtr c_ptr, bool *changed, ModQ *mods, UInt *nintmods) |
|
void | purgeVars_ (PreModQ *pre_mods) |
|
void | relax_ (ProblemPtr p, RelaxationPtr rel, bool *is_inf) |
| Common routine for building relaxation by copying all the linear constraints and variable-bounds from a given problem. More...
|
|
void | substVars_ (bool *changed, PreModQ *pre_mods) |
|
void | tightenInts_ (ProblemPtr p, bool apply_to_prob, bool *changed, ModQ *mods) |
| Round the bounds. More...
|
|
bool | treatDupRows_ (ConstraintPtr c1, ConstraintPtr c2, double mult, bool *changed) |
|
void | updateLfBoundsFromLb_ (ProblemPtr p, bool apply_to_prob, LinearFunctionPtr lf, double lb, double uu, bool is_sing, bool *changed, ModQ *mods, UInt *nintmods) |
|
void | updateLfBoundsFromUb_ (ProblemPtr p, bool apply_to_prob, LinearFunctionPtr lf, double ub, double ll, bool is_sing, bool *changed, ModQ *mods, UInt *nintmods) |
|
SolveStatus | varBndsFromCons_ (ProblemPtr p, bool apply_to_prob, bool *changed, ModQ *mods, UInt *nintmods) |
|
SolveStatus | varBndsFromObj_ (ProblemPtr p, double ub, bool apply_to_prob, bool *changed, ModQ *mods) |
|
An LinearHandler handles variables of a problem. It only checks bounds and integrality of the variables.