<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content=text/html;charset=iso-8859-1>
<META content="MSHTML 6.00.6000.16640" name=GENERATOR></HEAD>
<BODY id=MailContainerBody 
style="PADDING-RIGHT: 10px; PADDING-LEFT: 10px; PADDING-TOP: 15px" 
bgColor=#ffffff leftMargin=0 topMargin=0 CanvasTabStop="true" 
name="Compose message area">
<DIV><FONT face=Arial size=2>Don't know if that's the problem, because I already 
use the glpk mps writer to generate the mps file starting from a mod file and a 
dat file:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>#include &lt;iostream&gt;<BR>#include 
"glpk.h"<BR>#include "OsiClpSolverInterface.hpp"<BR>#include 
"OsiGlpkSolverInterface.hpp"</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>int 
main(void)<BR>{<BR>&nbsp;&nbsp;&nbsp;&nbsp;OsiSolverInterface *si;</FONT></DIV>
<DIV><FONT face=Arial size=2>&nbsp;&nbsp;&nbsp;&nbsp;si = new 
OsiClpSolverInterface;</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>&nbsp;&nbsp;&nbsp;&nbsp;//The behaviour is the same 
if I use instead<BR>&nbsp;&nbsp;&nbsp;&nbsp;//si = new 
OsiGlpkSolverInterface;</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV>&nbsp;&nbsp;&nbsp;&nbsp;<FONT face=Arial size=2>// Call glpk 
methods</FONT></DIV>
<DIV><FONT face=Arial 
size=2>&nbsp;&nbsp;&nbsp;&nbsp;lpx_write_freemps(lpx_read_model("mymodel.mod","mydata.dat","temp_mps_file.mps") 
,"real_mps_file.mps");</FONT></DIV>
<DIV><FONT face=Arial 
size=2>&nbsp;&nbsp;&nbsp;&nbsp;si-&gt;readMps("real_mps_file.mps");</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV><FONT face=Arial size=2>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;&nbsp;&nbsp;&nbsp;//si-&gt;initialSolve();<BR>&nbsp;&nbsp;&nbsp;&nbsp;si-&gt;branchAndBound();</DIV>
<DIV>&nbsp;&nbsp;&nbsp;&nbsp;</DIV>
<DIV>&nbsp;&nbsp;&nbsp;&nbsp;//Never get over there, get "primal infeasible" 
message</DIV>
<DIV>&nbsp;&nbsp;&nbsp;&nbsp;...<BR>}</DIV>
<DIV>&nbsp;</DIV>
<DIV>This is (part of) my C file. As already said, if I load "real_mps_file.mps" 
into glpsolve directly from a shell, it calculates the correct solution of the 
problem, but using this C-file compiled I get primal infeasible message, both if 
I try the initialSolve or the branchAndBound.</DIV>
<DIV>I'm quite hopeless, can't figure out what's the problem with my file or my 
model...</DIV>
<DIV>Hope someone could help.</DIV>
<DIV>Domenico S.</FONT></DIV></BODY></HTML>