source: trunk/Clp/examples/testBarrier.cpp @ 1559

Last change on this file since 1559 was 1559, checked in by stefan, 9 years ago

merge split branch into trunk

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 1.1 KB
Line 
1/* $Id: testBarrier.cpp 1559 2010-06-05 19:42:36Z stefan $ */
2// Copyright (C) 2003, International Business Machines
3// Corporation and others.  All Rights Reserved.
4
5#include "ClpInterior.hpp"
6#include "ClpSimplex.hpp"
7#include "ClpCholeskyWssmp.hpp"
8#include "ClpCholeskyDense.hpp"
9int main(int argc, const char *argv[])
10{
11     ClpInterior  model;
12     int status;
13     if (argc < 2) {
14#if defined(COIN_HAS_SAMPLE) && defined(SAMPLEDIR)
15          status = model.readMps(SAMPLEDIR "/p0033.mps", true);
16#else
17          fprintf(stderr, "Do not know where to find sample MPS files.\n");
18          exit(1);
19#endif
20     } else
21          status = model.readMps(argv[1]);
22     if (status) {
23          printf("errors on input\n");
24          exit(77);
25     }
26     // ** note this does not have presolve
27#ifdef WSSMP_BARRIER
28     ClpCholeskyWssmp * cholesky = new ClpCholeskyWssmp();
29#else
30     ClpCholeskyDense * cholesky = new ClpCholeskyDense();
31#endif
32     model.setCholesky(cholesky);
33     model.primalDual();
34     // Do crossover
35     ClpSimplex model2(model);
36     // make sure no status left
37     model2.createStatus();
38     model2.primal(1);
39     return 0;
40}
Note: See TracBrowser for help on using the repository browser.