<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">Pietro,<br>
<br>
You should be able to read a gmpl file into Cbc (If GMPL installed
using ThirdParty). The format is something like<br>
<br>
cbc -import gmpl_model_file%gmpl_data_file -solve<br>
<br>
The code may be broken if nobody has used the facility for years
but should be easy to fix.<br>
<br>
John Forrest<br>
<br>
On 16/04/13 14:22, Pietro Scionti wrote:<br>
</div>
<blockquote
cite="mid:F91D78FE19F40846858F7BE07024D08F0300896B9D60@platone.archi.lan"
type="cite">
<meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-1">
<meta name="Generator" content="Microsoft Word 12 (filtered
medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
        {mso-style-priority:34;
        margin-top:0cm;
        margin-right:0cm;
        margin-bottom:0cm;
        margin-left:36.0pt;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
span.StileMessaggioDiPostaElettronica17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 2.0cm 2.0cm 2.0cm;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
<div class="WordSection1">
<p class="MsoNormal">Hi,<o:p></o:p></p>
<p class="MsoNormal">i am learning CBC in order to transition to
it from GLPK.<o:p></o:p></p>
<p class="MsoNormal">Since I cannot lose GMPL’s capabilities but
for various reasons I am constrained to use the unmodified
executable, my modus operandi is<o:p></o:p></p>
<p class="MsoNormal">1) run GLPK with the “--wlp model.lp
--check" option to make the mod-> lp transition<o:p></o:p></p>
<p class="MsoNormal">2) run cbc solving the .lp model<o:p></o:p></p>
<p class="MsoNormal">I would like to know, is there a way to
pass the model to be solved via the console standard input? My
models (all integer) get pretty big pretty fast, and I am
concerned I might use a huge amount of disk space that I then
need to clean up, while this could all be avoided if I could
feed the model to cbc in memory.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">If i was not clear, what I want to
accomplish in GLPK can be done like this (language is C#, i am
on Windows 7):<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"> System.Diagnostics.Process
process = new System.Diagnostics.Process();<o:p></o:p></p>
<p class="MsoNormal">
process.StartInfo.UseShellExecute = false;<o:p></o:p></p>
<p class="MsoNormal"> process.StartInfo.FileName =
glpsolPath; <o:p></o:p></p>
<p class="MsoNormal"> process.StartInfo.Arguments =
String.Format("--math /dev/stdin --output {0} --log {1}",
outputStreamPath, logPath);<o:p></o:p></p>
<p class="MsoNormal">
process.StartInfo.RedirectStandardInput = true;<o:p></o:p></p>
<p class="MsoNormal"> process.Start();<o:p></o:p></p>
<p class="MsoNormal"> StreamReader tr = new
StreamReader(modelPath);<o:p></o:p></p>
<p class="MsoNormal">
process.StandardInput.Write(tr.ReadToEnd());<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Thanks everyone,<o:p></o:p></p>
<p class="MsoNormal">Pietro Scionti<o:p></o:p></p>
</div>
<br>
<hr>
<font color="Blue" face="Arial" size="2"><br>
Archimede S.r.l.<br>
Sede Legale:<br>
Via Manzoni, 82<br>
Ponte S. Giovanni<br>
<br>
P.IVA: 01992020543<br>
<br>
Tel. 075 515 22 11<br>
Fax. 075 515 22 99<br>
<a class="moz-txt-link-abbreviated" href="http://www.archinet.it">www.archinet.it</a><br>
<br>
**********************************************************************************************************************************************************************************************************************<br>
La presente comunicazione, con le informazioni in essa contenute
e ogni documento o file allegato, e' rivolta unicamente alla/e
persona/e cui e' indirizzata ed alle altre da questa
autorizzata/e a riceverla. Se non siete i
destinatari/autorizzati siete avvisati che qualsiasi azione,
copia, comunicazione, divulgazione o simili basate sul contenuto
di tali informazioni e' vietata e potrebbe essere contro la
legge (art. 616 C.P., D.Lgs n. 196/2003 Codice in materia di
protezione dei dati personali). Se avete ricevuto questa
comunicazione per errore, vi preghiamo di darne immediata
notizia al mittente e di distruggere il messaggio originale e
ogni file allegato senza farne copia alcuna o riprodurne in
alcun modo il contenuto.<br>
<br>
This e-mail and its attachments are intended for the
addressee(s) only and are confidential and/or may contain
legally privileged information. If you have received this
message by mistake or are not one of the addressees above, you
may take no action based on it, and you may not copy or show it
to anyone; please reply to this e-mail and point out the error
which has occurred.<br>
**********************************************************************************************************************************************************************************************************************<br>
</font>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Cbc mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Cbc@list.coin-or.org">Cbc@list.coin-or.org</a>
<a class="moz-txt-link-freetext" href="http://list.coin-or.org/mailman/listinfo/cbc">http://list.coin-or.org/mailman/listinfo/cbc</a>
</pre>
</blockquote>
<br>
</body>
</html>