12void Report(OsiSolverInterface* iface) {
13 std::cout << iface->getNumCols() <<
" total variables, "
14 << iface->getNumIntegers() <<
" integer.\n";
15 std::cout << iface->getNumRows() <<
" constraints\n";
19 : solver_t_(solver_t),
26 : solver_t_(solver_t),
33 : solver_t_(solver_t),
40 bool verbose,
bool mps)
41 : solver_t_(solver_t),
49void ProgSolver::WriteMPS() {
52 iface_->writeMps(ss.str().c_str());
78 iface_->passInMessageHandler(&h);
80 std::cout <<
"Solving problem, message handler has log level of "
81 << iface_->messageHandler()->logLevel() <<
"\n";
92 double ret = iface_->getObjValue();
virtual int time()
Returns the current simulation timestep.
void ClearMatches()
clears all matches
a very simple interface for solving translated resource exchanges
double Solve(ExchangeGraph *graph=NULL)
interface for solving a given exchange graph
double PseudoCost()
Calculates the ratio of the maximum objective coefficient to minimum unit capacity plus an added cost...
The GreedySolver provides the implementation for a "greedy" solution to a resource exchange graph.
The ProgSolver provides the implementation for a mathematical programming solution to a resource exch...
virtual double SolveGraph()
the ProgSolver solves an ExchangeGraph...
ProgSolver(std::string solver_t)
a helper class to translate a product exchange into a mathematical program.
void FromProg()
translates solution from iface back into graph matches
void ToProg()
translates graph into mathematic program via iface.
A factory class that, given a configuration, returns a Coin::OsiSolverInterface for a solver.
OsiSolverInterface * get()
get the configured solver
taken directly from OsiSolverInterface.cpp on 2/17/14 from https://projects.coin-or....
void Report(OsiSolverInterface *iface)
void SolveProg(OsiSolverInterface *si, double greedy_obj, bool verbose)