23 #include "CoinMessageHandler.hpp" 24 #include "OsiClpSolverInterface.hpp" 26 #if CBC_OTHER_SOLVER==1 27 #include "OsiCpxSolverInterface.hpp" 31 #include "CbcOrClpParam.hpp" 35 class CglCutGenerator;
67 int solve(
int argc,
const char * argv[],
int returnMode);
74 int solve(
const char * input,
int returnMode);
115 int *
analyze(OsiClpSolverInterface * solverMod,
int & numberChanged,
double & increment,
116 bool changeInt, CoinMessageHandler * generalMessageHandler);
129 void updateModel(ClpSimplex * model2,
int returnMode);
133 int intValue(CbcOrClpParameterType type)
const;
136 void setIntValue(CbcOrClpParameterType type,
int value);
138 double doubleValue(CbcOrClpParameterType type)
const;
153 return numberUserFunctions_;
157 return userFunction_;
161 return originalSolver_;
165 return originalCoinModel_;
173 return numberCutGenerators_;
177 return cutGenerator_;
185 noPrinting_ = !onOff;
210 int * statusUserFunction_;
212 OsiClpSolverInterface * originalSolver_;
214 CoinModel * originalCoinModel_;
216 CglCutGenerator ** cutGenerator_;
218 int numberUserFunctions_;
220 int numberCutGenerators_;
226 CbcOrClpParam * parameters_;
228 int numberParameters_ ;
286 CbcOrClpParam parameters_[CBCMAXPARAMETERS];
332 int ,
const char * = NULL) {}
344 inline CoinModel *coinModel()
const {
353 inline std::string
name()
const {
359 virtual bool canDo(
const char * options) = 0;
374 virtual CbcUser * clone()
const = 0;
void fillValuesInSolver()
Set default values in solvers from parameters.
virtual void * stuff()
Other info - needs expanding.
CbcUser * userFunction(const char *name) const
User function (NULL if no match)
virtual void exportSolution(CbcSolver *, int, const char *=NULL)
Export.
CbcModel * model()
Return original Cbc model.
void setOriginalCoinModel(CoinModel *originalCoinModel)
Copy of model on initial load.
double startTime() const
Start time.
OsiClpSolverInterface * originalSolver() const
Copy of model on initial load (will contain output solutions)
std::string userName_
Name of user function.
CglCutGenerator ** cutGeneratorArray() const
Cut generator array.
virtual void exportData(CbcSolver *)
Export Data (i.e. at very end)
void setReadMode(int value)
Where to start reading commands.
int intValue(CbcOrClpParameterType type) const
Get int value.
double doubleValue(CbcOrClpParameterType type) const
Get double value.
void addCutGenerator(CglCutGenerator *generator)
Add cut generator.
int CbcMain1(int argc, const char *argv[], CbcModel &babSolver, int(CbcModel *currentSolver, int whereFrom), CbcSolverUsefulData &solverData)
A class to allow the use of unknown user functionality.
Support the use of a call back class to decide whether to stop.
void CbcMain0(CbcModel &babSolver, CbcSolverUsefulData &solverData)
And this uses it.
This allows the use of the standalone solver in a flexible manner.
virtual void fillInformation(CbcSolver *, CbcSolverUsefulData &)
Get useful stuff.
CbcModel * babModel()
Return updated Cbc model.
void fillParameters()
Fill with standard parameters.
void setIntValue(CbcOrClpParameterType type, int value)
Set int value.
void setDoubleValue(CbcOrClpParameterType type, double value)
Set double value.
CoinModel * originalCoinModel() const
Copy of model on initial load.
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...
virtual int importData(CbcSolver *, int &, char **)
Import - gets full command arguments.
The CbcSolver class was taken out at a 9/12/09 meeting This is a feeble replacement.
virtual int callBack(CbcModel *, int)
Import.
void updateModel(ClpSimplex *model2, int returnMode)
1 - add heuristics to model 2 - do heuristics (and set cutoff and best solution) 3 - for miplib test ...
void addUserFunction(CbcUser *function)
Add user function.
CbcUser ** userFunctionArray() const
User function array.
int numberUserFunctions() const
Number of userFunctions.
std::string name() const
Name.
CoinModel * coinModel_
CoinModel.
void setOriginalSolver(OsiClpSolverInterface *originalSolver)
Copy of model on initial load (will contain output solutions)
void setPrinting(bool onOff)
Whether to print to std::cout.
int numberCutGenerators() const
Number of cutgenerators.
Simple Branch and bound class.
Structure to hold useful arrays.
int * analyze(OsiClpSolverInterface *solverMod, int &numberChanged, double &increment, bool changeInt, CoinMessageHandler *generalMessageHandler)
CbcSolver & operator=(const CbcSolver &rhs)
Assignment operator.
void setUserCallBack(CbcStopNow *function)
Set user call back.
CbcSolver()
Default Constructor.