Osi 0.107.7

- 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
OsiXprSolverInterface.hpp
Go to the documentation of this file.
1 // Copyright (C) 2000, International Business Machines
2 // Corporation and others. All Rights Reserved.
3 // This code is licensed under the terms of the Eclipse Public License (EPL).
4
5 #ifndef OsiXprSolverInterface_H
6 #define OsiXprSolverInterface_H
7
8 #include <string>
9 #include <cstdio>
10
11 #include "OsiSolverInterface.hpp"
12
13 typedef struct xo_prob_struct* XPRSprob;
14
15 //#############################################################################
16
21 class OsiXprSolverInterface : virtual public OsiSolverInterface {
22 friend void OsiXprSolverInterfaceUnitTest(const std::string & mpsDir, const std::string & netlibDir);
23 public:
26 virtual void initialSolve();
28
30 virtual void resolve();
31
33 virtual void branchAndBound();
35
51 // Set an integer parameter
52 bool setIntParam(OsiIntParam key, int value);
53 // Set an double parameter
54 bool setDblParam(OsiDblParam key, double value);
55 // Set a string parameter
56 bool setStrParam(OsiStrParam key, const std::string & value);
57 // Get an integer parameter
58 bool getIntParam(OsiIntParam key, int& value) const;
59 // Get an double parameter
60 bool getDblParam(OsiDblParam key, double& value) const;
61 // Get a string parameter
62 bool getStrParam(OsiStrParam key, std::string& value) const;
63 // Set mipstart option (pass column solution to XPRESS before MIP start)
64 void setMipStart(bool value) { domipstart = value; }
65 // Get mipstart option value
66 bool getMipStart() const { return domipstart; }
68
69 //---------------------------------------------------------------------------
71
72 virtual bool isAbandoned() const;
75 virtual bool isProvenOptimal() const;
77 virtual bool isProvenPrimalInfeasible() const;
79 virtual bool isProvenDualInfeasible() const;
81 virtual bool isPrimalObjectiveLimitReached() const;
83 virtual bool isDualObjectiveLimitReached() const;
85 virtual bool isIterationLimitReached() const;
87
88 //---------------------------------------------------------------------------
91 CoinWarmStart *getEmptyWarmStart () const;
94 virtual CoinWarmStart* getWarmStart() const;
97 virtual bool setWarmStart(const CoinWarmStart* warmstart);
99
100 //---------------------------------------------------------------------------
107 virtual void markHotStart();
110 virtual void solveFromHotStart();
112 virtual void unmarkHotStart();
114
115 //---------------------------------------------------------------------------
130 virtual int getNumCols() const;
132
134 virtual int getNumRows() const;
135
137 virtual int getNumElements() const;
138
140 virtual const double * getColLower() const;
141
143 virtual const double * getColUpper() const;
144
154 virtual const char * getRowSense() const;
155
164 virtual const double * getRightHandSide() const;
165
174 virtual const double * getRowRange() const;
175
177 virtual const double * getRowLower() const;
178
180 virtual const double * getRowUpper() const;
181
183 virtual const double * getObjCoefficients() const;
184
186 virtual double getObjSense() const;
187
189 virtual bool isContinuous(int colIndex) const;
190
191 #if 0
192 virtual bool isBinary(int colIndex) const;
194
199 virtual bool isInteger(int colIndex) const;
200
202 virtual bool isIntegerNonBinary(int colIndex) const;
203
205 virtual bool isFreeBinary(int colIndex) const;
206 #endif
207 virtual const CoinPackedMatrix * getMatrixByRow() const;
209
211 virtual const CoinPackedMatrix * getMatrixByCol() const;
212
214 virtual double getInfinity() const;
216
219 virtual const double * getColSolution() const;
221
223 virtual const double * getRowPrice() const;
224
226 virtual const double * getReducedCost() const;
227
230 virtual const double * getRowActivity() const;
231
233 virtual double getObjValue() const;
234
237 virtual int getIterationCount() const;
238
256 virtual std::vector<double*> getDualRays(int maxNumRays,
257 bool fullRay=false) const;
269 virtual std::vector<double*> getPrimalRays(int maxNumRays) const;
270
271 #if 0
272
274 virtual OsiVectorInt getFractionalIndices(const double etol=1.e-05)
275 const;
276 #endif
277
278
279
280 //---------------------------------------------------------------------------
281
284 //-------------------------------------------------------------------------
288 virtual void setObjCoeff( int elementIndex, double elementValue );
289
292 virtual void setColLower( int elementIndex, double elementValue );
293
296 virtual void setColUpper( int elementIndex, double elementValue );
297
301 virtual void setColBounds( int elementIndex,
302 double lower, double upper );
303
312 virtual void setColSetBounds(const int* indexFirst,
313 const int* indexLast,
314 const double* boundList);
315
318 virtual void setRowLower( int elementIndex, double elementValue );
319
322 virtual void setRowUpper( int elementIndex, double elementValue );
323
327 virtual void setRowBounds( int elementIndex,
328 double lower, double upper );
329
331 virtual void setRowType(int index, char sense, double rightHandSide,
332 double range);
333
342 virtual void setRowSetBounds(const int* indexFirst,
343 const int* indexLast,
344 const double* boundList);
345
356 virtual void setRowSetTypes(const int* indexFirst,
357 const int* indexLast,
358 const char* senseList,
359 const double* rhsList,
360 const double* rangeList);
362
363 //-------------------------------------------------------------------------
367 virtual void setContinuous(int index);
369 virtual void setInteger(int index);
372 virtual void setContinuous(const int* indices, int len);
375 virtual void setInteger(const int* indices, int len);
377
378 //-------------------------------------------------------------------------
380 virtual void setObjSense(double s);
381
392 virtual void setColSolution(const double * colsol);
393
404 virtual void setRowPrice(const double * rowprice);
405
406 //-------------------------------------------------------------------------
412 virtual void addCol(const CoinPackedVectorBase& vec,
413 const double collb, const double colub,
414 const double obj);
416 virtual void addCols(const int numcols,
417 const CoinPackedVectorBase * const * cols,
418 const double* collb, const double* colub,
419 const double* obj);
421 virtual void deleteCols(const int num, const int * colIndices);
422
424 virtual void addRow(const CoinPackedVectorBase& vec,
425 const double rowlb, const double rowub);
427 virtual void addRow(const CoinPackedVectorBase& vec,
428 const char rowsen, const double rowrhs,
429 const double rowrng);
431 virtual void addRows(const int numrows,
432 const CoinPackedVectorBase * const * rows,
433 const double* rowlb, const double* rowub);
435 virtual void addRows(const int numrows,
436 const CoinPackedVectorBase * const * rows,
437 const char* rowsen, const double* rowrhs,
438 const double* rowrng);
440 virtual void deleteRows(const int num, const int * rowIndices);
441 #if 0
442 //-----------------------------------------------------------------------
464 virtual ApplyCutsReturnCode applyCuts(const OsiCuts & cs,
465 double effectivenessLb = 0.0);
467
468 #endif
469 //---------------------------------------------------------------------------
470
484 virtual void loadProblem(const CoinPackedMatrix& matrix,
485 const double* collb, const double* colub,
486 const double* obj,
487 const double* rowlb, const double* rowub);
488
496 virtual void assignProblem(CoinPackedMatrix*& matrix,
497 double*& collb, double*& colub, double*& obj,
498 double*& rowlb, double*& rowub);
499
512 virtual void loadProblem(const CoinPackedMatrix& matrix,
513 const double* collb, const double* colub,
514 const double* obj,
515 const char* rowsen, const double* rowrhs,
516 const double* rowrng);
517
525 virtual void assignProblem(CoinPackedMatrix*& matrix,
526 double*& collb, double*& colub, double*& obj,
527 char*& rowsen, double*& rowrhs,
528 double*& rowrng);
529
532 virtual void loadProblem(const int numcols, const int numrows,
533 const int* start, const int* index,
534 const double* value,
535 const double* collb, const double* colub,
536 const double* obj,
537 const double* rowlb, const double* rowub);
538
541 virtual void loadProblem(const int numcols, const int numrows,
542 const int* start, const int* index,
543 const double* value,
544 const double* collb, const double* colub,
545 const double* obj,
546 const char* rowsen, const double* rowrhs,
547 const double* rowrng);
548
549
551 virtual int readMps(const char *filename,
552 const char *extension = "mps");
553
554
559 virtual void writeMps(const char *filename,
560 const char *extension = "mps",
561 double objSense=0.0) const;
563
571 void passInMessageHandler(CoinMessageHandler * handler);
573
574 //---------------------------------------------------------------------------
575
589 static void incrementInstanceCounter();
590
599 static void decrementInstanceCounter();
600
603 static unsigned int getNumInstances();
604
606 XPRSprob getLpPtr() { return prob_; }
608
610 static int version();
611
614 static int iXprCallCount_;
615
616
618 static FILE * getLogFilePtr();
621 static void setLogFileName( const char * filename );
623
624
627 OsiXprSolverInterface (int newrows = 50, int newnz = 100);
629
631 virtual OsiSolverInterface * clone(bool copyData = true) const;
632
634 OsiXprSolverInterface (const OsiXprSolverInterface &);
635
637 OsiXprSolverInterface & operator=(const OsiXprSolverInterface& rhs);
638
640 virtual ~OsiXprSolverInterface ();
642
643 protected:
644
647 virtual void applyRowCut( const OsiRowCut & rc );
649
653 virtual void applyColCut( const OsiColCut & cc );
655
656 private:
657
660 static const char * logFileName_;
662
664 static FILE * logFilePtr_;
665
667 static unsigned int numInstances_;
668
670 static unsigned int osiSerial_;
671
673
676 void gutsOfCopy( const OsiXprSolverInterface & source );
678
680 void gutsOfConstructor();
681
683 void gutsOfDestructor();
684
686 void freeSolution();
687
690 void freeCachedResults();
691
693 int getNumIntVars() const;
694
697 void getVarTypes() const;
699
703 void activateMe() const;
704
709 bool isDataLoaded() const;
711
712
715
718
719 mutable XPRSprob prob_;
720
722 mutable std::string xprProbname_;
724
732 mutable CoinPackedMatrix *matrixByRow_;
733 mutable CoinPackedMatrix *matrixByCol_;
734
736 mutable double *colupper_;
737
739 mutable double *collower_;
740
742 mutable double *rowupper_;
743
745 mutable double *rowlower_;
746
748 mutable char *rowsense_;
749
751 mutable double *rhs_;
752
756 mutable double *rowrange_;
757
759 mutable double *objcoeffs_;
760
762 mutable double objsense_;
763
765 mutable double *colsol_;
766
768 mutable double *rowsol_;
769
771 mutable double *rowact_;
772
774 mutable double *rowprice_;
775
777 mutable double *colprice_;
778
780 mutable int *ivarind_;
781
790 mutable char *ivartype_;
791
795 mutable char *vartype_;
796
798 mutable bool lastsolvewasmip;
800
801
803 bool domipstart;
804 };
805
806 //#############################################################################
808 void OsiXprSolverInterfaceUnitTest(const std::string & mpsDir, const std::string & netlibDir);
809
810 #endif
OsiXprSolverInterface::setDblParam
bool setDblParam(OsiDblParam key, double value)
Set a double parameter.
OsiXprSolverInterface::rowprice_
double * rowprice_
Pointer to dense vector of dual row variable values.
Definition: OsiXprSolverInterface.hpp:774
OsiXprSolverInterface::matrixByCol_
CoinPackedMatrix * matrixByCol_
Definition: OsiXprSolverInterface.hpp:733
OsiXprSolverInterface::lastsolvewasmip
bool lastsolvewasmip
Indicates whether the last solve was for a MIP or an LP.
Definition: OsiXprSolverInterface.hpp:798
OsiXprSolverInterface::setContinuous
virtual void setContinuous(int index)
Set the index-th variable to be a continuous variable.
OsiXprSolverInterface::ivartype_
char * ivartype_
Pointer to list of global variable types:
Definition: OsiXprSolverInterface.hpp:790
OsiXprSolverInterface::getRowRange
virtual const double * getRowRange() const
Get pointer to array[getNumRows()] of row ranges.
OsiXprSolverInterface::getNumElements
virtual int getNumElements() const
Get number of nonzero elements.
OsiXprSolverInterface::rowlower_
double * rowlower_
Pointer to dense vector of slack variable lower bounds.
Definition: OsiXprSolverInterface.hpp:745
OsiXprSolverInterface::applyColCut
virtual void applyColCut(const OsiColCut &cc)
Apply a column cut (bound adjustment).
OsiXprSolverInterface::isProvenPrimalInfeasible
virtual bool isProvenPrimalInfeasible() const
Is primal infeasiblity proven?
OsiXprSolverInterface::isProvenDualInfeasible
virtual bool isProvenDualInfeasible() const
Is dual infeasiblity proven?
OsiXprSolverInterface::getColSolution
virtual const double * getColSolution() const
Get pointer to array[getNumCols()] of primal solution vector.
OsiXprSolverInterface::logFileName_
static const char * logFileName_
Name of the logfile.
Definition: OsiXprSolverInterface.hpp:661
OsiXprSolverInterface::setObjSense
virtual void setObjSense(double s)
Set objective function sense (1 for min (default), -1 for max,)
OsiXprSolverInterface::freeSolution
void freeSolution()
Destroy cached copy of solution data (whenever it changes)
OsiXprSolverInterface::gutsOfConstructor
void gutsOfConstructor()
The real work of a constructor (used by construct and assignment)
OsiXprSolverInterface::getRightHandSide
virtual const double * getRightHandSide() const
Get pointer to array[getNumRows()] of rows right-hand sides.
OsiXprSolverInterface::isDataLoaded
bool isDataLoaded() const
Save and restore are necessary if there is data associated with this problem.
OsiXprSolverInterface::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...
OsiXprSolverInterface::getPrimalRays
virtual std::vector< double * > getPrimalRays(int maxNumRays) const
Get as many primal rays as the solver can provide.
OsiSolverInterface::isIntegerNonBinary
virtual bool isIntegerNonBinary(int colIndex) const
Return true if the variable is general integer.
OsiXprSolverInterface::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...
OsiXprSolverInterface::solveFromHotStart
virtual void solveFromHotStart()
Optimize starting from the hotstart.
OsiXprSolverInterface::getIterationCount
virtual int getIterationCount() const
Get how many iterations it took to solve the problem (whatever &quot;iteration&quot; mean to the solver...
OsiXprSolverInterface::markHotStart
virtual void markHotStart()
Create a hotstart point of the optimization process.
OsiDblParam
OsiDblParam
Definition: OsiSolverParameters.hpp:52
XPRSprob
struct xo_prob_struct * XPRSprob
Definition: OsiXprSolverInterface.hpp:13
OsiXprSolverInterface::isDualObjectiveLimitReached
virtual bool isDualObjectiveLimitReached() const
Is the given dual objective limit reached?
OsiXprSolverInterface::rowsol_
double * rowsol_
Pointer to dense vector of primal slack variable values.
Definition: OsiXprSolverInterface.hpp:768
OsiXprSolverInterface::setIntParam
bool setIntParam(OsiIntParam key, int value)
Set an integer parameter.
OsiXprSolverInterface::operator=
OsiXprSolverInterface & operator=(const OsiXprSolverInterface &rhs)
Assignment operator.
OsiXprSolverInterface::branchAndBound
virtual void branchAndBound()
Invoke solver&#39;s built-in enumeration algorithm.
OsiXprSolverInterface::getColLower
virtual const double * getColLower() const
Get pointer to array[getNumCols()] of column lower bounds.
OsiXprSolverInterface::setRowType
virtual void setRowType(int index, char sense, double rightHandSide, double range)
Set the type of a single row
OsiXprSolverInterface::osiSerial_
static unsigned int osiSerial_
Counts calls to incrementInstanceCounter()
Definition: OsiXprSolverInterface.hpp:670
OsiXprSolverInterface::applyRowCut
virtual void applyRowCut(const OsiRowCut &rc)
Apply a row cut. Return true if cut was applied.
OsiXprSolverInterface::~OsiXprSolverInterface
virtual ~OsiXprSolverInterface()
Destructor.
OsiCuts
Collections of row cuts and column cuts.
Definition: OsiCuts.hpp:19
OsiColCut
Column Cut Class.
Definition: OsiColCut.hpp:23
OsiXprSolverInterface::prob_
XPRSprob prob_
Definition: OsiXprSolverInterface.hpp:719
OsiXprSolverInterface::rowact_
double * rowact_
Pointer to dense vector of primal slack variable values.
Definition: OsiXprSolverInterface.hpp:771
OsiXprSolverInterface::setWarmStart
virtual bool setWarmStart(const CoinWarmStart *warmstart)
Set warmstarting information.
OsiXprSolverInterface::getMipStart
bool getMipStart() const
Definition: OsiXprSolverInterface.hpp:66
OsiXprSolverInterface::setRowBounds
virtual void setRowBounds(int elementIndex, double lower, double upper)
Set a single row lower and upper bound The default implementation just invokes setRowLower() and set...
OsiXprSolverInterface::decrementInstanceCounter
static void decrementInstanceCounter()
XPRESS has a context that should be deleted after XPRESS calls.
OsiXprSolverInterface::setInteger
virtual void setInteger(int index)
Set the index-th variable to be an integer variable.
OsiXprSolverInterface::getMatrixByRow
virtual const CoinPackedMatrix * getMatrixByRow() const
Get pointer to row-wise copy of matrix.
CoinMessageHandler
Base class for message handling.
Definition: CoinMessageHandler.hpp:327
OsiSolverInterface::isInteger
virtual bool isInteger(int colIndex) const
Return true if the variable is integer.
OsiXprSolverInterface::getObjSense
virtual double getObjSense() const
Get objective function sense (1 for min (default), -1 for max)
OsiXprSolverInterface::OsiXprSolverInterface
OsiXprSolverInterface(int newrows=50, int newnz=100)
Default Constructor.
OsiXprSolverInterface::isProvenOptimal
virtual bool isProvenOptimal() const
Is optimality proven?
OsiXprSolverInterface::version
static int version()
Return XPRESS-MP Version number.
OsiSolverInterface
Abstract Base Class for describing an interface to a solver.
Definition: OsiSolverInterface.hpp:62
OsiXprSolverInterface::activateMe
void activateMe() const
Save the current problem in XPRESS (if necessary) and make this problem current (restore if necessary...
OsiXprSolverInterface::colprice_
double * colprice_
Pointer to dense vector of dual column variable values.
Definition: OsiXprSolverInterface.hpp:777
OsiXprSolverInterface::passInMessageHandler
void passInMessageHandler(CoinMessageHandler *handler)
Pass in a message handler It is the client&#39;s responsibility to destroy a message handler installed by...
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...
OsiXprSolverInterface::collower_
double * collower_
Pointer to dense vector of structural variable lower bounds.
Definition: OsiXprSolverInterface.hpp:739
OsiVectorInt
std::vector< int > OsiVectorInt
Vector of int.
Definition: OsiCollections.hpp:22
OsiXprSolverInterface::getLpPtr
XPRSprob getLpPtr()
Return a pointer to the XPRESS problem.
Definition: OsiXprSolverInterface.hpp:606
OsiXprSolverInterface::rhs_
double * rhs_
Pointer to dense vector of row right-hand side values.
Definition: OsiXprSolverInterface.hpp:751
OsiXprSolverInterface::getRowLower
virtual const double * getRowLower() const
Get pointer to array[getNumRows()] of row lower bounds.
OsiXprSolverInterface::isIterationLimitReached
virtual bool isIterationLimitReached() const
Iteration limit reached?
OsiXprSolverInterface::getDualRays
virtual std::vector< double * > getDualRays(int maxNumRays, bool fullRay=false) const
Get as many dual rays as the solver can provide.
OsiXprSolverInterface::getRowActivity
virtual const double * getRowActivity() const
Get pointer to array[getNumRows()] of row activity levels (constraint matrix times the solution vecto...
OsiXprSolverInterface::rowrange_
double * rowrange_
Pointer to dense vector of slack upper bounds for range constraints (undefined for non-range rows) ...
Definition: OsiXprSolverInterface.hpp:756
OsiXprSolverInterface::rowsense_
char * rowsense_
Pointer to dense vector of row sense indicators.
Definition: OsiXprSolverInterface.hpp:748
OsiXprSolverInterface::getNumRows
virtual int getNumRows() const
Get number of rows.
OsiXprSolverInterface::getIntParam
bool getIntParam(OsiIntParam key, int &value) const
Get an integer parameter.
OsiXprSolverInterface::getColUpper
virtual const double * getColUpper() const
Get pointer to array[getNumCols()] of column upper bounds.
OsiXprSolverInterface::setColSolution
virtual void setColSolution(const double *colsol)
Set the primal solution column values.
OsiXprSolverInterface::resolve
virtual void resolve()
Resolve an LP relaxation after problem modification.
OsiXprSolverInterface::setColLower
virtual void setColLower(int elementIndex, double elementValue)
Set a single column lower bound Use -COIN_DBL_MAX for -infinity.
OsiStrParam
OsiStrParam
Definition: OsiSolverParameters.hpp:88
OsiXprSolverInterface::iXprCallCount_
static int iXprCallCount_
Definition: OsiXprSolverInterface.hpp:614
OsiXprSolverInterface::setRowSetBounds
virtual void setRowSetBounds(const int *indexFirst, const int *indexLast, const double *boundList)
Set the bounds on a number of rows simultaneously The default implementation just invokes setRowLowe...
OsiXprSolverInterface::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.
OsiXprSolverInterface::setObjCoeff
virtual void setObjCoeff(int elementIndex, double elementValue)
Set an objective function coefficient.
OsiXprSolverInterface::getEmptyWarmStart
CoinWarmStart * getEmptyWarmStart() const
Get empty warm start object.
OsiXprSolverInterface::setMipStart
void setMipStart(bool value)
Definition: OsiXprSolverInterface.hpp:64
OsiXprSolverInterface
XPRESS-MP Solver Interface.
Definition: OsiXprSolverInterface.hpp:21
OsiSolverInterface::isBinary
virtual bool isBinary(int colIndex) const
Return true if the variable is binary.
OsiXprSolverInterface::rowupper_
double * rowupper_
Pointer to dense vector of slack variable upper bounds.
Definition: OsiXprSolverInterface.hpp:742
OsiXprSolverInterface::setRowSetTypes
virtual void setRowSetTypes(const int *indexFirst, const int *indexLast, const char *senseList, const double *rhsList, const double *rangeList)
Set the type of a number of rows simultaneously The default implementation just invokes setRowType()...
OsiXprSolverInterface::getStrParam
bool getStrParam(OsiStrParam key, std::string &value) const
Get a string parameter.
OsiXprSolverInterface::readMps
virtual int readMps(const char *filename, const char *extension="mps")
Read an mps file from the given filename.
OsiXprSolverInterface::isPrimalObjectiveLimitReached
virtual bool isPrimalObjectiveLimitReached() const
Is the given primal objective limit reached?
OsiXprSolverInterface::getInfinity
virtual double getInfinity() const
Get solver&#39;s value for infinity.
OsiXprSolverInterface::setColUpper
virtual void setColUpper(int elementIndex, double elementValue)
Set a single column upper bound Use COIN_DBL_MAX for infinity.
OsiXprSolverInterface::setLogFileName
static void setLogFileName(const char *filename)
Set logfile name.
OsiXprSolverInterface::getNumInstances
static unsigned int getNumInstances()
Return the number of instances of instantiated objects using XPRESS services.
OsiXprSolverInterfaceUnitTest
void OsiXprSolverInterfaceUnitTest(const std::string &mpsDir, const std::string &netlibDir)
A function that tests the methods in the OsiXprSolverInterface class.
OsiRowCut
Row Cut Class.
Definition: OsiRowCut.hpp:29
OsiXprSolverInterface::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 ...
OsiXprSolverInterface::initialSolve
virtual void initialSolve()
Solve initial LP relaxation.
OsiXprSolverInterface::gutsOfCopy
void gutsOfCopy(const OsiXprSolverInterface &source)
The real work of a copy constructor (used by copy and assignment)
OsiSolverInterface::applyCuts
virtual ApplyCutsReturnCode applyCuts(const OsiCuts &cs, double effectivenessLb=0.0)
Apply a collection of cuts.
CoinPackedMatrix
Sparse Matrix Base Class.
Definition: CoinPackedMatrix.hpp:79
OsiXprSolverInterface::getWarmStart
virtual CoinWarmStart * getWarmStart() const
Get warmstarting information.
OsiXprSolverInterface::OsiXprSolverInterfaceUnitTest
friend void OsiXprSolverInterfaceUnitTest(const std::string &mpsDir, const std::string &netlibDir)
A function that tests the methods in the OsiXprSolverInterface class.
OsiXprSolverInterface::getRowUpper
virtual const double * getRowUpper() const
Get pointer to array[getNumRows()] of row upper bounds.
OsiXprSolverInterface::colsol_
double * colsol_
Pointer to dense vector of primal structural variable values.
Definition: OsiXprSolverInterface.hpp:765
OsiXprSolverInterface::setRowLower
virtual void setRowLower(int elementIndex, double elementValue)
Set a single row lower bound Use -COIN_DBL_MAX for -infinity.
OsiSolverInterface.hpp
OsiXprSolverInterface::getObjValue
virtual double getObjValue() const
Get objective function value.
OsiSolverInterface::isFreeBinary
virtual bool isFreeBinary(int colIndex) const
Return true if the variable is binary and not fixed.
OsiXprSolverInterface::numInstances_
static unsigned int numInstances_
Number of live problem instances.
Definition: OsiXprSolverInterface.hpp:667
OsiXprSolverInterface::getRowSense
virtual const char * getRowSense() const
Get pointer to array[getNumRows()] of row constraint senses.
OsiXprSolverInterface::xprProbname_
std::string xprProbname_
XPRESS problem name (should be unique for each saved problem)
Definition: OsiXprSolverInterface.hpp:722
OsiXprSolverInterface::incrementInstanceCounter
static void incrementInstanceCounter()
XPRESS has a context that must be created prior to all other XPRESS calls.
OsiXprSolverInterface::gutsOfDestructor
void gutsOfDestructor()
The real work of a destructor (used by copy and assignment)
OsiXprSolverInterface::setColSetBounds
virtual void setColSetBounds(const int *indexFirst, const int *indexLast, const double *boundList)
Set the bounds on a number of columns simultaneously The default implementation just invokes setColL...
OsiXprSolverInterface::getNumIntVars
int getNumIntVars() const
Number of integer variables in the problem.
OsiXprSolverInterface::isAbandoned
virtual bool isAbandoned() const
Are there a numerical difficulties?
OsiXprSolverInterface::setRowUpper
virtual void setRowUpper(int elementIndex, double elementValue)
Set a single row upper bound Use COIN_DBL_MAX for infinity.
OsiXprSolverInterface::matrixByRow_
CoinPackedMatrix * matrixByRow_
Pointer to row-wise copy of problem matrix coefficients.
Definition: OsiXprSolverInterface.hpp:732
OsiXprSolverInterface::getRowPrice
virtual const double * getRowPrice() const
Get pointer to array[getNumRows()] of dual prices.
OsiXprSolverInterface::objcoeffs_
double * objcoeffs_
Pointer to dense vector of objective coefficients.
Definition: OsiXprSolverInterface.hpp:759
OsiXprSolverInterface::domipstart
bool domipstart
Whether to pass a column solution to XPRESS before starting MIP solve (loadmipsol) ...
Definition: OsiXprSolverInterface.hpp:803
OsiXprSolverInterface::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.
OsiXprSolverInterface::isContinuous
virtual bool isContinuous(int colIndex) const
Return true if variable is continuous.
OsiXprSolverInterface::vartype_
char * vartype_
Pointer to dense vector of variable types (as above, or &#39;C&#39; for continuous)
Definition: OsiXprSolverInterface.hpp:795
OsiXprSolverInterface::getObjCoefficients
virtual const double * getObjCoefficients() const
Get pointer to array[getNumCols()] of objective function coefficients.
OsiXprSolverInterface::logFilePtr_
static FILE * logFilePtr_
The FILE* to the logfile.
Definition: OsiXprSolverInterface.hpp:664
OsiIntParam
OsiIntParam
Definition: OsiSolverParameters.hpp:8
OsiXprSolverInterface::deleteRows
virtual void deleteRows(const int num, const int *rowIndices)
Delete a set of rows (constraints) from the problem.
OsiXprSolverInterface::getReducedCost
virtual const double * getReducedCost() const
Get a pointer to array[getNumCols()] of reduced costs.
OsiXprSolverInterface::addCol
virtual void addCol(const CoinPackedVectorBase &vec, const double collb, const double colub, const double obj)
Add a column (primal variable) to the problem.
OsiXprSolverInterface::addRow
virtual void addRow(const CoinPackedVectorBase &vec, const double rowlb, const double rowub)
Add a row (constraint) to the problem.
OsiXprSolverInterface::freeCachedResults
void freeCachedResults()
Destroy cached copies of problem and solution data (whenever they change)
OsiXprSolverInterface::getDblParam
bool getDblParam(OsiDblParam key, double &value) const
Get a double parameter.
OsiXprSolverInterface::setStrParam
bool setStrParam(OsiStrParam key, const std::string &value)
Set a string parameter.
OsiXprSolverInterface::clone
virtual OsiSolverInterface * clone(bool copyData=true) const
Clone.
OsiXprSolverInterface::objsense_
double objsense_
Sense of objective (1 for min; -1 for max)
Definition: OsiXprSolverInterface.hpp:762
OsiXprSolverInterface::unmarkHotStart
virtual void unmarkHotStart()
Delete the snapshot.
OsiXprSolverInterface::setRowPrice
virtual void setRowPrice(const double *rowprice)
Set dual solution vector.
OsiXprSolverInterface::getVarTypes
void getVarTypes() const
Build cached copy of variable types.
CoinWarmStart
Abstract base class for warm start information.
Definition: CoinWarmStart.hpp:21
OsiXprSolverInterface::colupper_
double * colupper_
Pointer to dense vector of structural variable upper bounds.
Definition: OsiXprSolverInterface.hpp:736
OsiXprSolverInterface::deleteCols
virtual void deleteCols(const int num, const int *colIndices)
Remove a set of columns (primal variables) from the problem.
OsiXprSolverInterface::getMatrixByCol
virtual const CoinPackedMatrix * getMatrixByCol() const
Get pointer to column-wise copy of matrix.
OsiXprSolverInterface::getLogFilePtr
static FILE * getLogFilePtr()
Get logfile FILE *.
OsiXprSolverInterface::ivarind_
int * ivarind_
Pointer to list of indices of XPRESS &quot;global&quot; variables.
Definition: OsiXprSolverInterface.hpp:780
OsiXprSolverInterface::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.
OsiXprSolverInterface::getNumCols
virtual int getNumCols() const
Get number of columns.