Dip  0.92.4
OsiNullSolverInterface2.hpp
Go to the documentation of this file.
1 // Copyright (C) 2000, International Business Machines
2 // Corporation and others. All Rights Reserved.
3 #ifndef OsiNullSolverInterface_H
4 #define OsiNullSolverInterface_H
5 
6 #include <string>
7 #include <vector>
8 
9 #include "CoinMessageHandler.hpp"
10 #include "CoinPackedVectorBase.hpp"
11 
12 #include "OsiData.hpp"
13 #include "OsiCollections.hpp"
14 #include "OsiSolverParameters.hpp"
15 
16 class CoinPackedMatrix;
17 class CoinWarmStart;
18 
19 class OsiCuts;
20 class OsiAuxInfo;
21 class OsiRowCut;
22 class OsiRowCutDebugger;
23 class CoinSet;
24 class CoinBuild;
25 class CoinModel;
26 class OsiSolverBranch;
27 class OsiSolverResult;
28 #include "CoinFinite.hpp"
29 
30 #ifndef COIN_DBL_MAX
31 static const double OsiNullInfinity = DBL_MAX;
32 #else
33 static const double OsiNullInfinity = COIN_DBL_MAX;
34 #endif
35 
36 //#############################################################################
37 
39 
40 public:
42 
43  virtual void initialSolve(){
45  CoinAssertHint(0, "OsiNull does not have a solver");
46  };
47 
49  virtual void resolve(){
50  CoinAssertHint(0, "OsiNull does not have a solver");
51  }
52 
54  virtual void branchAndBound(){
55  CoinAssertHint(0, "OsiNull does not have a solver");
56  }
58  // Set an integer parameter
59  // copy all parameters in this section from one solver to another
62 
63  //------------------------------------------------------------------------
65 
66  virtual bool isAbandoned() const{
68  CoinAssertHint(0, "OsiNull does not have a solver");
69  return false;
70  }
72  virtual bool isProvenOptimal() const{
73  CoinAssertHint(0, "OsiNull does not have a solver");
74  return false;
75  }
77  virtual bool isProvenPrimalInfeasible() const{
78  CoinAssertHint(0, "OsiNull does not have a solver");
79  return false;
80  }
82  virtual bool isProvenDualInfeasible() const{
83  CoinAssertHint(0, "OsiNull does not have a solver");
84  return false;
85  }
87  virtual bool isPrimalObjectiveLimitReached() const{
88  CoinAssertHint(0, "OsiNull does not have a solver");
89  return false;
90  }
92  virtual bool isDualObjectiveLimitReached() const{
93  CoinAssertHint(0, "OsiNull does not have a solver");
94  return false;
95  }
97  virtual bool isIterationLimitReached() const{
98  CoinAssertHint(0, "OsiNull does not have a solver");
99  return false;
100  }
102 
103  //------------------------------------------------------------------------
121  virtual CoinWarmStart *getEmptyWarmStart () const {
122  CoinAssertHint(0, "OsiNull does not have a solver");
123  return NULL;
124  }
125 
132  virtual CoinWarmStart* getWarmStart() const {
133  CoinAssertHint(0, "OsiNull does not have a solver");
134  return NULL;
135  }
136 
144  virtual bool setWarmStart(const CoinWarmStart* warmstart){
145  CoinAssertHint(0, "OsiNull does not have a solver");
146  return false;
147  }
149 
150  //------------------------------------------------------------------------
161  virtual int getNumCols() const {
163  return data_->getNcol();
164  };
165 
167  virtual int getNumRows() const {
168  return data_->getNrow();
169  };
170 
172  virtual int getNumElements() const {
173  const CoinPackedMatrix * Mrow = data_->getMatrixByRow();
174  const CoinPackedMatrix * Mcol = data_->getMatrixByCol();
175  if(Mrow){
176  return Mrow->getNumElements();
177  } else if(Mcol){
178  return Mcol->getNumElements();
179  }
180  return 0;
181  };
182 
184  virtual int getNumIntegers() const {
185  int i, nInt = 0;
186  const char * colType = data_->getColType();
187  for(i = 0; i < getNumCols(); i++){
188  if(colType[i] == 'B' || colType[i] == 'I')
189  nInt++;
190  }
191  return nInt;
192  }
193 
195  virtual const double * getColLower() const {
196  return data_->getColLower();
197  }
198 
200  virtual const double * getColUpper() const {
201  return data_->getColUpper();
202  }
203 
213  virtual const char * getRowSense() const {
214 
227  return data_->getRowSense();
228  }
229 
230  virtual const double * getRightHandSide() const {
231 
240  return data_->getRowRhs();
241  }
242 
243  virtual const double * getRowRange() const {
244  return data_->getRowRange();
245  }
246 
248  virtual const double * getRowLower() const {
249  return data_->getRowLower();
250  }
251 
253  virtual const double * getRowUpper() const {
254  return data_->getRowUpper();
255  }
256 
258  virtual const double * getObjCoefficients() const {
259  return data_->getObj();
260  }
261 
263  virtual double getObjSense() const {
264  CoinAssertHint(0, "Sorry, not implemented yet.");
265  return 1;
266  }
267 
269  virtual bool isContinuous(int colIndex) const {
270  return data_->getColType()[colIndex] == 'C';
271  }
272 
274  virtual bool isBinary(int colIndex) const {
275  return data_->getColType()[colIndex] == 'B';
276  }
277 
282  virtual bool isInteger(int colIndex) const {
283  return (data_->getColType()[colIndex] == 'B' ||
284  data_->getColType()[colIndex] == 'I' );
285  }
286 
288  virtual const CoinPackedMatrix * getMatrixByRow() const {
289  return data_->getMatrixByRow();
290  }
291 
293  virtual const CoinPackedMatrix * getMatrixByCol() const {
294  return data_->getMatrixByCol();
295  }
297  virtual double getInfinity() const {
298  return data_->getInfinity();
299  }
301 
304  virtual const double * getColSolution() const {
306  return data_->getPrimalSol();
307  }
308 
310  //TODO: let user enter dual sol also
311  virtual const double * getRowPrice() const {
312  CoinAssertHint(0, "Sorry, not implemented yet.");
313  return NULL;
314  }
315 
317  virtual const double * getReducedCost() const {
318  CoinAssertHint(0, "Sorry, not implemented yet.");
319  return NULL;
320  }
321 
324  virtual const double * getRowActivity() const {
325  return data_->getRowActivity();
326  }
327 
329  virtual double getObjValue() const {
330  CoinAssertHint(0, "Sorry, not implemented yet.");
331  return 0.0;
332  }
333 
336  virtual int getIterationCount() const {
337  CoinAssertHint(0, "OsiNull does not have a solver");
338  }
339 
353  virtual std::vector<double*> getDualRays(int maxNumRays) const {
365  CoinAssertHint(0, "OsiNull does not have a solver");
366  }
367 
368  virtual std::vector<double*> getPrimalRays(int maxNumRays) const {
369  CoinAssertHint(0, "OsiNull does not have a solver");
370  }
371 
372  //-------------------------------------------------------------------------
383 
385  virtual void setObjCoeff( int elementIndex, double elementValue ) {
386  CoinAssertHint(0, "Sorry, not implemented yet.");
387  }
388 
391  virtual void setColLower( int elementIndex, double elementValue ) {
392  CoinAssertHint(0, "Sorry, not implemented yet.");
393  }
394 
397  virtual void setColUpper( int elementIndex, double elementValue ) {
398  CoinAssertHint(0, "Sorry, not implemented yet.");
399  }
400 
403  virtual void setRowLower( int elementIndex, double elementValue ) {
404  CoinAssertHint(0, "Sorry, not implemented yet.");
405  }
406 
409  virtual void setRowUpper( int elementIndex, double elementValue ) {
410  CoinAssertHint(0, "Sorry, not implemented yet.");
411  }
412 
414  virtual void setRowType(int index, char sense, double rightHandSide,
415  double range) {
416  CoinAssertHint(0, "Sorry, not implemented yet.");
417  }
418 
421  virtual void setObjSense(double s) {
422  CoinAssertHint(0, "Sorry, not implemented yet.");
423  }
424 
433  virtual void setColType(const char * colType){
434  data_->setColType(colType);
435  }
436 
437  /*
438  Set the primal solution variable values
439 
440  colsol[getNumCols()] is an array of values for the primal variables.
441  These values are copied to memory owned by the solver interface object
442  or the solver. They will be returned as the result of getColSolution()
443  until changed by another call to setColSolution() or by a call to any
444  solver routine. Whether the solver makes use of the solution in any
445  way is solver-dependent.
446  */
447  virtual void setColSolution(const double *colsol) {
448  data_->setPrimalSol(colsol);
449  }
450 
451 
462  virtual void setRowPrice(const double * rowprice) {
463  CoinAssertHint(0, "Sorry, not implemented yet.");
464  }
465 
466  //-------------------------------------------------------------------------
470  virtual void setContinuous(int index) {
471  CoinAssertHint(0, "Sorry, not implemented yet.");
472  }
473 
475  virtual void setInteger(int index) {
476  CoinAssertHint(0, "Sorry, not implemented yet.");
477  }
478 
482  //-------------------------------------------------------------------------
483 
484  //-------------------------------------------------------------------------
492  virtual void addCol(const CoinPackedVectorBase& vec,
493  const double collb, const double colub,
494  const double obj) {
495  CoinAssertHint(0, "Sorry, not implemented yet.");
496  }
497 
504  virtual void deleteCols(const int num, const int * colIndices) {
505  CoinAssertHint(0, "Sorry, not implemented yet.");
506  }
507 
509  virtual void addRow(const CoinPackedVectorBase& vec,
510  const double rowlb, const double rowub) {
511  CoinAssertHint(0, "Sorry, not implemented yet.");
512  }
513 
515  virtual void addRow(const CoinPackedVectorBase& vec,
516  const char rowsen, const double rowrhs,
517  const double rowrng) {
518  CoinAssertHint(0, "Sorry, not implemented yet.");
519  }
520 
526  virtual void deleteRows(const int num, const int * rowIndices) {
527  CoinAssertHint(0, "Sorry, not implemented yet.");
528  }
529 
530 
531 
532  //---------------------------------------------------------------------
534  //TODO: ugh force both row/col format?
535  void loadDataAndSolution(const CoinPackedMatrix & rowMatrix,
536  const CoinPackedMatrix & colMatrix,
537  const double * collb,
538  const double * colub,
539  const double * obj,
540  const double * rowlb,
541  const double * rowub,
542  const char * colType,
543  const double * primalSol,
544  const double infinity){
545  data_->setMatrixByRow(&rowMatrix);
546  data_->setMatrixByCol(&colMatrix);
547  data_->setNrow(rowMatrix.getNumRows());
548  data_->setNcol(rowMatrix.getNumCols());
549  data_->setColLower(collb);
550  data_->setColUpper(colub);
551  data_->setRowLower(rowlb);
552  data_->setRowUpper(rowub);
553  data_->setObj(obj);
554  data_->setColType(colType);
555  data_->setPrimalSol(primalSol);
556  data_->setInfinity(infinity);
558  }
559 
560 
561 
563 
574  virtual void loadProblem(const CoinPackedMatrix & matrix,
575  const double * collb,
576  const double * colub,
577  const double * obj,
578  const double * rowlb,
579  const double * rowub){
580  CoinAssertHint(0, "Sorry, not implemented yet.");
581  }
582 
583  //TODO: version that passes in rhs/ranges/sense and converts to bounds
584 
594  virtual void assignProblem(CoinPackedMatrix*& matrix,
595  double*& collb, double*& colub, double*& obj,
596  double*& rowlb, double*& rowub) {
597  CoinAssertHint(0, "Sorry, not implemented yet.");
598  }
599 
612  virtual void loadProblem(const CoinPackedMatrix& matrix,
613  const double* collb, const double* colub,
614  const double* obj,
615  const char* rowsen, const double* rowrhs,
616  const double* rowrng) {
617  CoinAssertHint(0, "Sorry, not implemented yet.");
618  }
619 
629  virtual void assignProblem(CoinPackedMatrix*& matrix,
630  double*& collb, double*& colub, double*& obj,
631  char*& rowsen, double*& rowrhs,
632  double*& rowrng) {
633  CoinAssertHint(0, "Sorry, not implemented yet.");
634  }
635 
638  virtual void loadProblem(const int numcols, const int numrows,
639  const CoinBigIndex * start, const int* index,
640  const double* value,
641  const double* collb, const double* colub,
642  const double* obj,
643  const double* rowlb, const double* rowub) {
644  CoinAssertHint(0, "Sorry, not implemented yet.");
645  }
646 
649  virtual void loadProblem(const int numcols, const int numrows,
650  const CoinBigIndex * start, const int* index,
651  const double* value,
652  const double* collb, const double* colub,
653  const double* obj,
654  const char* rowsen, const double* rowrhs,
655  const double* rowrng) {
656  CoinAssertHint(0, "Sorry, not implemented yet.");
657  }
658 
665  virtual void writeMps(const char *filename,
666  const char *extension = "mps",
667  double objSense=0.0) const {
668  CoinAssertHint(0, "Sorry, not implemented yet.");
669  }
670 
671  //-----------------------------------------------------------------------
672 
674 
678  data_(NULL)
679  {
681  }
682 
688  virtual OsiNullSolverInterface * clone(bool copyData = true) const {
689  CoinAssertHint(0, "Sorry, not implemented yet.");
690  return NULL;
691  }
692 
695 
698 
701  delete data_;
702  }
703 
705 
706  //------------------------------------------------------------------------
707 
708 protected:
710 
711 
712  virtual void applyRowCut( const OsiRowCut & rc ) {
713  CoinAssertHint(0, "OsiNull does not have a solver");
714  }
715 
717  virtual void applyColCut( const OsiColCut & cc ) {
718  CoinAssertHint(0, "OsiNull does not have a solver");
719  }
722  template <class T> inline T
723  forceIntoRange(const T value, const T lower, const T upper) const {
724  return value < lower ? lower : (value > upper ? upper : value);
725  }
727 
728  //---------------------------------------------------------------------
729 protected:
730  OsiData * data_;
731 };
732 
733 #endif
int getNcol() const
Get ncol.
Definition: OsiData.hpp:51
int CoinBigIndex
const char * getRowSense() const
Get rowSense.
Definition: OsiData.hpp:123
virtual const double * getRowActivity() const
Get pointer to array[getNumRows()] of row activity levels (constraint matrix times the solution vecto...
virtual void setRowLower(const double *givenRowLower)
Set rowLower to point on a vector holding the lower bounds on the constraints.
Definition: OsiData.hpp:99
virtual void assignProblem(CoinPackedMatrix *&matrix, double *&collb, double *&colub, double *&obj, double *&rowlb, double *&rowub)
Load in an problem by assuming ownership of the arguments (the constraints on the rows are given by l...
virtual std::vector< double * > getPrimalRays(int maxNumRays) const
Get pointer to array[getNumCols()] of primal variable values.
const char * getColType() const
Get colType.
Definition: OsiData.hpp:138
This is a simple minded model which is stored in a format which makes it easier to construct and modi...
Definition: CoinModel.hpp:181
virtual bool isAbandoned() const
Are there numerical difficulties?
T forceIntoRange(const T value, const T lower, const T upper) const
A quick inlined function to force a value to be between a minimum and a maximum value.
virtual void setNrow(const int givenNrow)
Set nrow to the number of rows.
Definition: OsiData.hpp:38
const double * getObj() const
Get obj.
Definition: OsiData.hpp:77
Column Cut Class.
Definition: OsiColCut.hpp:23
OsiNullSolverInterface & operator=(const OsiNullSolverInterface &rhs)
Assignment operator (disabled)
virtual const double * getRowLower() const
Get pointer to array[getNumRows()] of row lower bounds.
void loadDataAndSolution(const CoinPackedMatrix &rowMatrix, const CoinPackedMatrix &colMatrix, const double *collb, const double *colub, const double *obj, const double *rowlb, const double *rowub, const char *colType, const double *primalSol, const double infinity)
Load in an problem by copying the arguments (the constraints on the rows are given by lower and upper...
Row Cut Class.
Definition: OsiRowCut.hpp:29
virtual bool isProvenPrimalInfeasible() const
Is primal infeasiblity proven?
virtual void setRowLower(int elementIndex, double elementValue)
Set a single row lower bound.
virtual void setObj(const double *givenObj)
Set obj to point on a vector holding the objective coefficient values.
Definition: OsiData.hpp:72
const CoinPackedMatrix * getMatrixByRow() const
Get matrixByRow.
Definition: OsiData.hpp:69
virtual void setColLower(const double *givenColLower)
Set colLower to point on a vector holding the lower bounds on the variables.
Definition: OsiData.hpp:81
virtual void assignProblem(CoinPackedMatrix *&matrix, double *&collb, double *&colub, double *&obj, char *&rowsen, double *&rowrhs, double *&rowrng)
Load in an problem by assuming ownership of the arguments (the constraints on the rows are given by s...
const double * getRowRhs() const
Set rowRhs to point on a vector holding the right hand side of the constraints (for a ranged constrai...
Definition: OsiData.hpp:119
virtual void setInfinity(const double givenInfinity)
Set infinity.
Definition: OsiData.hpp:30
This class allows for a more structured use of algorithmic tweaking to an OsiSolverInterface.
Definition: OsiAuxInfo.hpp:21
virtual int getNumRows() const
Get number of rows.
virtual const double * getRightHandSide() const
Get a pointer to an array[getNumRows()] of row right-hand sides.
virtual void setPrimalSol(const double *givenPrimalSol)
Set primal solution.
Definition: OsiData.hpp:141
virtual double getObjSense() const
Get objective function sense (1 for min (default), -1 for max)
virtual const CoinPackedMatrix * getMatrixByCol() const
Get pointer to column-wise copy of matrix.
virtual double getInfinity() const
Get solver&#39;s value for infinity.
virtual bool isBinary(int colIndex) const
Return true if variable is binary.
virtual bool isInteger(int colIndex) const
Return true if column is integer.
int getNumRows() const
Number of rows.
virtual void setColLower(int elementIndex, double elementValue)
Set a single column lower bound.
virtual CoinWarmStart * getWarmStart() const
Get warm start information.
void initializeOtherData()
initialize the non-const data
Definition: OsiData.hpp:149
virtual std::vector< double * > getDualRays(int maxNumRays) const
Get as many dual rays as the solver can provide.
virtual void applyColCut(const OsiColCut &cc)
Apply a column cut (adjust the bounds of one or more variables).
Sparse Matrix Base Class.
virtual int getIterationCount() const
Get the number of iterations it took to solve the problem (whatever ``iteration&#39;&#39; means to the solver...
#define CoinAssertHint(expression, hint)
Definition: CoinError.hpp:184
virtual void deleteRows(const int num, const int *rowIndices)
Delete a set of rows (constraints) from the problem.
virtual bool isPrimalObjectiveLimitReached() const
Is the given primal objective limit reached?
virtual CoinWarmStart * getEmptyWarmStart() const
Get an empty warm start object.
virtual void initialSolve()
Solve initial LP relaxation.
Solver Result Class.
virtual void loadProblem(const CoinPackedMatrix &matrix, const double *collb, const double *colub, const double *obj, const double *rowlb, const double *rowub)
Load in an problem by copying the arguments (the constraints on the rows are given by lower and upper...
Collections of row cuts and column cuts.
Definition: OsiCuts.hpp:19
virtual void branchAndBound()
Invoke solver&#39;s built-in enumeration algorithm.
virtual bool isProvenOptimal() const
Is optimality proven?
virtual bool isDualObjectiveLimitReached() const
Is the given dual objective limit reached?
virtual void setColUpper(const double *givenColUpper)
Set colUpper to point on a vector holding the upper bounds on the variables.
Definition: OsiData.hpp:90
virtual bool isIterationLimitReached() const
Iteration limit reached?
virtual void setRowType(int index, char sense, double rightHandSide, double range)
Set the type of a single row.
Abstract base class for various sparse vectors.
virtual const double * getObjCoefficients() const
Get pointer to array[getNumCols()] of objective function coefficients.
const double * getColUpper() const
Get colUpper.
Definition: OsiData.hpp:95
virtual OsiNullSolverInterface * clone(bool copyData=true) const
Clone.
virtual void addCol(const CoinPackedVectorBase &vec, const double collb, const double colub, const double obj)
Add a column (primal variable) to the problem.
const double * getColLower() const
Get colLower.
Definition: OsiData.hpp:86
virtual void writeMps(const char *filename, const char *extension="mps", double objSense=0.0) const
Write the problem in MPS format to the specified file.
virtual const double * getColSolution() const
Get pointer to array[getNumCols()] of primal variable values.
virtual int getNumIntegers() const
Get number of integer variables.
virtual const double * getRowUpper() const
Get pointer to array[getNumRows()] of row upper bounds.
virtual int getNumCols() const
Get number of columns.
Very simple class for containing data on set.
Definition: CoinMpsIO.hpp:269
virtual bool setWarmStart(const CoinWarmStart *warmstart)
Set warm start information.
const double * getRowLower() const
Get rowLower.
Definition: OsiData.hpp:104
virtual void setInteger(int index)
Set the index-th variable to be an integer variable.
virtual void loadProblem(const int numcols, const int numrows, const CoinBigIndex *start, const int *index, const double *value, const double *collb, const double *colub, const double *obj, const char *rowsen, const double *rowrhs, const double *rowrng)
Just like the other loadProblem() methods except that the matrix is given in a standard column major ...
virtual const double * getRowRange() const
Get number of columns.
OsiNullSolverInterface()
Default Constructor.
virtual void loadProblem(const int numcols, const int numrows, const CoinBigIndex *start, const int *index, const double *value, const double *collb, const double *colub, const double *obj, const double *rowlb, const double *rowub)
Just like the other loadProblem() methods except that the matrix is given in a standard column major ...
virtual void loadProblem(const CoinPackedMatrix &matrix, const double *collb, const double *colub, const double *obj, const char *rowsen, const double *rowrhs, const double *rowrng)
Load in an problem by copying the arguments (the constraints on the rows are given by sense/rhs/range...
virtual const double * getColUpper() const
Get pointer to array[getNumCols()] of column upper bounds.
int getNumCols() const
Number of columns.
This is a first attempt at a message handler.
virtual bool isContinuous(int colIndex) const
Return true if variable is continuous.
virtual const double * getColLower() const
Get pointer to array[getNumCols()] of column lower bounds.
Abstract Base Class for describing an interface to a solver.
virtual void setMatrixByCol(const CoinPackedMatrix *givenMatrixByCol)
Set matrixByCol to point on the coefficient matrix ordered by columns.
Definition: OsiData.hpp:55
const double * getPrimalSol() const
Get primal solution.
Definition: OsiData.hpp:146
virtual void resolve()
Resolve an LP relaxation after problem modification.
virtual void setObjCoeff(int elementIndex, double elementValue)
Set an objective function coefficient.
virtual void setMatrixByRow(const CoinPackedMatrix *givenMatrixByRow)
Set matrixByRow to point on the coefficient matrix ordered by rows.
Definition: OsiData.hpp:64
Class collecting pointers on data for OsiEmpty.
Definition: OsiData.hpp:22
const double COIN_DBL_MAX
Definition: CoinFinite.hpp:18
int getNrow() const
Get nrow.
Definition: OsiData.hpp:43
virtual void setColType(const char *givenColType)
Set colType to point on a vector holding the type of the variables (&#39;B&#39;, &#39;I&#39;, or &#39;C&#39; for Binary...
Definition: OsiData.hpp:133
virtual void setRowPrice(const double *rowprice)
Set dual solution variable values.
virtual void setNcol(const int givenNcol)
Set ncol to the number of variables.
Definition: OsiData.hpp:46
const CoinPackedMatrix * getMatrixByCol() const
Get matrixByCol.
Definition: OsiData.hpp:60
Validate cuts against a known solution.
void copyParameters(OsiNullSolverInterface &rhs)
Solve initial LP relaxation.
Abstract base class for warm start information.
static const double OsiNullInfinity
double getInfinity() const
Get infinity.
Definition: OsiData.hpp:35
virtual const double * getReducedCost() const
Get a pointer to array[getNumCols()] of reduced costs.
virtual void setRowUpper(int elementIndex, double elementValue)
Set a single row upper bound.
virtual void addRow(const CoinPackedVectorBase &vec, const double rowlb, const double rowub)
Add a row (constraint) to the problem.
virtual double getObjValue() const
Get objective function value.
In many cases it is natural to build a model by adding one row at a time.
Definition: CoinBuild.hpp:25
virtual const double * getRowPrice() const
Get pointer to array[getNumRows()] of dual variable values.
const double * getRowRange() const
Get rowRange.
Definition: OsiData.hpp:121
virtual void setColUpper(int elementIndex, double elementValue)
Set a single column upper bound.
virtual ~OsiNullSolverInterface()
Destructor.
virtual const CoinPackedMatrix * getMatrixByRow() const
Get pointer to row-wise copy of matrix.
Solver Branch Class.
virtual void setContinuous(int index)
Set the index-th variable to be a continuous variable.
virtual void addRow(const CoinPackedVectorBase &vec, const char rowsen, const double rowrhs, const double rowrng)
Add a column (primal variable) to the problem.
virtual int getNumElements() const
Get number of nonzero elements.
virtual void deleteCols(const int num, const int *colIndices)
Remove a set of columns (primal variables) from the problem.
CoinBigIndex getNumElements() const
Number of entries in the packed matrix.
virtual bool isProvenDualInfeasible() const
Is dual infeasiblity proven?
virtual void setObjSense(double s)
Set the objective function sense.
const double * getRowUpper() const
Get rowUpper.
Definition: OsiData.hpp:113
virtual void setRowUpper(const double *givenRowUpper)
Set rowUpper to point on a vector holding the upper bounds on the constraints.
Definition: OsiData.hpp:108
virtual void setColType(const char *colType)
Set characters for columns types.
const double * getRowActivity() const
Set rowActivity to point on a vector holding the activity of the constraints (i.e.
Definition: OsiData.hpp:129
virtual void setColSolution(const double *colsol)
Set an objective function coefficient.
virtual const char * getRowSense() const
Get pointer to array[getNumRows()] of row constraint senses.
virtual void applyRowCut(const OsiRowCut &rc)
Apply a row cut (append to the constraint matrix).