Changeset 1660 for trunk/Cbc/examples


Ignore:
Timestamp:
Jun 9, 2011 9:09:23 AM (8 years ago)
Author:
stefan
Message:

change to new way of using and installing configuration header files

Location:
trunk/Cbc/examples
Files:
5 edited

Legend:

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

    r1574 r1660  
    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
    138#include "CbcConfig.h"
     9#include "CoinPragma.hpp"
    1410
    1511// For Branch and bound
     
    1713#include "CbcModel.hpp"
    1814
    19 #ifdef COIN_HAS_CLP
    2015#include "OsiClpSolverInterface.hpp"
    21 #endif
    2216#include "ClpPresolve.hpp"
    2317#include "CbcCompareUser.hpp"
     
    8579  // Define your favorite OsiSolver
    8680 
    87 #ifdef COIN_HAS_CLP
    8881  ClpSimplex simplex;
    89 #endif
    9082  double time0 = cpuTime();
    9183  double time1 = time0;
  • trunk/Cbc/examples/sample2.cpp

    r1574 r1660  
    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
     9#include "CoinPragma.hpp"
    1410
    1511// For Branch and bound
  • trunk/Cbc/examples/sample3.cpp

    r1574 r1660  
    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 "CbcConfig.h"
     7
     8#include "CoinPragma.hpp"
    129
    1310#include <assert.h>
     
    2320#include "CbcCutGenerator.hpp"
    2421#include "CbcHeuristicLocal.hpp"
    25 #ifdef COIN_HAS_CLP
    2622#include "OsiClpSolverInterface.hpp"
    27 #endif
    28 #ifdef COIN_HAS_OSL
    29 #include "OsiOslSolverInterface.hpp"
    30 #endif
    3123
    3224// Cuts
     
    9587  // Define your favorite OsiSolver
    9688 
    97 #ifdef COIN_HAS_CLP
    9889  OsiClpSolverInterface solver1;
    9990  //solver1.messageHandler()->setLogLevel(0);
    10091  solver1.getModelPtr()->setDualBound(1.0e10);
    101 #endif
    102 #ifdef COIN_HAS_OSL
    103   OsiOslSolverInterface solver1;
    104   //solver1.messageHandler()->setLogLevel(0);
    105 #endif
    10692
    10793  // Read in model using argv[1]
  • trunk/Cbc/examples/sample4.cpp

    r1574 r1660  
    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 "CbcConfig.h"
     7
     8#include "CoinPragma.hpp"
    129
    1310#include <cassert>
     
    2219#include "CbcCompareUser.hpp"
    2320#include "CoinTime.hpp"
    24 #ifdef COIN_HAS_CLP
    2521#include "OsiClpSolverInterface.hpp"
    26 #endif
    2722
    2823//#############################################################################
     
    4641  // Define your favorite OsiSolver
    4742 
    48 #ifdef COIN_HAS_CLP
    4943  OsiClpSolverInterface solver1;
    5044  //solver1.messageHandler()->setLogLevel(0);
    5145  CbcModel model(solver1);
    52 #endif
    5346  model.solver()->setHintParam(OsiDoReducePrint,true,OsiHintTry);
    5447
  • trunk/Cbc/examples/sample5.cpp

    r1574 r1660  
    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 "CbcConfig.h"
     7
     8#include "CoinPragma.hpp"
    129
    1310#include <cassert>
     
    2219#include "CbcCutGenerator.hpp"
    2320#include "CbcHeuristicLocal.hpp"
    24 #ifdef COIN_HAS_CLP
    2521#include "OsiClpSolverInterface.hpp"
    26 #endif
    27 #ifdef COIN_HAS_OSL
    28 #include "OsiOslSolverInterface.hpp"
    29 #endif
    3022
    3123// Cuts
     
    8274  */
    8375 
    84 #ifdef COIN_HAS_CLP
    8576  OsiClpSolverInterface solver1;
    86 #elif COIN_HAS_OSL
    87   OsiOslSolverInterface solver1;
    88 #endif
    8977  /* From now on we can build model in a solver independent way.
    9078     You can add rows one at a time but for large problems this is slow so
     
    215203  model.addCutGenerator(&mixedGen,-1,"MixedIntegerRounding");
    216204
    217 #ifdef COIN_HAS_CLP
    218205  OsiClpSolverInterface * osiclp = dynamic_cast< OsiClpSolverInterface*> (model.solver());
    219206  // go faster stripes
     
    223210    printf("may not be safe if doing cuts in tree which need accuracy (level 2 anyway)\n");
    224211  }
    225 #endif
    226212
    227213  // Allow rounding heuristic
Note: See TracChangeset for help on using the changeset viewer.