Public Member Functions | Protected Attributes

CbcHeuristicLocal Class Reference

LocalSearch class. More...

#include <CbcHeuristicLocal.hpp>

Inheritance diagram for CbcHeuristicLocal:
CbcHeuristic CbcHeuristic

List of all members.

Public Member Functions

 CbcHeuristicLocal ()
 CbcHeuristicLocal (CbcModel &model)
 CbcHeuristicLocal (const CbcHeuristicLocal &)
 ~CbcHeuristicLocal ()
virtual CbcHeuristicclone () const
 Clone.
CbcHeuristicLocaloperator= (const CbcHeuristicLocal &rhs)
 Assignment operator.
virtual void generateCpp (FILE *fp)
 Create C++ lines to get to current state.
virtual void resetModel (CbcModel *model)
 Resets stuff if model changes.
virtual void setModel (CbcModel *model)
 update model (This is needed if cliques update matrix etc)
virtual int solution (double &objectiveValue, double *newSolution)
 returns 0 if no solution, 1 if valid solution.
int solutionFix (double &objectiveValue, double *newSolution, const int *keep)
 This version fixes stuff and does IP.
void setSearchType (int value)
 Sets type of search.
int * used () const
 Used array so we can set.
 CbcHeuristicLocal ()
 CbcHeuristicLocal (CbcModel &model)
 CbcHeuristicLocal (const CbcHeuristicLocal &)
 ~CbcHeuristicLocal ()
virtual CbcHeuristicclone () const
 Clone.
CbcHeuristicLocaloperator= (const CbcHeuristicLocal &rhs)
 Assignment operator.
virtual void generateCpp (FILE *fp)
 Create C++ lines to get to current state.
virtual void resetModel (CbcModel *model)
 Resets stuff if model changes.
virtual void setModel (CbcModel *model)
 update model (This is needed if cliques update matrix etc)
virtual int solution (double &objectiveValue, double *newSolution)
 returns 0 if no solution, 1 if valid solution.
int solutionFix (double &objectiveValue, double *newSolution, const int *keep)
 This version fixes stuff and does IP.
void setSearchType (int value)
 Sets type of search.
int * used () const
 Used array so we can set.

Protected Attributes

CoinPackedMatrix matrix_
int numberSolutions_
int swap_
int * used_
 Whether a variable has been in a solution (also when).

Detailed Description

LocalSearch class.

Definition at line 11 of file CbcHeuristicLocal.hpp.


Constructor & Destructor Documentation

CbcHeuristicLocal::CbcHeuristicLocal (  ) 
CbcHeuristicLocal::CbcHeuristicLocal ( CbcModel model  ) 
CbcHeuristicLocal::CbcHeuristicLocal ( const CbcHeuristicLocal  ) 
CbcHeuristicLocal::~CbcHeuristicLocal (  ) 
CbcHeuristicLocal::CbcHeuristicLocal (  ) 
CbcHeuristicLocal::CbcHeuristicLocal ( CbcModel model  ) 
CbcHeuristicLocal::CbcHeuristicLocal ( const CbcHeuristicLocal  ) 
CbcHeuristicLocal::~CbcHeuristicLocal (  ) 

Member Function Documentation

virtual CbcHeuristic* CbcHeuristicLocal::clone (  )  const [virtual]

Clone.

Implements CbcHeuristic.

CbcHeuristicLocal& CbcHeuristicLocal::operator= ( const CbcHeuristicLocal rhs  ) 

Assignment operator.

virtual void CbcHeuristicLocal::generateCpp ( FILE *  fp  )  [virtual]

Create C++ lines to get to current state.

Reimplemented from CbcHeuristic.

virtual void CbcHeuristicLocal::resetModel ( CbcModel model  )  [virtual]

Resets stuff if model changes.

Implements CbcHeuristic.

virtual void CbcHeuristicLocal::setModel ( CbcModel model  )  [virtual]

update model (This is needed if cliques update matrix etc)

Reimplemented from CbcHeuristic.

virtual int CbcHeuristicLocal::solution ( double &  objectiveValue,
double *  newSolution 
) [virtual]

returns 0 if no solution, 1 if valid solution.

Sets solution values if good, sets objective value (only if good) This is called after cuts have been added - so can not add cuts First tries setting a variable to better value. If feasible then tries setting others. If not feasible then tries swaps

This first version does not do LP's and does swaps of two integer variables. Later versions could do Lps.

Implements CbcHeuristic.

int CbcHeuristicLocal::solutionFix ( double &  objectiveValue,
double *  newSolution,
const int *  keep 
)

This version fixes stuff and does IP.

void CbcHeuristicLocal::setSearchType ( int  value  )  [inline]

Sets type of search.

Definition at line 63 of file CbcHeuristicLocal.hpp.

int* CbcHeuristicLocal::used (  )  const [inline]

Used array so we can set.

Definition at line 67 of file CbcHeuristicLocal.hpp.

virtual CbcHeuristic* CbcHeuristicLocal::clone (  )  const [virtual]

Clone.

Implements CbcHeuristic.

CbcHeuristicLocal& CbcHeuristicLocal::operator= ( const CbcHeuristicLocal rhs  ) 

Assignment operator.

virtual void CbcHeuristicLocal::generateCpp ( FILE *  fp  )  [virtual]

Create C++ lines to get to current state.

Reimplemented from CbcHeuristic.

virtual void CbcHeuristicLocal::resetModel ( CbcModel model  )  [virtual]

Resets stuff if model changes.

Implements CbcHeuristic.

virtual void CbcHeuristicLocal::setModel ( CbcModel model  )  [virtual]

update model (This is needed if cliques update matrix etc)

Reimplemented from CbcHeuristic.

virtual int CbcHeuristicLocal::solution ( double &  objectiveValue,
double *  newSolution 
) [virtual]

returns 0 if no solution, 1 if valid solution.

Sets solution values if good, sets objective value (only if good) This is called after cuts have been added - so can not add cuts First tries setting a variable to better value. If feasible then tries setting others. If not feasible then tries swaps

This first version does not do LP's and does swaps of two integer variables. Later versions could do Lps.

Implements CbcHeuristic.

int CbcHeuristicLocal::solutionFix ( double &  objectiveValue,
double *  newSolution,
const int *  keep 
)

This version fixes stuff and does IP.

void CbcHeuristicLocal::setSearchType ( int  value  )  [inline]

Sets type of search.

Definition at line 63 of file CbcHeuristicLocal.hpp.

int* CbcHeuristicLocal::used (  )  const [inline]

Used array so we can set.

Definition at line 67 of file CbcHeuristicLocal.hpp.


Member Data Documentation

CoinPackedMatrix CbcHeuristicLocal::matrix_ [protected]

Definition at line 75 of file CbcHeuristicLocal.hpp.

Definition at line 78 of file CbcHeuristicLocal.hpp.

int CbcHeuristicLocal::swap_ [protected]

Definition at line 80 of file CbcHeuristicLocal.hpp.

int * CbcHeuristicLocal::used_ [protected]

Whether a variable has been in a solution (also when).

Definition at line 82 of file CbcHeuristicLocal.hpp.


The documentation for this class was generated from the following files: