<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
--></style>
</head>
<body class='hmmessage'>
A bit more info, just in case:<br><br>The writeLp() method you are using is an Osi method, not a FlopC++ <br>method, so it must be called after FlopC++ actually makes an Osi object <br>out of its internal data structures.<br>(Remember that the '->' operator of MP_model is overloaded to point to <br>the associated Osi object, i.e. the solver.)<br><br>As Tim says, the Osi object is created using the attach() method.<br>Since minimize() needs the Osi object to call the solver, it will call <br>attach() automatically - which explains why writeLp() works after <br>calling it...<br><br><br>Hope this helped.<br><br>Michal<br><br><br>Tim Hultberg wrote:<br>> You can use the attach method to generate the problem without solving it.<br>> <br>> Tim<br>> <br>> -----Original Message-----<br>> From: flopcpp-bounces@list.coin-or.org [mailto:flopcpp-bounces@list.coin-or.org] On Behalf Of Peter Sels<br>> Sent: Thursday, November 26, 2009 11:52 AM<br>> To: flopcpp@list.coin-or.org<br>> Subject: [FlopCpp] Model->writeLp("OsiSchedule"); crashes om CoinAll 1.3.0: solved<br>> <br>> Hello All,<br>> <br>> To make Model->writeLp("file", "txt") work, seems I needed to call<br>> Model->minimize(obj);<br>> first. The same seems to be true for Model->getNumRows() and the like.<br>> There may be a good technical reason for this, but from a user perspective it<br>> is nice to be able to check the model in an LP  file before actually<br>> having to solve it, especially if solving time is hours, days, weeks, ...<br>> <br>> Maybe there is a better solution?<br>> <br>> thanks and best regards,<br>> <br><br>                                               <br /><hr />Windows Live: Make it easier for your friends to see  <a href='http://www.microsoft.com/middleeast/windows/windowslive/see-it-in-action/social-network-basics.aspx?ocid=PID23461::T:WLMTAGL:ON:WL:en-xm:SI_SB_2:092009' target='_new'>what you’re up to on Facebook.</a></body>
</html>