Changeset 1007 for branches


Ignore:
Timestamp:
May 15, 2007 6:15:06 AM (12 years ago)
Author:
forrest
Message:

idiot mainly

Location:
branches/devel/Clp/src
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • branches/devel/Clp/src/ClpConstraintQuadratic.cpp

    r1005 r1007  
    147147            double elementValue = coefficient_[j];
    148148            if (iColumn!=jColumn) {
    149               offset_ += valueI*valueJ*elementValue;
     149              offset_ -= valueI*valueJ*elementValue;
    150150              double gradientI = valueJ*elementValue;
    151151              double gradientJ = valueI*elementValue;
     
    153153              lastGradient_[jColumn] += gradientJ;
    154154            } else {
    155               offset_ += 0.5*valueI*valueI*elementValue;
     155              offset_ -= 0.5*valueI*valueI*elementValue;
    156156              double gradientI = valueI*elementValue;
    157157              lastGradient_[iColumn] += gradientI;
  • branches/devel/Clp/src/ClpSimplexDual.cpp

    r989 r1007  
    43374337  double elementRatio = largestPositive/smallestPositive;
    43384338  int numberNonZero=0;
    4339   if (!numberIterations_&&perturbation_==50) {
     4339  if (!numberIterations_&&perturbation_>=50) {
    43404340    // See if we need to perturb
    43414341    double * sort = new double[numberColumns_];
  • branches/devel/Clp/src/ClpSimplexNonlinear.cpp

    r1005 r1007  
    35783578      if (iRow>=0) {
    35793579        if (numberRows<50)
    3580           printf("For row %d current value is %g (activity %g) , dual is %g\n",iRow,functionValue,
     3580          printf("For row %d current value is %g (activity %g) , dual is %g - offset %g\n",iRow,functionValue,
    35813581                 newModel.primalRowSolution()[iRow],
    3582                  newModel.dualRowSolution()[iRow]);
     3582                 newModel.dualRowSolution()[iRow],offset);
    35833583        int numberCoefficients = constraint->numberCoefficients();
    35843584        for (CoinBigIndex j=rowStart[iRow];j<rowStart[iRow]+numberCoefficients;j++) {
  • branches/devel/Clp/src/ClpSolve.cpp

    r1003 r1007  
    15421542      if (model2->getColumnStatus(iColumn)!=basic) {
    15431543        if (columnSolution[iColumn]>columnLower[iColumn]&&
    1544             columnSolution[iColumn]<columnUpper[iColumn])
     1544            columnSolution[iColumn]<columnUpper[iColumn]&&
     1545            columnSolution[iColumn])
    15451546          sort[numberSort++]=iColumn;
    15461547      }
  • branches/devel/Clp/src/Idiot.cpp

    r1004 r1007  
    807807#endif
    808808    }
    809     if (iteration>50&&n==numberAway&&result.infeas<1.0e-4)
     809    if (iteration>50&&n==numberAway&&result.infeas<1.0e-4) {
     810      printf("infeas small %g\n",result.infeas);
    810811      break; // not much happening
     812    }
    811813    if (lightWeight_==1&&iteration>10&&result.infeas>1.0&&maxIts!=7) {
    812814      if (lastInfeas!=bestInfeas&&CoinMin(result.infeas,lastInfeas)>0.95*bestInfeas)
     
    821823      if ((strategy_&1024)!=0&&mu<1.0e-10)
    822824        result.infeas=firstInfeas*0.8;
    823       if (majorIterations_>=50)
     825      if (majorIterations_>=50||dropEnoughFeasibility_<=0.0)
    824826        result.infeas *= 0.8;
    825827      if (result.infeas>firstInfeas*0.9
Note: See TracChangeset for help on using the changeset viewer.