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

Last change on this file since 1552 was 1552, checked in by mjs, 9 years ago

Format examples with 'astyle -A4 -p'.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 947 bytes
Line 
1/* $Id: testBarrier.cpp 1552 2010-05-25 01:03:59Z mjs $ */
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          status = model.readMps("../../Data/Sample/p0033.mps");
15     else
16          status = model.readMps(argv[1]);
17     if (status) {
18          printf("errors on input\n");
19          exit(77);
20     }
21     // ** note this does not have presolve
22#ifdef WSSMP_BARRIER
23     ClpCholeskyWssmp * cholesky = new ClpCholeskyWssmp();
24#else
25     ClpCholeskyDense * cholesky = new ClpCholeskyDense();
26#endif
27     model.setCholesky(cholesky);
28     model.primalDual();
29     // Do crossover
30     ClpSimplex model2(model);
31     // make sure no status left
32     model2.createStatus();
33     model2.primal(1);
34     return 0;
35}
Note: See TracBrowser for help on using the repository browser.