Ignore:
Timestamp:
Aug 16, 2002 12:02:38 PM (18 years ago)
Author:
forrest
Message:

Hope this works from wincvs

Fix error in values pass

File:
1 edited

Legend:

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

    r8 r15  
    218218      for (iRow=0;iRow<numberRows_;iRow++) {
    219219        int iPivot=pivotVariable_[iRow];
    220        
     220
    221221        if (iPivot<numberColumns_) {
    222222          // column
     
    234234        int iColumn=sort[iRow];
    235235        setColumnStatus(iColumn,ClpSimplex::superBasic);
    236        
     236
    237237      }
    238238      delete [] sort;
     
    502502      If 10 added then in primal values pass
    503503*/
    504 // Return codes are as from ClpFactorization
     504/* Return codes are as from ClpFactorization unless initial factorization
     505   when total number of singularities is returned */
    505506int ClpSimplex::internalFactorize ( int solveType)
    506507{
    507508
    508509  int iRow,iColumn;
     510  int totalSlacks=numberRows_;
    509511
    510512  bool valuesPass=false;
     
    560562          }
    561563        }
     564        totalSlacks=numberBasic;
    562565        for (iColumn=0;iColumn<numberColumns_;iColumn++) {
    563566          switch(getColumnStatus(iColumn)) {
     
    683686            setRowStatus(iRow,ClpSimplex::superBasic);
    684687        }
     688        totalSlacks=numberBasic;
    685689        for (iColumn=0;iColumn<numberColumns_;iColumn++) {
    686690          if (getColumnStatus(iColumn)==ClpSimplex::basic) {
     
    834838      <<OsiMessageEol;
    835839    return -1;
     840  } else if (!solveType) {
     841    // Initial basis - return number of singularities
     842    int numberSlacks=0;
     843    for (iRow=0;iRow<numberRows_;iRow++) {
     844      if (getRowStatus(iRow) == ClpSimplex::basic)
     845        numberSlacks++;
     846    }
     847    status= numberSlacks-totalSlacks;
    836848  }
    837849
Note: See TracChangeset for help on using the changeset viewer.