Cgl 0.60.2

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
OsiSpxSolverInterface.hpp
Go to the documentation of this file.
1 //-----------------------------------------------------------------------------
2 // name: OSI Interface for SoPlex >= 1.4.2c
3 // authors: Tobias Pfender
4 // Ambros Gleixner
5 // Wei Huang
6 // Konrad-Zuse-Zentrum Berlin (Germany)
7 // email: pfender@zib.de
8 // date: 01/16/2002
9 // license: this file may be freely distributed under the terms of the EPL
10 //-----------------------------------------------------------------------------
11 // Copyright (C) 2002, Tobias Pfender, International Business Machines
12 // Corporation and others. All Rights Reserved.
13 // Last edit: $Id: OsiSpxSolverInterface.hpp 2200 2019-01-06 23:02:02Z unxusr $
14
15 #ifndef OsiSpxSolverInterface_H
16 #define OsiSpxSolverInterface_H
17
18 #include <string>
19 #include "OsiSolverInterface.hpp"
20 #include "CoinWarmStartBasis.hpp"
21
22 #ifndef _SOPLEX_H_
23 /* forward declarations so the header can be compiled without having to include soplex.h
24 * however, these declaration work only for SoPlex < 2.0, so we do them only if soplex.h hasn't been included already
25 */
26 namespace soplex {
27 class DIdxSet;
28 class DVector;
29 class SPxOut;
30 class SoPlex;
31 }
32 #endif
33
37 class OsiSpxSolverInterface : virtual public OsiSolverInterface {
38 friend void OsiSpxSolverInterfaceUnitTest(const std::string &mpsDir, const std::string &netlibDir);
39
40 public:
41 //---------------------------------------------------------------------------
44 virtual void initialSolve();
46
48 virtual void resolve();
49
51 virtual void branchAndBound();
53
54 //---------------------------------------------------------------------------
70 // Set an integer parameter
71 bool setIntParam(OsiIntParam key, int value);
72 // Set an double parameter
73 bool setDblParam(OsiDblParam key, double value);
74 // Get an integer parameter
75 bool getIntParam(OsiIntParam key, int &value) const;
76 // Get an double parameter
77 bool getDblParam(OsiDblParam key, double &value) const;
78 // Get a string parameter
79 bool getStrParam(OsiStrParam key, std::string &value) const;
80 // Set timelimit
81 void setTimeLimit(double value);
82 // Get timelimit
83 double getTimeLimit() const;
85
86 //---------------------------------------------------------------------------
88
89 virtual bool isAbandoned() const;
92 virtual bool isProvenOptimal() const;
94 virtual bool isProvenPrimalInfeasible() const;
96 virtual bool isProvenDualInfeasible() const;
97 // Is the given primal objective limit reached? - use implementation from OsiSolverInterface
99 virtual bool isDualObjectiveLimitReached() const;
101 virtual bool isIterationLimitReached() const;
103 virtual bool isTimeLimitReached() const;
105
106 //---------------------------------------------------------------------------
109 inline CoinWarmStart *getEmptyWarmStart() const
111 {
112 return (dynamic_cast< CoinWarmStart * >(new CoinWarmStartBasis()));
113 }
115 virtual CoinWarmStart *getWarmStart() const;
118 virtual bool setWarmStart(const CoinWarmStart *warmstart);
120
121 //---------------------------------------------------------------------------
128 virtual void markHotStart();
131 virtual void solveFromHotStart();
133 virtual void unmarkHotStart();
135
136 //---------------------------------------------------------------------------
151 virtual int getNumCols() const;
153
155 virtual int getNumRows() const;
156
158 virtual int getNumElements() const;
159
161 virtual const double *getColLower() const;
162
164 virtual const double *getColUpper() const;
165
175 virtual const char *getRowSense() const;
176
185 virtual const double *getRightHandSide() const;
186
195 virtual const double *getRowRange() const;
196
198 virtual const double *getRowLower() const;
199
201 virtual const double *getRowUpper() const;
202
204 virtual const double *getObjCoefficients() const;
205
207 virtual double getObjSense() const;
208
210 virtual bool isContinuous(int colNumber) const;
211
212 #if 0
213 virtual bool isBinary(int columnNumber) const;
215
220 virtual bool isInteger(int columnNumber) const;
221
223 virtual bool isIntegerNonBinary(int columnNumber) const;
224
226 virtual bool isFreeBinary(int columnNumber) const;
227 #endif
228
230 virtual const CoinPackedMatrix *getMatrixByRow() const;
231
233 virtual const CoinPackedMatrix *getMatrixByCol() const;
234
236 virtual double getInfinity() const;
238
241 virtual const double *getColSolution() const;
243
245 virtual const double *getRowPrice() const;
246
248 virtual const double *getReducedCost() const;
249
252 virtual const double *getRowActivity() const;
253
255 virtual double getObjValue() const;
256
259 virtual int getIterationCount() const;
260
278 virtual std::vector< double * > getDualRays(int maxNumRays,
279 bool fullRay = false) const;
291 virtual std::vector< double * > getPrimalRays(int maxNumRays) const;
292
293 #if 0
294
296 virtual OsiVectorInt getFractionalIndices(const double etol=1.e-05)
297 const;
298 #endif
299
300
301
302 //---------------------------------------------------------------------------
303
306 //-------------------------------------------------------------------------
310 virtual void setObjCoeff(int elementIndex, double elementValue);
311
314 virtual void setColLower(int elementIndex, double elementValue);
315
318 virtual void setColUpper(int elementIndex, double elementValue);
319
323 virtual void setColBounds(int elementIndex,
324 double lower, double upper);
325
326 #if 0 // we are using the default implementation of OsiSolverInterface
327
335 virtual void setColSetBounds(const int* indexFirst,
336 const int* indexLast,
337 const double* boundList);
338 #endif
339
342 virtual void setRowLower(int elementIndex, double elementValue);
343
346 virtual void setRowUpper(int elementIndex, double elementValue);
347
351 virtual void setRowBounds(int elementIndex,
352 double lower, double upper);
353
355 virtual void setRowType(int index, char sense, double rightHandSide,
356 double range);
357
358 #if 0 // we are using the default implementation of OsiSolverInterface
359
366 virtual void setRowSetBounds(const int* indexFirst,
367 const int* indexLast,
368 const double* boundList);
369
379 virtual void setRowSetTypes(const int* indexFirst,
380 const int* indexLast,
381 const char* senseList,
382 const double* rhsList,
383 const double* rangeList);
384 #endif
385
386
387 //-------------------------------------------------------------------------
391 virtual void setContinuous(int index);
393 virtual void setInteger(int index);
394 #if 0 // we are using the default implementation of OsiSolverInterface
395
397 virtual void setContinuous(const int* indices, int len);
400 virtual void setInteger(const int* indices, int len);
401 #endif
402
403
404 //-------------------------------------------------------------------------
406 virtual void setObjSense(double s);
407
418 virtual void setColSolution(const double *colsol);
419
430 virtual void setRowPrice(const double *rowprice);
431
432 //-------------------------------------------------------------------------
438 virtual void addCol(const CoinPackedVectorBase &vec,
439 const double collb, const double colub,
440 const double obj);
441
442 #if 0 // we are using the default implementation of OsiSolverInterface
443
444 virtual void addCols(const int numcols,
445 const CoinPackedVectorBase * const * cols,
446 const double* collb, const double* colub,
447 const double* obj);
448 #endif
449
451 virtual void deleteCols(const int num, const int *colIndices);
452
454 virtual void addRow(const CoinPackedVectorBase &vec,
455 const double rowlb, const double rowub);
457 virtual void addRow(const CoinPackedVectorBase &vec,
458 const char rowsen, const double rowrhs,
459 const double rowrng);
460
461 #if 0 // we are using the default implementation of OsiSolverInterface
462
463 virtual void addRows(const int numrows,
464 const CoinPackedVectorBase * const * rows,
465 const double* rowlb, const double* rowub);
467 virtual void addRows(const int numrows,
468 const CoinPackedVectorBase * const * rows,
469 const char* rowsen, const double* rowrhs,
470 const double* rowrng);
471 #endif
472
474 virtual void deleteRows(const int num, const int *rowIndices);
475
476 #if 0 // we are using the default implementation of OsiSolverInterface \
477 //-----------------------------------------------------------------------
478
499 virtual ApplyCutsReturnCode applyCuts(const OsiCuts & cs,
500 double effectivenessLb = 0.0);
501 #endif
502
503
504
505 //---------------------------------------------------------------------------
506
520 virtual void loadProblem(const CoinPackedMatrix &matrix,
521 const double *collb, const double *colub,
522 const double *obj,
523 const double *rowlb, const double *rowub);
524
532 virtual void assignProblem(CoinPackedMatrix *&matrix,
533 double *&collb, double *&colub, double *&obj,
534 double *&rowlb, double *&rowub);
535
548 virtual void loadProblem(const CoinPackedMatrix &matrix,
549 const double *collb, const double *colub,
550 const double *obj,
551 const char *rowsen, const double *rowrhs,
552 const double *rowrng);
553
561 virtual void assignProblem(CoinPackedMatrix *&matrix,
562 double *&collb, double *&colub, double *&obj,
563 char *&rowsen, double *&rowrhs,
564 double *&rowrng);
565
568 virtual void loadProblem(const int numcols, const int numrows,
569 const int *start, const int *index,
570 const double *value,
571 const double *collb, const double *colub,
572 const double *obj,
573 const double *rowlb, const double *rowub);
574
577 virtual void loadProblem(const int numcols, const int numrows,
578 const int *start, const int *index,
579 const double *value,
580 const double *collb, const double *colub,
581 const double *obj,
582 const char *rowsen, const double *rowrhs,
583 const double *rowrng);
584
586 virtual int readMps(const char *filename,
587 const char *extension = "mps");
588
593 virtual void writeMps(const char *filename,
594 const char *extension = "mps",
595 double objSense = 0.0) const;
597
598 //---------------------------------------------------------------------------
599
602 OsiSpxSolverInterface();
604
606 virtual OsiSolverInterface *clone(bool copyData = true) const;
607
609 OsiSpxSolverInterface(const OsiSpxSolverInterface &);
610
612 OsiSpxSolverInterface &operator=(const OsiSpxSolverInterface &rhs);
613
615 virtual ~OsiSpxSolverInterface();
617
618 enum keepCachedFlag {
620 KEEPCACHED_NONE = 0,
622 KEEPCACHED_COLUMN = 1,
624 KEEPCACHED_ROW = 2,
626 KEEPCACHED_MATRIX = 4,
628 KEEPCACHED_RESULTS = 8,
630 KEEPCACHED_PROBLEM = KEEPCACHED_COLUMN | KEEPCACHED_ROW | KEEPCACHED_MATRIX,
632 KEEPCACHED_ALL = KEEPCACHED_PROBLEM | KEEPCACHED_RESULTS,
634 FREECACHED_COLUMN = KEEPCACHED_PROBLEM & ~KEEPCACHED_COLUMN,
636 FREECACHED_ROW = KEEPCACHED_PROBLEM & ~KEEPCACHED_ROW,
638 FREECACHED_MATRIX = KEEPCACHED_PROBLEM & ~KEEPCACHED_MATRIX,
640 FREECACHED_RESULTS = KEEPCACHED_ALL & ~KEEPCACHED_RESULTS
641 };
642 soplex::SoPlex *getLpPtr(int keepCached = KEEPCACHED_NONE);
643
644 soplex::SPxOut *getSPxOut() { return spxout_; }
645
646 protected:
649 virtual void applyRowCut(const OsiRowCut &rc);
651
655 virtual void applyColCut(const OsiColCut &cc);
657
660 soplex::SPxOut *spxout_;
663 soplex::SoPlex *soplex_;
665
666 private:
669
671 void freeCachedColRim();
672
674 void freeCachedRowRim();
675
677 void freeCachedResults();
678
680 void freeCachedMatrix();
681
683 void freeCachedData(int keepCached = KEEPCACHED_NONE);
684
686 void freeAllMemory();
688
691 soplex::DIdxSet *spxintvars_;
693
695 void *hotStartCStat_;
696 int hotStartCStatSize_;
697 void *hotStartRStat_;
698 int hotStartRStatSize_;
699 int hotStartMaxIteration_;
700
703 mutable soplex::DVector *obj_;
705
707 mutable char *rowsense_;
708
710 mutable double *rhs_;
711
713 mutable double *rowrange_;
714
716 mutable soplex::DVector *colsol_;
717
719 mutable soplex::DVector *rowsol_;
720
722 mutable soplex::DVector *redcost_;
723
725 mutable soplex::DVector *rowact_;
726
728 mutable CoinPackedMatrix *matrixByRow_;
729
731 mutable CoinPackedMatrix *matrixByCol_;
733
734 };
735
736 //#############################################################################
738 void OsiSpxSolverInterfaceUnitTest(const std::string &mpsDir, const std::string &netlibDir);
739
740 #endif
741
742 /* vi: softtabstop=2 shiftwidth=2 expandtab tabstop=2
743 */
OsiSolverInterface::setRowSetTypes
virtual void setRowSetTypes(const int *indexFirst, const int *indexLast, const char *senseList, const double *rhsList, const double *rangeList)
Set the type of a set of rows.
OsiSpxSolverInterface::hotStartCStatSize_
int hotStartCStatSize_
Definition: OsiSpxSolverInterface.hpp:696
OsiSpxSolverInterface::getRowRange
virtual const double * getRowRange() const
Get pointer to array[getNumRows()] of row ranges.
OsiSpxSolverInterface
SoPlex Solver Interface Instantiation of OsiSpxSolverInterface for SoPlex.
Definition: OsiSpxSolverInterface.hpp:37
OsiSpxSolverInterface::applyRowCut
virtual void applyRowCut(const OsiRowCut &rc)
Apply a row cut. Return true if cut was applied.
OsiSpxSolverInterface::rowsense_
char * rowsense_
Pointer to dense vector of row sense indicators.
Definition: OsiSpxSolverInterface.hpp:707
OsiSpxSolverInterface::KEEPCACHED_COLUMN
column information: objective values, lower and upper bounds, variable types
Definition: OsiSpxSolverInterface.hpp:622
OsiSpxSolverInterface::setColLower
virtual void setColLower(int elementIndex, double elementValue)
Set a single column lower bound Use -COIN_DBL_MAX for -infinity.
OsiSpxSolverInterface::clone
virtual OsiSolverInterface * clone(bool copyData=true) const
Clone.
OsiSpxSolverInterface::loadProblem
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...
OsiSpxSolverInterface::getLpPtr
soplex::SoPlex * getLpPtr(int keepCached=KEEPCACHED_NONE)
OsiSpxSolverInterface::isAbandoned
virtual bool isAbandoned() const
Are there a numerical difficulties?
OsiSolverInterface::isIntegerNonBinary
virtual bool isIntegerNonBinary(int colIndex) const
Return true if the variable is general integer.
OsiSpxSolverInterface::isContinuous
virtual bool isContinuous(int colNumber) const
Return true if column is continuous.
OsiSpxSolverInterface::unmarkHotStart
virtual void unmarkHotStart()
Delete the snapshot.
OsiSpxSolverInterface::matrixByRow_
CoinPackedMatrix * matrixByRow_
Pointer to row-wise copy of problem matrix coefficients.
Definition: OsiSpxSolverInterface.hpp:728
OsiSpxSolverInterface::getColSolution
virtual const double * getColSolution() const
Get pointer to array[getNumCols()] of primal solution vector.
OsiSpxSolverInterface::writeMps
virtual void writeMps(const char *filename, const char *extension="mps", double objSense=0.0) const
Write the problem into an mps file of the given filename.
OsiDblParam
OsiDblParam
Definition: OsiSolverParameters.hpp:52
OsiSolverInterface::setColSetBounds
virtual void setColSetBounds(const int *indexFirst, const int *indexLast, const double *boundList)
Set the upper and lower bounds of a set of columns.
OsiSpxSolverInterface::getInfinity
virtual double getInfinity() const
Get solver&#39;s value for infinity.
OsiSpxSolverInterface::rowsol_
soplex::DVector * rowsol_
Pointer to dual solution vector.
Definition: OsiSpxSolverInterface.hpp:719
OsiSpxSolverInterface::rowrange_
double * rowrange_
Pointer to dense vector of slack upper bounds for range constraints (undefined for non-range rows) ...
Definition: OsiSpxSolverInterface.hpp:713
OsiCuts
Collections of row cuts and column cuts.
Definition: OsiCuts.hpp:19
OsiSpxSolverInterface::getPrimalRays
virtual std::vector< double * > getPrimalRays(int maxNumRays) const
Get as many primal rays as the solver can provide.
OsiColCut
Column Cut Class.
Definition: OsiColCut.hpp:23
OsiSpxSolverInterface::getObjValue
virtual double getObjValue() const
Get objective function value.
OsiSpxSolverInterface::getObjCoefficients
virtual const double * getObjCoefficients() const
Get pointer to array[getNumCols()] of objective function coefficients.
OsiSpxSolverInterface::readMps
virtual int readMps(const char *filename, const char *extension="mps")
Read an mps file from the given filename.
OsiSpxSolverInterface::markHotStart
virtual void markHotStart()
Create a hotstart point of the optimization process.
OsiSpxSolverInterface::setRowType
virtual void setRowType(int index, char sense, double rightHandSide, double range)
Set the type of a single row
CoinWarmStartBasis
The default COIN simplex (basis-oriented) warm start class.
Definition: CoinWarmStartBasis.hpp:40
OsiSpxSolverInterface::setRowLower
virtual void setRowLower(int elementIndex, double elementValue)
Set a single row lower bound Use -COIN_DBL_MAX for -infinity.
OsiSpxSolverInterface::getDualRays
virtual std::vector< double * > getDualRays(int maxNumRays, bool fullRay=false) const
Get as many dual rays as the solver can provide.
OsiSpxSolverInterface::matrixByCol_
CoinPackedMatrix * matrixByCol_
Pointer to row-wise copy of problem matrix coefficients.
Definition: OsiSpxSolverInterface.hpp:731
OsiSpxSolverInterface::isProvenDualInfeasible
virtual bool isProvenDualInfeasible() const
Is dual infeasiblity proven?
OsiSpxSolverInterface::addRow
virtual void addRow(const CoinPackedVectorBase &vec, const double rowlb, const double rowub)
Add a row (constraint) to the problem.
OsiSpxSolverInterface::FREECACHED_ROW
free only cached row and LP solution information
Definition: OsiSpxSolverInterface.hpp:636
OsiSpxSolverInterface::freeCachedMatrix
void freeCachedMatrix()
free cached matrices
OsiSolverInterface::isInteger
virtual bool isInteger(int colIndex) const
Return true if the variable is integer.
OsiSpxSolverInterface::keepCachedFlag
keepCachedFlag
Definition: OsiSpxSolverInterface.hpp:618
OsiSpxSolverInterface::getReducedCost
virtual const double * getReducedCost() const
Get a pointer to array[getNumCols()] of reduced costs.
OsiSpxSolverInterface::isProvenOptimal
virtual bool isProvenOptimal() const
Is optimality proven?
OsiSpxSolverInterface::KEEPCACHED_MATRIX
problem matrix: matrix ordered by column and by row
Definition: OsiSpxSolverInterface.hpp:626
OsiSpxSolverInterface::getMatrixByRow
virtual const CoinPackedMatrix * getMatrixByRow() const
Get pointer to row-wise copy of matrix.
OsiSolverInterface
Abstract Base Class for describing an interface to a solver.
Definition: OsiSolverInterface.hpp:61
OsiSpxSolverInterface::getMatrixByCol
virtual const CoinPackedMatrix * getMatrixByCol() const
Get pointer to column-wise copy of matrix.
OsiSpxSolverInterface::setWarmStart
virtual bool setWarmStart(const CoinWarmStart *warmstart)
Set warmstarting information.
OsiSpxSolverInterface::isTimeLimitReached
virtual bool isTimeLimitReached() const
Time limit reached?
OsiSpxSolverInterface::freeAllMemory
void freeAllMemory()
free all allocated memory
OsiSpxSolverInterface::hotStartCStat_
void * hotStartCStat_
Hotstart information.
Definition: OsiSpxSolverInterface.hpp:695
OsiSpxSolverInterface::getIterationCount
virtual int getIterationCount() const
Get how many iterations it took to solve the problem (whatever &quot;iteration&quot; mean to the solver...
OsiSpxSolverInterface::OsiSpxSolverInterface
OsiSpxSolverInterface()
Default Constructor.
CoinPackedVectorBase
Abstract base class for various sparse vectors.
Definition: CoinPackedVectorBase.hpp:23
OsiSolverInterface::getFractionalIndices
virtual OsiVectorInt getFractionalIndices(const double etol=1.e-05) const
Get vector of indices of primal variables which are integer variables but have fractional values in t...
OsiSpxSolverInterface::deleteCols
virtual void deleteCols(const int num, const int *colIndices)
Remove a set of columns (primal variables) from the problem.
OsiSpxSolverInterface::getRowUpper
virtual const double * getRowUpper() const
Get pointer to array[getNumRows()] of row upper bounds.
OsiSpxSolverInterface::getRightHandSide
virtual const double * getRightHandSide() const
Get pointer to array[getNumRows()] of rows right-hand sides.
OsiSpxSolverInterface::isIterationLimitReached
virtual bool isIterationLimitReached() const
Iteration limit reached?
OsiSpxSolverInterface::KEEPCACHED_NONE
discard all cached data (default)
Definition: OsiSpxSolverInterface.hpp:620
OsiSpxSolverInterface::setColUpper
virtual void setColUpper(int elementIndex, double elementValue)
Set a single column upper bound Use COIN_DBL_MAX for infinity.
OsiSpxSolverInterface::setColSolution
virtual void setColSolution(const double *colsol)
Set the primal solution column values.
OsiSpxSolverInterface::freeCachedColRim
void freeCachedColRim()
free cached column rim vectors
OsiSpxSolverInterface::getWarmStart
virtual CoinWarmStart * getWarmStart() const
Get warmstarting information.
OsiSpxSolverInterface::setContinuous
virtual void setContinuous(int index)
Set the index-th variable to be a continuous variable.
OsiSolverInterface::addRows
virtual void addRows(const int numrows, const CoinPackedVectorBase *const *rows, const double *rowlb, const double *rowub)
Add a set of rows (constraints) to the problem.
OsiSpxSolverInterface::addCol
virtual void addCol(const CoinPackedVectorBase &vec, const double collb, const double colub, const double obj)
Add a column (primal variable) to the problem.
OsiSpxSolverInterface::getRowLower
virtual const double * getRowLower() const
Get pointer to array[getNumRows()] of row lower bounds.
OsiSpxSolverInterface::getNumRows
virtual int getNumRows() const
Get number of rows.
OsiSpxSolverInterface::hotStartMaxIteration_
int hotStartMaxIteration_
Definition: OsiSpxSolverInterface.hpp:699
OsiSpxSolverInterface::obj_
soplex::DVector * obj_
Pointer to objective Vector.
Definition: OsiSpxSolverInterface.hpp:704
OsiStrParam
OsiStrParam
Definition: OsiSolverParameters.hpp:87
OsiSpxSolverInterface::spxout_
soplex::SPxOut * spxout_
SoPlex output object.
Definition: OsiSpxSolverInterface.hpp:661
OsiSpxSolverInterface::branchAndBound
virtual void branchAndBound()
Invoke solver&#39;s built-in enumeration algorithm.
OsiSpxSolverInterface::getNumCols
virtual int getNumCols() const
Get number of columns.
OsiSpxSolverInterface::setIntParam
bool setIntParam(OsiIntParam key, int value)
Set an integer parameter.
OsiSolverInterface::addCols
virtual void addCols(const int numcols, const CoinPackedVectorBase *const *cols, const double *collb, const double *colub, const double *obj)
Add a set of columns (primal variables) to the problem.
OsiSpxSolverInterface::colsol_
soplex::DVector * colsol_
Pointer to primal solution vector.
Definition: OsiSpxSolverInterface.hpp:716
OsiSolverInterface::isBinary
virtual bool isBinary(int colIndex) const
Return true if the variable is binary.
OsiSpxSolverInterface::hotStartRStat_
void * hotStartRStat_
Definition: OsiSpxSolverInterface.hpp:697
OsiSpxSolverInterface::KEEPCACHED_ROW
row information: right hand sides, ranges and senses, lower and upper bounds for row ...
Definition: OsiSpxSolverInterface.hpp:624
OsiSpxSolverInterface::setTimeLimit
void setTimeLimit(double value)
OsiSpxSolverInterface::initialSolve
virtual void initialSolve()
Solve initial LP relaxation.
OsiSpxSolverInterface::KEEPCACHED_ALL
keep all cached data (similar to getMutableLpPtr())
Definition: OsiSpxSolverInterface.hpp:632
OsiSpxSolverInterface::freeCachedRowRim
void freeCachedRowRim()
free cached row rim vectors
OsiSpxSolverInterface::freeCachedData
void freeCachedData(int keepCached=KEEPCACHED_NONE)
free all cached data (except specified entries, see getLpPtr())
OsiSpxSolverInterface::getTimeLimit
double getTimeLimit() const
OsiSpxSolverInterface::FREECACHED_RESULTS
free only cached LP solution information
Definition: OsiSpxSolverInterface.hpp:640
OsiRowCut
Row Cut Class.
Definition: OsiRowCut.hpp:29
OsiSpxSolverInterface::getStrParam
bool getStrParam(OsiStrParam key, std::string &value) const
Get a string parameter.
OsiSpxSolverInterface::hotStartRStatSize_
int hotStartRStatSize_
Definition: OsiSpxSolverInterface.hpp:698
OsiSpxSolverInterface::setObjSense
virtual void setObjSense(double s)
Set objective function sense (1 for min (default), -1 for max,)
OsiSpxSolverInterface::freeCachedResults
void freeCachedResults()
free cached result vectors
OsiSolverInterface::applyCuts
virtual ApplyCutsReturnCode applyCuts(const OsiCuts &cs, double effectivenessLb=0.0)
Apply a collection of cuts.
OsiSpxSolverInterface::solveFromHotStart
virtual void solveFromHotStart()
Optimize starting from the hotstart.
OsiSpxSolverInterface::resolve
virtual void resolve()
Resolve an LP relaxation after problem modification.
CoinPackedMatrix
Sparse Matrix Base Class.
Definition: CoinPackedMatrix.hpp:79
OsiSpxSolverInterface::FREECACHED_MATRIX
free only cached matrix and LP solution information
Definition: OsiSpxSolverInterface.hpp:638
OsiSpxSolverInterface::getSPxOut
soplex::SPxOut * getSPxOut()
Definition: OsiSpxSolverInterface.hpp:644
OsiSolverInterface::setRowSetBounds
virtual void setRowSetBounds(const int *indexFirst, const int *indexLast, const double *boundList)
Set the bounds on a set of rows.
OsiSpxSolverInterface::setInteger
virtual void setInteger(int index)
Set the index-th variable to be an integer variable.
OsiSpxSolverInterface::rhs_
double * rhs_
Pointer to dense vector of row right-hand side values.
Definition: OsiSpxSolverInterface.hpp:710
OsiSpxSolverInterface::spxintvars_
soplex::DIdxSet * spxintvars_
indices of integer variables
Definition: OsiSpxSolverInterface.hpp:692
OsiSpxSolverInterface::isDualObjectiveLimitReached
virtual bool isDualObjectiveLimitReached() const
Is the given dual objective limit reached?
OsiSolverInterface.hpp
OsiSpxSolverInterface::getNumElements
virtual int getNumElements() const
Get number of nonzero elements.
OsiSpxSolverInterface::rowact_
soplex::DVector * rowact_
Pointer to row activity (slack) vector.
Definition: OsiSpxSolverInterface.hpp:725
OsiSolverInterface::isFreeBinary
virtual bool isFreeBinary(int colIndex) const
Return true if the variable is binary and not fixed.
OsiSpxSolverInterface::~OsiSpxSolverInterface
virtual ~OsiSpxSolverInterface()
Destructor.
OsiSpxSolverInterface::setObjCoeff
virtual void setObjCoeff(int elementIndex, double elementValue)
Set an objective function coefficient.
OsiSpxSolverInterface::FREECACHED_COLUMN
free only cached column and LP solution information
Definition: OsiSpxSolverInterface.hpp:634
OsiSpxSolverInterface::setRowUpper
virtual void setRowUpper(int elementIndex, double elementValue)
Set a single row upper bound Use COIN_DBL_MAX for infinity.
OsiSpxSolverInterface::setRowPrice
virtual void setRowPrice(const double *rowprice)
Set dual solution vector.
OsiSpxSolverInterface::setRowBounds
virtual void setRowBounds(int elementIndex, double lower, double upper)
Set a single row lower and upper bound The default implementation just invokes setRowUower and setRo...
OsiSpxSolverInterface::applyColCut
virtual void applyColCut(const OsiColCut &cc)
Apply a column cut (bound adjustment).
OsiSpxSolverInterface::deleteRows
virtual void deleteRows(const int num, const int *rowIndices)
Delete a set of rows (constraints) from the problem.
OsiSpxSolverInterface::getColUpper
virtual const double * getColUpper() const
Get pointer to array[getNumCols()] of column upper bounds.
OsiSpxSolverInterface::getEmptyWarmStart
CoinWarmStart * getEmptyWarmStart() const
Get empty warm start object.
Definition: OsiSpxSolverInterface.hpp:110
OsiSpxSolverInterface::redcost_
soplex::DVector * redcost_
Pointer to reduced cost vector.
Definition: OsiSpxSolverInterface.hpp:722
OsiSpxSolverInterface::setColBounds
virtual void setColBounds(int elementIndex, double lower, double upper)
Set a single column lower and upper bound The default implementation just invokes setColLower and se...
OsiSpxSolverInterface::soplex_
soplex::SoPlex * soplex_
SoPlex solver object.
Definition: OsiSpxSolverInterface.hpp:663
OsiSpxSolverInterface::isProvenPrimalInfeasible
virtual bool isProvenPrimalInfeasible() const
Is primal infeasiblity proven?
OsiSpxSolverInterface::getRowSense
virtual const char * getRowSense() const
Get pointer to array[getNumRows()] of row constraint senses.
OsiSpxSolverInterfaceUnitTest
void OsiSpxSolverInterfaceUnitTest(const std::string &mpsDir, const std::string &netlibDir)
A function that tests the methods in the OsiSpxSolverInterface class.
OsiSpxSolverInterface::getRowActivity
virtual const double * getRowActivity() const
Get pointer to array[getNumRows()] of row activity levels (constraint matrix times the solution vecto...
OsiSpxSolverInterface::getDblParam
bool getDblParam(OsiDblParam key, double &value) const
Get a double parameter.
CoinWarmStartBasis.hpp
OsiIntParam
OsiIntParam
Definition: OsiSolverParameters.hpp:8
OsiVectorInt
std::vector< int > OsiVectorInt
Vector of int.
Definition: OsiCollections.hpp:20
OsiSolverInterface::ApplyCutsReturnCode
Internal class for obtaining status from the applyCuts method.
Definition: OsiSolverInterface.hpp:72
OsiSpxSolverInterface::KEEPCACHED_RESULTS
LP solution: primal and dual solution, reduced costs, row activities.
Definition: OsiSpxSolverInterface.hpp:628
OsiSpxSolverInterface::OsiSpxSolverInterfaceUnitTest
friend void OsiSpxSolverInterfaceUnitTest(const std::string &mpsDir, const std::string &netlibDir)
A function that tests the methods in the OsiSpxSolverInterface class.
CoinWarmStart
Abstract base class for warm start information.
Definition: CoinWarmStart.hpp:21
OsiSpxSolverInterface::getColLower
virtual const double * getColLower() const
Get pointer to array[getNumCols()] of column lower bounds.
OsiSpxSolverInterface::setDblParam
bool setDblParam(OsiDblParam key, double value)
Set a double parameter.
OsiSpxSolverInterface::KEEPCACHED_PROBLEM
only discard cached LP solution
Definition: OsiSpxSolverInterface.hpp:630
OsiSpxSolverInterface::getObjSense
virtual double getObjSense() const
Get objective function sense (1 for min (default), -1 for max)
OsiSpxSolverInterface::getRowPrice
virtual const double * getRowPrice() const
Get pointer to array[getNumRows()] of dual prices.
OsiSpxSolverInterface::getIntParam
bool getIntParam(OsiIntParam key, int &value) const
Get an integer parameter.
OsiSpxSolverInterface::operator=
OsiSpxSolverInterface & operator=(const OsiSpxSolverInterface &rhs)
Assignment operator.
OsiSpxSolverInterface::assignProblem
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...