Ignore:
Timestamp:
Oct 2, 2003 1:21:02 PM (17 years ago)
Author:
forrest
Message:

lots of stuff

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/pre/ClpSolve.cpp

    r210 r212  
    103103    }
    104104    // We may be better off using original
    105     if (numberRows_<1.01*model2->numberRows_&&numberColumns_<1.01*model2->numberColumns_) {
     105    if (presolve!=ClpSolve::presolveOff&&
     106        numberRows_<1.01*model2->numberRows_&&numberColumns_<1.01*model2->numberColumns_) {
    106107      delete model2;
    107108      model2 = this;
     
    215216  if (model2->factorizationFrequency()==200) {
    216217    // User did not touch preset
    217     model2->setFactorizationFrequency(100+model2->numberRows()/100);
     218    model2->setFactorizationFrequency(100+model2->numberRows()/200);
    218219  }
    219220  if (method==ClpSolve::usePrimalorSprint) {
     
    241242      int nPasses=0;
    242243      Idiot info(*model2);
    243       if (numberRows>1000&&numberColumns>2*numberRows) {
     244      // Get ratio of average number of elements per column to 5
     245      double ratio  = ((double) numberElements/(double) numberColumns)/5.0;
     246      if (numberRows>200&&numberColumns>5000&&numberColumns>2*numberRows) {
    244247        if (plusMinus) {
    245248          // look at rhs
     
    265268            nPasses = max(nPasses,15);
    266269            if (numberElements<3*numberColumns)
    267               nPasses=0; // probably not worh it
     270              nPasses=10; // probably not worh it
     271            info.setLightweight(1); // say lightweight idiot
    268272          } else if (largest/smallest>1.01||numberElements<=3*numberColumns) {
    269273            nPasses = 10+numberColumns/1000;
     
    284288          else
    285289            nPasses=5;
     290          info.setLightweight(1); // say lightweight idiot
    286291          if (numberElements<3*numberColumns)
    287             nPasses=0; // probably not worh it
     292            nPasses=2; // probably not worh it
    288293          else
    289294            nPasses = max(nPasses,5);
     295          nPasses = (int) (((double) nPasses)/ratio); // reduce if lots of elements per column
     296          if (nPasses<2)
     297            nPasses=0;
    290298          //info.setStartingWeight(1.0e-1);
    291299        }
     
    312320    if (doCrash)
    313321      model2->crash(1000,1);
    314     model2->primal(1);
     322    model2->primal(2);
    315323    time2 = CoinCpuTime();
    316324    timeCore = time2-timeX;
     
    479487    double originalOffset;
    480488    model2->getDblParam(ClpObjOffset,originalOffset);
     489    int totalIterations=0;
    481490    for (iPass=0;iPass<maxPass;iPass++) {
    482491      //printf("Bug until submodel new version\n");
     
    517526        currentModel = &small;
    518527      small.primal();
     528      totalIterations += small.numberIterations();
    519529      // move solution back
    520530      const double * solution = small.primalColumnSolution();
     
    594604      <<CoinMessageEol;
    595605    timeX=time2;
     606    model2->setNumberIterations(model2->numberIterations()+totalIterations);
    596607  } else {
    597608    assert (method!=ClpSolve::automatic); // later
Note: See TracChangeset for help on using the changeset viewer.