Changeset 384


Ignore:
Timestamp:
Jun 1, 2004 4:27:17 PM (16 years ago)
Author:
forrest
Message:

add barrier

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Samples/driver.cpp

    r336 r384  
    2828  }
    2929#else
    30   model.setLogLevel(8);
    3130  ClpSolve solvectl;
    3231
    3332
    34   if (argc<3 ||!strstr(argv[2],"primal")) {
    35     // Use the dual algorithm unless user said "primal"
     33  if (argc<3 ||(!strstr(argv[2],"primal")&&!strstr(argv[2],"barrier"))) {
     34    // Use the dual algorithm unless user said "primal" or "barrier"
    3635    std::cout << std::endl << " Solve using Dual: " << std::endl;
    3736    solvectl.setSolveType(ClpSolve::useDual);
     37    solvectl.setPresolveType(ClpSolve::presolveOn);
     38    model.initialSolve(solvectl);
     39  } else if (strstr(argv[2],"barrier")) {
     40    // Use the barrier algorithm if user said "barrier"
     41    std::cout << std::endl << " Solve using Barrier: " << std::endl;
     42    solvectl.setSolveType(ClpSolve::useBarrier);
    3843    solvectl.setPresolveType(ClpSolve::presolveOn);
    3944    model.initialSolve(solvectl);
     
    5257  // remove this to print solution
    5358
    54   //exit(0);
     59  exit(0);
    5560
    5661  /*
Note: See TracChangeset for help on using the changeset viewer.