Changeset 21 for branches


Ignore:
Timestamp:
Sep 17, 2002 4:43:03 PM (17 years ago)
Author:
forrest
Message:

Check matrix more carefully

Location:
branches/devel-1
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • branches/devel-1/ClpMessage.cpp

    r19 r21  
    3636  {CLP_PRIMAL_OPTIMAL,17,2,"Looking optimal with tolerance of %g"},
    3737  {CLP_SINGULARITIES,18,2,"%d total structurals rejected in initial factorization"},
     38  {CLP_MODIFIEDBOUNDS,19,1,"%d variables/rows fixed as scaled bounds too close"},
     39  {CLP_RIMSTATISTICS1,20,2,"Absolute values of scaled objective range from %g to %g"},
     40  {CLP_RIMSTATISTICS2,21,2,"Absolute values of scaled bounds range from %g to %g, minimum gap %g"},
     41  {CLP_RIMSTATISTICS3,22,2,"Absolute values of scaled rhs range from %g to %g, minimum gap %g"},
    3842  {CLP_SIMPLEX_HOUSE1,101,32,"dirOut %d, dirIn %d, theta %g, out %g, dj %g, alpha %g"},
    3943  {CLP_SIMPLEX_HOUSE2,102,4,"%d %g In: %c%d Out: %c%d%? dj ratio %g distance %g%? dj %g distance %g"},
     
    4953  {CLP_INITIALIZE_STEEP,1005,1,"Initializing steepest edge weights - old %g, new %g"},
    5054  {CLP_UNABLE_OPEN,6001,0,"Unable to open file %s for reading"},
     55  {CLP_BAD_BOUNDS,6002,0,"%d bad bound pairs were found - first at %c%d"},
     56  {CLP_BAD_MATRIX,6003,0,"Matrix has bad values"},
    5157  {CLP_IMPORT_RESULT,18,1,"Model was imported from %s in %g seconds"},
    5258  {CLP_IMPORT_ERRORS,3001,1," There were %d errors when importing model from %s"},
  • branches/devel-1/ClpPackedMatrix.cpp

    r19 r21  
    769769  }
    770770}
    771 
     771/* Checks if all elements are in valid range.  Can just
     772   return true if you are not paranoid.  For Clp I will
     773   probably expect no zeros.  Code can modify matrix to get rid of
     774   small elements.
     775*/
     776bool
     777ClpPackedMatrix::allElementsInRange(double smallest, double largest)
     778{
     779  int iColumn;
     780  int numberBad=0;;
     781  // get matrix data pointers
     782  //const int * row = matrix_->getIndices();
     783  const int * columnStart = matrix_->getVectorStarts();
     784  const int * columnLength = matrix_->getVectorLengths();
     785  const double * elementByColumn = matrix_->getElements();
     786  int numberColumns = matrix_->getNumCols();
     787  for (iColumn=0;iColumn<numberColumns;iColumn++) {
     788    int j;
     789    for (j=columnStart[iColumn];
     790         j<columnStart[iColumn]+columnLength[iColumn];j++) {
     791      double value = fabs(elementByColumn[j]);
     792      if (value<smallest||value>largest)
     793        numberBad++;
     794    }
     795  }
     796  return (numberBad==0);
     797}
     798
     799
  • branches/devel-1/ClpSimplex.cpp

    r20 r21  
    28052805  return -1;
    28062806}
     2807// Sanity check on input data - returns true if okay
     2808bool
     2809ClpSimplex::sanityCheck()
     2810{
     2811  int badProblem=0;
     2812  int numberBad , numberBadBounds;
     2813  double largestBound, smallestBound, minimumGap;
     2814  double smallestObj, largestObj;
     2815  int firstBad;
     2816  int modifiedBounds=0;
     2817  int i;
     2818  numberBad=0;
     2819  numberBadBounds=0;
     2820  firstBad=-1;
     2821  minimumGap=1.0e100;
     2822  smallestBound=1.0e100;
     2823  largestBound=0.0;
     2824  smallestObj=1.0e100;
     2825  largestObj=0.0;
     2826  for (i=numberColumns_;i<numberColumns_+numberRows_;i++) {
     2827    double value;
     2828    value = fabs(cost_[i]);
     2829    if (value>1.0e50) {
     2830      numberBad++;
     2831      if (firstBad<0)
     2832        firstBad=i;
     2833    } else if (value) {
     2834      if (value>largestObj)
     2835        largestObj=value;
     2836      if (value<smallestObj)
     2837        smallestObj=value;
     2838    }
     2839    value=upper_[i]-lower_[i];
     2840    if (value<-primalTolerance_) {
     2841      numberBadBounds++;
     2842      if (firstBad<0)
     2843        firstBad=i;
     2844    } else if (value<=primalTolerance_) {
     2845      if (value) {
     2846        // modify
     2847        upper_[i] = lower_[i];
     2848        modifiedBounds++;
     2849      }
     2850    } else {
     2851      if (value<minimumGap)
     2852        minimumGap=value;
     2853    }
     2854    if (lower_[i]>-1.0e100&&lower_[i]) {
     2855      value = fabs(lower_[i]);
     2856      if (value>largestBound)
     2857        largestBound=value;
     2858      if (value<smallestBound)
     2859        smallestBound=value;
     2860    }
     2861    if (upper_[i]<1.0e100&&upper_[i]) {
     2862      value = fabs(upper_[i]);
     2863      if (value>largestBound)
     2864        largestBound=value;
     2865      if (value<smallestBound)
     2866        smallestBound=value;
     2867    }
     2868  }
     2869  if (largestBound)
     2870    handler_->message(CLP_RIMSTATISTICS3,messages_)
     2871      <<smallestBound
     2872      <<largestBound
     2873      <<minimumGap
     2874      <<CoinMessageEol;
     2875  minimumGap=1.0e100;
     2876  smallestBound=1.0e100;
     2877  largestBound=0.0;
     2878  for (i=0;i<numberColumns_;i++) {
     2879    double value;
     2880    value = fabs(cost_[i]);
     2881    if (value>1.0e50) {
     2882      numberBad++;
     2883      if (firstBad<0)
     2884        firstBad=i;
     2885    } else if (value) {
     2886      if (value>largestObj)
     2887        largestObj=value;
     2888      if (value<smallestObj)
     2889        smallestObj=value;
     2890    }
     2891    value=upper_[i]-lower_[i];
     2892    if (value<-primalTolerance_) {
     2893      numberBadBounds++;
     2894      if (firstBad<0)
     2895        firstBad=i;
     2896    } else if (value<=primalTolerance_) {
     2897      if (value) {
     2898        // modify
     2899        upper_[i] = lower_[i];
     2900        modifiedBounds++;
     2901      }
     2902    } else {
     2903      if (value<minimumGap)
     2904        minimumGap=value;
     2905    }
     2906    if (lower_[i]>-1.0e100&&lower_[i]) {
     2907      value = fabs(lower_[i]);
     2908      if (value>largestBound)
     2909        largestBound=value;
     2910      if (value<smallestBound)
     2911        smallestBound=value;
     2912    }
     2913    if (upper_[i]<1.0e100&&upper_[i]) {
     2914      value = fabs(upper_[i]);
     2915      if (value>largestBound)
     2916        largestBound=value;
     2917      if (value<smallestBound)
     2918        smallestBound=value;
     2919    }
     2920  }
     2921  char rowcol[]={'R','C'};
     2922  if (numberBad) {
     2923    handler_->message(CLP_BAD_BOUNDS,messages_)
     2924      <<numberBad
     2925      <<rowcol[isColumn(firstBad)]<<sequenceWithin(firstBad)
     2926      <<CoinMessageEol;
     2927    problemStatus_=4;
     2928    return false;
     2929  }
     2930  //check matrix
     2931  if (!matrix_->allElementsInRange(1.0e-20,1.0e20)) {
     2932    handler_->message(CLP_BAD_MATRIX,messages_)
     2933      <<CoinMessageEol;
     2934    problemStatus_=4;
     2935    return false;
     2936  }
     2937  if (modifiedBounds)
     2938    handler_->message(CLP_MODIFIEDBOUNDS,messages_)
     2939      <<modifiedBounds
     2940      <<CoinMessageEol;
     2941  handler_->message(CLP_RIMSTATISTICS1,messages_)
     2942    <<smallestObj
     2943    <<largestObj
     2944    <<CoinMessageEol;
     2945  if (largestBound)
     2946    handler_->message(CLP_RIMSTATISTICS2,messages_)
     2947      <<smallestBound
     2948      <<largestBound
     2949      <<minimumGap
     2950      <<CoinMessageEol;
     2951  return true;
     2952}
  • branches/devel-1/ClpSimplexDual.cpp

    r20 r21  
    246246  // save dual bound
    247247  double saveDualBound_ = dualBound_;
    248 
    249   int iRow,iColumn;
    250   // Do initial factorization
    251   // and set certain stuff
    252   // We can either set increasing rows so ...IsBasic gives pivot row
    253   // or we can just increment iBasic one by one
    254   // for now let ...iBasic give pivot row
    255   factorization_->increasingRows(2);
    256   // row activities have negative sign
    257   factorization_->slackValue(-1.0);
    258   factorization_->zeroTolerance(1.0e-13);
     248  // save perturbation
     249  int savePerturbation = perturbation_;
    259250  // save if sparse factorization wanted
    260251  int saveSparse = factorization_->sparseThreshold();
    261252
    262   int factorizationStatus = internalFactorize(0);
    263   if (factorizationStatus<0)
    264     return 1; // some error
    265   else if (factorizationStatus)
    266     handler_->message(CLP_SINGULARITIES,messages_)
    267     <<factorizationStatus
    268     <<CoinMessageEol;
    269 
    270   // If user asked for perturbation - do it
    271   int savePerturbation = perturbation_;
    272 
    273   if (perturbation_<100)
    274     perturb();
    275 
    276   double objectiveChange;
    277   // for dual we will change bounds using dualBound_
    278   // for this we need clean basis so it is after factorize
    279   gutsOfSolution(rowActivityWork_,columnActivityWork_);
    280 
    281   numberFake_ =0; // Number of variables at fake bounds
    282   changeBounds(true,NULL,objectiveChange);
    283 
    284   problemStatus_ = -1;
    285   numberIterations_=0;
    286 
    287   int lastCleaned=0; // last time objective or bounds cleaned up
    288 
    289   // number of times we have declared optimality
    290   numberTimesOptimal_=0;
    291 
    292   // Progress indicator
    293   ClpSimplexProgress progress(this);
    294 
    295   // This says whether to restore things etc
    296   int factorType=0;
    297   /*
    298     Status of problem:
    299     0 - optimal
    300     1 - infeasible
    301     2 - unbounded
    302     -1 - iterating
    303     -2 - factorization wanted
    304     -3 - redo checking without factorization
    305     -4 - looks infeasible
    306   */
    307   while (problemStatus_<0) {
    308     // clear
    309     for (iRow=0;iRow<4;iRow++) {
    310       rowArray_[iRow]->clear();
    311     }   
     253  if (sanityCheck()) {
     254    // Problem looks okay
     255    int iRow,iColumn;
     256    // Do initial factorization
     257    // and set certain stuff
     258    // We can either set increasing rows so ...IsBasic gives pivot row
     259    // or we can just increment iBasic one by one
     260    // for now let ...iBasic give pivot row
     261    factorization_->increasingRows(2);
     262    // row activities have negative sign
     263    factorization_->slackValue(-1.0);
     264    factorization_->zeroTolerance(1.0e-13);
    312265   
    313     for (iColumn=0;iColumn<2;iColumn++) {
    314       columnArray_[iColumn]->clear();
    315     }   
    316 
    317     // give matrix (and model costs and bounds a chance to be
    318     // refreshed (normally null)
    319     matrix_->refresh(this);
    320     // If getting nowhere - why not give it a kick
     266    int factorizationStatus = internalFactorize(0);
     267    if (factorizationStatus<0)
     268      return 1; // some error
     269    else if (factorizationStatus)
     270      handler_->message(CLP_SINGULARITIES,messages_)
     271        <<factorizationStatus
     272        <<CoinMessageEol;
     273   
     274    // If user asked for perturbation - do it
     275   
     276    if (perturbation_<100)
     277      perturb();
     278   
     279    double objectiveChange;
     280    // for dual we will change bounds using dualBound_
     281    // for this we need clean basis so it is after factorize
     282    gutsOfSolution(rowActivityWork_,columnActivityWork_);
     283   
     284    numberFake_ =0; // Number of variables at fake bounds
     285    changeBounds(true,NULL,objectiveChange);
     286   
     287    problemStatus_ = -1;
     288    numberIterations_=0;
     289   
     290    int lastCleaned=0; // last time objective or bounds cleaned up
     291   
     292    // number of times we have declared optimality
     293    numberTimesOptimal_=0;
     294   
     295    // Progress indicator
     296    ClpSimplexProgress progress(this);
     297   
     298    // This says whether to restore things etc
     299    int factorType=0;
     300    /*
     301      Status of problem:
     302      0 - optimal
     303      1 - infeasible
     304      2 - unbounded
     305      -1 - iterating
     306      -2 - factorization wanted
     307      -3 - redo checking without factorization
     308      -4 - looks infeasible
     309    */
     310    while (problemStatus_<0) {
     311      // clear
     312      for (iRow=0;iRow<4;iRow++) {
     313        rowArray_[iRow]->clear();
     314      }   
     315     
     316      for (iColumn=0;iColumn<2;iColumn++) {
     317        columnArray_[iColumn]->clear();
     318      }   
     319     
     320      // give matrix (and model costs and bounds a chance to be
     321      // refreshed (normally null)
     322      matrix_->refresh(this);
     323      // If getting nowhere - why not give it a kick
    321324#if 0
    322     // does not seem to work too well - do some more work
    323     if (perturbation_<101&&numberIterations_>2*(numberRows_+numberColumns_))
    324       perturb();
    325 #endif
    326     // may factorize, checks if problem finished
    327     statusOfProblemInDual(lastCleaned,factorType,progress);
    328 
    329     // Say good factorization
    330     factorType=1;
    331     if (saveSparse) {
    332       // use default at present
    333       factorization_->sparseThreshold(0);
    334       factorization_->goSparse();
    335     }
    336 
    337     // Do iterations
    338     whileIterating();
     325      // does not seem to work too well - do some more work
     326      if (perturbation_<101&&numberIterations_>2*(numberRows_+numberColumns_))
     327        perturb();
     328#endif
     329      // may factorize, checks if problem finished
     330      statusOfProblemInDual(lastCleaned,factorType,progress);
     331     
     332      // Say good factorization
     333      factorType=1;
     334      if (saveSparse) {
     335        // use default at present
     336        factorization_->sparseThreshold(0);
     337        factorization_->goSparse();
     338      }
     339     
     340      // Do iterations
     341      whileIterating();
     342    }
    339343  }
    340344
  • branches/devel-1/ClpSimplexPrimal.cpp

    r20 r21  
    227227  // save infeasibility cost
    228228  double saveInfeasibilityCost = infeasibilityCost_;
    229 
    230   int iRow,iColumn;
    231   // Do initial factorization
    232   // and set certain stuff
    233   // We can either set increasing rows so ...IsBasic gives pivot row
    234   // or we can just increment iBasic one by one
    235   // for now let ...iBasic give pivot row
    236   factorization_->increasingRows(2);
    237   // row activities have negative sign
    238   factorization_->slackValue(-1.0);
    239   factorization_->zeroTolerance(1.0e-13);
    240  
    241 
    242   // If user asked for perturbation - do it
     229  // Save perturbation
    243230  int savePerturbation = perturbation_;
    244 
    245   if (perturbation_<100)
    246     perturb();
    247 
    248   // for primal we will change bounds using infeasibilityCost_
    249   if (nonLinearCost_==NULL) {
    250     // get a valid nonlinear cost function
    251     delete nonLinearCost_;
    252     nonLinearCost_= new ClpNonLinearCost(this);
    253   }
    254 
    255231  // save if sparse factorization wanted
    256232  int saveSparse = factorization_->sparseThreshold();
    257233
    258   // loop round to clean up solution if values pass
    259   int numberThrownOut = -1;
    260   int firstSuperBasic=numberRows_+numberColumns_;
    261   int totalNumberThrownOut=0;
    262   while(numberThrownOut) {
    263     int status = internalFactorize(0+10*ifValuesPass);
    264     if (status<0)
    265       return 1; // some error
    266     else
    267       totalNumberThrownOut+= status;
    268 
    269     // for this we need clean basis so it is after factorize
    270     numberThrownOut=gutsOfSolution(rowActivityWork_,columnActivityWork_,
    271                                    ifValuesPass);
    272     totalNumberThrownOut+= numberThrownOut;
    273 
    274     // find first superbasic - columns, then rows
    275     if (ifValuesPass) {
    276       nextSuperBasic(firstSuperBasic);
    277       if (firstSuperBasic==numberRows_+numberColumns_)
    278         ifValuesPass=0; // signal no values pass
    279     }
    280   }
    281 
    282   if (totalNumberThrownOut)
    283     handler_->message(CLP_SINGULARITIES,messages_)
    284     <<totalNumberThrownOut
    285     <<CoinMessageEol;
    286 
    287   problemStatus_ = -1;
    288   numberIterations_=0;
    289 
    290   int lastCleaned=0; // last time objective or bounds cleaned up
    291 
    292   // number of times we have declared optimality
    293   numberTimesOptimal_=0;
    294 
    295   // Progress indicator
    296   ClpSimplexProgress progress(this);
    297 
    298   // Say no pivot has occurred (for steepest edge and updates)
    299   pivotRow_=-2;
    300 
    301   // This says whether to restore things etc
    302   int factorType=0;
    303   // Save iteration number
    304   int saveNumber = -1;
    305   /*
    306     Status of problem:
    307     0 - optimal
    308     1 - infeasible
    309     2 - unbounded
    310     -1 - iterating
    311     -2 - factorization wanted
    312     -3 - redo checking without factorization
    313     -4 - looks infeasible
    314     -5 - looks unbounded
    315   */
    316   while (problemStatus_<0) {
    317     // clear
    318     for (iRow=0;iRow<4;iRow++) {
    319       rowArray_[iRow]->clear();
    320     }   
     234  if (sanityCheck()) {
     235    // Model looks okay
     236    int iRow,iColumn;
     237    // Do initial factorization
     238    // and set certain stuff
     239    // We can either set increasing rows so ...IsBasic gives pivot row
     240    // or we can just increment iBasic one by one
     241    // for now let ...iBasic give pivot row
     242    factorization_->increasingRows(2);
     243    // row activities have negative sign
     244    factorization_->slackValue(-1.0);
     245    factorization_->zeroTolerance(1.0e-13);
    321246   
    322     for (iColumn=0;iColumn<2;iColumn++) {
    323       columnArray_[iColumn]->clear();
    324     }   
    325 
    326     // give matrix (and model costs and bounds a chance to be
    327     // refreshed (normally null)
    328     matrix_->refresh(this);
    329     // If getting nowhere - why not give it a kick
    330 #if 0
    331     // primal perturbation not coded yet
    332     if (perturbation_<101&&numberIterations_>2*(numberRows_+numberColumns_))
     247   
     248    // If user asked for perturbation - do it
     249   
     250    if (perturbation_<100)
    333251      perturb();
    334 #endif
    335     // If we have done no iterations - special
    336     if (saveNumber==numberIterations_)
    337       factorType=3;
    338     // may factorize, checks if problem finished
    339     statusOfProblemInPrimal(lastCleaned,factorType,progress);
    340 
    341     // Say good factorization
    342     factorType=1;
    343     if (saveSparse) {
    344       // use default at present
    345       factorization_->sparseThreshold(0);
    346       factorization_->goSparse();
    347     }
    348 
     252   
     253    // for primal we will change bounds using infeasibilityCost_
     254    if (nonLinearCost_==NULL) {
     255      // get a valid nonlinear cost function
     256      delete nonLinearCost_;
     257      nonLinearCost_= new ClpNonLinearCost(this);
     258    }
     259   
     260    // loop round to clean up solution if values pass
     261    int numberThrownOut = -1;
     262    int firstSuperBasic=numberRows_+numberColumns_;
     263    int totalNumberThrownOut=0;
     264    while(numberThrownOut) {
     265      int status = internalFactorize(0+10*ifValuesPass);
     266      if (status<0)
     267        return 1; // some error
     268      else
     269        totalNumberThrownOut+= status;
     270     
     271      // for this we need clean basis so it is after factorize
     272      numberThrownOut=gutsOfSolution(rowActivityWork_,columnActivityWork_,
     273                                     ifValuesPass);
     274      totalNumberThrownOut+= numberThrownOut;
     275     
     276      // find first superbasic - columns, then rows
     277      if (ifValuesPass) {
     278        nextSuperBasic(firstSuperBasic);
     279        if (firstSuperBasic==numberRows_+numberColumns_)
     280          ifValuesPass=0; // signal no values pass
     281      }
     282    }
     283   
     284    if (totalNumberThrownOut)
     285      handler_->message(CLP_SINGULARITIES,messages_)
     286        <<totalNumberThrownOut
     287        <<CoinMessageEol;
     288   
     289    problemStatus_ = -1;
     290    numberIterations_=0;
     291   
     292    int lastCleaned=0; // last time objective or bounds cleaned up
     293   
     294    // number of times we have declared optimality
     295    numberTimesOptimal_=0;
     296   
     297    // Progress indicator
     298    ClpSimplexProgress progress(this);
     299   
    349300    // Say no pivot has occurred (for steepest edge and updates)
    350301    pivotRow_=-2;
    351 
     302   
     303    // This says whether to restore things etc
     304    int factorType=0;
    352305    // Save iteration number
    353     saveNumber = numberIterations_;
    354 
    355     // Iterate
    356     whileIterating(firstSuperBasic);
    357   }
    358 
     306    int saveNumber = -1;
     307    /*
     308      Status of problem:
     309      0 - optimal
     310      1 - infeasible
     311      2 - unbounded
     312      -1 - iterating
     313      -2 - factorization wanted
     314      -3 - redo checking without factorization
     315      -4 - looks infeasible
     316      -5 - looks unbounded
     317    */
     318    while (problemStatus_<0) {
     319      // clear
     320      for (iRow=0;iRow<4;iRow++) {
     321        rowArray_[iRow]->clear();
     322      }   
     323     
     324      for (iColumn=0;iColumn<2;iColumn++) {
     325        columnArray_[iColumn]->clear();
     326      }   
     327     
     328      // give matrix (and model costs and bounds a chance to be
     329      // refreshed (normally null)
     330      matrix_->refresh(this);
     331      // If getting nowhere - why not give it a kick
     332#if 0
     333      // primal perturbation not coded yet
     334      if (perturbation_<101&&numberIterations_>2*(numberRows_+numberColumns_))
     335        perturb();
     336#endif
     337      // If we have done no iterations - special
     338      if (saveNumber==numberIterations_)
     339        factorType=3;
     340      // may factorize, checks if problem finished
     341      statusOfProblemInPrimal(lastCleaned,factorType,progress);
     342     
     343      // Say good factorization
     344      factorType=1;
     345      if (saveSparse) {
     346        // use default at present
     347        factorization_->sparseThreshold(0);
     348        factorization_->goSparse();
     349      }
     350     
     351      // Say no pivot has occurred (for steepest edge and updates)
     352      pivotRow_=-2;
     353     
     354      // Save iteration number
     355      saveNumber = numberIterations_;
     356     
     357      // Iterate
     358      whileIterating(firstSuperBasic);
     359    }
     360  }
    359361  // if infeasible get real values
    360   if (problemStatus_) {
     362  if (problemStatus_==1) {
    361363    infeasibilityCost_=0.0;
    362364    createRim(7);
  • branches/devel-1/Makefile

    r19 r21  
    55# highest level of optimization the compiler supports. If want something in
    66# between then specify the exact level you want, e.g., -O1 or -O2
    7 #OptLevel := -O2
    87OptLevel := -g
     8OptLevel := -O2
    99
    1010ifeq ($(OptLevel),-g)
  • branches/devel-1/include/ClpMatrixBase.hpp

    r19 r21  
    8282  virtual int scale(ClpSimplex * model) const
    8383  { return 1;};
     84
     85  /** Checks if all elements are in valid range.  Can just
     86      return true if you are not paranoid.  For Clp I will
     87      probably expect no zeros.  Code can modify matrix to get rid of
     88      small elements.
     89  */
     90  virtual bool allElementsInRange(double smallest, double largest)
     91  { return true;};
    8492
    8593  /** Unpacks a column into an CoinIndexedvector
  • branches/devel-1/include/ClpMessage.hpp

    r19 r21  
    3434  CLP_PRIMAL_WEIGHT,
    3535  CLP_PRIMAL_OPTIMAL,
     36  CLP_SINGULARITIES,
     37  CLP_MODIFIEDBOUNDS,
     38  CLP_RIMSTATISTICS1,
     39  CLP_RIMSTATISTICS2,
     40  CLP_RIMSTATISTICS3,
    3641  CLP_SIMPLEX_HOUSE1,
    3742  CLP_SIMPLEX_HOUSE2,
     
    4752  CLP_INITIALIZE_STEEP,
    4853  CLP_UNABLE_OPEN,
     54  CLP_BAD_BOUNDS,
     55  CLP_BAD_MATRIX,
    4956  CLP_IMPORT_RESULT,
    5057  CLP_IMPORT_ERRORS,
    51   CLP_SINGULARITIES,
    5258  CLP_DUMMY_END
    5359};
  • branches/devel-1/include/ClpPackedMatrix.hpp

    r19 r21  
    7979      returns non-zero if no scaling done */
    8080  virtual int scale(ClpSimplex * model) const ;
     81  /** Checks if all elements are in valid range.  Can just
     82      return true if you are not paranoid.  For Clp I will
     83      probably expect no zeros.  Code can modify matrix to get rid of
     84      small elements.
     85  */
     86  virtual bool allElementsInRange(double smallest, double largest);
     87
    8188  /** Unpacks a column into an CoinIndexedvector
    8289      Note that model is NOT const.  Bounds and objective could
  • branches/devel-1/include/ClpSimplex.hpp

    r20 r21  
    355355  /// releases above arrays and does solution scaling out
    356356  void deleteRim();
     357  /// Sanity check on input data (after scaling) - returns true if okay
     358  bool sanityCheck();
    357359  //@}
    358360  public:
Note: See TracChangeset for help on using the changeset viewer.