source: trunk/include/ClpModel.hpp @ 468

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

to make sbb faster

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 25.4 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  /** Change row lower bounds */
160  void chgRowLower(const double * rowLower);
161  /** Change row upper bounds */
162  void chgRowUpper(const double * rowUpper);
163  /** Change column lower bounds */
164  void chgColumnLower(const double * columnLower);
165  /** Change column upper bounds */
166  void chgColumnUpper(const double * columnUpper);
167  /** Change objective coefficients */
168  void chgObjCoefficients(const double * objIn); 
169  /** Borrow model.  This is so we don't have to copy large amounts
170      of data around.  It assumes a derived class wants to overwrite
171      an empty model with a real one - while it does an algorithm */
172  void borrowModel(ClpModel & otherModel);
173  /** Return model - nulls all arrays so can be deleted safely
174      also updates any scalars */
175  void returnModel(ClpModel & otherModel);
176
177  /// Create empty ClpPackedMatrix
178  void createEmptyMatrix();
179  /// Drops names - makes lengthnames 0 and names empty
180  void dropNames();
181  /// Copies in names
182  void copyNames(std::vector<std::string> & rowNames,
183                 std::vector<std::string> & columnNames);
184 
185    /** Write the problem in MPS format to the specified file.
186
187        Row and column names may be null.
188        formatType is
189        <ul>
190          <li> 0 - normal
191          <li> 1 - extra accuracy
192          <li> 2 - IEEE hex (later)
193        </ul>
194
195        Returns non-zero on I/O error
196    */
197    int writeMps(const char *filename, 
198                  int formatType=0,int numberAcross=2,
199                 double objSense=0.0) const ;
200  //@}
201  /**@name gets and sets */
202  //@{
203   /// Number of rows
204   inline int numberRows() const {
205      return numberRows_;
206   }
207   inline int getNumRows() const {
208      return numberRows_;
209   }
210   /// Number of columns
211   inline int getNumCols() const {
212      return numberColumns_;
213   }
214   inline int numberColumns() const {
215      return numberColumns_;
216   }
217   /// Primal tolerance to use
218   inline double primalTolerance() const {
219      return dblParam_[ClpPrimalTolerance];
220   }
221   void setPrimalTolerance( double value) ;
222   /// Dual tolerance to use
223   inline double dualTolerance() const  { return dblParam_[ClpDualTolerance]; }
224   void setDualTolerance( double value) ;
225  /// Dual objective limit
226  inline double dualObjectiveLimit() const { return dblParam_[ClpDualObjectiveLimit];}
227  void setDualObjectiveLimit(double value);
228  /// Objective offset
229  inline double objectiveOffset() const { return dblParam_[ClpObjOffset];}
230  void setObjectiveOffset(double value);
231  inline std::string problemName() const { return strParam_[ClpProbName]; };
232   /// Number of iterations
233   inline int numberIterations() const  { return numberIterations_; }
234   inline int getIterationCount() const { return numberIterations_; }
235  inline void setNumberIterations(int numberIterations)
236  { numberIterations_ = numberIterations;};
237  /** Solve type - 1 simplex, 2 simplex interface, 3 Interior.*/
238  inline int solveType() const
239  { return solveType_;};
240  inline void setSolveType(int type)
241  { solveType_=type;};
242   /// Maximum number of iterations
243   inline int maximumIterations() const { return intParam_[ClpMaxNumIteration]; }
244   void setMaximumIterations(int value);
245  /// Maximum time in seconds (from when set called)
246   inline double maximumSeconds() const { return dblParam_[ClpMaxSeconds]; }
247   void setMaximumSeconds(double value);
248  /// Returns true if hit maximum iterations (or time)
249  bool hitMaximumIterations() const;
250   /** Status of problem:
251       0 - optimal
252       1 - primal infeasible
253       2 - dual infeasible
254       3 - stopped on iterations or time
255       4 - stopped due to errors
256       5 - stopped by event handler (virtual int ClpEventHandler::event())
257   */
258   inline int status() const            { return problemStatus_; }
259  /// Set problem status
260  inline void setProblemStatus(int problemStatus)
261  { problemStatus_ = problemStatus;};
262   /** Secondary status of problem - may get extended
263       0 - none
264       1 - primal infeasible because dual limit reached OR probably primal
265       infeasible but can't prove it (main status 4)
266       2 - scaled problem optimal - unscaled problem has primal infeasibilities
267       3 - scaled problem optimal - unscaled problem has dual infeasibilities
268       4 - scaled problem optimal - unscaled problem has primal and dual infeasibilities
269       5 - giving up in primal with flagged variables
270       100 up - translation of enum from ClpEventHandler
271   */
272   inline int secondaryStatus() const            { return secondaryStatus_; }
273  inline void setSecondaryStatus(int status)
274  { secondaryStatus_ = status;};
275   /// Are there a numerical difficulties?
276   bool isAbandoned() const             { return problemStatus_==4; }
277   /// Is optimality proven?
278   bool isProvenOptimal() const         { return problemStatus_==0; }
279   /// Is primal infeasiblity proven?
280   bool isProvenPrimalInfeasible() const { return problemStatus_==1; }
281   /// Is dual infeasiblity proven?
282   bool isProvenDualInfeasible() const  { return problemStatus_==2; }
283   /// Is the given primal objective limit reached?
284   bool isPrimalObjectiveLimitReached() const ;
285   /// Is the given dual objective limit reached?
286   bool isDualObjectiveLimitReached() const ;
287   /// Iteration limit reached?
288   bool isIterationLimitReached() const { return problemStatus_==3; }
289   /// Direction of optimization (1 - minimize, -1 - maximize, 0 - ignore
290   inline double optimizationDirection() const {
291      return  optimizationDirection_;
292   }
293   inline double getObjSense() const    { return optimizationDirection_; }
294   void setOptimizationDirection(double value);
295   /// Primal row solution
296   inline double * primalRowSolution() const    { return rowActivity_; }
297   inline const double * getRowActivity() const { return rowActivity_; }
298   /// Primal column solution
299   inline double * primalColumnSolution() const { return columnActivity_; }
300   inline const double * getColSolution() const { return columnActivity_; }
301   inline void setColSolution(const double * input)
302   { memcpy(columnActivity_,input,numberColumns_*sizeof(double));};
303   /// Dual row solution
304   inline double * dualRowSolution() const      { return dual_; }
305   inline const double * getRowPrice() const    { return dual_; }
306   /// Reduced costs
307   inline double * dualColumnSolution() const   { return reducedCost_; }
308   inline const double * getReducedCost() const { return reducedCost_; }
309   /// Row lower
310   inline double* rowLower() const              { return rowLower_; }
311   inline const double* getRowLower() const     { return rowLower_; }
312   /// Row upper
313   inline double* rowUpper() const              { return rowUpper_; }
314   inline const double* getRowUpper() const     { return rowUpper_; }
315   /// Scaling
316   inline const double * rowScale() const {return rowScale_;};
317   inline const double * columnScale() const {return columnScale_;};
318   inline void setRowScale(double * scale) { delete [] (double *) rowScale_; rowScale_ = scale;};
319   inline void setColumnScale(double * scale) { delete [] (double *) columnScale_; columnScale_ = scale;};
320  /// Scaling of objective
321  inline double objectiveScale() const 
322          { return objectiveScale_;} ;
323  inline void setObjectiveScale(double value)
324          { objectiveScale_ = value;} ;
325  /// Scaling of rhs and bounds
326  inline double rhsScale() const 
327          { return rhsScale_;} ;
328  inline void setRhsScale(double value)
329          { rhsScale_ = value;} ;
330   /// Sets or unsets scaling, 0 -off, 1 equilibrium, 2 geometric, 3, auto, 4 dynamic(later)
331   void scaling(int mode=1);
332  /** If we constructed a "really" scaled model then this reverses the operation.
333      Quantities may not be exactly as they were before due to rounding errors */
334  void unscale();
335   /// Gets scalingFlag
336   inline int scalingFlag() const {return scalingFlag_;};
337   /// Objective
338   inline double * objective() const           
339  {
340    if (objective_) {
341      double offset; 
342      return objective_->gradient(NULL,NULL,offset,false);
343    } else {
344      return NULL;
345    }
346  }
347   inline double * objective(const double * solution, double & offset,bool refresh=true) const           
348  {
349    offset=0.0;
350    if (objective_) {
351      return objective_->gradient(NULL,solution,offset,refresh);
352    } else {
353      return NULL;
354    }
355  }
356   inline const double * getObjCoefficients() const 
357  { 
358    if (objective_) {
359      double offset; 
360      return objective_->gradient(NULL,NULL,offset,false);
361    } else {
362      return NULL;
363    }
364  }
365   /// Row Objective
366   inline double * rowObjective() const         { return rowObjective_; }
367   inline const double * getRowObjCoefficients() const {
368      return rowObjective_;
369   }
370   /// Column Lower
371   inline double * columnLower() const          { return columnLower_; }
372   inline const double * getColLower() const    { return columnLower_; }
373   /// Column Upper
374   inline double * columnUpper() const          { return columnUpper_; }
375   inline const double * getColUpper() const    { return columnUpper_; }
376   /// Matrix (if not ClpPackedmatrix be careful about memory leak
377   inline CoinPackedMatrix * matrix() const {
378     if ( matrix_ == NULL ) return NULL;
379     else return matrix_->getPackedMatrix();
380   }
381   /// Number of elements in matrix
382   inline int getNumElements() const 
383     { return matrix_->getNumElements();};
384   /** Small element value - elements less than this set to zero,
385      default is 1.0e-20 */
386   inline double getSmallElementValue() const
387  { return smallElement_;}; 
388  inline void setSmallElementValue(double value)
389  { smallElement_=value;}; 
390   /// Row Matrix
391   inline ClpMatrixBase * rowCopy() const       { return rowCopy_; }
392   /// Clp Matrix
393   inline ClpMatrixBase * clpMatrix() const     { return matrix_; }
394  /** Replace Clp Matrix (current is not deleted unless told to
395      and new is used)
396      So up to user to delete current.  This was used where
397      matrices were being rotated.
398  */
399   void replaceMatrix(ClpMatrixBase * matrix,bool deleteCurrent=false);
400   /// Objective value
401   inline double objectiveValue() const {
402      return objectiveValue_*optimizationDirection_ - dblParam_[ClpObjOffset];
403   }
404   inline double getObjValue() const {
405      return objectiveValue_*optimizationDirection_ - dblParam_[ClpObjOffset];
406   }
407   /// Integer information
408   inline char * integerInformation() const     { return integerType_; }
409   /** Infeasibility/unbounded ray (NULL returned if none/wrong)
410       Up to user to use delete [] on these arrays.  */
411   double * infeasibilityRay() const;
412   double * unboundedRay() const;
413  /// See if status array exists (partly for OsiClp)
414  inline bool statusExists() const
415  { return (status_!=NULL);};
416  /// Return address of status array (char[numberRows+numberColumns])
417  inline unsigned char *  statusArray() const
418  { return status_;};
419  /** Return copy of status array (char[numberRows+numberColumns]),
420      use delete [] */
421  unsigned char *  statusCopy() const;
422  /// Copy in status vector
423  void copyinStatus(const unsigned char * statusArray);
424
425  /// User pointer for whatever reason
426  inline void setUserPointer (void * pointer)
427  { userPointer_=pointer;};
428  inline void * getUserPointer () const
429  { return userPointer_;};
430  //@}
431  /**@name Message handling */
432  //@{
433   /// Pass in Message handler (not deleted at end)
434   void passInMessageHandler(CoinMessageHandler * handler);
435  /// Pass in Message handler (not deleted at end) and return current
436  CoinMessageHandler * pushMessageHandler(CoinMessageHandler * handler,
437                                          bool & oldDefault);
438  /// back to previous message handler
439  void popMessageHandler(CoinMessageHandler * oldHandler,bool oldDefault);
440   /// Set language
441   void newLanguage(CoinMessages::Language language);
442   void setLanguage(CoinMessages::Language language) { newLanguage(language); }
443   /// Return handler
444   CoinMessageHandler * messageHandler() const       { return handler_; }
445   /// Return messages
446   CoinMessages messages() const                     { return messages_; }
447   /// Return pointer to messages
448   CoinMessages * messagesPointer()                  { return & messages_; }
449  /** Amount of print out:
450      0 - none
451      1 - just final
452      2 - just factorizations
453      3 - as 2 plus a bit more
454      4 - verbose
455      above that 8,16,32 etc just for selective debug
456  */
457   void setLogLevel(int value)    { handler_->setLogLevel(value); }
458   int logLevel() const           { return handler_->logLevel(); }
459   /// Pass in Event handler (cloned and deleted at end)
460   void passInEventHandler(const ClpEventHandler * eventHandler);
461   /// length of names (0 means no names0
462   inline int lengthNames() const { return lengthNames_; }
463   /// Row names
464   const std::vector<std::string> * rowNames() const {
465      return &rowNames_;
466   }
467   const std::string& rowName(int iRow) const {
468      return rowNames_[iRow];
469   }
470   /// Column names
471   const std::vector<std::string> * columnNames() const {
472      return &columnNames_;
473   }
474   const std::string& columnName(int iColumn) const {
475      return columnNames_[iColumn];
476   }
477  /// Objective methods
478  inline ClpObjective * objectiveAsObject() const
479  { return objective_;};
480  void setObjective(ClpObjective * objective);
481  void setObjectivePointer(ClpObjective * objective)
482  { objective_ = objective;};
483  /** Solve a problem with no elements - return status and
484      dual and primal infeasibilites */
485  int emptyProblem(int * infeasNumber=NULL, double * infeasSum=NULL,bool printMessage=true);
486 
487  //@}
488
489  /**@name Matrix times vector methods
490     They can be faster if scalar is +- 1
491     These are covers so user need not worry about scaling
492     Also for simplex I am not using basic/non-basic split */
493  //@{
494    /** Return <code>y + A * x * scalar</code> in <code>y</code>.
495        @pre <code>x</code> must be of size <code>numColumns()</code>
496        @pre <code>y</code> must be of size <code>numRows()</code> */
497   void times(double scalar,
498                       const double * x, double * y) const;
499    /** Return <code>y + x * scalar * A</code> in <code>y</code>.
500        @pre <code>x</code> must be of size <code>numRows()</code>
501        @pre <code>y</code> must be of size <code>numColumns()</code> */
502    void transposeTimes(double scalar,
503                                const double * x, double * y) const ;
504  //@}
505
506
507  //---------------------------------------------------------------------------
508  /**@name Parameter set/get methods
509
510     The set methods return true if the parameter was set to the given value,
511     false otherwise. There can be various reasons for failure: the given
512     parameter is not applicable for the solver (e.g., refactorization
513     frequency for the volume algorithm), the parameter is not yet implemented
514     for the solver or simply the value of the parameter is out of the range
515     the solver accepts. If a parameter setting call returns false check the
516     details of your solver.
517
518     The get methods return true if the given parameter is applicable for the
519     solver and is implemented. In this case the value of the parameter is
520     returned in the second argument. Otherwise they return false.
521
522     ** once it has been decided where solver sits this may be redone
523  */
524  //@{
525    /// Set an integer parameter
526    bool setIntParam(ClpIntParam key, int value) ;
527    /// Set an double parameter
528    bool setDblParam(ClpDblParam key, double value) ;
529    /// Set an string parameter
530    bool setStrParam(ClpStrParam key, const std::string & value);
531    // Get an integer parameter
532    inline bool getIntParam(ClpIntParam key, int& value) const {
533      if (key!=ClpLastIntParam) {
534        value = intParam_[key];
535        return true;
536      } else {
537        return false;
538      }
539    }
540    // Get an double parameter
541    inline bool getDblParam(ClpDblParam key, double& value) const {
542      if (key!=ClpLastDblParam) {
543        value = dblParam_[key];
544        return true;
545      } else {
546        return false;
547      }
548    }
549    // Get a string parameter
550    inline bool getStrParam(ClpStrParam key, std::string& value) const {
551      if (key!=ClpLastStrParam) {
552        value = strParam_[key];
553        return true;
554      } else {
555        return false;
556      }
557    }
558  //@}
559
560  /**@name private or protected methods */
561  //@{
562protected:
563  /// Does most of deletion
564  void gutsOfDelete();
565  /** Does most of copying
566      If trueCopy false then just points to arrays */
567  void gutsOfCopy(const ClpModel & rhs, bool trueCopy=true);
568  /// gets lower and upper bounds on rows
569  void getRowBound(int iRow, double& lower, double& upper) const;
570  /// puts in format I like - 4 array matrix - may make row copy
571  void gutsOfLoadModel ( int numberRows, int numberColumns,
572                     const double* collb, const double* colub,   
573                     const double* obj,
574                     const double* rowlb, const double* rowub,
575                      const double * rowObjective=NULL);
576  /// Does much of scaling
577  void gutsOfScaling();
578  //@}
579
580
581////////////////// data //////////////////
582protected:
583
584  /**@name data */
585  //@{
586  /// Direction of optimization (1 - minimize, -1 - maximize, 0 - ignore
587  double optimizationDirection_;
588  /// Array of double parameters
589  double dblParam_[ClpLastDblParam];
590  /// Objective value
591  double objectiveValue_;
592  /// Small element value
593  double smallElement_;
594  /// Scaling of objective
595  double objectiveScale_;
596  /// Scaling of rhs and bounds
597  double rhsScale_;
598  /// Number of rows
599  int numberRows_;
600  /// Number of columns
601  int numberColumns_;
602  /// Row activities
603  double * rowActivity_;
604  /// Column activities
605  double * columnActivity_;
606  /// Duals
607  double * dual_;
608  /// Reduced costs
609  double * reducedCost_;
610  /// Row lower
611  double* rowLower_;
612  /// Row upper
613  double* rowUpper_;
614  /// Objective
615  ClpObjective * objective_;
616  /// Row Objective (? sign)  - may be NULL
617  double * rowObjective_;
618  /// Column Lower
619  double * columnLower_;
620  /// Column Upper
621  double * columnUpper_;
622  /// Packed matrix
623  ClpMatrixBase * matrix_;
624  /// Row copy if wanted
625  ClpMatrixBase * rowCopy_;
626  /// Infeasible/unbounded ray
627  double * ray_;
628  /// Row scale factors for matrix
629  double * rowScale_;
630  /// Column scale factors
631  double * columnScale_;
632  /// Scale flag, 0 none, 1 equilibrium, 2 geometric, 3, auto, 4 dynamic
633  int scalingFlag_;
634  /** Status Region.  I know that not all algorithms need a status
635      array, but it made sense for things like crossover and put
636      all permanent stuff in one place.  No assumption is made
637      about what is in status array (although it might be good to reserve
638      bottom 3 bits (i.e. 0-7 numeric) for classic status).  This
639      is number of columns + number of rows long (in that order).
640  */
641  unsigned char * status_;
642  /// Integer information
643  char * integerType_;
644  /// User pointer for whatever reason
645  void * userPointer_;
646  /// Array of integer parameters
647  int intParam_[ClpLastIntParam];
648  /// Number of iterations
649  int numberIterations_;
650  /** Solve type - 1 simplex, 2 simplex interface, 3 Interior.*/
651  int solveType_;
652  /// Status of problem
653  int problemStatus_;
654  /// Secondary status of problem
655  int secondaryStatus_;
656  /// length of names (0 means no names)
657  int lengthNames_;
658  /// Message handler
659  CoinMessageHandler * handler_;
660  /// Flag to say if default handler (so delete)
661  bool defaultHandler_;
662  /// Event handler
663  ClpEventHandler * eventHandler_;
664  /// Row names
665  std::vector<std::string> rowNames_;
666  /// Column names
667  std::vector<std::string> columnNames_;
668  /// Messages
669  CoinMessages messages_;
670  /// Array of string parameters
671  std::string strParam_[ClpLastStrParam];
672  //@}
673};
674/** This is a tiny class where data can be saved round calls */
675class ClpDataSave {
676
677public:
678  /**@name Constructors and destructor
679   */
680  //@{
681    /// Default constructor
682    ClpDataSave (  );
683
684    /// Copy constructor.
685    ClpDataSave(const ClpDataSave &);
686    /// Assignment operator. This copies the data
687    ClpDataSave & operator=(const ClpDataSave & rhs);
688    /// Destructor
689    ~ClpDataSave (  );
690
691  //@}
692
693////////////////// data //////////////////
694public:
695
696  /**@name data - with same names as in other classes*/
697  //@{
698  double dualBound_;
699  double infeasibilityCost_;
700  double pivotTolerance_;
701  int sparseThreshold_;
702  int perturbation_;
703  int forceFactorization_;
704
705  //@}
706};
707
708#endif
Note: See TracBrowser for help on using the repository browser.