Ignore:
Timestamp:
Sep 19, 2002 12:42:59 PM (18 years ago)
Author:
forrest
Message:

Allowing for bad matrices

File:
1 edited

Legend:

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

    r21 r23  
    107107#include <stdio.h>
    108108#include <iostream>
     109#define CHECK_DJ
    109110// This returns a non const array filled with input from scalar
    110111// or actual array
     
    242243  // put in standard form (and make row copy)
    243244  // create modifiable copies of model rim and do optional scaling
    244   createRim(7+8+16,true);
     245  bool goodMatrix = createRim(7+8+16,true);
    245246
    246247  // save dual bound
     
    251252  int saveSparse = factorization_->sparseThreshold();
    252253
    253   if (sanityCheck()) {
     254  if (goodMatrix) {
    254255    // Problem looks okay
    255256    int iRow,iColumn;
     
    597598            rowArray_[1]->clear();
    598599            columnArray_[0]->clear();
     600            // make sure dual feasible
     601            // look at all rows and columns
     602            CoinIotaN(rowArray_[0]->getIndices(),numberRows_,0);
     603            rowArray_[0]->setNumElements(numberRows_);
     604            CoinIotaN(columnArray_[0]->getIndices(),numberColumns_,0);
     605            columnArray_[0]->setNumElements(numberColumns_);
     606            double objectiveChange=0.0;
     607            updateDualsInDual(rowArray_[0],columnArray_[0],rowArray_[1],
     608                              0.0,objectiveChange);
    599609            continue;
    600610          }
     
    11921202        break;
    11931203      case ClpSimplex::atUpperBound:
     1204#ifdef CHECK_DJ
     1205        // For Debug so we can find out where problem is
     1206        perturbation_ = iSequence+addSequence;
     1207#endif
    11941208        assert (oldValue<=dualTolerance_*1.0001);
    11951209        if (value>newTolerance) {
     
    12011215        break;
    12021216      case ClpSimplex::atLowerBound:
     1217#ifdef CHECK_DJ
     1218        // For Debug so we can find out where problem is
     1219        perturbation_ = iSequence+addSequence;
     1220#endif
    12031221        assert (oldValue>=-dualTolerance_*1.0001);
    12041222        if (value<-newTolerance) {
     
    19291947          ray_ = NULL;
    19301948        }
     1949
    19311950      }
    19321951    } else {
Note: See TracChangeset for help on using the changeset viewer.