Go to the documentation of this file.
22 #include "CoinMessageHandler.hpp"
23 #include "OsiClpSolverInterface.hpp"
25 #if CBC_OTHER_SOLVER == 1
26 #include "OsiCpxSolverInterface.hpp"
30 #include "CbcOrClpParam.hpp"
34 class CglCutGenerator;
66 int solve(
int argc,
const char *argv[],
int returnMode);
73 int solve(
const char *input,
int returnMode);
114 int *
analyze(OsiClpSolverInterface *solverMod,
int &numberChanged,
double &increment,
115 bool changeInt, CoinMessageHandler *generalMessageHandler);
128 void updateModel(ClpSimplex *model2,
int returnMode);
132 int intValue(CbcOrClpParameterType type)
const;
135 void setIntValue(CbcOrClpParameterType type,
int value);
137 double doubleValue(CbcOrClpParameterType type)
const;
339 int ,
const char * = NULL) {}
362 inline std::string
name()
const
369 virtual bool canDo(
const char *options) = 0;
CbcModel * babModel_
Updated model.
CbcModel model_
Reference model.
CoinModel * originalCoinModel_
Copy of model on initial load.
void addUserFunction(CbcUser *function)
Add user function.
CbcUser()
Default Constructor.
virtual int callBack(CbcModel *, int)
Import.
~CbcSolverUsefulData()
Destructor.
void setDoubleValue(CbcOrClpParameterType type, double value)
Set double value.
bool doMiplib_
Whether to do miplib test.
CbcStopNow & operator=(const CbcStopNow &rhs)
Assignment operator.
CbcSolver()
Default Constructor.
int numberCutGenerators_
Number of cut generators.
virtual ~CbcStopNow()
Destructor.
virtual int importData(CbcSolver *, int &, char **)
Import - gets full command arguments.
CoinModel * originalCoinModel() const
Copy of model on initial load.
int numberUserFunctions() const
Number of userFunctions.
std::vector< CbcOrClpParam > parameters_
Parameters and values.
CbcUser & operator=(const CbcUser &rhs)
Assignment operator.
int numberCutGenerators() const
Number of cutgenerators.
CbcModel * model()
Return original Cbc model.
void setIntValue(CbcOrClpParameterType type, int value)
Set int value.
void addCutGenerator(CglCutGenerator *generator)
Add cut generator.
bool noPrinting_
Whether to print to std::cout.
double doubleValue(CbcOrClpParameterType type) const
Get double value.
A class to allow the use of unknown user functionality.
int * analyze(OsiClpSolverInterface *solverMod, int &numberChanged, double &increment, bool changeInt, CoinMessageHandler *generalMessageHandler)
CoinModel * coinModel() const
CoinModel if valid.
CbcUser ** userFunctionArray() const
User function array.
CbcStopNow * callBack_
Stop now stuff.
This allows the use of the standalone solver in a flexible manner.
The CbcSolver class was taken out at a 9/12/09 meeting This is a feeble replacement.
virtual ~CbcUser()
Destructor.
virtual void * stuff()
Other info - needs expanding.
CbcStopNow()
Default Constructor.
Structure to hold useful arrays.
void CbcMain0(CbcModel &babSolver, CbcSolverUsefulData &solverData)
And this uses it.
CbcUser * userFunction(const char *name) const
User function (NULL if no match)
Simple Branch and bound class.
int * statusUserFunction_
Status of user functions 0 - not used 1 - needs cbc_load 2 - available - data in coinModel 3 - data l...
double startTime() const
Start time.
void setUserCallBack(CbcStopNow *function)
Set user call back.
std::vector< CbcOrClpParam > parameters_
CoinModel * coinModel_
CoinModel.
CbcSolverUsefulData()
Default Constructor.
std::string name() const
Name.
CglCutGenerator ** cutGenerator_
Cut generators.
CbcModel * babModel()
Return updated Cbc model.
void updateModel(ClpSimplex *model2, int returnMode)
1 - add heuristics to model 2 - do heuristics (and set cutoff and best solution) 3 - for miplib test ...
double startTime_
Cpu time at instantiation.
void setReadMode(int value)
Where to start reading commands.
virtual bool canDo(const char *options)=0
Returns true if function knows about option.
CbcUser ** userFunction_
User functions.
virtual CbcUser * clone() const =0
Clone.
virtual CbcStopNow * clone() const
Clone.
void setOriginalCoinModel(CoinModel *originalCoinModel)
Copy of model on initial load.
CbcSolverUsefulData & operator=(const CbcSolverUsefulData &rhs)
Assignment operator.
CglCutGenerator ** cutGeneratorArray() const
Cut generator array.
int CbcMain1(int argc, const char *argv[], CbcModel &babSolver, int(CbcModel *currentSolver, int whereFrom), CbcSolverUsefulData &solverData)
OsiClpSolverInterface * originalSolver_
Copy of model on initial load (will contain output solutions)
int solve(int argc, const char *argv[], int returnMode)
This takes a list of commands, does "stuff" and returns returnMode - 0 model and solver untouched - b...
int readMode_
Where to start reading commands.
std::string userName_
Name of user function.
virtual void fillInformation(CbcSolver *, CbcSolverUsefulData &)
Get useful stuff.
virtual void exportSolution(CbcSolver *, int, const char *=NULL)
Export.
void setOriginalSolver(OsiClpSolverInterface *originalSolver)
Copy of model on initial load (will contain output solutions)
void fillParameters()
Fill with standard parameters.
void setPrinting(bool onOff)
Whether to print to std::cout.
int numberUserFunctions_
Number of user functions.
virtual void solve(CbcSolver *model, const char *options)=0
Solve (whatever that means)
CbcSolver & operator=(const CbcSolver &rhs)
Assignment operator.
Support the use of a call back class to decide whether to stop.
void fillValuesInSolver()
Set default values in solvers from parameters.
virtual void exportData(CbcSolver *)
Export Data (i.e. at very end)
int intValue(CbcOrClpParameterType type) const
Get int value.
OsiClpSolverInterface * originalSolver() const
Copy of model on initial load (will contain output solutions)