1#ifndef CYCLUS_SRC_SOLVER_FACTORY_H_
2#define CYCLUS_SRC_SOLVER_FACTORY_H_
8#include "CbcEventHandler.hpp"
10class OsiSolverInterface;
25 virtual CbcEventHandler*
clone();
27 inline double time()
const {
return time_; }
28 inline double obj()
const {
return obj_; }
29 inline bool found()
const {
return found_; }
51 inline void solver_t(std::string t) { t_ = t; }
52 inline const std::string
solver_t()
const {
return t_; }
56 OsiSolverInterface*
get();
64void SolveProg(OsiSolverInterface*
si,
bool verbose);
An event handler that records the time that a better solution is found.
virtual CbcEventHandler::CbcAction event(CbcEvent e)
ObjValueHandler & operator=(const ObjValueHandler &other)
ObjValueHandler(double obj, double time, bool found)
virtual CbcEventHandler * clone()
virtual ~ObjValueHandler()
A factory class that, given a configuration, returns a Coin::OsiSolverInterface for a solver.
OsiSolverInterface * get()
get the configured solver
const std::string solver_t() const
SolverFactory()
currently supported solver types are 'clp' and 'cbc'
void solver_t(std::string t)
get/set the solver type
taken directly from OsiSolverInterface.cpp on 2/17/14 from https://projects.coin-or....
void SolveProg(OsiSolverInterface *si, double greedy_obj, bool verbose)
bool HasInt(OsiSolverInterface *si)
int CbcCallBack(CbcModel *model, int from)
this is taken exactly from driver4.cpp in the Cbc examples
T OptionalQuery(InfileTree *tree, std::string query, T default_val)
a query method for optional parameters