Ignore:
Timestamp:
Apr 9, 2013 2:06:04 PM (6 years ago)
Author:
stefan
Message:

fixup examples

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Cbc/examples/simpleBAB.cpp

    r1854 r1898  
    44// This code is licensed under the terms of the Eclipse Public License (EPL).
    55
    6 #if defined(_MSC_VER)
    7 // Turn off compiler warning about long names
    8 #  pragma warning(disable:4786)
    9 #endif
    10 
    116#include <cassert>
    127#include <iomanip>
    138
    149
     10#include "CoinPragma.hpp"
    1511#include "OsiClpSolverInterface.hpp"
    1612#include "CoinPackedVector.hpp"
     
    4137  model.setInteger(0);
    4238  model.setObjSense(-1.0);
    43   bool optimal;
     39  //bool optimal;
    4440 
    4541#ifndef USE_CBC
     
    5450  model.getDblParam(OsiDualObjectiveLimit,objLimit);
    5551  model.branchAndBound();
    56   optimal = model.isProvenOptimal();
     52  //optimal = model.isProvenOptimal();
    5753  const double *val = model.getColSolution(); // x0 = 3, x1 = 0.45
    5854  printf("Solution %g %g\n",val[0],val[1]);
     
    6561    CbcModel model2(model);
    6662    model2.branchAndBound();
    67     optimal = model2.isProvenOptimal();
     63    //optimal = model2.isProvenOptimal();
    6864    const double *val = model2.getColSolution(); // x0 = 3, x1 = 0.45
    6965    printf("Solution %g %g\n",val[0],val[1]);
     
    7975#ifndef USE_CBC
    8076  model.branchAndBound();
    81   optimal = model.isProvenOptimal(); // should be x0 = 2, x1 = 0.95
     77  //optimal = model.isProvenOptimal(); // should be x0 = 2, x1 = 0.95
    8278  // Address of solution will be same as only adding rows - but be safe
    8379  val = model.getColSolution();
     
    8783    CbcModel model2(model);
    8884    model2.branchAndBound();
    89     optimal = model2.isProvenOptimal(); // should be x0 = 2, x1 = 0.95
     85    //optimal = model2.isProvenOptimal(); // should be x0 = 2, x1 = 0.95
    9086    const double *val = model2.getColSolution();
    9187    printf("Solution %g %g\n",val[0],val[1]);
Note: See TracChangeset for help on using the changeset viewer.