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;
155 return numberUserFunctions_;
160 return userFunction_;
165 return originalSolver_;
170 return originalCoinModel_;
179 return numberCutGenerators_;
184 return cutGenerator_;
194 noPrinting_ = !onOff;
220 int *statusUserFunction_;
222 OsiClpSolverInterface *originalSolver_;
224 CoinModel *originalCoinModel_;
226 CglCutGenerator **cutGenerator_;
228 int numberUserFunctions_;
230 int numberCutGenerators_;
236 std::vector< CbcOrClpParam > parameters_;
339 int ,
const char * = NULL) {}
351 inline CoinModel *coinModel()
const 362 inline std::string
name()
const 369 virtual bool canDo(
const char *options) = 0;
384 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.
std::vector< CbcOrClpParam > parameters_
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.