source: trunk/include/ClpModel.hpp @ 393

Last change on this file since 393 was 393, checked in by forrest, 16 years ago

Some quadratic stuff

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 24.7 KB
Line 
1// Copyright (C) 2002, International Business Machines
2// Corporation and others.  All Rights Reserved.
3#ifndef ClpModel_H
4#define ClpModel_H
5
6#include <iostream>
7#include <cassert>
8#include <cmath>
9#include <vector>
10#include <string>
11
12#include "ClpMatrixBase.hpp"
13#include "CoinMessageHandler.hpp"
14#include "ClpParameters.hpp"
15#include "ClpObjective.hpp"
16class ClpEventHandler;
17
18// Plus infinity
19#ifndef COIN_DBL_MAX
20#define COIN_DBL_MAX DBL_MAX
21#endif
22
23/** This is the base class for Linear and quadratic Models
24    This knows nothing about the algorithm, but it seems to
25    have a reasonable amount of information
26
27    I would welcome suggestions for what should be in this and
28    how it relates to OsiSolverInterface.  Some methods look
29    very similar.
30
31*/
32
33class ClpModel {
34
35public:
36
37  /**@name Constructors and destructor
38     Note - copy methods copy ALL data so can chew up memory
39     until other copy is freed
40   */
41  //@{
42    /// Default constructor
43    ClpModel (  );
44
45  /** Copy constructor. May scale depending on mode
46      -1 leave mode as is
47      0 -off, 1 equilibrium, 2 geometric, 3, auto, 4 dynamic(later)
48  */
49    ClpModel(const ClpModel & rhs, int scalingMode=-1);
50    /// Assignment operator. This copies the data
51    ClpModel & operator=(const ClpModel & rhs);
52  /** Subproblem constructor.  A subset of whole model is created from the
53      row and column lists given.  The new order is given by list order and
54      duplicates are allowed.  Name and integer information can be dropped
55  */
56    ClpModel (const ClpModel * wholeModel,
57      int numberRows, const int * whichRows,
58      int numberColumns, const int * whichColumns,
59              bool dropNames=true, bool dropIntegers=true);
60    /// Destructor
61    ~ClpModel (  );
62  //@}
63
64  /**@name Load model - loads some stuff and initializes others */
65  //@{
66    /** Loads a problem (the constraints on the
67        rows are given by lower and upper bounds). If a pointer is 0 then the
68        following values are the default:
69        <ul>
70          <li> <code>colub</code>: all columns have upper bound infinity
71          <li> <code>collb</code>: all columns have lower bound 0
72          <li> <code>rowub</code>: all rows have upper bound infinity
73          <li> <code>rowlb</code>: all rows have lower bound -infinity
74          <li> <code>obj</code>: all variables have 0 objective coefficient
75        </ul>
76    */
77  void loadProblem (  const ClpMatrixBase& matrix,
78                     const double* collb, const double* colub,   
79                     const double* obj,
80                     const double* rowlb, const double* rowub,
81                      const double * rowObjective=NULL);
82  void loadProblem (  const CoinPackedMatrix& matrix,
83                     const double* collb, const double* colub,   
84                     const double* obj,
85                     const double* rowlb, const double* rowub,
86                      const double * rowObjective=NULL);
87
88  /** Just like the other loadProblem() method except that the matrix is
89        given in a standard column major ordered format (without gaps). */
90  void loadProblem (  const int numcols, const int numrows,
91                     const CoinBigIndex* start, const int* index,
92                     const double* value,
93                     const double* collb, const double* colub,   
94                     const double* obj,
95                      const double* rowlb, const double* rowub,
96                      const double * rowObjective=NULL);
97  /// This one is for after presolve to save memory
98  void loadProblem (  const int numcols, const int numrows,
99                     const CoinBigIndex* start, const int* index,
100                      const double* value,const int * length,
101                     const double* collb, const double* colub,   
102                     const double* obj,
103                      const double* rowlb, const double* rowub,
104                      const double * rowObjective=NULL);
105  /** Load up quadratic objective.  This is stored as a CoinPackedMatrix */
106  void loadQuadraticObjective(const int numberColumns, 
107                              const CoinBigIndex * start,
108                              const int * column, const double * element);
109  void loadQuadraticObjective (  const CoinPackedMatrix& matrix);
110  /// Get rid of quadratic objective
111  void deleteQuadraticObjective();
112  /// This just loads up a row objective
113  void setRowObjective(const double * rowObjective);
114  /// Read an mps file from the given filename
115  int readMps(const char *filename,
116              bool keepNames=false,
117              bool ignoreErrors = false);
118  /// Copy in integer informations
119  void copyInIntegerInformation(const char * information);
120  /// Drop integer informations
121  void deleteIntegerInformation();
122  /// Resizes rim part of model
123  void resize (int newNumberRows, int newNumberColumns);
124  /// Deletes rows
125  void deleteRows(int number, const int * which);
126  /// Add rows
127  void addRows(int number, const double * rowLower, 
128               const double * rowUpper,
129               const int * rowStarts, const int * columns,
130               const double * elements);
131  /// Add rows
132  void addRows(int number, const double * rowLower, 
133               const double * rowUpper,
134               const int * rowStarts, const int * rowLengths,
135               const int * columns,
136               const double * elements);
137  void addRows(int number, const double * rowLower, 
138               const double * rowUpper,
139               const CoinPackedVectorBase * const * rows);
140
141  /// Deletes columns
142  void deleteColumns(int number, const int * which);
143  /// Add columns
144  void addColumns(int number, const double * columnLower, 
145                  const double * columnUpper,
146                  const double * objective,
147                  const int * columnStarts, const int * rows,
148                  const double * elements);
149  void addColumns(int number, const double * columnLower, 
150                  const double * columnUpper,
151                  const double * objective,
152                  const int * columnStarts, const int * columnLengths,
153                  const int * rows,
154                  const double * elements);
155  void addColumns(int number, const double * columnLower, 
156               const double * columnUpper,
157                  const double * objective,
158               const CoinPackedVectorBase * const * columns);
159  /** Borrow model.  This is so we don't have to copy large amounts
160      of data around.  It assumes a derived class wants to overwrite
161      an empty model with a real one - while it does an algorithm */
162  void borrowModel(ClpModel & otherModel);
163  /** Return model - nulls all arrays so can be deleted safely
164      also updates any scalars */
165  void returnModel(ClpModel & otherModel);
166
167  /// Create empty ClpPackedMatrix
168  void createEmptyMatrix();
169  /// Drops names - makes lengthnames 0 and names empty
170  void dropNames();
171  /// Copies in names
172  void copyNames(std::vector<std::string> & rowNames,
173                 std::vector<std::string> & columnNames);
174 
175    /** Write the problem in MPS format to the specified file.
176
177        Row and column names may be null.
178        formatType is
179        <ul>
180          <li> 0 - normal
181          <li> 1 - extra accuracy
182          <li> 2 - IEEE hex (later)
183        </ul>
184
185        Returns non-zero on I/O error
186    */
187    int writeMps(const char *filename, 
188                  int formatType=0,int numberAcross=2,
189                 double objSense=0.0) const ;
190  //@}
191  /**@name gets and sets */
192  //@{
193   /// Number of rows
194   inline int numberRows() const {
195      return numberRows_;
196   }
197   inline int getNumRows() const {
198      return numberRows_;
199   }
200   /// Number of columns
201   inline int getNumCols() const {
202      return numberColumns_;
203   }
204   inline int numberColumns() const {
205      return numberColumns_;
206   }
207   /// Primal tolerance to use
208   inline double primalTolerance() const {
209      return dblParam_[ClpPrimalTolerance];
210   }
211   void setPrimalTolerance( double value) ;
212   /// Dual tolerance to use
213   inline double dualTolerance() const  { return dblParam_[ClpDualTolerance]; }
214   void setDualTolerance( double value) ;
215  /// Dual objective limit
216  inline double dualObjectiveLimit() const { return dblParam_[ClpDualObjectiveLimit];}
217  void setDualObjectiveLimit(double value);
218  /// Objective offset
219  inline double objectiveOffset() const { return dblParam_[ClpObjOffset];}
220  void setObjectiveOffset(double value);
221  inline std::string problemName() const { return strParam_[ClpProbName]; };
222   /// Number of iterations
223   inline int numberIterations() const  { return numberIterations_; }
224   inline int getIterationCount() const { return numberIterations_; }
225  inline void setNumberIterations(int numberIterations)
226  { numberIterations_ = numberIterations;};
227  /** Solve type - 1 simplex, 2 simplex interface, 3 Interior.*/
228  inline int solveType() const
229  { return solveType_;};
230  inline void setSolveType(int type)
231  { solveType_=type;};
232   /// Maximum number of iterations
233   inline int maximumIterations() const { return intParam_[ClpMaxNumIteration]; }
234   void setMaximumIterations(int value);
235  /// Maximum time in seconds (from when set called)
236   inline double maximumSeconds() const { return dblParam_[ClpMaxSeconds]; }
237   void setMaximumSeconds(double value);
238  /// Returns true if hit maximum iterations (or time)
239  bool hitMaximumIterations() const;
240   /** Status of problem:
241       0 - optimal
242       1 - primal infeasible
243       2 - dual infeasible
244       3 - stopped on iterations or time
245       4 - stopped due to errors
246       5 - stopped by event handler (virtual int ClpEventHandler::event())
247   */
248   inline int status() const            { return problemStatus_; }
249  /// Set problem status
250  inline void setProblemStatus(int problemStatus)
251  { problemStatus_ = problemStatus;};
252   /** Secondary status of problem - may get extended
253       0 - none
254       1 - primal infeasible because dual limit reached
255       2 - scaled problem optimal - unscaled problem has primal infeasibilities
256       3 - scaled problem optimal - unscaled problem has dual infeasibilities
257       4 - scaled problem optimal - unscaled problem has primal and dual infeasibilities
258       100 up - translation of enum from ClpEventHandler
259   */
260   inline int secondaryStatus() const            { return secondaryStatus_; }
261  inline void setSecondaryStatus(int status)
262  { secondaryStatus_ = status;};
263   /// Are there a numerical difficulties?
264   bool isAbandoned() const             { return problemStatus_==4; }
265   /// Is optimality proven?
266   bool isProvenOptimal() const         { return problemStatus_==0; }
267   /// Is primal infeasiblity proven?
268   bool isProvenPrimalInfeasible() const { return problemStatus_==1; }
269   /// Is dual infeasiblity proven?
270   bool isProvenDualInfeasible() const  { return problemStatus_==2; }
271   /// Is the given primal objective limit reached?
272   bool isPrimalObjectiveLimitReached() const ;
273   /// Is the given dual objective limit reached?
274   bool isDualObjectiveLimitReached() const ;
275   /// Iteration limit reached?
276   bool isIterationLimitReached() const { return problemStatus_==3; }
277   /// Direction of optimization (1 - minimize, -1 - maximize, 0 - ignore
278   inline double optimizationDirection() const {
279      return  optimizationDirection_;
280   }
281   inline double getObjSense() const    { return optimizationDirection_; }
282   void setOptimizationDirection(double value);
283   /// Primal row solution
284   inline double * primalRowSolution() const    { return rowActivity_; }
285   inline const double * getRowActivity() const { return rowActivity_; }
286   /// Primal column solution
287   inline double * primalColumnSolution() const { return columnActivity_; }
288   inline const double * getColSolution() const { return columnActivity_; }
289   inline void setColSolution(const double * input)
290   { memcpy(columnActivity_,input,numberColumns_*sizeof(double));};
291   /// Dual row solution
292   inline double * dualRowSolution() const      { return dual_; }
293   inline const double * getRowPrice() const    { return dual_; }
294   /// Reduced costs
295   inline double * dualColumnSolution() const   { return reducedCost_; }
296   inline const double * getReducedCost() const { return reducedCost_; }
297   /// Row lower
298   inline double* rowLower() const              { return rowLower_; }
299   inline const double* getRowLower() const     { return rowLower_; }
300   /// Row upper
301   inline double* rowUpper() const              { return rowUpper_; }
302   inline const double* getRowUpper() const     { return rowUpper_; }
303   /// Scaling
304   inline const double * rowScale() const {return rowScale_;};
305   inline const double * columnScale() const {return columnScale_;};
306   inline void setRowScale(double * scale) { delete [] rowScale_; rowScale_ = scale;};
307   inline void setColumnScale(double * scale) { delete [] columnScale_; columnScale_ = scale;};
308  /// Scaling of objective
309  inline double objectiveScale() const 
310          { return objectiveScale_;} ;
311  inline void setObjectiveScale(double value)
312          { objectiveScale_ = value;} ;
313  /// Scaling of rhs and bounds
314  inline double rhsScale() const 
315          { return rhsScale_;} ;
316  inline void setRhsScale(double value)
317          { rhsScale_ = value;} ;
318   /// Sets or unsets scaling, 0 -off, 1 equilibrium, 2 geometric, 3, auto, 4 dynamic(later)
319   void scaling(int mode=1);
320  /** If we constructed a "really" scaled model then this reverses the operation.
321      Quantities may not be exactly as they were before due to rounding errors */
322  void unscale();
323   /// Gets scalingFlag
324   inline int scalingFlag() const {return scalingFlag_;};
325   /// Objective
326   inline double * objective() const           
327  {
328    if (objective_) {
329      double offset; 
330      return objective_->gradient(NULL,NULL,offset,false);
331    } else {
332      return NULL;
333    }
334  }
335   inline double * objective(const double * solution, double & offset,bool refresh=true) const           
336  {
337    offset=0.0;
338    if (objective_) {
339      return objective_->gradient(NULL,solution,offset,refresh);
340    } else {
341      return NULL;
342    }
343  }
344   inline const double * getObjCoefficients() const 
345  { 
346    if (objective_) {
347      double offset; 
348      return objective_->gradient(NULL,NULL,offset,false);
349    } else {
350      return NULL;
351    }
352  }
353   /// Row Objective
354   inline double * rowObjective() const         { return rowObjective_; }
355   inline const double * getRowObjCoefficients() const {
356      return rowObjective_;
357   }
358   /// Column Lower
359   inline double * columnLower() const          { return columnLower_; }
360   inline const double * getColLower() const    { return columnLower_; }
361   /// Column Upper
362   inline double * columnUpper() const          { return columnUpper_; }
363   inline const double * getColUpper() const    { return columnUpper_; }
364   /// Matrix (if not ClpPackedmatrix be careful about memory leak
365   inline CoinPackedMatrix * matrix() const {
366     if ( matrix_ == NULL ) return NULL;
367     else return matrix_->getPackedMatrix();
368   }
369   /// Number of elements in matrix
370   inline int getNumElements() const 
371     { return matrix_->getNumElements();};
372   /** Small element value - elements less than this set to zero,
373      default is 1.0e-20 */
374   inline double getSmallElementValue() const
375  { return smallElement_;}; 
376  inline void setSmallElementValue(double value)
377  { smallElement_=value;}; 
378   /// Row Matrix
379   inline ClpMatrixBase * rowCopy() const       { return rowCopy_; }
380   /// Clp Matrix
381   inline ClpMatrixBase * clpMatrix() const     { return matrix_; }
382  /** Replace Clp Matrix (current is not deleted and new is used)
383      So up to user to delete one
384  */
385   void replaceMatrix(ClpMatrixBase * matrix);
386   /// Objective value
387   inline double objectiveValue() const {
388      return objectiveValue_*optimizationDirection_ - dblParam_[ClpObjOffset];
389   }
390   inline double getObjValue() const {
391      return objectiveValue_*optimizationDirection_ - dblParam_[ClpObjOffset];
392   }
393   /// Integer information
394   inline char * integerInformation() const     { return integerType_; }
395   /** Infeasibility/unbounded ray (NULL returned if none/wrong)
396       Up to user to use delete [] on these arrays.  */
397   double * infeasibilityRay() const;
398   double * unboundedRay() const;
399  /// See if status array exists (partly for OsiClp)
400  inline bool statusExists() const
401  { return (status_!=NULL);};
402  /// Return address of status array (char[numberRows+numberColumns])
403  inline unsigned char *  statusArray() const
404  { return status_;};
405  /** Return copy of status array (char[numberRows+numberColumns]),
406      use delete [] */
407  unsigned char *  statusCopy() const;
408  /// Copy in status vector
409  void copyinStatus(const unsigned char * statusArray);
410
411  /// User pointer for whatever reason
412  inline void setUserPointer (void * pointer)
413  { userPointer_=pointer;};
414  inline void * getUserPointer () const
415  { return userPointer_;};
416  //@}
417  /**@name Message handling */
418  //@{
419   /// Pass in Message handler (not deleted at end)
420   void passInMessageHandler(CoinMessageHandler * handler);
421  /// Pass in Message handler (not deleted at end) and return current
422  CoinMessageHandler * pushMessageHandler(CoinMessageHandler * handler,
423                                          bool & oldDefault);
424  /// back to previous message handler
425  void popMessageHandler(CoinMessageHandler * oldHandler,bool oldDefault);
426   /// Set language
427   void newLanguage(CoinMessages::Language language);
428   void setLanguage(CoinMessages::Language language) { newLanguage(language); }
429   /// Return handler
430   CoinMessageHandler * messageHandler() const       { return handler_; }
431   /// Return messages
432   CoinMessages messages() const                     { return messages_; }
433   /// Return pointer to messages
434   CoinMessages * messagesPointer()                  { return & messages_; }
435  /** Amount of print out:
436      0 - none
437      1 - just final
438      2 - just factorizations
439      3 - as 2 plus a bit more
440      4 - verbose
441      above that 8,16,32 etc just for selective debug
442  */
443   void setLogLevel(int value)    { handler_->setLogLevel(value); }
444   int logLevel() const           { return handler_->logLevel(); }
445   /// Pass in Event handler (cloned and deleted at end)
446   void passInEventHandler(const ClpEventHandler * eventHandler);
447   /// length of names (0 means no names0
448   inline int lengthNames() const { return lengthNames_; }
449   /// Row names
450   const std::vector<std::string> * rowNames() const {
451      return &rowNames_;
452   }
453   const std::string& rowName(int iRow) const {
454      return rowNames_[iRow];
455   }
456   /// Column names
457   const std::vector<std::string> * columnNames() const {
458      return &columnNames_;
459   }
460   const std::string& columnName(int iColumn) const {
461      return columnNames_[iColumn];
462   }
463  /// Objective methods
464  inline ClpObjective * objectiveAsObject() const
465  { return objective_;};
466  void setObjective(ClpObjective * objective);
467  void setObjectivePointer(ClpObjective * objective)
468  { objective_ = objective;};
469  /** Solve a problem with no elements - return status and
470      dual and primal infeasibilites */
471  int emptyProblem(int * infeasNumber=NULL, double * infeasSum=NULL,bool printMessage=true);
472 
473  //@}
474
475  /**@name Matrix times vector methods
476     They can be faster if scalar is +- 1
477     These are covers so user need not worry about scaling
478     Also for simplex I am not using basic/non-basic split */
479  //@{
480    /** Return <code>y + A * x * scalar</code> in <code>y</code>.
481        @pre <code>x</code> must be of size <code>numColumns()</code>
482        @pre <code>y</code> must be of size <code>numRows()</code> */
483   void times(double scalar,
484                       const double * x, double * y) const;
485    /** Return <code>y + x * scalar * A</code> in <code>y</code>.
486        @pre <code>x</code> must be of size <code>numRows()</code>
487        @pre <code>y</code> must be of size <code>numColumns()</code> */
488    void transposeTimes(double scalar,
489                                const double * x, double * y) const ;
490  //@}
491
492
493  //---------------------------------------------------------------------------
494  /**@name Parameter set/get methods
495
496     The set methods return true if the parameter was set to the given value,
497     false otherwise. There can be various reasons for failure: the given
498     parameter is not applicable for the solver (e.g., refactorization
499     frequency for the volume algorithm), the parameter is not yet implemented
500     for the solver or simply the value of the parameter is out of the range
501     the solver accepts. If a parameter setting call returns false check the
502     details of your solver.
503
504     The get methods return true if the given parameter is applicable for the
505     solver and is implemented. In this case the value of the parameter is
506     returned in the second argument. Otherwise they return false.
507
508     ** once it has been decided where solver sits this may be redone
509  */
510  //@{
511    /// Set an integer parameter
512    bool setIntParam(ClpIntParam key, int value) ;
513    /// Set an double parameter
514    bool setDblParam(ClpDblParam key, double value) ;
515    /// Set an string parameter
516    bool setStrParam(ClpStrParam key, const std::string & value);
517    // Get an integer parameter
518    inline bool getIntParam(ClpIntParam key, int& value) const {
519      if (key!=ClpLastIntParam) {
520        value = intParam_[key];
521        return true;
522      } else {
523        return false;
524      }
525    }
526    // Get an double parameter
527    inline bool getDblParam(ClpDblParam key, double& value) const {
528      if (key!=ClpLastDblParam) {
529        value = dblParam_[key];
530        return true;
531      } else {
532        return false;
533      }
534    }
535    // Get a string parameter
536    inline bool getStrParam(ClpStrParam key, std::string& value) const {
537      if (key!=ClpLastStrParam) {
538        value = strParam_[key];
539        return true;
540      } else {
541        return false;
542      }
543    }
544  //@}
545
546  /**@name private or protected methods */
547  //@{
548protected:
549  /// Does most of deletion
550  void gutsOfDelete();
551  /** Does most of copying
552      If trueCopy false then just points to arrays */
553  void gutsOfCopy(const ClpModel & rhs, bool trueCopy=true);
554  /// gets lower and upper bounds on rows
555  void getRowBound(int iRow, double& lower, double& upper) const;
556  /// puts in format I like - 4 array matrix - may make row copy
557  void gutsOfLoadModel ( int numberRows, int numberColumns,
558                     const double* collb, const double* colub,   
559                     const double* obj,
560                     const double* rowlb, const double* rowub,
561                      const double * rowObjective=NULL);
562  /// Does much of scaling
563  void gutsOfScaling();
564  //@}
565
566
567////////////////// data //////////////////
568protected:
569
570  /**@name data */
571  //@{
572  /// Direction of optimization (1 - minimize, -1 - maximize, 0 - ignore
573  double optimizationDirection_;
574  /// Array of double parameters
575  double dblParam_[ClpLastDblParam];
576  /// Objective value
577  double objectiveValue_;
578  /// Small element value
579  double smallElement_;
580  /// Scaling of objective
581  double objectiveScale_;
582  /// Scaling of rhs and bounds
583  double rhsScale_;
584  /// Number of rows
585  int numberRows_;
586  /// Number of columns
587  int numberColumns_;
588  /// Row activities
589  double * rowActivity_;
590  /// Column activities
591  double * columnActivity_;
592  /// Duals
593  double * dual_;
594  /// Reduced costs
595  double * reducedCost_;
596  /// Row lower
597  double* rowLower_;
598  /// Row upper
599  double* rowUpper_;
600  /// Objective
601  ClpObjective * objective_;
602  /// Row Objective (? sign)  - may be NULL
603  double * rowObjective_;
604  /// Column Lower
605  double * columnLower_;
606  /// Column Upper
607  double * columnUpper_;
608  /// Packed matrix
609  ClpMatrixBase * matrix_;
610  /// Row copy if wanted
611  ClpMatrixBase * rowCopy_;
612  /// Infeasible/unbounded ray
613  double * ray_;
614  /// Row scale factors for matrix
615  double * rowScale_;
616  /// Column scale factors
617  double * columnScale_;
618  /// Scale flag, 0 none, 1 equilibrium, 2 geometric, 3, auto, 4 dynamic
619  int scalingFlag_;
620  /** Status Region.  I know that not all algorithms need a status
621      array, but it made sense for things like crossover and put
622      all permanent stuff in one place.  No assumption is made
623      about what is in status array (although it might be good to reserve
624      bottom 3 bits (i.e. 0-7 numeric) for classic status).  This
625      is number of columns + number of rows long (in that order).
626  */
627  unsigned char * status_;
628  /// Integer information
629  char * integerType_;
630  /// User pointer for whatever reason
631  void * userPointer_;
632  /// Array of integer parameters
633  int intParam_[ClpLastIntParam];
634  /// Number of iterations
635  int numberIterations_;
636  /** Solve type - 1 simplex, 2 simplex interface, 3 Interior.*/
637  int solveType_;
638  /// Status of problem
639  int problemStatus_;
640  /// Secondary status of problem
641  int secondaryStatus_;
642  /// length of names (0 means no names)
643  int lengthNames_;
644  /// Message handler
645  CoinMessageHandler * handler_;
646  /// Flag to say if default handler (so delete)
647  bool defaultHandler_;
648  /// Event handler
649  ClpEventHandler * eventHandler_;
650  /// Row names
651  std::vector<std::string> rowNames_;
652  /// Column names
653  std::vector<std::string> columnNames_;
654  /// Messages
655  CoinMessages messages_;
656  /// Array of string parameters
657  std::string strParam_[ClpLastStrParam];
658  //@}
659};
660/** This is a tiny class where data can be saved round calls */
661class ClpDataSave {
662
663public:
664  /**@name Constructors and destructor
665   */
666  //@{
667    /// Default constructor
668    ClpDataSave (  );
669
670    /// Copy constructor.
671    ClpDataSave(const ClpDataSave &);
672    /// Assignment operator. This copies the data
673    ClpDataSave & operator=(const ClpDataSave & rhs);
674    /// Destructor
675    ~ClpDataSave (  );
676
677  //@}
678
679////////////////// data //////////////////
680public:
681
682  /**@name data - with same names as in other classes*/
683  //@{
684  double dualBound_;
685  double infeasibilityCost_;
686  int sparseThreshold_;
687  int perturbation_;
688
689  //@}
690};
691
692#endif
Note: See TracBrowser for help on using the repository browser.