Ignore:
Timestamp:
Sep 23, 2002 9:40:07 AM (18 years ago)
Author:
forrest
Message:

Taking out dependence on CoinWarmStartBasis?

File:
1 edited

Legend:

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

    r23 r26  
    420420        double upperValue=upper_[iSequence];
    421421        double value=solution_[iSequence];
    422         if(getStatus(iSequence)!=ClpSimplex::basic) {
     422        if(getStatus(iSequence)!=basic) {
    423423          assert(lowerValue>-1.0e20);
    424424          assert(upperValue<1.0e20);
     
    426426        switch(getStatus(iSequence)) {
    427427         
    428         case ClpSimplex::basic:
     428        case basic:
    429429          break;
    430         case ClpSimplex::isFree:
    431         case ClpSimplex::superBasic:
     430        case isFree:
     431        case superBasic:
    432432          break;
    433         case ClpSimplex::atUpperBound:
     433        case atUpperBound:
    434434          assert (fabs(value-upperValue)<=primalTolerance_) ;
    435435          break;
    436         case ClpSimplex::atLowerBound:
     436        case atLowerBound:
    437437          assert (fabs(value-lowerValue)<=primalTolerance_) ;
    438438          break;
     
    774774        switch(status) {
    775775         
    776         case ClpSimplex::basic:
    777         case ClpSimplex::superBasic:
     776        case basic:
     777        case superBasic:
    778778          break;
    779         case ClpSimplex::isFree:
     779        case isFree:
    780780          if (fabs(value)>tolerance) {
    781781#ifdef CLP_DEBUG
     
    786786          }
    787787          break;
    788         case ClpSimplex::atUpperBound:
     788        case atUpperBound:
    789789          if (value>tolerance) {
    790790            // to lower bound (if swap)
     
    810810                  value>=-tolerance) {
    811811                movement = lower[iSequence]-upper[iSequence];
    812                 setStatus(iSequence+addSequence,ClpSimplex::atLowerBound);
     812                setStatus(iSequence+addSequence,atLowerBound);
    813813                solution[iSequence] = lower[iSequence];
    814814                changeObj += movement*cost[iSequence];
     
    819819          }
    820820          break;
    821         case ClpSimplex::atLowerBound:
     821        case atLowerBound:
    822822          if (value<-tolerance) {
    823823            // to upper bound
     
    843843                  value<=tolerance) {
    844844                movement = upper[iSequence] - lower[iSequence];
    845                 setStatus(iSequence+addSequence,ClpSimplex::atUpperBound);
     845                setStatus(iSequence+addSequence,atUpperBound);
    846846                solution[iSequence] = upper[iSequence];
    847847                changeObj += movement*cost[iSequence];
     
    952952      switch(getStatus(iSequence)) {
    953953
    954       case ClpSimplex::basic:
     954      case basic:
    955955        break;
    956       case ClpSimplex::isFree:
    957       case ClpSimplex::superBasic:
     956      case isFree:
     957      case superBasic:
    958958        break;
    959       case ClpSimplex::atUpperBound:
     959      case atUpperBound:
    960960        if (fabs(value-upperValue)>primalTolerance_)
    961961          numberInfeasibilities++;
    962962        break;
    963       case ClpSimplex::atLowerBound:
     963      case atLowerBound:
    964964        if (fabs(value-lowerValue)>primalTolerance_)
    965965          numberInfeasibilities++;
     
    975975        double newUpperValue;
    976976        Status status = getStatus(iSequence);
    977         if (status==ClpSimplex::atUpperBound||
    978             status==ClpSimplex::atLowerBound) {
     977        if (status==atUpperBound||
     978            status==atLowerBound) {
    979979          double value = solution_[iSequence];
    980980          if (value-lowerValue<=upperValue-value) {
     
    996996              setFakeBound(iSequence,ClpSimplexDual::upperFake);
    997997          }
    998           if (status==ClpSimplex::atUpperBound)
     998          if (status==atUpperBound)
    999999            solution_[iSequence] = newUpperValue;
    10001000          else
     
    10241024    for (iSequence=0;iSequence<numberRows_+numberColumns_;iSequence++) {
    10251025      Status status = getStatus(iSequence);
    1026       if (status==ClpSimplex::atUpperBound||
    1027           status==ClpSimplex::atLowerBound) {
     1026      if (status==atUpperBound||
     1027          status==atLowerBound) {
    10281028        double lowerValue=lower_[iSequence];
    10291029        double upperValue=upper_[iSequence];
     
    11841184      switch(getStatus(iSequence+addSequence)) {
    11851185         
    1186       case ClpSimplex::basic:
     1186      case basic:
    11871187        break;
    1188       case ClpSimplex::isFree:
    1189       case ClpSimplex::superBasic:
     1188      case isFree:
     1189      case superBasic:
    11901190        if (oldValue>dualTolerance_) {
    11911191          if (value<-newTolerance)
     
    12011201        }
    12021202        break;
    1203       case ClpSimplex::atUpperBound:
     1203      case atUpperBound:
    12041204#ifdef CHECK_DJ
    12051205        // For Debug so we can find out where problem is
     
    12141214        }
    12151215        break;
    1216       case ClpSimplex::atLowerBound:
     1216      case atLowerBound:
    12171217#ifdef CHECK_DJ
    12181218        // For Debug so we can find out where problem is
     
    19141914              double * original = columnArray_[0]->denseVector();
    19151915              for (iColumn=0;iColumn<numberColumns_;iColumn++) {
    1916                 if(getColumnStatus(iColumn)!= ClpSimplex::basic)
     1916                if(getColumnStatus(iColumn)!= basic)
    19171917                  ray_[iColumn] +=
    19181918                    columnActivityWork_[iColumn]-original[iColumn];
     
    20732073      switch(status) {
    20742074
    2075       case ClpSimplex::basic:
    2076       case ClpSimplex::isFree:
    2077       case ClpSimplex::superBasic:
     2075      case basic:
     2076      case isFree:
     2077      case superBasic:
    20782078        break;
    2079       case ClpSimplex::atUpperBound:
     2079      case atUpperBound:
    20802080        assert (value<=0.0);
    20812081        // to lower bound
    2082         setStatus(iSequence+addSequence,ClpSimplex::atLowerBound);
     2082        setStatus(iSequence+addSequence,atLowerBound);
    20832083        solution[iSequence] = lower[iSequence];
    20842084        break;
    2085       case ClpSimplex::atLowerBound:
     2085      case atLowerBound:
    20862086        assert (value>=0.0);
    20872087        // to upper bound
    2088         setStatus(iSequence+addSequence,ClpSimplex::atUpperBound);
     2088        setStatus(iSequence+addSequence,atUpperBound);
    20892089        solution[iSequence] = upper[iSequence];
    20902090        break;
     
    21222122    }
    21232123  }
    2124   setFakeBound(iSequence,ClpSimplex::noFake);
     2124  setFakeBound(iSequence,noFake);
    21252125}
    21262126/* As changeBounds but just changes new bounds for a single variable.
     
    21442144    if (upperValue > oldLower + dualBound_) {
    21452145      upper_[iSequence]=oldLower+dualBound_;
    2146       setFakeBound(iSequence,ClpSimplex::upperFake);
     2146      setFakeBound(iSequence,upperFake);
    21472147      modified=true;
    21482148    }
     
    21502150    if (lowerValue < oldUpper - dualBound_) {
    21512151      lower_[iSequence]=oldUpper-dualBound_;
    2152       setFakeBound(iSequence,ClpSimplex::lowerFake);
     2152      setFakeBound(iSequence,lowerFake);
    21532153      modified=true;
    21542154    }
     
    26242624    switch(getStatus(iSequence)) {
    26252625
    2626     case ClpSimplex::basic:
     2626    case basic:
    26272627      break;
    2628     case ClpSimplex::isFree:
    2629     case ClpSimplex::superBasic:
     2628    case isFree:
     2629    case superBasic:
    26302630      break;
    2631     case ClpSimplex::atUpperBound:
    2632       if (bound==ClpSimplex::upperFake||bound==ClpSimplex::bothFake)
     2631    case atUpperBound:
     2632      if (bound==upperFake||bound==bothFake)
    26332633        numberFake++;
    26342634      break;
    2635     case ClpSimplex::atLowerBound:
    2636       if (bound==ClpSimplex::lowerFake||bound==ClpSimplex::bothFake)
     2635    case atLowerBound:
     2636      if (bound==lowerFake||bound==bothFake)
    26372637        numberFake++;
    26382638      break;
Note: See TracChangeset for help on using the changeset viewer.