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

Last change on this file since 1662 was 1662, checked in by lou, 8 years ago

Add EPL license notice in examples.

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