Changeset 491


Ignore:
Timestamp:
Apr 24, 2007 2:32:08 PM (12 years ago)
Author:
pbonami
Message:

Get information on infeasible node. Set strategy in case of failed nlp to fathom.

Location:
trunk/Bonmin
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Bonmin/experimental/NotConvex/BonCouenneSetup.cpp

    r481 r491  
    2323   
    2424    /* Read the model. */
     25    options_->SetStringValue("nlp_failure_behavior","fathom","bonmin.");
     26    gatherParametersValues(options_);
    2527    CouenneInterface * ci = new CouenneInterface;
    2628    nonlinearSolver_ = ci;
  • trunk/Bonmin/experimental/NotConvex/BonNlpHeuristic.cpp

    r465 r491  
    1313#include "CouenneProblem.h"
    1414#include "CbcBranchActual.hpp"
     15#include "BonAuxInfos.hpp"
    1516
    1617namespace Bonmin{
     
    7879  NlpSolveHeuristic::solution( double & objectiveValue, double * newSolution){
    7980    OsiSolverInterface * solver = model_->solver();
     81   
     82    Bonmin::BabInfo * babInfo = dynamic_cast<Bonmin::BabInfo *> (solver->getAuxiliaryInfo());
     83    if(babInfo && babInfo->infeasibleNode()){
     84      return 0;
     85    }
    8086    double * lower = CoinCopyOfArray(solver->getColLower(), nlp_->getNumCols());
    8187    double * upper = CoinCopyOfArray(solver->getColUpper(), nlp_->getNumCols());
  • trunk/Bonmin/src/CbcBonmin/BonAuxInfos.hpp

    r484 r491  
    1818  BabInfo(int type):
    1919  OsiBabSolver(type),
    20   babPtr_(NULL){}
     20  babPtr_(NULL),
     21  infeasibleNode_(false){}
    2122 
    2223  BabInfo(const OsiBabSolver &other):
     
    2526  BabInfo(const BabInfo &other):
    2627  OsiBabSolver(other),
    27   babPtr_(other.babPtr_){
     28  babPtr_(other.babPtr_),
     29  infeasibleNode_(other.infeasibleNode_){
    2830  }
    2931 
     
    3537  Bab2 * babPtr(){
    3638    return babPtr_;}
     39 
     40  void setFeasibleNode(){
     41    infeasibleNode_ = false;}
     42 
     43  void setInfeasibleNode(){
     44    infeasibleNode_ = true;}
     45 
     46  bool infeasibleNode(){
     47    return infeasibleNode_;}
    3748protected:
     49  /** Pointer to branch-and-bound algorithm.*/
    3850  Bab2 * babPtr_;
     51  /** Say if current node was found infeasible during cut generation*/
     52  bool infeasibleNode_;
     53 
    3954  };
    4055}/* End namespace.*/
  • trunk/Bonmin/src/Interfaces/BonTNLPSolver.cpp

    r481 r491  
    4545    Ipopt::SmartPtr<Ipopt::OptionsList> options,
    4646    Ipopt::SmartPtr<Ipopt::Journalist> journalist)
    47   {}
     47  {
     48  }
    4849 
    4950  TNLPSolver::~TNLPSolver()
Note: See TracChangeset for help on using the changeset viewer.