Changeset 1935


Ignore:
Timestamp:
Apr 8, 2013 3:16:07 PM (5 years ago)
Author:
stefan
Message:

fix compiler warnings; fix path to sample instance in minimum

Location:
trunk/Clp/examples
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/Clp/examples/addBits.cpp

    r1662 r1935  
    166166     if (numberColumns < 50)
    167167          build.setLogLevel(1);
     168     // should fail as we never set multiplier
    168169     int numberErrors = model2.loadProblem(build);
    169      // should fail as we never set multiplier
    170      assert(numberErrors);
     170     if( numberErrors == 0 )
     171     {
     172        printf("%d errors from model2.loadProblem(build), but we expected some", numberErrors);
     173        return 1;
     174     }
    171175     time3 = CoinCpuTime() - time2;
    172176     // subtract out unsuccessful times
  • trunk/Clp/examples/addRows.cpp

    r1662 r1935  
    259259          std::cout << "--------------------------------------" << std::endl;
    260260          // Test CoinAssert
    261           std::cout << "If Clp compiled with -g below should give assert, if with -O1 or COIN_ASSERT CoinError" << std::endl;
     261          std::cout << "If Clp compiled without NDEBUG below should give assert, if with NDEBUG or COIN_ASSERT CoinError" << std::endl;
    262262          model = modelSave;
    263263          model.deleteRows(2, del);
  • trunk/Clp/examples/minimum.cpp

    r1662 r1935  
    1212#if defined(SAMPLEDIR)
    1313/*
    14   SAMPLEDIR should "path/to/Data/Sample/"
     14  SAMPLEDIR should "path/to/Data/Sample"
    1515  Include the quotes and final path separator.
    1616*/
    17           status = model.readMps(SAMPLEDIR "p0033.mps", true);
     17          status = model.readMps(SAMPLEDIR "/p0033.mps", true);
    1818#else
    1919          fprintf(stderr, "Do not know where to find sample MPS files.\n");
  • trunk/Clp/examples/piece.cpp

    r1662 r1935  
    203203     // Create nonlinear objective
    204204     int returnCode = model.createPiecewiseLinearCosts(segstart, breakpt, slope);
    205      assert(!returnCode);
     205     if( returnCode != 0 )
     206     {
     207        printf("Unexpected return code %d from model.createPiecewiseLinearCosts()\n", returnCode);
     208        return returnCode;
     209     }
    206210
    207211     // delete
  • trunk/Clp/examples/testGub.cpp

    r1662 r1935  
    418418               fwrite(gubSolution, sizeof(double), numberTotalColumns, fp);
    419419               fwrite(status, sizeof(char), numberTotalColumns, fp);
     420#ifndef NDEBUG
    420421               const double * rowsol = model2.primalRowSolution();
     422#endif
    421423               double * rowsol2 = new double[originalNumberRows];
    422424               memset(rowsol2, 0, originalNumberRows * sizeof(double));
  • trunk/Clp/examples/useVolume.cpp

    r1662 r1935  
    172172     } else
    173173          status = model.readMps(argv[1], true);
     174     if( status != 0 )
     175     {
     176        printf("Error %d reading MPS file\n", status);
     177        return status;
     178     }
    174179     /*
    175180       This driver uses volume algorithm
Note: See TracChangeset for help on using the changeset viewer.