Crossover Search class. More...
#include <CbcHeuristicLocal.hpp>
Public Member Functions | |
CbcHeuristicCrossover () | |
CbcHeuristicCrossover (CbcModel &model) | |
CbcHeuristicCrossover (const CbcHeuristicCrossover &) | |
~CbcHeuristicCrossover () | |
virtual CbcHeuristic * | clone () const |
Clone. | |
CbcHeuristicCrossover & | operator= (const CbcHeuristicCrossover &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. | |
void | setNumberSolutions (int value) |
Sets number of solutions to use. | |
CbcHeuristicCrossover () | |
CbcHeuristicCrossover (CbcModel &model) | |
CbcHeuristicCrossover (const CbcHeuristicCrossover &) | |
~CbcHeuristicCrossover () | |
virtual CbcHeuristic * | clone () const |
Clone. | |
CbcHeuristicCrossover & | operator= (const CbcHeuristicCrossover &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. | |
void | setNumberSolutions (int value) |
Sets number of solutions to use. | |
Protected Attributes | |
std::vector< double > | attempts_ |
Attempts. | |
double | random_ [10] |
Random numbers to stop same search happening. | |
int | numberSolutions_ |
Number of solutions so we only do after new solution. | |
int | useNumber_ |
Number of solutions to use. |
Crossover Search class.
Definition at line 149 of file CbcHeuristicLocal.hpp.
CbcHeuristicCrossover::CbcHeuristicCrossover | ( | ) |
CbcHeuristicCrossover::CbcHeuristicCrossover | ( | CbcModel & | model | ) |
CbcHeuristicCrossover::CbcHeuristicCrossover | ( | const CbcHeuristicCrossover & | ) |
CbcHeuristicCrossover::~CbcHeuristicCrossover | ( | ) |
CbcHeuristicCrossover::CbcHeuristicCrossover | ( | ) |
CbcHeuristicCrossover::CbcHeuristicCrossover | ( | CbcModel & | model | ) |
CbcHeuristicCrossover::CbcHeuristicCrossover | ( | const CbcHeuristicCrossover & | ) |
CbcHeuristicCrossover::~CbcHeuristicCrossover | ( | ) |
virtual CbcHeuristic* CbcHeuristicCrossover::clone | ( | ) | const [virtual] |
Clone.
Implements CbcHeuristic.
CbcHeuristicCrossover& CbcHeuristicCrossover::operator= | ( | const CbcHeuristicCrossover & | rhs | ) |
Assignment operator.
virtual void CbcHeuristicCrossover::generateCpp | ( | FILE * | fp | ) | [virtual] |
Create C++ lines to get to current state.
Reimplemented from CbcHeuristic.
virtual void CbcHeuristicCrossover::resetModel | ( | CbcModel * | model | ) | [virtual] |
Resets stuff if model changes.
Implements CbcHeuristic.
virtual void CbcHeuristicCrossover::setModel | ( | CbcModel * | model | ) | [virtual] |
update model (This is needed if cliques update matrix etc)
Reimplemented from CbcHeuristic.
virtual int CbcHeuristicCrossover::solution | ( | double & | objectiveValue, | |
double * | newSolution | |||
) | [virtual] |
returns 0 if no solution, 1 if valid solution.
Fix variables if agree in useNumber_ solutions when_ 0 off, 1 only at new solutions, 2 also every now and then add 10 to make only if agree at lower bound
Implements CbcHeuristic.
void CbcHeuristicCrossover::setNumberSolutions | ( | int | value | ) | [inline] |
Sets number of solutions to use.
Definition at line 191 of file CbcHeuristicLocal.hpp.
virtual CbcHeuristic* CbcHeuristicCrossover::clone | ( | ) | const [virtual] |
Clone.
Implements CbcHeuristic.
CbcHeuristicCrossover& CbcHeuristicCrossover::operator= | ( | const CbcHeuristicCrossover & | rhs | ) |
Assignment operator.
virtual void CbcHeuristicCrossover::generateCpp | ( | FILE * | fp | ) | [virtual] |
Create C++ lines to get to current state.
Reimplemented from CbcHeuristic.
virtual void CbcHeuristicCrossover::resetModel | ( | CbcModel * | model | ) | [virtual] |
Resets stuff if model changes.
Implements CbcHeuristic.
virtual void CbcHeuristicCrossover::setModel | ( | CbcModel * | model | ) | [virtual] |
update model (This is needed if cliques update matrix etc)
Reimplemented from CbcHeuristic.
virtual int CbcHeuristicCrossover::solution | ( | double & | objectiveValue, | |
double * | newSolution | |||
) | [virtual] |
returns 0 if no solution, 1 if valid solution.
Fix variables if agree in useNumber_ solutions when_ 0 off, 1 only at new solutions, 2 also every now and then add 10 to make only if agree at lower bound
Implements CbcHeuristic.
void CbcHeuristicCrossover::setNumberSolutions | ( | int | value | ) | [inline] |
Sets number of solutions to use.
Definition at line 191 of file CbcHeuristicLocal.hpp.
std::vector< double > CbcHeuristicCrossover::attempts_ [protected] |
Attempts.
Definition at line 199 of file CbcHeuristicLocal.hpp.
double CbcHeuristicCrossover::random_ [protected] |
Random numbers to stop same search happening.
Definition at line 201 of file CbcHeuristicLocal.hpp.
int CbcHeuristicCrossover::numberSolutions_ [protected] |
Number of solutions so we only do after new solution.
Definition at line 203 of file CbcHeuristicLocal.hpp.
int CbcHeuristicCrossover::useNumber_ [protected] |
Number of solutions to use.
Definition at line 205 of file CbcHeuristicLocal.hpp.