<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">

<head>
<meta http-equiv=Content-Type content="text/html; charset=windows-1252">
<meta name=Generator content="Microsoft Word 12 (filtered medium)">
<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:Verdana;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","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;}
span.EmailStyle17
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.p
        {mso-style-name:p;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page Section1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.Section1
        {page:Section1;}
-->
</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]-->
</head>

<body lang=EN-GB link=blue vlink=purple>

<div class=Section1>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Hi Mario,<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>  here are some answers:<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>1. Yes, that is possible.<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>2. You can output the problem in MPS format or 'lp format'. See
the recent mails on the list about how to do this.<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>3.<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>4.  You cant. Flopc++ can only be used to model LPs and will not
allow you to divide with an expression involving decision variables.<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>5.<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>6. <o:p></o:p></span></p>

<table class=MsoNormalTable border=1 cellspacing=0 cellpadding=0 width="100%"
 style='width:100.0%;border-collapse:collapse;border:none'>
 <tr>
  <td valign=top style='border:solid #DDDDDD 1.0pt;border-bottom:none;
  background:white;padding:.75pt 1.5pt .75pt 1.5pt'>
  <p class=MsoNormal style='line-height:130%'><b><span style='font-size:8.5pt;
  line-height:130%;font-family:"Courier New";color:#445588'>void</span></b><span
  style='font-size:8.5pt;line-height:130%;font-family:"Courier New";color:black'>&nbsp;MP_constraint<b>::</b>display</span><span
  style='font-size:8.5pt;line-height:130%;font-family:"Courier New";color:black'>(</span><span
  style='font-size:8.5pt;line-height:130%;font-family:"Courier New";color:black'>string
  s</span><span style='font-size:8.5pt;line-height:130%;font-family:"Courier New";
  color:black'>)</span><span style='font-size:8.5pt;line-height:130%;
  font-family:"Courier New";color:black'>&nbsp;<b>const</b>&nbsp;</span><span
  style='font-size:8.5pt;line-height:130%;font-family:"Courier New";color:black'>{</span><span
  style='font-size:8.5pt;line-height:130%;font-family:"Courier New";color:black'><o:p></o:p></span></p>
  </td>
 </tr>
 <tr>
  <td valign=top style='border-top:none;border-left:solid #DDDDDD 1.0pt;
  border-bottom:solid #999988 1.0pt;border-right:solid #D7D7D7 1.0pt;
  background:#EEEEDD;padding:0cm 6.0pt 0cm 6.0pt'>
  <p class=MsoNormal align=right style='text-align:right;line-height:130%'><span
  style='font-size:8.5pt;line-height:130%;font-family:"Verdana","sans-serif";
  color:#888866'><a href="javascript:setLineNum(89)"><span style='color:#888866;
  border:none windowtext 1.0pt;padding:0cm;text-decoration:none'>89</span></a><o:p></o:p></span></p>
  </td>
  <td valign=top style='border:none;border-right:solid #DDDDDD 1.0pt;
  background:white;padding:.75pt 1.5pt .75pt 1.5pt'>
  <p class=MsoNormal style='line-height:130%'><span style='font-size:8.5pt;
  line-height:130%;font-family:"Courier New";color:black'>&nbsp; &nbsp; cout<b>&lt;&lt;</b>s<b>&lt;&lt;</b>endl</span><span
  style='font-size:8.5pt;line-height:130%;font-family:"Courier New";color:black'>;</span><span
  style='font-size:8.5pt;line-height:130%;font-family:"Courier New";color:black'><o:p></o:p></span></p>
  </td>
 </tr>
 <tr>
  <td valign=top style='border-top:none;border-left:solid #DDDDDD 1.0pt;
  border-bottom:solid #999988 1.0pt;border-right:solid #D7D7D7 1.0pt;
  background:#EEEEDD;padding:0cm 6.0pt 0cm 6.0pt'>
  <p class=MsoNormal align=right style='text-align:right;line-height:130%'><span
  style='font-size:8.5pt;line-height:130%;font-family:"Verdana","sans-serif";
  color:#888866'><a href="javascript:setLineNum(90)"><span style='color:#888866;
  border:none windowtext 1.0pt;padding:0cm;text-decoration:none'>90</span></a><o:p></o:p></span></p>
  </td>
  <td valign=top style='border:none;border-right:solid #DDDDDD 1.0pt;
  background:white;padding:.75pt 1.5pt .75pt 1.5pt'>
  <p class=MsoNormal style='line-height:130%'><span style='font-size:8.5pt;
  line-height:130%;font-family:"Courier New";color:black'>&nbsp; &nbsp; <b>if</b>&nbsp;</span><span
  style='font-size:8.5pt;line-height:130%;font-family:"Courier New";color:black'>(</span><span
  style='font-size:8.5pt;line-height:130%;font-family:"Courier New";color:black'>offset
  <b>&gt;=</b></span><span style='font-size:8.5pt;line-height:130%;font-family:
  "Courier New";color:#009999'>0</span><span style='font-size:8.5pt;line-height:
  130%;font-family:"Courier New";color:black'>)</span><span style='font-size:
  8.5pt;line-height:130%;font-family:"Courier New";color:black'>&nbsp;</span><span
  style='font-size:8.5pt;line-height:130%;font-family:"Courier New";color:black'>{</span><span
  style='font-size:8.5pt;line-height:130%;font-family:"Courier New";color:black'><o:p></o:p></span></p>
  </td>
 </tr>
 <tr>
  <td valign=top style='border-top:none;border-left:solid #DDDDDD 1.0pt;
  border-bottom:solid #999988 1.0pt;border-right:solid #D7D7D7 1.0pt;
  background:#EEEEDD;padding:0cm 6.0pt 0cm 6.0pt'>
  <p class=MsoNormal align=right style='text-align:right;line-height:130%'><span
  style='font-size:8.5pt;line-height:130%;font-family:"Verdana","sans-serif";
  color:#888866'><a href="javascript:setLineNum(91)"><span style='color:#888866;
  border:none windowtext 1.0pt;padding:0cm;text-decoration:none'>91</span></a><o:p></o:p></span></p>
  </td>
  <td valign=top style='border:none;border-right:solid #DDDDDD 1.0pt;
  background:white;padding:.75pt 1.5pt .75pt 1.5pt'>
  <p class=MsoNormal style='line-height:130%'><span style='font-size:8.5pt;
  line-height:130%;font-family:"Courier New";color:black'>&nbsp; &nbsp; &nbsp; <b>for</b>&nbsp;</span><span
  style='font-size:8.5pt;line-height:130%;font-family:"Courier New";color:black'>(</span><b><span
  style='font-size:8.5pt;line-height:130%;font-family:"Courier New";color:#445588'>int</span></b><span
  style='font-size:8.5pt;line-height:130%;font-family:"Courier New";color:black'>&nbsp;i<b>=</b>offset</span><span
  style='font-size:8.5pt;line-height:130%;font-family:"Courier New";color:black'>;</span><span
  style='font-size:8.5pt;line-height:130%;font-family:"Courier New";color:black'>&nbsp;i<b>&lt;</b>offset<b>+</b>size</span><span
  style='font-size:8.5pt;line-height:130%;font-family:"Courier New";color:black'>();</span><span
  style='font-size:8.5pt;line-height:130%;font-family:"Courier New";color:black'>&nbsp;i<b>++</b></span><span
  style='font-size:8.5pt;line-height:130%;font-family:"Courier New";color:black'>)</span><span
  style='font-size:8.5pt;line-height:130%;font-family:"Courier New";color:black'>&nbsp;</span><span
  style='font-size:8.5pt;line-height:130%;font-family:"Courier New";color:black'>{</span><span
  style='font-size:8.5pt;line-height:130%;font-family:"Courier New";color:black'><o:p></o:p></span></p>
  </td>
 </tr>
 <tr>
  <td valign=top style='border-top:none;border-left:solid #DDDDDD 1.0pt;
  border-bottom:solid #999988 1.0pt;border-right:solid #D7D7D7 1.0pt;
  background:#EEEEDD;padding:0cm 6.0pt 0cm 6.0pt'>
  <p class=MsoNormal align=right style='text-align:right;line-height:130%'><span
  style='font-size:8.5pt;line-height:130%;font-family:"Verdana","sans-serif";
  color:#888866'><a href="javascript:setLineNum(92)"><span style='color:#888866;
  border:none windowtext 1.0pt;padding:0cm;text-decoration:none'>92</span></a><o:p></o:p></span></p>
  </td>
  <td valign=top style='border:none;border-right:solid #DDDDDD 1.0pt;
  background:white;padding:.75pt 1.5pt .75pt 1.5pt'>
  <p class=MsoNormal style='line-height:130%'><span style='font-size:8.5pt;
  line-height:130%;font-family:"Courier New";color:black'>&nbsp; &nbsp; &nbsp;
  &nbsp; cout<b>&lt;&lt;</b>i<b>&lt;&lt;</b></span><span style='font-size:8.5pt;
  line-height:130%;font-family:"Courier New";color:#BB8844'>&quot;&nbsp; &quot;</span><b><span
  style='font-size:8.5pt;line-height:130%;font-family:"Courier New";color:black'>&lt;&lt;</span></b><span
  style='font-size:8.5pt;line-height:130%;font-family:"Courier New";color:black'>M<b>-&gt;</b>bl</span><span
  style='font-size:8.5pt;line-height:130%;font-family:"Courier New";color:black'>[</span><span
  style='font-size:8.5pt;line-height:130%;font-family:"Courier New";color:black'>i</span><span
  style='font-size:8.5pt;line-height:130%;font-family:"Courier New";color:black'>]</span><b><span
  style='font-size:8.5pt;line-height:130%;font-family:"Courier New";color:black'>&lt;&lt;</span></b><span
  style='font-size:8.5pt;line-height:130%;font-family:"Courier New";color:#BB8844'>&quot;&nbsp;
  &quot;</span><b><span style='font-size:8.5pt;line-height:130%;font-family:
  "Courier New";color:black'>&lt;&lt;</span></b><span style='font-size:8.5pt;
  line-height:130%;font-family:"Courier New";color:black'>M<b>-&gt;</b>rowActivity</span><span
  style='font-size:8.5pt;line-height:130%;font-family:"Courier New";color:black'>[</span><span
  style='font-size:8.5pt;line-height:130%;font-family:"Courier New";color:black'>i</span><span
  style='font-size:8.5pt;line-height:130%;font-family:"Courier New";color:black'>]</span><b><span
  style='font-size:8.5pt;line-height:130%;font-family:"Courier New";color:black'>&lt;&lt;</span></b><span
  style='font-size:8.5pt;line-height:130%;font-family:"Courier New";color:#BB8844'>&quot;&nbsp;
  &quot;</span><b><span style='font-size:8.5pt;line-height:130%;font-family:
  "Courier New";color:black'>&lt;&lt;</span></b><span style='font-size:8.5pt;
  line-height:130%;font-family:"Courier New";color:black'>M<b>-&gt;</b>bu</span><span
  style='font-size:8.5pt;line-height:130%;font-family:"Courier New";color:black'>[</span><span
  style='font-size:8.5pt;line-height:130%;font-family:"Courier New";color:black'>i</span><span
  style='font-size:8.5pt;line-height:130%;font-family:"Courier New";color:black'>]</span><b><span
  style='font-size:8.5pt;line-height:130%;font-family:"Courier New";color:black'>&lt;&lt;</span></b><span
  style='font-size:8.5pt;line-height:130%;font-family:"Courier New";color:#BB8844'>&quot;&nbsp;
  &quot;</span><b><span style='font-size:8.5pt;line-height:130%;font-family:
  "Courier New";color:black'>&lt;&lt;</span></b><span style='font-size:8.5pt;
  line-height:130%;font-family:"Courier New";color:black'>M<b>-&gt;</b>rowPrice</span><span
  style='font-size:8.5pt;line-height:130%;font-family:"Courier New";color:black'>[</span><span
  style='font-size:8.5pt;line-height:130%;font-family:"Courier New";color:black'>i</span><span
  style='font-size:8.5pt;line-height:130%;font-family:"Courier New";color:black'>]</span><b><span
  style='font-size:8.5pt;line-height:130%;font-family:"Courier New";color:black'>&lt;&lt;</span></b><span
  style='font-size:8.5pt;line-height:130%;font-family:"Courier New";color:black'>endl</span><span
  style='font-size:8.5pt;line-height:130%;font-family:"Courier New";color:black'>;</span><span
  style='font-size:8.5pt;line-height:130%;font-family:"Courier New";color:black'><o:p></o:p></span></p>
  </td>
 </tr>
 <tr>
  <td valign=top style='border-top:none;border-left:solid #DDDDDD 1.0pt;
  border-bottom:solid #999988 1.0pt;border-right:solid #D7D7D7 1.0pt;
  background:#EEEEDD;padding:0cm 6.0pt 0cm 6.0pt'>
  <p class=MsoNormal align=right style='text-align:right;line-height:130%'><span
  style='font-size:8.5pt;line-height:130%;font-family:"Verdana","sans-serif";
  color:#888866'><a href="javascript:setLineNum(93)"><span style='color:#888866;
  border:none windowtext 1.0pt;padding:0cm;text-decoration:none'>93</span></a><o:p></o:p></span></p>
  </td>
  <td valign=top style='border:none;border-right:solid #DDDDDD 1.0pt;
  background:white;padding:.75pt 1.5pt .75pt 1.5pt'>
  <p class=MsoNormal style='line-height:130%'><span style='font-size:8.5pt;
  line-height:130%;font-family:"Courier New";color:black'>&nbsp; &nbsp; &nbsp; </span><span
  style='font-size:8.5pt;line-height:130%;font-family:"Courier New";color:black'>}</span><span
  style='font-size:8.5pt;line-height:130%;font-family:"Courier New";color:black'><o:p></o:p></span></p>
  </td>
 </tr>
 <tr>
  <td valign=top style='border-top:none;border-left:solid #DDDDDD 1.0pt;
  border-bottom:solid #999988 1.0pt;border-right:solid #D7D7D7 1.0pt;
  background:#EEEEDD;padding:0cm 6.0pt 0cm 6.0pt'>
  <p class=MsoNormal align=right style='text-align:right;line-height:130%'><span
  style='font-size:8.5pt;line-height:130%;font-family:"Verdana","sans-serif";
  color:#888866'><a href="javascript:setLineNum(94)"><span style='color:#888866;
  border:none windowtext 1.0pt;padding:0cm;text-decoration:none'>94</span></a><o:p></o:p></span></p>
  </td>
  <td valign=top style='border:none;border-right:solid #DDDDDD 1.0pt;
  background:white;padding:.75pt 1.5pt .75pt 1.5pt'>
  <p class=MsoNormal style='line-height:130%'><span style='font-size:8.5pt;
  line-height:130%;font-family:"Courier New";color:black'>&nbsp; &nbsp; </span><span
  style='font-size:8.5pt;line-height:130%;font-family:"Courier New";color:black'>}</span><span
  style='font-size:8.5pt;line-height:130%;font-family:"Courier New";color:black'>&nbsp;<b>else</b>&nbsp;</span><span
  style='font-size:8.5pt;line-height:130%;font-family:"Courier New";color:black'>{</span><span
  style='font-size:8.5pt;line-height:130%;font-family:"Courier New";color:black'><o:p></o:p></span></p>
  </td>
 </tr>
 <tr>
  <td valign=top style='border-top:none;border-left:solid #DDDDDD 1.0pt;
  border-bottom:solid #999988 1.0pt;border-right:solid #D7D7D7 1.0pt;
  background:#EEEEDD;padding:0cm 6.0pt 0cm 6.0pt'>
  <p class=MsoNormal align=right style='text-align:right;line-height:130%'><span
  style='font-size:8.5pt;line-height:130%;font-family:"Verdana","sans-serif";
  color:#888866'><a href="javascript:setLineNum(95)"><span style='color:#888866;
  border:none windowtext 1.0pt;padding:0cm;text-decoration:none'>95</span></a><o:p></o:p></span></p>
  </td>
  <td valign=top style='border:none;border-right:solid #DDDDDD 1.0pt;
  background:white;padding:.75pt 1.5pt .75pt 1.5pt'>
  <p class=MsoNormal style='line-height:130%'><span style='font-size:8.5pt;
  line-height:130%;font-family:"Courier New";color:black'>&nbsp; &nbsp; &nbsp;
  cout<b>&lt;&lt;</b></span><span style='font-size:8.5pt;line-height:130%;
  font-family:"Courier New";color:#BB8844'>&quot;No solution available!&quot;</span><b><span
  style='font-size:8.5pt;line-height:130%;font-family:"Courier New";color:black'>&lt;&lt;</span></b><span
  style='font-size:8.5pt;line-height:130%;font-family:"Courier New";color:black'>endl</span><span
  style='font-size:8.5pt;line-height:130%;font-family:"Courier New";color:black'>;</span><span
  style='font-size:8.5pt;line-height:130%;font-family:"Courier New";color:black'><o:p></o:p></span></p>
  </td>
 </tr>
 <tr>
  <td valign=top style='border-top:none;border-left:solid #DDDDDD 1.0pt;
  border-bottom:solid #999988 1.0pt;border-right:solid #D7D7D7 1.0pt;
  background:#EEEEDD;padding:0cm 6.0pt 0cm 6.0pt'>
  <p class=MsoNormal align=right style='text-align:right;line-height:130%'><span
  style='font-size:8.5pt;line-height:130%;font-family:"Verdana","sans-serif";
  color:#888866'><a href="javascript:setLineNum(96)"><span style='color:#888866;
  border:none windowtext 1.0pt;padding:0cm;text-decoration:none'>96</span></a><o:p></o:p></span></p>
  </td>
  <td valign=top style='border:none;border-right:solid #DDDDDD 1.0pt;
  background:white;padding:.75pt 1.5pt .75pt 1.5pt'>
  <p class=MsoNormal style='line-height:130%'><span style='font-size:8.5pt;
  line-height:130%;font-family:"Courier New";color:black'>&nbsp; &nbsp; </span><span
  style='font-size:8.5pt;line-height:130%;font-family:"Courier New";color:black'>}</span><span
  style='font-size:8.5pt;line-height:130%;font-family:"Courier New";color:black'><o:p></o:p></span></p>
  </td>
 </tr>
 <tr>
  <td valign=top style='border-top:none;border-left:solid #DDDDDD 1.0pt;
  border-bottom:solid #999988 1.0pt;border-right:solid #D7D7D7 1.0pt;
  background:#EEEEDD;padding:0cm 6.0pt 0cm 6.0pt'>
  <p class=MsoNormal align=right style='text-align:right;line-height:130%'><span
  style='font-size:8.5pt;line-height:130%;font-family:"Verdana","sans-serif";
  color:#888866'><a href="javascript:setLineNum(97)"><span style='color:#888866;
  border:none windowtext 1.0pt;padding:0cm;text-decoration:none'>97</span></a><o:p></o:p></span></p>
  </td>
  <td valign=top style='border-top:none;border-left:none;border-bottom:solid #DDDDDD 1.0pt;
  border-right:solid #DDDDDD 1.0pt;background:white;padding:.75pt 1.5pt .75pt 1.5pt'>
  <p class=MsoNormal style='line-height:130%'><span style='font-size:8.5pt;
  line-height:130%;font-family:"Courier New";color:black'>}</span><span
  style='font-size:8.5pt;line-height:130%;font-family:"Courier New";color:black'><o:p></o:p></span></p>
  </td>
 </tr>
</table>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>I know I didn’t answer everthing, but I have to go now..<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Tim<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'>

<p class=MsoNormal><b><span lang=EN-US style='font-size:10.0pt;font-family:
"Tahoma","sans-serif"'>From:</span></b><span lang=EN-US style='font-size:10.0pt;
font-family:"Tahoma","sans-serif"'> flopcpp-bounces@list.coin-or.org
[mailto:flopcpp-bounces@list.coin-or.org] <b>On Behalf Of </b>Mario Rappi<br>
<b>Sent:</b> Sunday, November 29, 2009 2:47 AM<br>
<b>To:</b> flopcpp@list.coin-or.org<br>
<b>Subject:</b> [FlopCpp] wrote first flopcpp model. have a lot of questions<o:p></o:p></span></p>

</div>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal>First I include the model, then the output, and at the end
the questions:<br>
<br>
*****model************************<br>
// $Id$<br>
#include &quot;flopc.hpp&quot;<br>
using namespace flopc;<br>
#include &lt;OsiClpSolverInterface.hpp&gt;<br>
<br>
int main() {<br>
<br>
&nbsp;&nbsp;&nbsp; MP_model &amp;model = MP_model::getDefaultModel();<br>
&nbsp;&nbsp;&nbsp; model.setSolver(new OsiClpSolverInterface);<br>
&nbsp;&nbsp;&nbsp; model.verbose();<br>
<br>
&nbsp;&nbsp;&nbsp; enum {storeA, storeB, storeC, storeD, numS}; <br>
&nbsp;&nbsp;&nbsp; enum {Input1, Input2, numI};<br>
&nbsp;&nbsp;&nbsp; enum {Output1, numO};<br>
<br>
&nbsp;&nbsp;&nbsp; MP_set
S(numS);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // Stores<br>
&nbsp;&nbsp;&nbsp; MP_set I(numI);&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp; // Inputs<br>
&nbsp;&nbsp;&nbsp; MP_set O(numO);&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp; // Outputs<br>
<br>
&nbsp;&nbsp;&nbsp; MP_subset&lt;2&gt; Input(S,I);<br>
&nbsp;&nbsp;&nbsp; Input.insert(S,I);<br>
&nbsp;&nbsp;&nbsp; Input.display(&quot;Input&quot;);<br>
&nbsp;&nbsp;&nbsp; MP_subset&lt;2&gt; Output(S,O);<br>
&nbsp;&nbsp;&nbsp; Output.insert(S,O);<br>
&nbsp;&nbsp;&nbsp; Output.display(&quot;Output&quot;);<br>
&nbsp;&nbsp;&nbsp; <br>
&nbsp;&nbsp;&nbsp; //this will be easier with an array??<br>
&nbsp;&nbsp;&nbsp; MP_data InputVal(Input);<br>
&nbsp;&nbsp;&nbsp; InputVal(storeA,Input1)=1; InputVal(storeA,Input2)=3;<br>
&nbsp;&nbsp;&nbsp; InputVal(storeB,Input1)=3; InputVal(storeB,Input2)=3;<br>
&nbsp;&nbsp;&nbsp; InputVal(storeC,Input1)=4; InputVal(storeC,Input2)=2;<br>
&nbsp;&nbsp;&nbsp; InputVal(storeD,Input1)=3; InputVal(storeD,Input2)=1;<br>
<br>
&nbsp;&nbsp;&nbsp; MP_data OutputVal(Output);<br>
&nbsp;&nbsp;&nbsp; OutputVal(storeA,Output1)=1;<br>
&nbsp;&nbsp;&nbsp; OutputVal(storeB,Output1)=1.5;<br>
&nbsp;&nbsp;&nbsp; OutputVal(storeC,Output1)=2;<br>
&nbsp;&nbsp;&nbsp; OutputVal(storeD,Output1)=1;<br>
<br>
&nbsp;&nbsp;&nbsp; MP_variable x(I), y(O);<br>
&nbsp;&nbsp;&nbsp; x.lowerLimit(I)=0;<br>
&nbsp;&nbsp;&nbsp; y.lowerLimit(O)=0;<br>
<br>
&nbsp;&nbsp;&nbsp; MP_constraint efficiency(S);<br>
&nbsp;&nbsp;&nbsp; efficiency(S) = sum(I, InputVal(S, I) * x(I)) &lt;= sum(O,
OutputVal(S, O) * y(O));<br>
<br>
&nbsp;&nbsp;&nbsp; minimize( (sum(O, OutputVal(storeB, O) * y(O))) - (sum(I,
InputVal(storeB, I) * x(I))));<br>
&nbsp;&nbsp;&nbsp; <br>
&nbsp;&nbsp;&nbsp; efficiency.display(&quot;constraints&quot;);<br>
&nbsp;&nbsp;&nbsp; x.display(&quot;x&quot;);<br>
&nbsp;&nbsp;&nbsp; y.display(&quot;y&quot;);<br>
<br>
&nbsp;&nbsp;&nbsp; cout&lt;&lt;&quot;Test dea passed.&quot;&lt;&lt;endl;<br>
}<br>
*****model end************************<br>
<br>
*****output************************<br>
Input<br>
Output<br>
FlopCpp: Constraint <br>
0&nbsp;&nbsp; 1&nbsp; 0&nbsp; 0<br>
1&nbsp;&nbsp; 1&nbsp; 0&nbsp; 0<br>
2&nbsp;&nbsp; 1&nbsp; 0&nbsp; 0<br>
3&nbsp;&nbsp; 1&nbsp; 0&nbsp; 0<br>
0&nbsp;&nbsp; 2&nbsp; 0&nbsp; 0<br>
1&nbsp;&nbsp; 2&nbsp; 0&nbsp; 0<br>
2&nbsp;&nbsp; 2&nbsp; 0&nbsp; 0<br>
3&nbsp;&nbsp; 2&nbsp; 0&nbsp; 0<br>
0&nbsp;&nbsp; 0&nbsp; -0&nbsp; 0<br>
1&nbsp;&nbsp; 0&nbsp; -0&nbsp; 0<br>
2&nbsp;&nbsp; 0&nbsp; -0&nbsp; 0<br>
3&nbsp;&nbsp; 0&nbsp; -0&nbsp; 0<br>
FlopCpp: Number of constraint blocks: 1<br>
FlopCpp: Number of individual constraints: 4<br>
FlopCpp: Number of variable blocks: 2<br>
FlopCpp: Number of individual variables: 3<br>
FlopCpp: Number of non-zeroes (including rhs): 12<br>
Objective <br>
-1&nbsp;&nbsp; 0&nbsp; 0<br>
-1&nbsp;&nbsp; 1&nbsp; -0<br>
-1&nbsp;&nbsp; 2&nbsp; -0<br>
FlopCpp: Generation time: -2.64274e-19<br>
Clp0000I Optimal - objective value 0<br>
Clp0032I Optimal objective 0 - 0 iterations time 0.002<br>
FlopCpp: Optimal obj. value = 0<br>
FlopCpp: Solver(m, n, nz) = 4&nbsp; 3&nbsp; 0<br>
constraints<br>
0&nbsp; -1.79769e+308&nbsp; 0&nbsp; 0&nbsp; -0<br>
1&nbsp; -1.79769e+308&nbsp; 0&nbsp; 0&nbsp; -0<br>
2&nbsp; -1.79769e+308&nbsp; 0&nbsp; 0&nbsp; -0<br>
3&nbsp; -1.79769e+308&nbsp; 0&nbsp; 0&nbsp; -0<br>
x<br>
0&nbsp;&nbsp; 0<br>
1&nbsp;&nbsp; 0<br>
y<br>
0&nbsp;&nbsp; 0<br>
Test dea passed.<br>
*****output end************************<br>
<br>
*****Questions:******************<br>
I would like to define a set A that includes all members of O and I and then
derive O and I from A.<br>
This is what I am thinking in GAMS terms:<br>
A&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; / Input1, Input2, Output1 /<br>
O(A)&nbsp;&nbsp; /&nbsp; Input1, Input2 /<br>
I(A)&nbsp;&nbsp;&nbsp; / Output1&nbsp; /<br>
Is this possible?. I thought it would allow me to write the model more easily
(but may be not)<br>
*******************<br>
I tried to display the constraints but I didn't get what I was expecting (the
actual mathematical expression). Is it possible to see the constraints in any
other way?<br>
*******************<br>
When I compile I get the following two warnings. Should I be concerned? How do
I fix them?<br>
<br>
c:\program files\coin-flopcpp\flopcpp\src\mp_set.hpp(259) : warning C4267:
'return' : conversion from 'size_t' to 'int', possible loss of data<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; c:\program files\coin-flopcpp\flopcpp\src\mp_set.hpp(258)
: while compiling class template member function 'int
flopc::MP_subset&lt;nbr&gt;::size(void) const'<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; with<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; nbr=2<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ]<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; c:\program
files\coin-flopcpp\flopcpp\examples\dea.cpp(21) : see reference to class
template instantiation 'flopc::MP_subset&lt;nbr&gt;' being compiled<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; with<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; nbr=2<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ]<br>
c:\program files\coin-flopcpp\flopcpp\src\mp_set.hpp(243) : warning C4267:
'initializing' : conversion from 'size_t' to 'const int', possible loss of data<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; c:\program
files\coin-flopcpp\flopcpp\src\mp_set.hpp(232) : while compiling class template
member function 'void flopc::MP_subset&lt;nbr&gt;::insert(const
std::vector&lt;_Ty&gt; &amp;)'<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; with<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; nbr=2,<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; _Ty=int<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ]<br>
<br>
*******************<br>
The objective function that I really want to use is<br>
maximize( (sum(O, OutputVal(storeB, O) * y(O))) / (sum(I, InputVal(storeB, I) *
x(I))));<br>
But it doesn't compile, I get this error:<br>
<br>
c:\program files\coin-flopcpp\flopcpp\examples\dea.cpp(51) : error C2678:
binary '/' : no operator found which takes a left-hand operand of type
'flopc::MP_expression' (or there is no acceptable conversion)<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; c:\program
files\coin-flopcpp\flopcpp\src\mp_constant.hpp(141): could be 'flopc::Constant
flopc::operator /(const flopc::Constant &amp;,const flopc::Constant &amp;)'<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; c:\program
files\coin-flopcpp\coinutils\src\coinpackedvector.hpp(483):
or&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'CoinPackedVector operator /(const
CoinPackedVectorBase &amp;,const CoinPackedVectorBase &amp;)'<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; c:\program
files\coin-flopcpp\coinutils\src\coinpackedvector.hpp(583):
or&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'CoinPackedVector operator /(const
CoinPackedVectorBase &amp;,double)'<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; c:\program
files\coin-flopcpp\coinutils\src\coinpackedvector.hpp(625): or&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
'CoinPackedVector operator /(double,const CoinPackedVectorBase &amp;)'<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; while trying to match the argument
list '(flopc::MP_expression, flopc::MP_expression)'<br>
<br>
I am using MSVCPP, I read of some problems specific to VCPP so I tried the same
in Linux(I think it is build-essential in Ubuntu) but I get the same errors.<br>
How can I fix this problem with the division operation?<br>
*******************<br>
Is my formulation of the objective function OK in how I sum only for storeB or
do I have to use such_that or any other type of control?<br>
How do I display the objective function?<br>
*******************<br>
What are these numbers in the output?<br>
constraints<br>
0&nbsp; -1.79769e+308&nbsp; 0&nbsp; 0&nbsp; -0<br>
1&nbsp; -1.79769e+308&nbsp; 0&nbsp; 0&nbsp; -0<br>
2&nbsp; -1.79769e+308&nbsp; 0&nbsp; 0&nbsp; -0<br>
3&nbsp; -1.79769e+308&nbsp; 0&nbsp; 0&nbsp; -0<br>
My four constraints are supposed to have only three terms (two on the left and
one on the right)<br>
********************<br>
What is this?<br>
Objective <br>
-1&nbsp;&nbsp; 0&nbsp; 0<br>
-1&nbsp;&nbsp; 1&nbsp; -0<br>
-1&nbsp;&nbsp; 2&nbsp; -0<br>
********************<br>
<br>
If it helps at all: the model is a simple DEA formulation (primal).<br>
I understand some of my questions may be more C++ than flopcpp questions but I
can't tell.<br>
I will appreciate help on any of these questions and on any other comments you
may have on the model formulation.<br>
Thanks in advance.<br>
Mario<o:p></o:p></p>

</div>

</body>

</html>