10 #define _MP_model_hpp_
19 #include <CoinPackedVector.hpp>
20 class OsiSolverInterface;
37 virtual void logMessage(
int level,
const char *
const msg){}
42 virtual void statistics(
int bm,
int m,
int bn,
int n,
int nz) {}
54 virtual void statistics(
int bm,
int m,
int bn,
int n,
int nz);
64 virtual void constraintDebug(std::string name,
const std::vector<Coef>& cfs);
191 void attach(OsiSolverInterface *solver=NULL);
239 typedef std::set<MP_variable* >::iterator
varIt;
240 typedef std::set<MP_constraint* >::iterator
conIt;
249 static void assemble(std::vector<Coef>& v, std::vector<Coef>& av);
MP_status getStatus() const
Returns the current status of the model-solver interaction. This method will return the current under...
OsiSolverInterface * operator->()
allows access to the OsiSolverInterface *
Symbolic representation of a linear expression.This is one of the main public interface classes...
MP_model(OsiSolverInterface *s, Messenger *m=new NormalMessenger)
Constructs an MP_model from an OsiSolverInterface *.
std::ostream & operator<<(std::ostream &os, const MP_model::MP_status &condition)
allows print of result from call to solve();
static void assemble(std::vector< Coef > &v, std::vector< Coef > &av)
static MP_model * getCurrentModel()
double getInfinity() const
std::set< MP_constraint * >::iterator conIt
Messenger * getMessenger()
MP_model & add(MP_constraint &c)
Adds a constrataint block to the model.
std::set< MP_variable * >::iterator varIt
Inteface for hooking up to internal flopc++ message handling.In more advanced use of FlopC++...
virtual void statistics(int bm, int m, int bn, int n, int nz)
virtual void constraintDebug(std::string name, const std::vector< Coef > &cfs)
std::set< MP_variable * > Variables
virtual void generationTime(double t)
MP_model & operator=(const MP_model &)
void setObjective(const MP_expression &o)
sets the "current objective" to the parameter o
void addRow(const Constraint &c)
Adds a constraint to the MP_model.
const double * rowActivity
static MP_model * current_model
void verbose()
used to help understanding and debugging FlopC++'s behavior.
A solver is attached, but not yet solved.
MP_status
Reflects the state of the solution from solve()
This is the anchor point for all constructs in a FlopC++ model.The constructors take an OsiSolverInte...
virtual void statistics(int bm, int m, int bn, int n, int nz)
OsiSolverInterface * Solver
if solve is called and solver finds model primal infeasible.
MP_model::MP_status solve(const MP_model::MP_direction &dir)
void silent()
used to silence FlopC++
void minimize_max(MP_set &d, const MP_expression &obj)
Symantic representation of a variable.This is one of the main public interface classes. It should be directly declared by clients of the FlopC++. The parametersof construction are MP_set s which specify the indexes over which the variable is defined.
if solve is called and solver finds the model dual infeasible.
Representation of a set for indexing into some other construct.This is one of the main public interfa...
const double * reducedCost
virtual void objectiveDebug(const std::vector< Coef > &cfs)
virtual void constraintDebug(std::string name, const std::vector< Coef > &cfs)
static MP_model & default_model
static MP_model & getDefaultModel()
if the solve method is called and the optimal solution found.
void setSolver(OsiSolverInterface *s)
allows for replacement of the solver used.
virtual void logMessage(int level, const char *const msg)
MP_direction
used when calling the solve() method.
virtual void objectiveDebug(const std::vector< Coef > &cfs)
void detach()
detaches an OsiSolverInterface object from the model. In essence, this will clean up any intermediate...
void attach(OsiSolverInterface *solver=NULL)
attaches the symantic representation of a model and data to a particular OsiSolverInterface ...
std::set< MP_constraint * > Constraints
virtual void generationTime(double t)
Semantic representation of a linear constraint.This is one of the main public interface classes...