<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div class="im">
&gt;&gt; When using writeMps with OsiCpx, the integer information is lost. Using writeLp works, but not writeMps. How do I fix this?<br>
&gt;<br>
&gt; You remember, whether you solve the LP relaxation or the MIP before<br>
&gt; calling writeMps?<br>
&gt; Does it work better if you add &quot;switchToMIP();&quot; in the beginning of<br>
&gt; OsiCpx::writeMps?<br>
&gt;<br>
&gt; writeMps calls the CPLEX MPS writing function, while writeLp uses an Osi<br>
&gt; function. That may make a difference.<br>
<br>
</div>Yes, OsiCpx has some strangeness coming from the fact that switching<br>
the problem type from LP to MIP erases cached solution information.<br>
I&#39;m pretty sure that the problem is that CPLEX is storing the problem<br>
as an LP instead of a MIP most of the time to avoid this difficulty.<br>
There have been several discussions of this on the list in the past.<br>
It should be easy to see what&#39;s going on by looking at the source.<br>
Another solution would be to switch to using the MPS writer in<br>
CoinUtils instead.<br></blockquote><div><br><br><br>Using writeMpsNative (CoinUtils) does work fine. I was just asking about
 OsiCpx&#39;s version (writeMps). It seems it should work (or be disabled so users don&#39;t try to use it).<br>
<br>
Stefan - I build the model, then use Osi&#39;s setInteger, then writeMps. I 
have not tried &quot;switchToMIP&quot;.<br><br> <br></div></div>