Changeset 1061


Ignore:
Timestamp:
Aug 8, 2007 5:20:36 AM (12 years ago)
Author:
forrest
Message:

nonlinear and a few parameters

Location:
trunk/Clp/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Clp/src/CbcOrClpParam.cpp

    r1054 r1061  
    13791379     );
    13801380#endif
     1381#ifdef COIN_HAS_CBC
     1382  parameters[numberParameters++]=
     1383    CbcOrClpParam("dextra1","Extra double parameter 1",
     1384                  -COIN_DBL_MAX,COIN_DBL_MAX,DEXTRA1,false);
     1385  parameters[numberParameters-1].setDoubleValue(0.0);
     1386  parameters[numberParameters++]=
     1387    CbcOrClpParam("dextra2","Extra double parameter 2",
     1388                  -COIN_DBL_MAX,COIN_DBL_MAX,DEXTRA2,false);
     1389  parameters[numberParameters-1].setDoubleValue(0.0);
     1390  parameters[numberParameters++]=
     1391    CbcOrClpParam("dextra3","Extra double parameter 3",
     1392                  -COIN_DBL_MAX,COIN_DBL_MAX,DEXTRA3,false);
     1393  parameters[numberParameters-1].setDoubleValue(0.0);
     1394  parameters[numberParameters++]=
     1395    CbcOrClpParam("dextra4","Extra double parameter 4",
     1396                  -COIN_DBL_MAX,COIN_DBL_MAX,DEXTRA4,false);
     1397  parameters[numberParameters-1].setDoubleValue(0.0);
     1398#endif
    13811399  parameters[numberParameters++]=
    13821400    CbcOrClpParam("direction","Minimize or Maximize",
     
    19081926  parameters[numberParameters++]=
    19091927    CbcOrClpParam("node!Strategy","What strategy to use to select nodes",
    1910                   "fewest",NODESTRATEGY);
     1928                  "hybrid",NODESTRATEGY);
     1929  parameters[numberParameters-1].append("fewest");
    19111930  parameters[numberParameters-1].append("depth");
    19121931  parameters[numberParameters-1].append("upfewest");
     
    19181937     "Normally before a solution the code will choose node with fewest infeasibilities. \
    19191938You can choose depth as the criterion.  You can also say if up or down branch must \
    1920 be done first (the up down choice will carry on after solution)."
     1939be done first (the up down choice will carry on after solution). \
     1940Default has now been changed to hybrid which is breadth first on small depth nodes then fewest."
    19211941     );
    19221942  parameters[numberParameters++]=
  • trunk/Clp/src/CbcOrClpParam.hpp

    r1055 r1061  
    5353   
    5454    DJFIX = 81, GAPRATIO,TIGHTENFACTOR,PRESOLVETOLERANCE,OBJSCALE2,
     55    DEXTRA1, DEXTRA2, DEXTRA3, DEXTRA4,
    5556
    5657    SOLVERLOGLEVEL=101,
  • trunk/Clp/src/ClpSimplexNonlinear.cpp

    r1059 r1061  
    37323732               newModel.primalRowSolution()[iRow],
    37333733               dualValue);
    3734       double movement = newModel.primalRowSolution()[iRow];
     3734      double movement = newModel.primalRowSolution()[iRow]+constraint->offset();
    37353735      movement = fabs((movement-functionValue)*dualValue);
    37363736      infPenalty2 += movement;
     
    37513751            boundMultiplier=10.0;
    37523752          int k;
     3753          assert (dualValue>=-1.0e-5);
     3754          dualValue = CoinMax(dualValue,0.0);
    37533755          for ( k=0;k<SEGMENTS;k++) {
    37543756            if (infeasibility<=0)
     
    37583760            infeasibility -= thisPart;
    37593761          }
     3762          infeasibility = functionValue-rowUpper_[iRow];
     3763          double newPenalty=0.0;
     3764          for ( k=0;k<SEGMENTS;k++) {
     3765            double thisPart = CoinMin(infeasibility,bounds[k]);
     3766            cost[jColumn+k] = CoinMax(penalties[k],dualValue+1.0e-3);
     3767            newPenalty += thisPart*cost[jColumn+k];
     3768            infeasibility -= thisPart;
     3769          }
    37603770          infPenalty += thisPenalty;
     3771          objectiveAdjustment += CoinMax(0.0,newPenalty-thisPenalty);
    37613772        }
    37623773        jColumn += SEGMENTS;
     
    38053816    objValue -= objectiveOffset2;
    38063817    printf("True objective %g\n",objValue);
    3807     objValue += infPenalty;
     3818    objValue += infPenalty+infPenalty2;
    38083819    if (iPass) {
    38093820      double drop = lastObjective-objValue;
Note: See TracChangeset for help on using the changeset viewer.