Changeset 133 for trunk


Ignore:
Timestamp:
Feb 25, 2003 10:17:07 AM (17 years ago)
Author:
forrest
Message:

memory problem for network and setRowObjective

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/ClpModel.cpp

    r123 r133  
    196196  }
    197197}
     198// This just loads up a row objective
     199void ClpModel::SetRowObjective(const double * rowObjective)
     200{
     201  delete [] rowObjective_;
     202  rowObjective_=ClpCopyOfArray(rowObjective,numberRows_);
     203}
    198204void
    199205ClpModel::loadProblem (  const ClpMatrixBase& matrix,
  • trunk/ClpSimplex.cpp

    r131 r133  
    245245
    246246  double * array = new double [numberRows_+1]; // +1 for network
    247   double * save = new double [numberRows_];
    248   double * previous = new double [numberRows_];
     247  double * save = new double [numberRows_+1];
     248  double * previous = new double [numberRows_+1];
    249249
    250250  // accumulate non basic stuff
     
    345345
    346346  double * array = new double [numberRows_+1]; // +1 for network
    347   double * save = new double [numberRows_];
    348   double * previous = new double [numberRows_];
     347  double * save = new double [numberRows_+1];
     348  double * previous = new double [numberRows_+1];
    349349
    350350  int iRow;
  • trunk/include/ClpModel.hpp

    r123 r133  
    9292                      const double* rowlb, const double* rowub,
    9393                      const double * rowObjective=NULL);
     94  /// This just loads up a row objective
     95  void SetRowObjective(const double * rowObjective);
    9496  /// Read an mps file from the given filename
    9597  int readMps(const char *filename,
Note: See TracChangeset for help on using the changeset viewer.