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;
CbcUser ** userFunctionArray() const
User function array.
void fillValuesInSolver()
Set default values in solvers from parameters.
int intValue(CbcOrClpParameterType type) const
Get int value.
virtual void * stuff()
Other info - needs expanding.
int numberCutGenerators() const
Number of cutgenerators.
virtual void exportSolution(CbcSolver *, int, const char *=NULL)
Export.
CoinModel * originalCoinModel() const
Copy of model on initial load.
CbcModel * model()
Return original Cbc model.
void setOriginalCoinModel(CoinModel *originalCoinModel)
Copy of model on initial load.
std::string userName_
Name of user function.
virtual void exportData(CbcSolver *)
Export Data (i.e. at very end)
void setReadMode(int value)
Where to start reading commands.
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.
CbcUser * userFunction(const char *name) const
User function (NULL if no match)
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.
double startTime() const
Start time.
void setDoubleValue(CbcOrClpParameterType type, double value)
Set double value.
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.
CglCutGenerator ** cutGeneratorArray() const
Cut generator array.
double doubleValue(CbcOrClpParameterType type) const
Get double value.
CoinModel * coinModel_
CoinModel.
std::string name() const
Name.
int numberUserFunctions() const
Number of userFunctions.
void setOriginalSolver(OsiClpSolverInterface *originalSolver)
Copy of model on initial load (will contain output solutions)
void setPrinting(bool onOff)
Whether to print to std::cout.
OsiClpSolverInterface * originalSolver() const
Copy of model on initial load (will contain output solutions)
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.