16 #ifndef DECOMP_MODEL_INCLUDED
17 #define DECOMP_MODEL_INCLUDED
24 #ifdef __DECOMP_IP_SYMPHONY__
26 #include "OsiSymSolverInterface.hpp"
76 std::string modelName,
88 #ifdef __DECOMP_IP_SYMPHONY__
89 OsiSymSolverInterface* osi_Sym;
135 std::map<int, int>::const_iterator mcit;
137 for (mcit = origToSparse.begin();
138 mcit != origToSparse.end(); mcit++) {
140 objCoeff[mcit->first]);
149 const double* colUB) {
159 std::map<int, int>::const_iterator mcit;
161 for (mcit = origToSparse.begin();
162 mcit != origToSparse.end(); mcit++) {
173 if (activeColumns.size()) {
174 std::vector<int>::iterator vi;
176 for (vi = activeColumns.begin(); vi != activeColumns.end(); vi++) {
203 const bool isXSparse =
false,
204 const int logLevel = 0,
205 const double feasVarTol = 1.0e-5,
206 const double feasConTol = 1.0e-4);
212 #ifdef __DECOMP_IP_SYMPHONY__
230 #ifdef __DECOMP_IP_SYMPHONY__
240 std::string modelName,
244 #ifdef __DECOMP_IP_SYMPHONY__
virtual void setColLower(int elementIndex, double elementValue)=0
Set a single column lower bound.
void setOsi(OsiSolverInterface *osi)
DecompConstraintSet * getModel() const
DecompAlgoModel(const DecompAppModel &appModel)
virtual void setObjCoeff(int elementIndex, double elementValue)=0
Set an objective function coefficient.
const int getBlockId() const
virtual void setColBounds(int elementIndex, double lower, double upper)
Set a single column lower and upper bound.
virtual int getNumCols() const =0
Get the number of columns.
std::vector< int > activeColumns
const bool isSparse() const
void setOsiObjCoeff(const double *objCoeff)
virtual void setColUpper(int elementIndex, double elementValue)=0
Set a single column upper bound.
void setModel(DecompConstraintSet *model)
DecompAppModel & operator=(const DecompAppModel &rhs)
const std::string & getModelName() const
void UtilIotaN(int *first, const int size, const int init)
DecompAppModel(DecompConstraintSet *model, std::string modelName, int blockId)
virtual void setObjCoeffSet(const int *indexFirst, const int *indexLast, const double *coeffList)
Set a set of objective function coefficients.
void setCounter(const int num)
bool isPointFeasible(const double *x, const bool isXSparse=false, const int logLevel=0, const double feasVarTol=1.0e-5, const double feasConTol=1.0e-4)
void solveOsiAsIp(DecompSolverResult *result, DecompParam ¶m, bool doExact, bool doCutoff, bool isRoot, double cutoff, double timeLimit)
DecompAlgoModel & operator=(const DecompAppModel &rhs)
#define UtilExceptionMemory(methodN, classN)
OsiSolverInterface * getOsi() const
const std::map< int, int > & getMapOrigToSparse() const
void setActiveColBounds(const double *colLB, const double *colUB)
Abstract Base Class for describing an interface to a solver.
DecompAlgoModel(DecompConstraintSet *model, std::string modelName, int blockId)
void setModelName(const std::string modelName)
void setBlockId(const int blockId)
Abstract base class for warm start information.
DecompConstraintSet * m_model
virtual ~DecompAppModel()
DecompAppModel(const DecompAppModel &appModel)
Storage of solver result.
OsiSolverInterface * m_osi