|
Couenne
0.5.8
|
An implementation of the Feasibility pump that uses linearization and Ipopt to find the two sequences of points. More...
#include <CouenneFeasPump.hpp>
Inheritance diagram for Couenne::CouenneFeasPump:
Collaboration diagram for Couenne::CouenneFeasPump:Public Types | |
| enum | fpCompDistIntType { FP_DIST_INT, FP_DIST_ALL, FP_DIST_POST } |
| enum | fpCutPlane { FP_CUT_NONE, FP_CUT_INTEGRATED, FP_CUT_EXTERNAL, FP_CUT_POST } |
| enum | fpTabuMgtPolicy { FP_TABU_NONE, FP_TABU_POOL, FP_TABU_PERTURB, FP_TABU_CUT } |
Public Member Functions | |
| CouenneFeasPump (CouenneProblem *couenne=NULL, CouenneCutGenerator *cg=NULL, Ipopt::SmartPtr< Ipopt::OptionsList > options=NULL) | |
| Constructor with (optional) MINLP pointer. More... | |
| CouenneFeasPump (const CouenneFeasPump &other) | |
| Copy constructor. More... | |
| virtual | ~CouenneFeasPump () |
| Destructor. More... | |
| virtual CbcHeuristic * | clone () const |
| Clone. More... | |
| CouenneFeasPump & | operator= (const CouenneFeasPump &rhs) |
| Assignment operator. More... | |
| virtual void | resetModel (CbcModel *model) |
| Does nothing, but necessary as CbcHeuristic declares it pure virtual. More... | |
| virtual int | solution (double &objectiveValue, double *newSolution) |
| Run heuristic, return 1 if a better solution than the one passed is found and 0 otherwise. More... | |
| void | setNumberSolvePerLevel (int value) |
| set number of nlp's solved for each given level of the tree More... | |
| virtual CouNumber | solveMILP (const CouNumber *nSol, CouNumber *&iSol, int niter, int *nsuciter) |
| find integer (possibly NLP-infeasible) point isol closest (according to the l-1 norm of the hessian) to the current NLP-feasible (but fractional) solution nsol More... | |
| virtual CouNumber | solveNLP (const CouNumber *nSol, CouNumber *&iSol) |
| obtain solution to NLP More... | |
| expression * | updateNLPObj (const double *) |
| set new expression as the NLP objective function using argument as point to minimize distance from. More... | |
| bool | fixIntVariables (const double *sol) |
| admits a (possibly fractional) solution and fixes the integer components in the nonlinear problem for later re-solve. More... | |
| double | findSolution (const double *nSol, double *&sol, int niter, int *nsuciter) |
| find feasible solution (called by solveMILP ()) More... | |
| void | init_MILP () |
| initialize all solvers at the first call, where the initial MILP is built More... | |
| void | initIpoptApp () |
| Common code for initializing non-smartptr ipopt application. More... | |
| CouenneProblem * | Problem () const |
| return pointer to problem More... | |
| enum fpCompDistIntType | compDistInt () const |
| return type of MILP solved More... | |
| CouenneTNLP * | nlp () const |
| return NLP More... | |
| int & | nCalls () |
| return number of calls (can be changed) More... | |
| int | milpPhase (double *nSol, double *iSol) |
| MILP phase of the FP. More... | |
| int | nlpPhase (double *iSol, double *nSol) |
| NLP phase of the FP. More... | |
Public Member Functions inherited from CbcHeuristic | |
| CbcHeuristic () | |
| CbcHeuristic (CbcModel &model) | |
| CbcHeuristic (const CbcHeuristic &) | |
| virtual | ~CbcHeuristic () |
| CbcHeuristic & | operator= (const CbcHeuristic &rhs) |
| virtual void | setModel (CbcModel *model) |
| virtual int | solution2 (double &, double *, OsiCuts &) |
| virtual void | validate () |
| void | setWhen (int value) |
| int | when () const |
| void | setNumberNodes (int value) |
| int | numberNodes () const |
| void | setSwitches (int value) |
| int | switches () const |
| bool | exitNow (double bestObjective) const |
| void | setFeasibilityPumpOptions (int value) |
| int | feasibilityPumpOptions () const |
| void | setModelOnly (CbcModel *model) |
| void | setFractionSmall (double value) |
| double | fractionSmall () const |
| int | numberSolutionsFound () const |
| void | incrementNumberSolutionsFound () |
| int | smallBranchAndBound (OsiSolverInterface *solver, int numberNodes, double *newSolution, double &newSolutionValue, double cutoff, std::string name) const |
| virtual void | generateCpp (FILE *) |
| void | generateCpp (FILE *fp, const char *heuristic) |
| virtual bool | canDealWithOdd () const |
| const char * | heuristicName () const |
| void | setHeuristicName (const char *name) |
| void | setSeed (int value) |
| int | getSeed () const |
| void | setDecayFactor (double value) |
| void | setInputSolution (const double *solution, double objValue) |
| void | setWhereFrom (int value) |
| int | whereFrom () const |
| void | setShallowDepth (int value) |
| void | setHowOftenShallow (int value) |
| void | setMinDistanceToRun (int value) |
| virtual bool | shouldHeurRun (int whereFrom) |
| bool | shouldHeurRun_randomChoice () |
| void | debugNodes () |
| void | printDistanceToNodes () |
| int | numRuns () const |
| int | numCouldRun () const |
| bool | isHeuristicInteger (const OsiSolverInterface *solver, int iColumn) |
| OsiSolverInterface * | cloneBut (int type) |
Static Public Member Functions | |
| static void | registerOptions (Ipopt::SmartPtr< Bonmin::RegisteredOptions >) |
| initialize options to be read later More... | |
Additional Inherited Members | |
Protected Attributes inherited from CbcHeuristic | |
| CbcModel * | model_ |
| int | when_ |
| int | numberNodes_ |
| int | feasibilityPumpOptions_ |
| double | fractionSmall_ |
| CoinThreadRandom | randomNumberGenerator_ |
| std::string | heuristicName_ |
| int | howOften_ |
| double | decayFactor_ |
| int | switches_ |
| int | whereFrom_ |
| int | shallowDepth_ |
| int | howOftenShallow_ |
| int | numInvocationsInShallow_ |
| int | numInvocationsInDeep_ |
| int | lastRunDeep_ |
| int | numRuns_ |
| int | minDistanceToRun_ |
| CbcHeuristicNodeList | runNodes_ |
| int | numCouldRun_ |
| int | numberSolutionsFound_ |
| int | numberNodesDone_ |
| double * | inputSolution_ |
An implementation of the Feasibility pump that uses linearization and Ipopt to find the two sequences of points.
Definition at line 57 of file CouenneFeasPump.hpp.
| Enumerator | |
|---|---|
| FP_DIST_INT | |
| FP_DIST_ALL | |
| FP_DIST_POST | |
Definition at line 61 of file CouenneFeasPump.hpp.
| Enumerator | |
|---|---|
| FP_CUT_NONE | |
| FP_CUT_INTEGRATED | |
| FP_CUT_EXTERNAL | |
| FP_CUT_POST | |
Definition at line 62 of file CouenneFeasPump.hpp.
| Enumerator | |
|---|---|
| FP_TABU_NONE | |
| FP_TABU_POOL | |
| FP_TABU_PERTURB | |
| FP_TABU_CUT | |
Definition at line 63 of file CouenneFeasPump.hpp.
| Couenne::CouenneFeasPump::CouenneFeasPump | ( | CouenneProblem * | couenne = NULL, |
| CouenneCutGenerator * | cg = NULL, |
||
| Ipopt::SmartPtr< Ipopt::OptionsList > | options = NULL |
||
| ) |
Constructor with (optional) MINLP pointer.
| Couenne::CouenneFeasPump::CouenneFeasPump | ( | const CouenneFeasPump & | other | ) |
Copy constructor.
|
virtual |
Destructor.
|
virtual |
Clone.
Implements CbcHeuristic.
| CouenneFeasPump& Couenne::CouenneFeasPump::operator= | ( | const CouenneFeasPump & | rhs | ) |
Assignment operator.
|
inlinevirtual |
Does nothing, but necessary as CbcHeuristic declares it pure virtual.
Implements CbcHeuristic.
Definition at line 83 of file CouenneFeasPump.hpp.
|
virtual |
Run heuristic, return 1 if a better solution than the one passed is found and 0 otherwise.
\argument objectiveValue Best known solution in input and value of solution found in output
\argument newSolution Solution found by heuristic.
Implements CbcHeuristic.
|
inline |
set number of nlp's solved for each given level of the tree
Definition at line 95 of file CouenneFeasPump.hpp.
|
virtual |
find integer (possibly NLP-infeasible) point isol closest (according to the l-1 norm of the hessian) to the current NLP-feasible (but fractional) solution nsol
|
virtual |
obtain solution to NLP
| expression* Couenne::CouenneFeasPump::updateNLPObj | ( | const double * | ) |
set new expression as the NLP objective function using argument as point to minimize distance from.
Return new objective function
| bool Couenne::CouenneFeasPump::fixIntVariables | ( | const double * | sol | ) |
admits a (possibly fractional) solution and fixes the integer components in the nonlinear problem for later re-solve.
Returns false if restriction infeasible, true otherwise
|
static |
initialize options to be read later
| double Couenne::CouenneFeasPump::findSolution | ( | const double * | nSol, |
| double *& | sol, | ||
| int | niter, | ||
| int * | nsuciter | ||
| ) |
find feasible solution (called by solveMILP ())
| void Couenne::CouenneFeasPump::init_MILP | ( | ) |
initialize all solvers at the first call, where the initial MILP is built
| void Couenne::CouenneFeasPump::initIpoptApp | ( | ) |
Common code for initializing non-smartptr ipopt application.
|
inline |
return pointer to problem
Definition at line 135 of file CouenneFeasPump.hpp.
|
inline |
return type of MILP solved
Definition at line 139 of file CouenneFeasPump.hpp.
|
inline |
return NLP
Definition at line 154 of file CouenneFeasPump.hpp.
|
inline |
return number of calls (can be changed)
Definition at line 158 of file CouenneFeasPump.hpp.
| int Couenne::CouenneFeasPump::milpPhase | ( | double * | nSol, |
| double * | iSol | ||
| ) |
MILP phase of the FP.
| int Couenne::CouenneFeasPump::nlpPhase | ( | double * | iSol, |
| double * | nSol | ||
| ) |
NLP phase of the FP.
1.8.17