source: trunk/Clp/examples/decomp2.cpp @ 1362

Last change on this file since 1362 was 1311, checked in by forrest, 11 years ago

To allow solving a structured model
(This is just proof of concept initial coding)

File size: 762 bytes
Line 
1// Copyright (C) 2008, International Business Machines
2// Corporation and others.  All Rights Reserved.
3
4#include "ClpSimplex.hpp"
5#include "CoinStructuredModel.hpp"
6#include <iomanip>
7
8int main (int argc, const char *argv[])
9{
10  /* Create a structured model by reading mps file and trying
11     Dantzig-Wolfe decomposition (that's the 1 parameter)
12  */
13  // At present D-W rows are hard coded - will move stuff from OSL
14  CoinStructuredModel model((argc<2) ? "../../Data/Netlib/czprob.mps"
15                        : argv[1],1);
16  if (!model.numberRows())
17    exit(10);
18  // Get default solver - could change stuff
19  ClpSimplex solver;
20  /*
21    This driver does a simple Dantzig Wolfe decomposition
22  */
23  solver.solve(&model);
24  // Double check
25  solver.primal(1);
26  return 0;
27}   
Note: See TracBrowser for help on using the repository browser.