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

Last change on this file since 755 was 709, checked in by jpfasano, 13 years ago

Modifed to use ClpCholeskyDense?, unless WSSMP_BARRIER is defined.
If WSSMP_BARRIER is defined, then ClpCholeskyWssmp? is used.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 858 bytes
Line 
1// Copyright (C) 2003, International Business Machines
2// Corporation and others.  All Rights Reserved.
3
4#include "ClpInterior.hpp"
5#include "ClpSimplex.hpp"
6#include "ClpCholeskyWssmp.hpp"
7#include "ClpCholeskyDense.hpp"
8int main (int argc, const char *argv[])
9{
10  ClpInterior  model;
11  int status;
12  if (argc<2)
13    status=model.readMps("../../Mps/Sample/p0033.mps");
14  else
15    status=model.readMps(argv[1]);
16  if (status) {
17    printf("errors on input\n");
18    exit(77);
19  }
20  // ** note this does not have presolve
21#ifdef WSSMP_BARRIER
22  ClpCholeskyWssmp * cholesky = new ClpCholeskyWssmp();
23#else
24  ClpCholeskyDense * cholesky = new ClpCholeskyDense();
25#endif
26  model.setCholesky(cholesky);
27  model.primalDual();
28  // Do crossover
29  ClpSimplex model2(model);
30  // make sure no status left
31  model2.createStatus();
32  model2.primal(1);
33  return 0;
34}   
Note: See TracBrowser for help on using the repository browser.