[Coin-lpsolver] LP input format to CLP

John J Forrest jjforre at us.ibm.com
Thu Nov 1 16:07:18 EDT 2007


Yiming,

Normally you just point AMPL at the solver.  AMPL then calls the solver as 
-

cbc xxxxxx.nl -AMPL

which tells cbc that the xxxxxx.nl file is ampl.

You can add options just as for an mps file but the format is different - 
so instead of -maxnodes 1000 the format is maxnodes=1000

John Forrest



Yiming Yao <yao3 at llnl.gov> 
11/01/2007 04:01 PM

To
John J Forrest/Watson/IBM at IBMUS
cc
coin-lpsolver at list.coin-or.org
Subject
Re: [Coin-lpsolver] LP input format to CLP






John,

Thanks for the reply. 

Is there a sample c++ file that reads an AMPL model? If not, what should 
be changed in the following code snippet so it can take an AMPL model as 
input?

int main (int argc, const char *argv[])
{
 
  OsiClpSolverInterface solver1;
 
  // Read in model using argv[1]
  // and assert that it is a clean model
  std::string mpsFileName = "../../Data/Sample/p0033.mps";
  if (argc>=2) mpsFileName = argv[1];
  int numMpsReadErrors = solver1.readMps(mpsFileName.c_str(),"");
---
}

V/r,

Yiming


At 05:19 AM 11/1/2007, John J Forrest wrote:

There is a GAMS interface - see GAMSlinks project on coin-or. 

Clp accepts LP format 

Clp itself does not have a link to AMPL.  However Cbc (which by default 
uses Clp) does - so just use Cbc.  To activate the AMPL linkages down load 
Cbc then go to ThirdParty/ASL and do get.ASL before the configure. 

John Forrest 


Yiming Yao <yao3 at llnl.gov> 
Sent by: coin-lpsolver-bounces at list.coin-or.org 

10/31/2007 08:11 PM 
To
<coin-lpsolver at list.coin-or.org> 
cc
Subject
[Coin-lpsolver] LP input format to CLP 




Besides MPS, does CLP accept other model formats, say, AMPL?

Thanks.
_______________________________________________
Coin-lpsolver mailing list
Coin-lpsolver at list.coin-or.org
http://list.coin-or.org/mailman/listinfo/coin-lpsolver

_______________________________________________
Coin-lpsolver mailing list
Coin-lpsolver at list.coin-or.org
http://list.coin-or.org/mailman/listinfo/coin-lpsolver

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.coin-or.org/pipermail/clp/attachments/20071101/36197dc6/attachment.html>


More information about the Clp mailing list