ClpModel.hpp
Go to the documentation of this file.
1 /* $Id: ClpModel.hpp 1525 2010-02-26 17:27:59Z mjs $ */
2 // Copyright (C) 2002, International Business Machines
3 // Corporation and others. All Rights Reserved.
4 #ifndef ClpModel_H
5 #define ClpModel_H
6 
7 #include "ClpConfig.h"
8 
9 #include <iostream>
10 #include <cassert>
11 #include <cmath>
12 #include <vector>
13 #include <string>
14 //#ifndef COIN_USE_CLP
15 //#define COIN_USE_CLP
16 //#endif
17 #include "ClpPackedMatrix.hpp"
18 #include "CoinMessageHandler.hpp"
19 #include "CoinHelperFunctions.hpp"
20 #include "CoinFinite.hpp"
21 #include "ClpParameters.hpp"
22 #include "ClpObjective.hpp"
23 class ClpEventHandler;
33 class CoinBuild;
34 class CoinModel;
35 class ClpModel {
36 
37 public:
38 
44  ClpModel (bool emptyMessages = false );
46 
51  ClpModel(const ClpModel & rhs, int scalingMode = -1);
53  ClpModel & operator=(const ClpModel & rhs);
58  ClpModel (const ClpModel * wholeModel,
59  int numberRows, const int * whichRows,
60  int numberColumns, const int * whichColumns,
61  bool dropNames = true, bool dropIntegers = true);
63  ~ClpModel ( );
65 
79  void loadProblem ( const ClpMatrixBase& matrix,
80  const double* collb, const double* colub,
81  const double* obj,
82  const double* rowlb, const double* rowub,
83  const double * rowObjective = NULL);
84  void loadProblem ( const CoinPackedMatrix& matrix,
85  const double* collb, const double* colub,
86  const double* obj,
87  const double* rowlb, const double* rowub,
88  const double * rowObjective = NULL);
89 
92  void loadProblem ( const int numcols, const int numrows,
93  const CoinBigIndex* start, const int* index,
94  const double* value,
95  const double* collb, const double* colub,
96  const double* obj,
97  const double* rowlb, const double* rowub,
98  const double * rowObjective = NULL);
104  int loadProblem ( CoinModel & modelObject, bool tryPlusMinusOne = false);
106  void loadProblem ( const int numcols, const int numrows,
107  const CoinBigIndex* start, const int* index,
108  const double* value, const int * length,
109  const double* collb, const double* colub,
110  const double* obj,
111  const double* rowlb, const double* rowub,
112  const double * rowObjective = NULL);
114  void loadQuadraticObjective(const int numberColumns,
115  const CoinBigIndex * start,
116  const int * column, const double * element);
117  void loadQuadraticObjective ( const CoinPackedMatrix& matrix);
121  void setRowObjective(const double * rowObjective);
123  int readMps(const char *filename,
124  bool keepNames = false,
125  bool ignoreErrors = false);
127  int readGMPL(const char *filename, const char * dataName,
128  bool keepNames = false);
130  void copyInIntegerInformation(const char * information);
134  void setContinuous(int index);
136  void setInteger(int index);
138  bool isInteger(int index) const;
140  void resize (int newNumberRows, int newNumberColumns);
142  void deleteRows(int number, const int * which);
144  void addRow(int numberInRow, const int * columns,
145  const double * elements, double rowLower = -COIN_DBL_MAX,
146  double rowUpper = COIN_DBL_MAX);
148  void addRows(int number, const double * rowLower,
149  const double * rowUpper,
150  const CoinBigIndex * rowStarts, const int * columns,
151  const double * elements);
153  void addRows(int number, const double * rowLower,
154  const double * rowUpper,
155  const CoinBigIndex * rowStarts, const int * rowLengths,
156  const int * columns,
157  const double * elements);
158 #ifndef CLP_NO_VECTOR
159  void addRows(int number, const double * rowLower,
160  const double * rowUpper,
161  const CoinPackedVectorBase * const * rows);
162 #endif
163 
168  int addRows(const CoinBuild & buildObject, bool tryPlusMinusOne = false,
169  bool checkDuplicates = true);
178  int addRows(CoinModel & modelObject, bool tryPlusMinusOne = false,
179  bool checkDuplicates = true);
180 
182  void deleteColumns(int number, const int * which);
184  void addColumn(int numberInColumn,
185  const int * rows,
186  const double * elements,
187  double columnLower = 0.0,
188  double columnUpper = COIN_DBL_MAX,
189  double objective = 0.0);
191  void addColumns(int number, const double * columnLower,
192  const double * columnUpper,
193  const double * objective,
194  const CoinBigIndex * columnStarts, const int * rows,
195  const double * elements);
196  void addColumns(int number, const double * columnLower,
197  const double * columnUpper,
198  const double * objective,
199  const CoinBigIndex * columnStarts, const int * columnLengths,
200  const int * rows,
201  const double * elements);
202 #ifndef CLP_NO_VECTOR
203  void addColumns(int number, const double * columnLower,
204  const double * columnUpper,
205  const double * objective,
206  const CoinPackedVectorBase * const * columns);
207 #endif
208 
213  int addColumns(const CoinBuild & buildObject, bool tryPlusMinusOne = false,
214  bool checkDuplicates = true);
222  int addColumns(CoinModel & modelObject, bool tryPlusMinusOne = false,
223  bool checkDuplicates = true);
225  inline void modifyCoefficient(int row, int column, double newElement,
226  bool keepZero = false) {
227  matrix_->modifyCoefficient(row, column, newElement, keepZero);
228  }
230  void chgRowLower(const double * rowLower);
232  void chgRowUpper(const double * rowUpper);
234  void chgColumnLower(const double * columnLower);
236  void chgColumnUpper(const double * columnUpper);
238  void chgObjCoefficients(const double * objIn);
242  void borrowModel(ClpModel & otherModel);
245  void returnModel(ClpModel & otherModel);
246 
248  void createEmptyMatrix();
256  int cleanMatrix(double threshold = 1.0e-20);
258  void copy(const ClpMatrixBase * from, ClpMatrixBase * & to);
259 #ifndef CLP_NO_STD
260  void dropNames();
263  void copyNames(std::vector<std::string> & rowNames,
264  std::vector<std::string> & columnNames);
266  void copyRowNames(const std::vector<std::string> & rowNames, int first, int last);
268  void copyColumnNames(const std::vector<std::string> & columnNames, int first, int last);
270  void copyRowNames(const char * const * rowNames, int first, int last);
272  void copyColumnNames(const char * const * columnNames, int first, int last);
274  void setRowName(int rowIndex, std::string & name) ;
276  void setColumnName(int colIndex, std::string & name) ;
277 #endif
278 
285  int findNetwork(char * rotate, double fractionNeeded = 0.75);
288  CoinModel * createCoinModel() const;
289 
302  int writeMps(const char *filename,
303  int formatType = 0, int numberAcross = 2,
304  double objSense = 0.0) const ;
306 
308  inline int numberRows() const {
310  return numberRows_;
311  }
312  inline int getNumRows() const {
313  return numberRows_;
314  }
316  inline int getNumCols() const {
317  return numberColumns_;
318  }
319  inline int numberColumns() const {
320  return numberColumns_;
321  }
323  inline double primalTolerance() const {
325  }
326  void setPrimalTolerance( double value) ;
328  inline double dualTolerance() const {
329  return dblParam_[ClpDualTolerance];
330  }
331  void setDualTolerance( double value) ;
333  inline double primalObjectiveLimit() const {
335  }
336  void setPrimalObjectiveLimit(double value);
338  inline double dualObjectiveLimit() const {
340  }
341  void setDualObjectiveLimit(double value);
343  inline double objectiveOffset() const {
344  return dblParam_[ClpObjOffset];
345  }
346  void setObjectiveOffset(double value);
348  inline double presolveTolerance() const {
350  }
351 #ifndef CLP_NO_STD
352  inline std::string problemName() const {
353  return strParam_[ClpProbName];
354  }
355 #endif
356  inline int numberIterations() const {
358  return numberIterations_;
359  }
360  inline int getIterationCount() const {
361  return numberIterations_;
362  }
363  inline void setNumberIterations(int numberIterationsNew) {
364  numberIterations_ = numberIterationsNew;
365  }
367  inline int solveType() const {
368  return solveType_;
369  }
370  inline void setSolveType(int type) {
371  solveType_ = type;
372  }
374  inline int maximumIterations() const {
376  }
377  void setMaximumIterations(int value);
379  inline double maximumSeconds() const {
380  return dblParam_[ClpMaxSeconds];
381  }
382  void setMaximumSeconds(double value);
384  bool hitMaximumIterations() const;
394  inline int status() const {
395  return problemStatus_;
396  }
397  inline int problemStatus() const {
398  return problemStatus_;
399  }
401  inline void setProblemStatus(int problemStatusNew) {
402  problemStatus_ = problemStatusNew;
403  }
418  inline int secondaryStatus() const {
419  return secondaryStatus_;
420  }
421  inline void setSecondaryStatus(int newstatus) {
422  secondaryStatus_ = newstatus;
423  }
425  inline bool isAbandoned() const {
426  return problemStatus_ == 4;
427  }
429  inline bool isProvenOptimal() const {
430  return problemStatus_ == 0;
431  }
433  inline bool isProvenPrimalInfeasible() const {
434  return problemStatus_ == 1;
435  }
437  inline bool isProvenDualInfeasible() const {
438  return problemStatus_ == 2;
439  }
441  bool isPrimalObjectiveLimitReached() const ;
443  bool isDualObjectiveLimitReached() const ;
445  inline bool isIterationLimitReached() const {
446  return problemStatus_ == 3;
447  }
449  inline double optimizationDirection() const {
450  return optimizationDirection_;
451  }
452  inline double getObjSense() const {
453  return optimizationDirection_;
454  }
455  void setOptimizationDirection(double value);
457  inline double * primalRowSolution() const {
458  return rowActivity_;
459  }
460  inline const double * getRowActivity() const {
461  return rowActivity_;
462  }
464  inline double * primalColumnSolution() const {
465  return columnActivity_;
466  }
467  inline const double * getColSolution() const {
468  return columnActivity_;
469  }
470  inline void setColSolution(const double * input) {
471  memcpy(columnActivity_, input, numberColumns_ * sizeof(double));
472  }
474  inline double * dualRowSolution() const {
475  return dual_;
476  }
477  inline const double * getRowPrice() const {
478  return dual_;
479  }
481  inline double * dualColumnSolution() const {
482  return reducedCost_;
483  }
484  inline const double * getReducedCost() const {
485  return reducedCost_;
486  }
488  inline double* rowLower() const {
489  return rowLower_;
490  }
491  inline const double* getRowLower() const {
492  return rowLower_;
493  }
495  inline double* rowUpper() const {
496  return rowUpper_;
497  }
498  inline const double* getRowUpper() const {
499  return rowUpper_;
500  }
501  //-------------------------------------------------------------------------
505  void setObjectiveCoefficient( int elementIndex, double elementValue );
507  inline void setObjCoeff( int elementIndex, double elementValue ) {
508  setObjectiveCoefficient( elementIndex, elementValue);
509  }
510 
513  void setColumnLower( int elementIndex, double elementValue );
514 
517  void setColumnUpper( int elementIndex, double elementValue );
518 
520  void setColumnBounds( int elementIndex,
521  double lower, double upper );
522 
531  void setColumnSetBounds(const int* indexFirst,
532  const int* indexLast,
533  const double* boundList);
534 
537  inline void setColLower( int elementIndex, double elementValue ) {
538  setColumnLower(elementIndex, elementValue);
539  }
542  inline void setColUpper( int elementIndex, double elementValue ) {
543  setColumnUpper(elementIndex, elementValue);
544  }
545 
547  inline void setColBounds( int elementIndex,
548  double lower, double upper ) {
549  setColumnBounds(elementIndex, lower, upper);
550  }
551 
558  inline void setColSetBounds(const int* indexFirst,
559  const int* indexLast,
560  const double* boundList) {
561  setColumnSetBounds(indexFirst, indexLast, boundList);
562  }
563 
566  void setRowLower( int elementIndex, double elementValue );
567 
570  void setRowUpper( int elementIndex, double elementValue ) ;
571 
573  void setRowBounds( int elementIndex,
574  double lower, double upper ) ;
575 
582  void setRowSetBounds(const int* indexFirst,
583  const int* indexLast,
584  const double* boundList);
585 
587  inline const double * rowScale() const {
589  return rowScale_;
590  }
591  inline const double * columnScale() const {
592  return columnScale_;
593  }
594  inline const double * inverseRowScale() const {
595  return inverseRowScale_;
596  }
597  inline const double * inverseColumnScale() const {
598  return inverseColumnScale_;
599  }
600  inline double * mutableRowScale() const {
601  return rowScale_;
602  }
603  inline double * mutableColumnScale() const {
604  return columnScale_;
605  }
606  inline double * mutableInverseRowScale() const {
607  return inverseRowScale_;
608  }
609  inline double * mutableInverseColumnScale() const {
610  return inverseColumnScale_;
611  }
612  void setRowScale(double * scale) ;
613  void setColumnScale(double * scale);
615  inline double objectiveScale() const {
616  return objectiveScale_;
617  }
618  inline void setObjectiveScale(double value) {
619  objectiveScale_ = value;
620  }
622  inline double rhsScale() const {
623  return rhsScale_;
624  }
625  inline void setRhsScale(double value) {
626  rhsScale_ = value;
627  }
629  void scaling(int mode = 1);
632  void unscale();
634  inline int scalingFlag() const {
635  return scalingFlag_;
636  }
638  inline double * objective() const {
639  if (objective_) {
640  double offset;
641  return objective_->gradient(NULL, NULL, offset, false);
642  } else {
643  return NULL;
644  }
645  }
646  inline double * objective(const double * solution, double & offset, bool refresh = true) const {
647  offset = 0.0;
648  if (objective_) {
649  return objective_->gradient(NULL, solution, offset, refresh);
650  } else {
651  return NULL;
652  }
653  }
654  inline const double * getObjCoefficients() const {
655  if (objective_) {
656  double offset;
657  return objective_->gradient(NULL, NULL, offset, false);
658  } else {
659  return NULL;
660  }
661  }
663  inline double * rowObjective() const {
664  return rowObjective_;
665  }
666  inline const double * getRowObjCoefficients() const {
667  return rowObjective_;
668  }
670  inline double * columnLower() const {
671  return columnLower_;
672  }
673  inline const double * getColLower() const {
674  return columnLower_;
675  }
677  inline double * columnUpper() const {
678  return columnUpper_;
679  }
680  inline const double * getColUpper() const {
681  return columnUpper_;
682  }
684  inline CoinPackedMatrix * matrix() const {
685  if ( matrix_ == NULL ) return NULL;
686  else return matrix_->getPackedMatrix();
687  }
689  inline int getNumElements() const {
690  return matrix_->getNumElements();
691  }
694  inline double getSmallElementValue() const {
695  return smallElement_;
696  }
697  inline void setSmallElementValue(double value) {
698  smallElement_ = value;
699  }
701  inline ClpMatrixBase * rowCopy() const {
702  return rowCopy_;
703  }
705  void setNewRowCopy(ClpMatrixBase * newCopy);
707  inline ClpMatrixBase * clpMatrix() const {
708  return matrix_;
709  }
711  inline ClpPackedMatrix * clpScaledMatrix() const {
712  return scaledMatrix_;
713  }
715  inline void setClpScaledMatrix(ClpPackedMatrix * scaledMatrix) {
716  delete scaledMatrix_;
717  scaledMatrix_ = scaledMatrix;
718  }
724  void replaceMatrix(ClpMatrixBase * matrix, bool deleteCurrent = false);
730  inline void replaceMatrix(CoinPackedMatrix * newmatrix,
731  bool deleteCurrent = false) {
732  replaceMatrix(new ClpPackedMatrix(newmatrix), deleteCurrent);
733  }
735  inline double objectiveValue() const {
737  }
738  inline void setObjectiveValue(double value) {
740  }
741  inline double getObjValue() const {
743  }
745  inline char * integerInformation() const {
746  return integerType_;
747  }
750  double * infeasibilityRay() const;
751  double * unboundedRay() const;
753  inline bool statusExists() const {
754  return (status_ != NULL);
755  }
757  inline unsigned char * statusArray() const {
758  return status_;
759  }
762  unsigned char * statusCopy() const;
764  void copyinStatus(const unsigned char * statusArray);
765 
767  inline void setUserPointer (void * pointer) {
768  userPointer_ = pointer;
769  }
770  inline void * getUserPointer () const {
771  return userPointer_;
772  }
774  inline void setTrustedUserPointer (ClpTrustedData * pointer) {
775  trustedUserPointer_ = pointer;
776  }
778  return trustedUserPointer_;
779  }
781  inline int whatsChanged() const {
782  return whatsChanged_;
783  }
784  inline void setWhatsChanged(int value) {
785  whatsChanged_ = value;
786  }
788  inline int numberThreads() const {
789  return numberThreads_;
790  }
791  inline void setNumberThreads(int value) {
792  numberThreads_ = value;
793  }
795 
797  void passInMessageHandler(CoinMessageHandler * handler);
800  CoinMessageHandler * pushMessageHandler(CoinMessageHandler * handler,
801  bool & oldDefault);
803  void popMessageHandler(CoinMessageHandler * oldHandler, bool oldDefault);
805  void newLanguage(CoinMessages::Language language);
806  inline void setLanguage(CoinMessages::Language language) {
807  newLanguage(language);
808  }
810  inline CoinMessageHandler * messageHandler() const {
811  return handler_;
812  }
814  inline CoinMessages messages() const {
815  return messages_;
816  }
818  inline CoinMessages * messagesPointer() {
819  return & messages_;
820  }
822  inline CoinMessages coinMessages() const {
823  return coinMessages_;
824  }
826  inline CoinMessages * coinMessagesPointer() {
827  return & coinMessages_;
828  }
837  inline void setLogLevel(int value) {
838  handler_->setLogLevel(value);
839  }
840  inline int logLevel() const {
841  return handler_->logLevel();
842  }
844  inline bool defaultHandler() const {
845  return defaultHandler_;
846  }
850  inline ClpEventHandler * eventHandler() const {
851  return eventHandler_;
852  }
854  inline CoinThreadRandom * randomNumberGenerator() {
855  return &randomNumberGenerator_;
856  }
858  inline CoinThreadRandom & mutableRandomNumberGenerator() {
859  return randomNumberGenerator_;
860  }
862  inline void setRandomSeed(int value) {
863  randomNumberGenerator_.setSeed(value);
864  }
866  inline int lengthNames() const {
867  return lengthNames_;
868  }
869 #ifndef CLP_NO_STD
870  inline void setLengthNames(int value) {
872  lengthNames_ = value;
873  }
875  inline const std::vector<std::string> * rowNames() const {
876  return &rowNames_;
877  }
878  inline const std::string& rowName(int iRow) const {
879  return rowNames_[iRow];
880  }
882  std::string getRowName(int iRow) const;
884  inline const std::vector<std::string> * columnNames() const {
885  return &columnNames_;
886  }
887  inline const std::string& columnName(int iColumn) const {
888  return columnNames_[iColumn];
889  }
891  std::string getColumnName(int iColumn) const;
892 #endif
893  inline ClpObjective * objectiveAsObject() const {
895  return objective_;
896  }
897  void setObjective(ClpObjective * objective);
898  inline void setObjectivePointer(ClpObjective * newobjective) {
899  objective_ = newobjective;
900  }
903  int emptyProblem(int * infeasNumber = NULL, double * infeasSum = NULL, bool printMessage = true);
904 
906 
915  void times(double scalar,
916  const double * x, double * y) const;
920  void transposeTimes(double scalar,
921  const double * x, double * y) const ;
923 
924 
925  //---------------------------------------------------------------------------
943  bool setIntParam(ClpIntParam key, int value) ;
946  bool setDblParam(ClpDblParam key, double value) ;
947 #ifndef CLP_NO_STD
948  bool setStrParam(ClpStrParam key, const std::string & value);
950 #endif
951  // Get an integer parameter
952  inline bool getIntParam(ClpIntParam key, int& value) const {
953  if (key < ClpLastIntParam) {
954  value = intParam_[key];
955  return true;
956  } else {
957  return false;
958  }
959  }
960  // Get an double parameter
961  inline bool getDblParam(ClpDblParam key, double& value) const {
962  if (key < ClpLastDblParam) {
963  value = dblParam_[key];
964  return true;
965  } else {
966  return false;
967  }
968  }
969 #ifndef CLP_NO_STD
970  // Get a string parameter
971  inline bool getStrParam(ClpStrParam key, std::string& value) const {
972  if (key < ClpLastStrParam) {
973  value = strParam_[key];
974  return true;
975  } else {
976  return false;
977  }
978  }
979 #endif
980  void generateCpp( FILE * fp);
1014  inline unsigned int specialOptions() const {
1015  return specialOptions_;
1016  }
1017  void setSpecialOptions(unsigned int value);
1018 #define COIN_CBC_USING_CLP 0x01000000
1019  inline bool inCbcBranchAndBound() const {
1020  return (specialOptions_ & COIN_CBC_USING_CLP) != 0;
1021  }
1023 
1026 protected:
1028  void gutsOfDelete(int type);
1032  void gutsOfCopy(const ClpModel & rhs, int trueCopy = 1);
1034  void getRowBound(int iRow, double& lower, double& upper) const;
1036  void gutsOfLoadModel ( int numberRows, int numberColumns,
1037  const double* collb, const double* colub,
1038  const double* obj,
1039  const double* rowlb, const double* rowub,
1040  const double * rowObjective = NULL);
1042  void gutsOfScaling();
1044  inline double rawObjectiveValue() const {
1045  return objectiveValue_;
1046  }
1048  inline bool permanentArrays() const {
1049  return (specialOptions_ & 65536) != 0;
1050  }
1052  void startPermanentArrays();
1054  void stopPermanentArrays();
1056  const char * const * rowNamesAsChar() const;
1058  const char * const * columnNamesAsChar() const;
1060  void deleteNamesAsChar(const char * const * names, int number) const;
1062  void onStopped();
1064 
1065 
1067 protected:
1068 
1071  double optimizationDirection_;
1082  double rhsScale_;
1088  double * rowActivity_;
1092  double * dual_;
1094  double * reducedCost_;
1096  double* rowLower_;
1098  double* rowUpper_;
1102  double * rowObjective_;
1104  double * columnLower_;
1106  double * columnUpper_;
1114  double * ray_;
1116  double * rowScale_;
1118  double * columnScale_;
1133  unsigned char * status_;
1162  unsigned int whatsChanged_;
1174  unsigned int specialOptions_;
1176  CoinMessageHandler * handler_;
1180  CoinThreadRandom randomNumberGenerator_;
1183 #ifndef CLP_NO_STD
1184  std::vector<std::string> rowNames_;
1187  std::vector<std::string> columnNames_;
1188 #endif
1189  CoinMessages messages_;
1192  CoinMessages coinMessages_;
1202  CoinPackedMatrix baseMatrix_;
1204  CoinPackedMatrix baseRowCopy_;
1206  double * savedRowScale_;
1209 #ifndef CLP_NO_STD
1210  std::string strParam_[ClpLastStrParam];
1212 #endif
1213 
1214 };
1218 
1219 public:
1223  ClpDataSave ( );
1225 
1227  ClpDataSave(const ClpDataSave &);
1229  ClpDataSave & operator=(const ClpDataSave & rhs);
1231  ~ClpDataSave ( );
1232 
1234 
1236 public:
1237 
1240  double dualBound_;
1251  unsigned int specialOptions_;
1253 };
1254 
1255 #endif
const char *const * rowNamesAsChar() const
Create row names as char **.
double * mutableInverseRowScale() const
Definition: ClpModel.hpp:606
int maximumIterations() const
Maximum number of iterations.
Definition: ClpModel.hpp:374
void copyColumnNames(const std::vector< std::string > &columnNames, int first, int last)
Copies in Column names - modifies names first .. last-1.
int getNumCols() const
Number of columns.
Definition: ClpModel.hpp:316
ClpDblParam
ClpTrustedData * trustedUserPointer_
Trusted user pointer e.g. for heuristics.
Definition: ClpModel.hpp:1139
bool isAbandoned() const
Are there a numerical difficulties?
Definition: ClpModel.hpp:425
int sparseThreshold_
Definition: ClpModel.hpp:1247
void setColumnSetBounds(const int *indexFirst, const int *indexLast, const double *boundList)
Set the bounds on a number of columns simultaneously The default implementation just invokes setColL...
void * getUserPointer() const
Definition: ClpModel.hpp:770
const double * getColLower() const
Definition: ClpModel.hpp:673
double pivotTolerance_
Definition: ClpModel.hpp:1242
char * integerInformation() const
Integer information.
Definition: ClpModel.hpp:745
int scalingFlag_
Definition: ClpModel.hpp:1250
void setSmallElementValue(double value)
Definition: ClpModel.hpp:697
double * ray_
Infeasible/unbounded ray.
Definition: ClpModel.hpp:1114
double acceptablePivot_
Definition: ClpModel.hpp:1245
ClpDataSave & operator=(const ClpDataSave &rhs)
Assignment operator. This copies the data.
~ClpModel()
Destructor.
int numberIterations() const
Number of iterations.
Definition: ClpModel.hpp:357
void setUserPointer(void *pointer)
User pointer for whatever reason.
Definition: ClpModel.hpp:767
void setObjectiveCoefficient(int elementIndex, double elementValue)
Set an objective function coefficient.
CoinPackedMatrix baseMatrix_
Base packed matrix.
Definition: ClpModel.hpp:1202
This is a tiny class where data can be saved round calls.
Definition: ClpModel.hpp:1217
int numberThreads_
Number of threads (not very operational)
Definition: ClpModel.hpp:1170
double * dualRowSolution() const
Dual row solution.
Definition: ClpModel.hpp:474
int numberColumns_
Number of columns.
Definition: ClpModel.hpp:1086
double infeasibilityCost_
Definition: ClpModel.hpp:1241
double * rowUpper_
Row upper.
Definition: ClpModel.hpp:1098
double * primalRowSolution() const
Primal row solution.
Definition: ClpModel.hpp:457
ClpObjective * objectiveAsObject() const
Objective methods.
Definition: ClpModel.hpp:894
ClpEventHandler * eventHandler_
Event handler.
Definition: ClpModel.hpp:1182
void gutsOfDelete(int type)
Does most of deletion (0 = all, 1 = most)
bool defaultHandler_
Flag to say if default handler (so delete)
Definition: ClpModel.hpp:1178
void chgRowLower(const double *rowLower)
Change row lower bounds.
void copyNames(std::vector< std::string > &rowNames, std::vector< std::string > &columnNames)
Copies in names.
void setColBounds(int elementIndex, double lower, double upper)
Set a single column lower and upper bound.
Definition: ClpModel.hpp:547
double * rowUpper() const
Row upper.
Definition: ClpModel.hpp:495
void setColumnUpper(int elementIndex, double elementValue)
Set a single column upper bound Use DBL_MAX for infinity.
int writeMps(const char *filename, int formatType=0, int numberAcross=2, double objSense=0.0) const
Write the problem in MPS format to the specified file.
int solveType() const
Solve type - 1 simplex, 2 simplex interface, 3 Interior.
Definition: ClpModel.hpp:367
For a structure to be used by trusted code.
Objective Abstract Base Class.
double * savedColumnScale_
Saved column scale factors.
Definition: ClpModel.hpp:1208
void setNumberThreads(int value)
Definition: ClpModel.hpp:791
void setRowSetBounds(const int *indexFirst, const int *indexLast, const double *boundList)
Set the bounds on a number of rows simultaneously
double * reducedCost_
Reduced costs.
Definition: ClpModel.hpp:1094
char * integerType_
Integer information.
Definition: ClpModel.hpp:1135
void copyinStatus(const unsigned char *statusArray)
Copy in status (basis) vector.
bool isInteger(int index) const
Return true if the index-th variable is an integer variable.
void setDualTolerance(double value)
Number of rows.
The maximum amount the primal constraints can be violated and still be considered feasible...
int scalingFlag() const
Gets scalingFlag.
Definition: ClpModel.hpp:634
double * dual_
Duals.
Definition: ClpModel.hpp:1092
unsigned int specialOptions_
For advanced options See get and set for meaning.
Definition: ClpModel.hpp:1174
CoinPackedMatrix * matrix() const
Matrix (if not ClpPackedmatrix be careful about memory leak.
Definition: ClpModel.hpp:684
Just a marker, so that we can allocate a static sized array to store parameters.
bool isPrimalObjectiveLimitReached() const
Is the given primal objective limit reached?
CoinMessageHandler * messageHandler() const
Return handler.
Definition: ClpModel.hpp:810
ClpTrustedData * getTrustedUserPointer() const
Definition: ClpModel.hpp:777
unsigned int specialOptions_
Definition: ClpModel.hpp:1251
double objectiveScale() const
Scaling of objective.
Definition: ClpModel.hpp:615
ClpObjective * objective_
Objective.
Definition: ClpModel.hpp:1100
double dualBound_
Definition: ClpModel.hpp:1240
int problemStatus_
Status of problem.
Definition: ClpModel.hpp:1164
double objectiveOffset() const
Objective offset.
Definition: ClpModel.hpp:343
unsigned char * status_
Status (i.e.
Definition: ClpModel.hpp:1133
void onStopped()
On stopped - sets secondary status.
ClpPackedMatrix * clpScaledMatrix() const
Scaled ClpPackedMatrix.
Definition: ClpModel.hpp:711
void loadProblem(const ClpMatrixBase &matrix, const double *collb, const double *colub, const double *obj, const double *rowlb, const double *rowub, const double *rowObjective=NULL)
Loads a problem (the constraints on the rows are given by lower and upper bounds).
int findNetwork(char *rotate, double fractionNeeded=0.75)
Find a network subset.
bool getIntParam(ClpIntParam key, int &value) const
Set an integer parameter.
Definition: ClpModel.hpp:952
double optimizationDirection() const
Direction of optimization (1 - minimize, -1 - maximize, 0 - ignore.
Definition: ClpModel.hpp:449
void setColUpper(int elementIndex, double elementValue)
Set a single column upper bound Use DBL_MAX for infinity.
Definition: ClpModel.hpp:542
double * rowObjective_
Row Objective (? sign) - may be NULL.
Definition: ClpModel.hpp:1102
int maximumInternalColumns_
Maximum number of columns (internal arrays) in model.
Definition: ClpModel.hpp:1198
void setColLower(int elementIndex, double elementValue)
Set a single column lower bound Use -DBL_MAX for -infinity.
Definition: ClpModel.hpp:537
CoinMessages * messagesPointer()
Return pointer to messages.
Definition: ClpModel.hpp:818
double * primalColumnSolution() const
Primal column solution.
Definition: ClpModel.hpp:464
CoinThreadRandom & mutableRandomNumberGenerator()
Thread specific random number generator.
Definition: ClpModel.hpp:858
ClpDataSave()
Default constructor.
void setRowName(int rowIndex, std::string &name)
Set name of row.
int numberRows() const
Number of rows.
Definition: ClpModel.hpp:309
Primal objective limit.
void loadQuadraticObjective(const int numberColumns, const CoinBigIndex *start, const int *column, const double *element)
Load up quadratic objective.
unsigned char * statusCopy() const
Return copy of status (i.e.
std::string strParam_[ClpLastStrParam]
Array of string parameters.
Definition: ClpModel.hpp:1211
double optimizationDirection_
Direction of optimization (1 - minimize, -1 - maximize, 0 - ignore.
Definition: ClpModel.hpp:1072
ClpStrParam
void setObjCoeff(int elementIndex, double elementValue)
Set an objective function coefficient.
Definition: ClpModel.hpp:507
void setTrustedUserPointer(ClpTrustedData *pointer)
Trusted user pointer.
Definition: ClpModel.hpp:774
void copy(const ClpMatrixBase *from, ClpMatrixBase *&to)
Copy contents - resizing if necessary - otherwise re-use memory.
void returnModel(ClpModel &otherModel)
Return model - nulls all arrays so can be deleted safely also updates any scalars.
int status() const
Status of problem: -1 - unknown e.g.
Definition: ClpModel.hpp:394
virtual void modifyCoefficient(int row, int column, double newElement, bool keepZero=false)
Modify one element of packed matrix.
Just a marker, so that we can allocate a static sized array to store parameters.
bool isDualObjectiveLimitReached() const
Is the given dual objective limit reached?
void setPrimalObjectiveLimit(double value)
Number of rows.
const double * getColSolution() const
Number of rows.
Definition: ClpModel.hpp:467
void replaceMatrix(CoinPackedMatrix *newmatrix, bool deleteCurrent=false)
Replace Clp Matrix (current is not deleted unless told to and new is used) So up to user to delete cu...
Definition: ClpModel.hpp:730
int whatsChanged() const
What has changed in model (only for masochistic users)
Definition: ClpModel.hpp:781
double dualTolerance() const
Dual tolerance to use.
Definition: ClpModel.hpp:328
ClpEventHandler * eventHandler() const
Event handler.
Definition: ClpModel.hpp:850
virtual double * gradient(const ClpSimplex *model, const double *solution, double &offset, bool refresh, int includeLinear=2)=0
Returns gradient.
double presolveTolerance() const
Presolve tolerance to use.
Definition: ClpModel.hpp:348
double * mutableRowScale() const
Definition: ClpModel.hpp:600
double * columnActivity_
Column activities.
Definition: ClpModel.hpp:1090
void scaling(int mode=1)
Sets or unsets scaling, 0 -off, 1 equilibrium, 2 geometric, 3 auto, 4 auto-but-as-initialSolve-in-bab...
const double * columnScale() const
Definition: ClpModel.hpp:591
int secondaryStatus() const
Secondary status of problem - may get extended 0 - none 1 - primal infeasible because dual limit reac...
Definition: ClpModel.hpp:418
bool isProvenOptimal() const
Is optimality proven?
Definition: ClpModel.hpp:429
double * columnUpper_
Column Upper.
Definition: ClpModel.hpp:1106
void setRowObjective(const double *rowObjective)
This just loads up a row objective.
const double * inverseColumnScale() const
Definition: ClpModel.hpp:597
double objectiveScale_
Scaling of objective.
Definition: ClpModel.hpp:1080
int numberThreads() const
Number of threads (not really being used)
Definition: ClpModel.hpp:788
void deleteRows(int number, const int *which)
Deletes rows.
double * inverseRowScale_
Inverse row scale factors for matrix (end of rowScale_)
Definition: ClpModel.hpp:1120
const double * getRowUpper() const
Number of rows.
Definition: ClpModel.hpp:498
void stopPermanentArrays()
Stop using maximumRows_ and Columns_.
double * savedRowScale_
Saved row scale factors for matrix.
Definition: ClpModel.hpp:1206
const double * rowScale() const
Scaling.
Definition: ClpModel.hpp:588
void setNewRowCopy(ClpMatrixBase *newCopy)
Set new row matrix.
double * rowObjective() const
Row Objective.
Definition: ClpModel.hpp:663
bool statusExists() const
See if status (i.e. basis) array exists (partly for OsiClp)
Definition: ClpModel.hpp:753
void setColSetBounds(const int *indexFirst, const int *indexLast, const double *boundList)
Set the bounds on a number of columns simultaneously
Definition: ClpModel.hpp:558
double * dualColumnSolution() const
Reduced costs.
Definition: ClpModel.hpp:481
void setColumnBounds(int elementIndex, double lower, double upper)
Set a single column lower and upper bound.
int cleanMatrix(double threshold=1.0e-20)
Really clean up matrix (if ClpPackedMatrix).
unsigned int whatsChanged_
Whats changed since last solve.
Definition: ClpModel.hpp:1162
const double * getRowLower() const
Number of rows.
Definition: ClpModel.hpp:491
void setRowScale(double *scale)
double * mutableInverseColumnScale() const
Definition: ClpModel.hpp:609
double dualObjectiveLimit() const
Dual objective limit.
Definition: ClpModel.hpp:338
const double * getReducedCost() const
Number of rows.
Definition: ClpModel.hpp:484
void addRow(int numberInRow, const int *columns, const double *elements, double rowLower=-COIN_DBL_MAX, double rowUpper=COIN_DBL_MAX)
Add one row.
CoinModel * createCoinModel() const
This creates a coinModel object.
double * columnLower_
Column Lower.
Definition: ClpModel.hpp:1104
int scalingFlag_
Scale flag, 0 none, 1 equilibrium, 2 geometric, 3, auto, 4 dynamic, 5 geometric on rows...
Definition: ClpModel.hpp:1125
void chgObjCoefficients(const double *objIn)
Change objective coefficients.
bool setStrParam(ClpStrParam key, const std::string &value)
Set an string parameter.
void passInMessageHandler(CoinMessageHandler *handler)
Pass in Message handler (not deleted at end)
void setRhsScale(double value)
Definition: ClpModel.hpp:625
int maximumColumns_
Maximum number of columns in model.
Definition: ClpModel.hpp:1194
const double * inverseRowScale() const
Definition: ClpModel.hpp:594
double * objective(const double *solution, double &offset, bool refresh=true) const
Definition: ClpModel.hpp:646
void copyRowNames(const std::vector< std::string > &rowNames, int first, int last)
Copies in Row names - modifies names first .. last-1.
bool setDblParam(ClpDblParam key, double value)
Set an double parameter.
ClpIntParam
This is where to put any useful stuff.
#define COIN_CBC_USING_CLP
Definition: ClpModel.hpp:1018
void deleteIntegerInformation()
Drop integer informations.
bool isProvenPrimalInfeasible() const
Is primal infeasiblity proven?
Definition: ClpModel.hpp:433
bool getStrParam(ClpStrParam key, std::string &value) const
Set an integer parameter.
Definition: ClpModel.hpp:971
void setWhatsChanged(int value)
Definition: ClpModel.hpp:784
double rawObjectiveValue() const
Objective value - always minimize.
Definition: ClpModel.hpp:1044
void setObjectiveValue(double value)
Definition: ClpModel.hpp:738
CoinPackedMatrix baseRowCopy_
Base row copy.
Definition: ClpModel.hpp:1204
void deleteNamesAsChar(const char *const *names, int number) const
Delete char * version of names.
double getObjSense() const
Number of rows.
Definition: ClpModel.hpp:452
double * rowLower() const
Row lower.
Definition: ClpModel.hpp:488
double maximumSeconds() const
Maximum time in seconds (from when set called)
Definition: ClpModel.hpp:379
int intParam_[ClpLastIntParam]
Array of integer parameters.
Definition: ClpModel.hpp:1141
void setSolveType(int type)
Number of rows.
Definition: ClpModel.hpp:370
void gutsOfCopy(const ClpModel &rhs, int trueCopy=1)
Does most of copying If trueCopy 0 then just points to arrays If -1 leaves as much as possible...
int numberColumns() const
Number of rows.
Definition: ClpModel.hpp:319
bool defaultHandler() const
Return true if default handler.
Definition: ClpModel.hpp:844
int forceFactorization_
Definition: ClpModel.hpp:1249
double zeroFactorizationTolerance_
Definition: ClpModel.hpp:1243
double zeroSimplexTolerance_
Definition: ClpModel.hpp:1244
Just a marker, so that we can allocate a static sized array to store parameters.
virtual CoinBigIndex getNumElements() const =0
Number of entries in the packed matrix.
int numberRows_
Number of rows.
Definition: ClpModel.hpp:1084
void startPermanentArrays()
Start using maximumRows_ and Columns_.
void setColumnName(int colIndex, std::string &name)
Set name of col.
CoinMessages * coinMessagesPointer()
Return pointer to Coin messages.
Definition: ClpModel.hpp:826
double objectiveValue() const
Objective value.
Definition: ClpModel.hpp:735
void getRowBound(int iRow, double &lower, double &upper) const
gets lower and upper bounds on rows
int getNumElements() const
Number of elements in matrix.
Definition: ClpModel.hpp:689
ClpMatrixBase * rowCopy() const
Row Matrix.
Definition: ClpModel.hpp:701
std::vector< std::string > columnNames_
Column names.
Definition: ClpModel.hpp:1187
double objectiveValue_
Objective value.
Definition: ClpModel.hpp:1076
int solveType_
Solve type - 1 simplex, 2 simplex interface, 3 Interior.
Definition: ClpModel.hpp:1145
bool isIterationLimitReached() const
Iteration limit reached?
Definition: ClpModel.hpp:445
ClpModel(bool emptyMessages=false)
Default constructor.
void generateCpp(FILE *fp)
Create C++ lines to get to current state.
const std::string & rowName(int iRow) const
Pass in Message handler (not deleted at end)
Definition: ClpModel.hpp:878
int readMps(const char *filename, bool keepNames=false, bool ignoreErrors=false)
Read an mps file from the given filename.
void addColumns(int number, const double *columnLower, const double *columnUpper, const double *objective, const CoinBigIndex *columnStarts, const int *rows, const double *elements)
Add columns.
void setObjectivePointer(ClpObjective *newobjective)
Pass in Message handler (not deleted at end)
Definition: ClpModel.hpp:898
void addRows(int number, const double *rowLower, const double *rowUpper, const CoinBigIndex *rowStarts, const int *columns, const double *elements)
Add rows.
Set Dual objective limit.
unsigned char * statusArray() const
Return address of status (i.e. basis) array (char[numberRows+numberColumns])
Definition: ClpModel.hpp:757
double getObjValue() const
Definition: ClpModel.hpp:741
const std::vector< std::string > * columnNames() const
Column names.
Definition: ClpModel.hpp:884
CoinMessages messages() const
Return messages.
Definition: ClpModel.hpp:814
The maximum amount the dual constraints can be violated and still be considered feasible.
Name of the problem.
double rhsScale_
Scaling of rhs and bounds.
Definition: ClpModel.hpp:1082
void borrowModel(ClpModel &otherModel)
Borrow model.
void gutsOfScaling()
Does much of scaling.
void setColSolution(const double *input)
Number of rows.
Definition: ClpModel.hpp:470
Base class for Clp event handling.
const double * getObjCoefficients() const
Definition: ClpModel.hpp:654
void chgColumnLower(const double *columnLower)
Change column lower bounds.
void setDualObjectiveLimit(double value)
Number of rows.
Abstract base class for Clp Matrices.
void setInteger(int index)
Set the index-th variable to be an integer variable.
const double * getRowPrice() const
Number of rows.
Definition: ClpModel.hpp:477
ClpMatrixBase * clpMatrix() const
Clp Matrix.
Definition: ClpModel.hpp:707
void newLanguage(CoinMessages::Language language)
Set language.
void setObjective(ClpObjective *objective)
Pass in Message handler (not deleted at end)
int secondaryStatus_
Secondary status of problem.
Definition: ClpModel.hpp:1166
int numberIterations_
Number of iterations.
Definition: ClpModel.hpp:1143
void setOptimizationDirection(double value)
Number of rows.
double * columnUpper() const
Column Upper.
Definition: ClpModel.hpp:677
~ClpDataSave()
Destructor.
void unscale()
If we constructed a "really" scaled model then this reverses the operation.
void setRowUpper(int elementIndex, double elementValue)
Set a single row upper bound Use DBL_MAX for infinity.
bool getDblParam(ClpDblParam key, double &value) const
Set an integer parameter.
Definition: ClpModel.hpp:961
void setColumnScale(double *scale)
void setNumberIterations(int numberIterationsNew)
Number of rows.
Definition: ClpModel.hpp:363
int lengthNames_
length of names (0 means no names)
Definition: ClpModel.hpp:1168
const char *const * columnNamesAsChar() const
Create column names as char **.
void resize(int newNumberRows, int newNumberColumns)
Resizes rim part of model.
virtual CoinPackedMatrix * getPackedMatrix() const =0
Return a complete CoinPackedMatrix.
void setMaximumIterations(int value)
Number of rows.
CoinMessageHandler * handler_
Message handler.
Definition: ClpModel.hpp:1176
CoinMessages coinMessages_
Coin messages.
Definition: ClpModel.hpp:1192
void setProblemStatus(int problemStatusNew)
Set problem status.
Definition: ClpModel.hpp:401
double * mutableColumnScale() const
Definition: ClpModel.hpp:603
double primalObjectiveLimit() const
Primal objective limit.
Definition: ClpModel.hpp:333
double * rowScale_
Row scale factors for matrix.
Definition: ClpModel.hpp:1116
void setLogLevel(int value)
Amount of print out: 0 - none 1 - just final 2 - just factorizations 3 - as 2 plus a bit more 4 - ver...
Definition: ClpModel.hpp:837
void transposeTimes(double scalar, const double *x, double *y) const
Return y + x * scalar * A in y.
std::vector< std::string > rowNames_
Row names.
Definition: ClpModel.hpp:1185
void chgColumnUpper(const double *columnUpper)
Change column upper bounds.
void setObjectiveScale(double value)
Definition: ClpModel.hpp:618
bool isProvenDualInfeasible() const
Is dual infeasiblity proven?
Definition: ClpModel.hpp:437
void setClpScaledMatrix(ClpPackedMatrix *scaledMatrix)
Sets pointer to scaled ClpPackedMatrix.
Definition: ClpModel.hpp:715
int getNumRows() const
Number of rows.
Definition: ClpModel.hpp:312
void setLengthNames(int value)
length of names (0 means no names0
Definition: ClpModel.hpp:871
int readGMPL(const char *filename, const char *dataName, bool keepNames=false)
Read GMPL files from the given filenames.
void dropNames()
Drops names - makes lengthnames 0 and names empty.
double * rowLower_
Row lower.
Definition: ClpModel.hpp:1096
void setContinuous(int index)
Set the index-th variable to be a continuous variable.
int maximumInternalRows_
Maximum number of rows (internal arrays) in model.
Definition: ClpModel.hpp:1200
double rhsScale() const
Scaling of rhs and bounds.
Definition: ClpModel.hpp:622
double * unboundedRay() const
void deleteColumns(int number, const int *which)
Deletes columns.
void gutsOfLoadModel(int numberRows, int numberColumns, const double *collb, const double *colub, const double *obj, const double *rowlb, const double *rowub, const double *rowObjective=NULL)
puts in format I like - 4 array matrix - may make row copy
double getSmallElementValue() const
Small element value - elements less than this set to zero, default is 1.0e-20.
Definition: ClpModel.hpp:694
void modifyCoefficient(int row, int column, double newElement, bool keepZero=false)
Modify one element of a matrix.
Definition: ClpModel.hpp:225
void setColumnLower(int elementIndex, double elementValue)
Set a single column lower bound Use -DBL_MAX for -infinity.
void times(double scalar, const double *x, double *y) const
Return y + A * x * scalar in y.
void deleteQuadraticObjective()
Get rid of quadratic objective.
void setRowLower(int elementIndex, double elementValue)
Set a single row lower bound Use -DBL_MAX for -infinity.
void setMaximumSeconds(double value)
Number of rows.
double smallElement_
Small element value.
Definition: ClpModel.hpp:1078
void setObjectiveOffset(double value)
Number of rows.
Maximum time in seconds - after this action is as max iterations.
double * rowActivity_
Row activities.
Definition: ClpModel.hpp:1088
void setPrimalTolerance(double value)
Number of rows.
double * objective() const
Objective.
Definition: ClpModel.hpp:638
const std::string & columnName(int iColumn) const
Pass in Message handler (not deleted at end)
Definition: ClpModel.hpp:887
void * userPointer_
User pointer for whatever reason.
Definition: ClpModel.hpp:1137
void setRandomSeed(int value)
Set seed for thread specific random number generator.
Definition: ClpModel.hpp:862
void replaceMatrix(ClpMatrixBase *matrix, bool deleteCurrent=false)
Replace Clp Matrix (current is not deleted unless told to and new is used) So up to user to delete cu...
double * columnScale_
Column scale factors.
Definition: ClpModel.hpp:1118
CoinMessages messages_
Messages.
Definition: ClpModel.hpp:1190
Objective function constant.
int maximumRows_
Maximum number of rows in model.
Definition: ClpModel.hpp:1196
int logLevel() const
Pass in Message handler (not deleted at end)
Definition: ClpModel.hpp:840
const std::vector< std::string > * rowNames() const
Row names.
Definition: ClpModel.hpp:875
std::string getRowName(int iRow) const
Return name or Rnnnnnnn.
void createEmptyMatrix()
Create empty ClpPackedMatrix.
CoinMessageHandler * pushMessageHandler(CoinMessageHandler *handler, bool &oldDefault)
Pass in Message handler (not deleted at end) and return current.
void addColumn(int numberInColumn, const int *rows, const double *elements, double columnLower=0.0, double columnUpper=COIN_DBL_MAX, double objective=0.0)
Add one column.
CoinThreadRandom * randomNumberGenerator()
Thread specific random number generator.
Definition: ClpModel.hpp:854
double dblParam_[ClpLastDblParam]
Array of double parameters.
Definition: ClpModel.hpp:1074
double primalTolerance() const
Primal tolerance to use.
Definition: ClpModel.hpp:323
void setSecondaryStatus(int newstatus)
Number of rows.
Definition: ClpModel.hpp:421
CoinThreadRandom randomNumberGenerator_
Thread specific random number generator.
Definition: ClpModel.hpp:1180
std::string getColumnName(int iColumn) const
Return name or Cnnnnnnn.
double * infeasibilityRay() const
Infeasibility/unbounded ray (NULL returned if none/wrong) Up to user to use delete [] on these arrays...
double * inverseColumnScale_
Inverse column scale factors for matrix (end of columnScale_)
Definition: ClpModel.hpp:1122
bool inCbcBranchAndBound() const
Set an integer parameter.
Definition: ClpModel.hpp:1019
bool hitMaximumIterations() const
Returns true if hit maximum iterations (or time)
void popMessageHandler(CoinMessageHandler *oldHandler, bool oldDefault)
back to previous message handler
int lengthNames() const
length of names (0 means no names0
Definition: ClpModel.hpp:866
ClpModel & operator=(const ClpModel &rhs)
Assignment operator. This copies the data.
void copyInIntegerInformation(const char *information)
Copy in integer informations.
int problemStatus() const
Number of rows.
Definition: ClpModel.hpp:397
ClpPackedMatrix * scaledMatrix_
Scaled packed matrix.
Definition: ClpModel.hpp:1112
double objectiveScale_
Definition: ClpModel.hpp:1246
bool setIntParam(ClpIntParam key, int value)
Set an integer parameter.
const double * getRowObjCoefficients() const
Definition: ClpModel.hpp:666
ClpMatrixBase * rowCopy_
Row copy if wanted.
Definition: ClpModel.hpp:1110
ClpMatrixBase * matrix_
Packed matrix.
Definition: ClpModel.hpp:1108
void chgRowUpper(const double *rowUpper)
Change row upper bounds.
CoinMessages coinMessages() const
Return Coin messages.
Definition: ClpModel.hpp:822
void setRowBounds(int elementIndex, double lower, double upper)
Set a single row lower and upper bound.
The maximum number of iterations Clp can execute in the simplex methods.
unsigned int specialOptions() const
For advanced options 1 - Don't keep changing infeasibility weight 2 - Keep nonLinearCost round solves...
Definition: ClpModel.hpp:1014
void setSpecialOptions(unsigned int value)
Set an integer parameter.
const double * getColUpper() const
Definition: ClpModel.hpp:680
const double * getRowActivity() const
Number of rows.
Definition: ClpModel.hpp:460
int getIterationCount() const
Number of rows.
Definition: ClpModel.hpp:360
std::string problemName() const
Number of rows.
Definition: ClpModel.hpp:352
double * columnLower() const
Column Lower.
Definition: ClpModel.hpp:670
Tolerance to use in presolve.
bool permanentArrays() const
If we are using maximumRows_ and Columns_.
Definition: ClpModel.hpp:1048
void setLanguage(CoinMessages::Language language)
Pass in Message handler (not deleted at end)
Definition: ClpModel.hpp:806
void passInEventHandler(const ClpEventHandler *eventHandler)
Pass in Event handler (cloned and deleted at end)
int perturbation_
Definition: ClpModel.hpp:1248
int emptyProblem(int *infeasNumber=NULL, double *infeasSum=NULL, bool printMessage=true)
Solve a problem with no elements - return status and dual and primal infeasibilites.