Ignore:
Timestamp:
Jan 6, 2019 2:43:06 PM (3 months ago)
Author:
unxusr
Message:

formatting

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Clp/src/ClpNonLinearCost.hpp

    r2235 r2385  
    66#ifndef ClpNonLinearCost_H
    77#define ClpNonLinearCost_H
    8 
    98
    109#include "CoinPragma.hpp"
     
    4241inline int originalStatus(unsigned char status)
    4342{
    44      return (status & 15);
     43  return (status & 15);
    4544}
    4645inline int currentStatus(unsigned char status)
    4746{
    48      return (status >> 4);
    49 }
    50 inline void setOriginalStatus(unsigned char & status, int value)
    51 {
    52      status = static_cast<unsigned char>(status & ~15);
    53      status = static_cast<unsigned char>(status | value);
     47  return (status >> 4);
     48}
     49inline void setOriginalStatus(unsigned char &status, int value)
     50{
     51  status = static_cast< unsigned char >(status & ~15);
     52  status = static_cast< unsigned char >(status | value);
    5453}
    5554inline void setCurrentStatus(unsigned char &status, int value)
    5655{
    57      status = static_cast<unsigned char>(status & ~(15 << 4));
    58      status = static_cast<unsigned char>(status | (value << 4));
     56  status = static_cast< unsigned char >(status & ~(15 << 4));
     57  status = static_cast< unsigned char >(status | (value << 4));
    5958}
    6059inline void setInitialStatus(unsigned char &status)
    6160{
    62      status = static_cast<unsigned char>(CLP_FEASIBLE | (CLP_SAME << 4));
     61  status = static_cast< unsigned char >(CLP_FEASIBLE | (CLP_SAME << 4));
    6362}
    6463inline void setSameStatus(unsigned char &status)
    6564{
    66      status = static_cast<unsigned char>(status & ~(15 << 4));
    67      status = static_cast<unsigned char>(status | (CLP_SAME << 4));
     65  status = static_cast< unsigned char >(status & ~(15 << 4));
     66  status = static_cast< unsigned char >(status | (CLP_SAME << 4));
    6867}
    6968// Use second version to get more speed
    7069//#define FAST_CLPNON
    7170#ifndef FAST_CLPNON
    72 #define CLP_METHOD1 ((method_&1)!=0)
    73 #define CLP_METHOD2 ((method_&2)!=0)
     71#define CLP_METHOD1 ((method_ & 1) != 0)
     72#define CLP_METHOD2 ((method_ & 2) != 0)
    7473#else
    7574#define CLP_METHOD1 (false)
    7675#define CLP_METHOD2 (true)
    7776#endif
    78 class ClpNonLinearCost  {
     77class ClpNonLinearCost {
    7978
    8079public:
    81 
    8280public:
    83 
    84      /**@name Constructors, destructor */
    85      //@{
    86      /// Default constructor.
    87      ClpNonLinearCost();
    88      /** Constructor from simplex.
     81  /**@name Constructors, destructor */
     82  //@{
     83  /// Default constructor.
     84  ClpNonLinearCost();
     85  /** Constructor from simplex.
    8986         This will just set up wasteful arrays for linear, but
    9087         later may do dual analysis and even finding duplicate columns .
    9188     */
    92      ClpNonLinearCost(ClpSimplex * model, int method = 1);
    93      /** Constructor from simplex and list of non-linearities (columns only)
     89  ClpNonLinearCost(ClpSimplex *model, int method = 1);
     90  /** Constructor from simplex and list of non-linearities (columns only)
    9491         First lower of each column has to match real lower
    9592         Last lower has to be <= upper (if == then cost ignored)
    9693         This could obviously be changed to make more user friendly
    9794     */
    98      ClpNonLinearCost(ClpSimplex * model, const int * starts,
    99                       const double * lower, const double * cost);
    100      /// Destructor
    101      ~ClpNonLinearCost();
    102      // Copy
    103      ClpNonLinearCost(const ClpNonLinearCost&);
    104      // Assignment
    105      ClpNonLinearCost& operator=(const ClpNonLinearCost&);
    106      //@}
    107 
    108 
    109      /**@name Actual work in primal */
    110      //@{
    111      /** Changes infeasible costs and computes number and cost of infeas
     95  ClpNonLinearCost(ClpSimplex *model, const int *starts,
     96    const double *lower, const double *cost);
     97  /// Destructor
     98  ~ClpNonLinearCost();
     99  // Copy
     100  ClpNonLinearCost(const ClpNonLinearCost &);
     101  // Assignment
     102  ClpNonLinearCost &operator=(const ClpNonLinearCost &);
     103  //@}
     104
     105  /**@name Actual work in primal */
     106  //@{
     107  /** Changes infeasible costs and computes number and cost of infeas
    112108         Puts all non-basic (non free) variables to bounds
    113109         and all free variables to zero if oldTolerance is non-zero
    114110         - but does not move those <= oldTolerance away*/
    115      void checkInfeasibilities(double oldTolerance = 0.0);
    116      /** Changes infeasible costs for each variable
     111  void checkInfeasibilities(double oldTolerance = 0.0);
     112  /** Changes infeasible costs for each variable
    117113         The indices are row indices and need converting to sequences
    118114     */
    119      void checkInfeasibilities(int numberInArray, const int * index);
    120      /** Puts back correct infeasible costs for each variable
     115  void checkInfeasibilities(int numberInArray, const int *index);
     116  /** Puts back correct infeasible costs for each variable
    121117         The input indices are row indices and need converting to sequences
    122118         for costs.
     
    124120         changed costs will be stored as normal CoinIndexedVector
    125121     */
    126      void checkChanged(int numberInArray, CoinIndexedVector * update);
    127      /** Goes through one bound for each variable.
     122  void checkChanged(int numberInArray, CoinIndexedVector *update);
     123  /** Goes through one bound for each variable.
    128124         If multiplier*work[iRow]>0 goes down, otherwise up.
    129125         The indices are row indices and need converting to sequences
     
    131127         Rhs entries are increased
    132128     */
    133      void goThru(int numberInArray, double multiplier,
    134                  const int * index, const double * work,
    135                  double * rhs);
    136      /** Takes off last iteration (i.e. offsets closer to 0)
    137      */
    138      void goBack(int numberInArray, const int * index,
    139                  double * rhs);
    140      /** Puts back correct infeasible costs for each variable
     129  void goThru(int numberInArray, double multiplier,
     130    const int *index, const double *work,
     131    double *rhs);
     132  /** Takes off last iteration (i.e. offsets closer to 0)
     133     */
     134  void goBack(int numberInArray, const int *index,
     135    double *rhs);
     136  /** Puts back correct infeasible costs for each variable
    141137         The input indices are row indices and need converting to sequences
    142138         for costs.
    143139         At the end of this all temporary offsets are zero
    144140     */
    145      void goBackAll(const CoinIndexedVector * update);
    146      /// Temporary zeroing of feasible costs
    147      void zapCosts();
    148      /// Refreshes costs always makes row costs zero
    149      void refreshCosts(const double * columnCosts);
    150      /// Puts feasible bounds into lower and upper
    151      void feasibleBounds();
    152      /// Refresh - assuming regions OK
    153      void refresh();
    154      /// Refresh one- assuming regions OK
    155      void refresh(int iSequence);
    156      /** Sets bounds and cost for one variable
     141  void goBackAll(const CoinIndexedVector *update);
     142  /// Temporary zeroing of feasible costs
     143  void zapCosts();
     144  /// Refreshes costs always makes row costs zero
     145  void refreshCosts(const double *columnCosts);
     146  /// Puts feasible bounds into lower and upper
     147  void feasibleBounds();
     148  /// Refresh - assuming regions OK
     149  void refresh();
     150  /// Refresh one- assuming regions OK
     151  void refresh(int iSequence);
     152  /** Sets bounds and cost for one variable
    157153         Returns change in cost
    158154      May need to be inline for speed */
    159      double setOne(int sequence, double solutionValue);
    160      /** Sets bounds and infeasible cost and true cost for one variable
     155  double setOne(int sequence, double solutionValue);
     156  /** Sets bounds and infeasible cost and true cost for one variable
    161157         This is for gub and column generation etc */
    162      void setOne(int sequence, double solutionValue, double lowerValue, double upperValue,
    163                  double costValue = 0.0);
    164      /** Sets bounds and cost for outgoing variable
     158  void setOne(int sequence, double solutionValue, double lowerValue, double upperValue,
     159    double costValue = 0.0);
     160  /** Sets bounds and cost for outgoing variable
    165161         may change value
    166162         Returns direction */
    167      int setOneOutgoing(int sequence, double &solutionValue);
    168      /// Returns nearest bound
    169      double nearest(int sequence, double solutionValue);
    170      /** Returns change in cost - one down if alpha >0.0, up if <0.0
     163  int setOneOutgoing(int sequence, double &solutionValue);
     164  /// Returns nearest bound
     165  double nearest(int sequence, double solutionValue);
     166  /** Returns change in cost - one down if alpha >0.0, up if <0.0
    171167         Value is current - new
    172168      */
    173      inline double changeInCost(int sequence, double alpha) const {
    174           double returnValue = 0.0;
    175           if (CLP_METHOD1) {
    176                int iRange = whichRange_[sequence] + offset_[sequence];
    177                if (alpha > 0.0)
    178                     returnValue = cost_[iRange] - cost_[iRange-1];
    179                else
    180                     returnValue = cost_[iRange] - cost_[iRange+1];
    181           }
    182           if (CLP_METHOD2) {
    183                returnValue = (alpha > 0.0) ? infeasibilityWeight_ : -infeasibilityWeight_;
    184           }
    185           return returnValue;
    186      }
    187      inline double changeUpInCost(int sequence) const {
    188           double returnValue = 0.0;
    189           if (CLP_METHOD1) {
    190                int iRange = whichRange_[sequence] + offset_[sequence];
    191                if (iRange + 1 != start_[sequence+1] && !infeasible(iRange + 1))
    192                     returnValue = cost_[iRange] - cost_[iRange+1];
    193                else
    194                     returnValue = -1.0e100;
    195           }
    196           if (CLP_METHOD2) {
    197                returnValue = -infeasibilityWeight_;
    198           }
    199           return returnValue;
    200      }
    201      inline double changeDownInCost(int sequence) const {
    202           double returnValue = 0.0;
    203           if (CLP_METHOD1) {
    204                int iRange = whichRange_[sequence] + offset_[sequence];
    205                if (iRange != start_[sequence] && !infeasible(iRange - 1))
    206                     returnValue = cost_[iRange] - cost_[iRange-1];
    207                else
    208                     returnValue = 1.0e100;
    209           }
    210           if (CLP_METHOD2) {
    211                returnValue = infeasibilityWeight_;
    212           }
    213           return returnValue;
    214      }
    215      /// This also updates next bound
    216      inline double changeInCost(int sequence, double alpha, double &rhs) {
    217           double returnValue = 0.0;
     169  inline double changeInCost(int sequence, double alpha) const
     170  {
     171    double returnValue = 0.0;
     172    if (CLP_METHOD1) {
     173      int iRange = whichRange_[sequence] + offset_[sequence];
     174      if (alpha > 0.0)
     175        returnValue = cost_[iRange] - cost_[iRange - 1];
     176      else
     177        returnValue = cost_[iRange] - cost_[iRange + 1];
     178    }
     179    if (CLP_METHOD2) {
     180      returnValue = (alpha > 0.0) ? infeasibilityWeight_ : -infeasibilityWeight_;
     181    }
     182    return returnValue;
     183  }
     184  inline double changeUpInCost(int sequence) const
     185  {
     186    double returnValue = 0.0;
     187    if (CLP_METHOD1) {
     188      int iRange = whichRange_[sequence] + offset_[sequence];
     189      if (iRange + 1 != start_[sequence + 1] && !infeasible(iRange + 1))
     190        returnValue = cost_[iRange] - cost_[iRange + 1];
     191      else
     192        returnValue = -1.0e100;
     193    }
     194    if (CLP_METHOD2) {
     195      returnValue = -infeasibilityWeight_;
     196    }
     197    return returnValue;
     198  }
     199  inline double changeDownInCost(int sequence) const
     200  {
     201    double returnValue = 0.0;
     202    if (CLP_METHOD1) {
     203      int iRange = whichRange_[sequence] + offset_[sequence];
     204      if (iRange != start_[sequence] && !infeasible(iRange - 1))
     205        returnValue = cost_[iRange] - cost_[iRange - 1];
     206      else
     207        returnValue = 1.0e100;
     208    }
     209    if (CLP_METHOD2) {
     210      returnValue = infeasibilityWeight_;
     211    }
     212    return returnValue;
     213  }
     214  /// This also updates next bound
     215  inline double changeInCost(int sequence, double alpha, double &rhs)
     216  {
     217    double returnValue = 0.0;
    218218#ifdef NONLIN_DEBUG
    219           double saveRhs = rhs;
     219    double saveRhs = rhs;
    220220#endif
    221           if (CLP_METHOD1) {
    222                int iRange = whichRange_[sequence] + offset_[sequence];
    223                if (alpha > 0.0) {
    224                     assert(iRange - 1 >= start_[sequence]);
    225                     offset_[sequence]--;
    226                     rhs += lower_[iRange] - lower_[iRange-1];
    227                     returnValue = alpha * (cost_[iRange] - cost_[iRange-1]);
    228                } else {
    229                     assert(iRange + 1 < start_[sequence+1] - 1);
    230                     offset_[sequence]++;
    231                     rhs += lower_[iRange+2] - lower_[iRange+1];
    232                     returnValue = alpha * (cost_[iRange] - cost_[iRange+1]);
    233                }
    234           }
    235           if (CLP_METHOD2) {
     221    if (CLP_METHOD1) {
     222      int iRange = whichRange_[sequence] + offset_[sequence];
     223      if (alpha > 0.0) {
     224        assert(iRange - 1 >= start_[sequence]);
     225        offset_[sequence]--;
     226        rhs += lower_[iRange] - lower_[iRange - 1];
     227        returnValue = alpha * (cost_[iRange] - cost_[iRange - 1]);
     228      } else {
     229        assert(iRange + 1 < start_[sequence + 1] - 1);
     230        offset_[sequence]++;
     231        rhs += lower_[iRange + 2] - lower_[iRange + 1];
     232        returnValue = alpha * (cost_[iRange] - cost_[iRange + 1]);
     233      }
     234    }
     235    if (CLP_METHOD2) {
    236236#ifdef NONLIN_DEBUG
    237                double saveRhs1 = rhs;
    238                rhs = saveRhs;
     237      double saveRhs1 = rhs;
     238      rhs = saveRhs;
    239239#endif
    240                unsigned char iStatus = status_[sequence];
    241                int iWhere = currentStatus(iStatus);
    242                if (iWhere == CLP_SAME)
    243                     iWhere = originalStatus(iStatus);
    244                // rhs always increases
    245                if (iWhere == CLP_FEASIBLE) {
    246                     if (alpha > 0.0) {
    247                          // going below
    248                          iWhere = CLP_BELOW_LOWER;
    249                          rhs = COIN_DBL_MAX;
    250                     } else {
    251                          // going above
    252                          iWhere = CLP_ABOVE_UPPER;
    253                          rhs = COIN_DBL_MAX;
    254                     }
    255                } else if (iWhere == CLP_BELOW_LOWER) {
    256                     assert (alpha < 0);
    257                     // going feasible
    258                     iWhere = CLP_FEASIBLE;
    259                     rhs += bound_[sequence] - model_->upperRegion()[sequence];
    260                } else {
    261                     assert (iWhere == CLP_ABOVE_UPPER);
    262                     // going feasible
    263                     iWhere = CLP_FEASIBLE;
    264                     rhs += model_->lowerRegion()[sequence] - bound_[sequence];
    265                }
    266                setCurrentStatus(status_[sequence], iWhere);
     240      unsigned char iStatus = status_[sequence];
     241      int iWhere = currentStatus(iStatus);
     242      if (iWhere == CLP_SAME)
     243        iWhere = originalStatus(iStatus);
     244      // rhs always increases
     245      if (iWhere == CLP_FEASIBLE) {
     246        if (alpha > 0.0) {
     247          // going below
     248          iWhere = CLP_BELOW_LOWER;
     249          rhs = COIN_DBL_MAX;
     250        } else {
     251          // going above
     252          iWhere = CLP_ABOVE_UPPER;
     253          rhs = COIN_DBL_MAX;
     254        }
     255      } else if (iWhere == CLP_BELOW_LOWER) {
     256        assert(alpha < 0);
     257        // going feasible
     258        iWhere = CLP_FEASIBLE;
     259        rhs += bound_[sequence] - model_->upperRegion()[sequence];
     260      } else {
     261        assert(iWhere == CLP_ABOVE_UPPER);
     262        // going feasible
     263        iWhere = CLP_FEASIBLE;
     264        rhs += model_->lowerRegion()[sequence] - bound_[sequence];
     265      }
     266      setCurrentStatus(status_[sequence], iWhere);
    267267#ifdef NONLIN_DEBUG
    268                assert(saveRhs1 == rhs);
     268      assert(saveRhs1 == rhs);
    269269#endif
    270                returnValue = fabs(alpha) * infeasibilityWeight_;
    271           }
    272           return returnValue;
    273      }
    274      /// Returns current lower bound
    275      inline double lower(int sequence) const {
    276           return lower_[whichRange_[sequence] + offset_[sequence]];
    277      }
    278      /// Returns current upper bound
    279      inline double upper(int sequence) const {
    280           return lower_[whichRange_[sequence] + offset_[sequence] + 1];
    281      }
    282      /// Returns current cost
    283      inline double cost(int sequence) const {
    284           return cost_[whichRange_[sequence] + offset_[sequence]];
    285      }
    286      /// Returns full status
    287      inline int fullStatus(int sequence) const {
    288        return status_[sequence];
    289      }
    290      /// Returns if changed from beginning of iteration
    291      inline bool changed(int sequence) const {
    292        return (status_[sequence]&64)==0;
    293      }
    294                    
    295      //@}
    296 
    297 
    298      /**@name Gets and sets */
    299      //@{
    300      /// Number of infeasibilities
    301      inline int numberInfeasibilities() const {
    302           return numberInfeasibilities_;
    303      }
    304      /// Change in cost
    305      inline double changeInCost() const {
    306           return changeCost_;
    307      }
    308      /// Feasible cost
    309      inline double feasibleCost() const {
    310           return feasibleCost_;
    311      }
    312      /// Feasible cost with offset and direction (i.e. for reporting)
    313      double feasibleReportCost() const;
    314      /// Sum of infeasibilities
    315      inline double sumInfeasibilities() const {
    316           return sumInfeasibilities_;
    317      }
    318      /// Largest infeasibility
    319      inline double largestInfeasibility() const {
    320           return largestInfeasibility_;
    321      }
    322      /// Average theta
    323      inline double averageTheta() const {
    324           return averageTheta_;
    325      }
    326      inline void setAverageTheta(double value) {
    327           averageTheta_ = value;
    328      }
    329      inline void setChangeInCost(double value) {
    330           changeCost_ = value;
    331      }
    332      inline void setMethod(int value) {
    333           method_ = value;
    334      }
    335      /// See if may want to look both ways
    336      inline bool lookBothWays() const {
    337           return bothWays_;
    338      }
    339      //@}
    340      ///@name Private functions to deal with infeasible regions
    341      inline bool infeasible(int i) const {
    342           return ((infeasible_[i>>5] >> (i & 31)) & 1) != 0;
    343      }
    344      inline void setInfeasible(int i, bool trueFalse) {
    345           unsigned int & value = infeasible_[i>>5];
    346           int bit = i & 31;
    347           if (trueFalse)
    348                value |= (1 << bit);
    349           else
    350                value &= ~(1 << bit);
    351      }
    352      inline unsigned char * statusArray() const {
    353           return status_;
    354      }
    355      /// For debug
    356      void validate();
    357      //@}
     270      returnValue = fabs(alpha) * infeasibilityWeight_;
     271    }
     272    return returnValue;
     273  }
     274  /// Returns current lower bound
     275  inline double lower(int sequence) const
     276  {
     277    return lower_[whichRange_[sequence] + offset_[sequence]];
     278  }
     279  /// Returns current upper bound
     280  inline double upper(int sequence) const
     281  {
     282    return lower_[whichRange_[sequence] + offset_[sequence] + 1];
     283  }
     284  /// Returns current cost
     285  inline double cost(int sequence) const
     286  {
     287    return cost_[whichRange_[sequence] + offset_[sequence]];
     288  }
     289  /// Returns full status
     290  inline int fullStatus(int sequence) const
     291  {
     292    return status_[sequence];
     293  }
     294  /// Returns if changed from beginning of iteration
     295  inline bool changed(int sequence) const
     296  {
     297    return (status_[sequence] & 64) == 0;
     298  }
     299
     300  //@}
     301
     302  /**@name Gets and sets */
     303  //@{
     304  /// Number of infeasibilities
     305  inline int numberInfeasibilities() const
     306  {
     307    return numberInfeasibilities_;
     308  }
     309  /// Change in cost
     310  inline double changeInCost() const
     311  {
     312    return changeCost_;
     313  }
     314  /// Feasible cost
     315  inline double feasibleCost() const
     316  {
     317    return feasibleCost_;
     318  }
     319  /// Feasible cost with offset and direction (i.e. for reporting)
     320  double feasibleReportCost() const;
     321  /// Sum of infeasibilities
     322  inline double sumInfeasibilities() const
     323  {
     324    return sumInfeasibilities_;
     325  }
     326  /// Largest infeasibility
     327  inline double largestInfeasibility() const
     328  {
     329    return largestInfeasibility_;
     330  }
     331  /// Average theta
     332  inline double averageTheta() const
     333  {
     334    return averageTheta_;
     335  }
     336  inline void setAverageTheta(double value)
     337  {
     338    averageTheta_ = value;
     339  }
     340  inline void setChangeInCost(double value)
     341  {
     342    changeCost_ = value;
     343  }
     344  inline void setMethod(int value)
     345  {
     346    method_ = value;
     347  }
     348  /// See if may want to look both ways
     349  inline bool lookBothWays() const
     350  {
     351    return bothWays_;
     352  }
     353  //@}
     354  ///@name Private functions to deal with infeasible regions
     355  inline bool infeasible(int i) const
     356  {
     357    return ((infeasible_[i >> 5] >> (i & 31)) & 1) != 0;
     358  }
     359  inline void setInfeasible(int i, bool trueFalse)
     360  {
     361    unsigned int &value = infeasible_[i >> 5];
     362    int bit = i & 31;
     363    if (trueFalse)
     364      value |= (1 << bit);
     365    else
     366      value &= ~(1 << bit);
     367  }
     368  inline unsigned char *statusArray() const
     369  {
     370    return status_;
     371  }
     372  /// For debug
     373  void validate();
     374  //@}
    358375
    359376private:
    360      /**@name Data members */
    361      //@{
    362      /// Change in cost because of infeasibilities
    363      double changeCost_;
    364      /// Feasible cost
    365      double feasibleCost_;
    366      /// Current infeasibility weight
    367      double infeasibilityWeight_;
    368      /// Largest infeasibility
    369      double largestInfeasibility_;
    370      /// Sum of infeasibilities
    371      double sumInfeasibilities_;
    372      /// Average theta - kept here as only for primal
    373      double averageTheta_;
    374      /// Number of rows (mainly for checking and copy)
    375      int numberRows_;
    376      /// Number of columns (mainly for checking and copy)
    377      int numberColumns_;
    378      /// Starts for each entry (columns then rows)
    379      int * start_;
    380      /// Range for each entry (columns then rows)
    381      int * whichRange_;
    382      /// Temporary range offset for each entry (columns then rows)
    383      int * offset_;
    384      /** Lower bound for each range (upper bound is next lower).
     377  /**@name Data members */
     378  //@{
     379  /// Change in cost because of infeasibilities
     380  double changeCost_;
     381  /// Feasible cost
     382  double feasibleCost_;
     383  /// Current infeasibility weight
     384  double infeasibilityWeight_;
     385  /// Largest infeasibility
     386  double largestInfeasibility_;
     387  /// Sum of infeasibilities
     388  double sumInfeasibilities_;
     389  /// Average theta - kept here as only for primal
     390  double averageTheta_;
     391  /// Number of rows (mainly for checking and copy)
     392  int numberRows_;
     393  /// Number of columns (mainly for checking and copy)
     394  int numberColumns_;
     395  /// Starts for each entry (columns then rows)
     396  int *start_;
     397  /// Range for each entry (columns then rows)
     398  int *whichRange_;
     399  /// Temporary range offset for each entry (columns then rows)
     400  int *offset_;
     401  /** Lower bound for each range (upper bound is next lower).
    385402         For various reasons there is always an infeasible range
    386403         at bottom - even if lower bound is - infinity */
    387      double * lower_;
    388      /// Cost for each range
    389      double * cost_;
    390      /// Model
    391      ClpSimplex * model_;
    392      // Array to say which regions are infeasible
    393      unsigned int * infeasible_;
    394      /// Number of infeasibilities found
    395      int numberInfeasibilities_;
    396      // new stuff
    397      /// Contains status at beginning and current
    398      unsigned char * status_;
    399      /// Bound which has been replaced in lower_ or upper_
    400      double * bound_;
    401      /// Feasible cost array
    402      double * cost2_;
    403      /// Method 1 old, 2 new, 3 both!
    404      int method_;
    405      /// If all non-linear costs convex
    406      bool convex_;
    407      /// If we should look both ways for djs
    408      bool bothWays_;
    409      //@}
     404  double *lower_;
     405  /// Cost for each range
     406  double *cost_;
     407  /// Model
     408  ClpSimplex *model_;
     409  // Array to say which regions are infeasible
     410  unsigned int *infeasible_;
     411  /// Number of infeasibilities found
     412  int numberInfeasibilities_;
     413  // new stuff
     414  /// Contains status at beginning and current
     415  unsigned char *status_;
     416  /// Bound which has been replaced in lower_ or upper_
     417  double *bound_;
     418  /// Feasible cost array
     419  double *cost2_;
     420  /// Method 1 old, 2 new, 3 both!
     421  int method_;
     422  /// If all non-linear costs convex
     423  bool convex_;
     424  /// If we should look both ways for djs
     425  bool bothWays_;
     426  //@}
    410427};
    411428
    412429#endif
     430
     431/* vi: softtabstop=2 shiftwidth=2 expandtab tabstop=2
     432*/
Note: See TracChangeset for help on using the changeset viewer.