Changeset 2496 for trunk


Ignore:
Timestamp:
Feb 20, 2019 6:45:46 AM (4 months ago)
Author:
forrest
Message:

add parameters to example

File:
1 edited

Legend:

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

    r2469 r2496  
    122122}
    123123
     124static int dummyCallBack(CbcModel * /*model*/, int /*whereFrom*/)
     125{
     126  return 0;
     127}
     128
    124129int main(int argc, const char *argv[])
    125130{
     
    159164  OsiClpSolverInterface *solver = dynamic_cast< OsiClpSolverInterface * >(modelA.solver());
    160165  model = solver->getModelPtr();
    161   CbcMain0(modelA);
     166  CbcSolverUsefulData cbcData;
     167#ifndef CBC_NO_INTERRUPT
     168  cbcData.useSignalHandler_ = true;
     169#endif
     170  cbcData.noPrinting_ = false;
     171  // initialize
     172  CbcMain0(modelA, cbcData);
    162173  /* Now go into code for standalone solver
    163174     Could copy arguments and add -quit at end to be safe
     
    165176  */
    166177  if (argc > 2) {
    167     CbcMain1(argc - 1, argv + 1, modelA);
     178    CbcMain1(argc - 1, argv + 1, modelA, dummyCallBack , cbcData);
    168179  } else {
    169180    const char *argv2[] = { "clpdriver", "-solve", "-quit" };
    170     CbcMain1(3, argv2, modelA);
     181    CbcMain1(3, argv2, modelA, dummyCallBack, cbcData);
    171182  }
    172183
Note: See TracChangeset for help on using the changeset viewer.