Thank you both for your help.<br>I linearized the objective function using Charnes/Cooper. <br>Then got the writeLP (which gives me what I was expecting from constraint.display) to work and confirmed my data wasn&#39;t loading, so changed the indexing from (Input) to (S,I) to load it right.<br>
Then I saw the model was unbounded, reviewed it and realized that when I earlier linearized the constraints I inadvertently flipped the sign of the inequalities.<br>When the problem was unbounded the exe crashed. Is this normal?<br>
Everything works now.<br>Next step is to loop to solve for each member of the set S and try to read the data from a database.<br>Thanks again, FlopC++ is a great product.<br>Mario<br><br><div class="gmail_quote">On Tue, Dec 1, 2009 at 10:42 AM, Tim Hultberg <span dir="ltr">&lt;<a href="mailto:Tim.Hultberg@eumetsat.int">Tim.Hultberg@eumetsat.int</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">








<div link="blue" vlink="purple" lang="EN-GB">

<div><div><div></div><div class="h5">

<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">Hi Mario,</span></p>

<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">  here are some answers:</span></p>

<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);"> </span></p>

<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">1. Yes, that is possible.</span></p>

<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);"> </span></p>

<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">2. You can output the problem in MPS format or &#39;lp format&#39;. See
the recent mails on the list about how to do this.</span></p>

<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);"> </span></p>

<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">3.</span></p>

<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);"> </span></p>

<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">4.  You cant. Flopc++ can only be used to model LPs and will not
allow you to divide with an expression involving decision variables.</span></p>

<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);"> </span></p>

<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">5.</span></p>

<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);"> </span></p>

<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">6. </span></p>

<table style="border: medium none ; width: 100%; border-collapse: collapse;" border="1" cellpadding="0" cellspacing="0" width="100%">
 <tbody><tr>
  <td style="border-style: solid solid none; border-color: rgb(221, 221, 221) rgb(221, 221, 221) -moz-use-text-color; border-width: 1pt 1pt medium; padding: 0.75pt 1.5pt; background: white none repeat scroll 0% 0%; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous;" valign="top">

  <p class="MsoNormal" style="line-height: 130%;"><b><span style="font-size: 8.5pt; line-height: 130%; font-family: &quot;Courier New&quot;; color: rgb(68, 85, 136);">void</span></b><span style="font-size: 8.5pt; line-height: 130%; font-family: &quot;Courier New&quot;; color: black;"> MP_constraint<b>::</b>display</span><span style="font-size: 8.5pt; line-height: 130%; font-family: &quot;Courier New&quot;; color: black;">(</span><span style="font-size: 8.5pt; line-height: 130%; font-family: &quot;Courier New&quot;; color: black;">string
  s</span><span style="font-size: 8.5pt; line-height: 130%; font-family: &quot;Courier New&quot;; color: black;">)</span><span style="font-size: 8.5pt; line-height: 130%; font-family: &quot;Courier New&quot;; color: black;"> <b>const</b> </span><span style="font-size: 8.5pt; line-height: 130%; font-family: &quot;Courier New&quot;; color: black;">{</span><span style="font-size: 8.5pt; line-height: 130%; font-family: &quot;Courier New&quot;; color: black;"></span></p>

  </td>
 </tr>
 <tr>
  <td style="border-style: none solid solid; border-color: -moz-use-text-color rgb(215, 215, 215) rgb(153, 153, 136) rgb(221, 221, 221); border-width: medium 1pt 1pt; padding: 0cm 6pt; background: rgb(238, 238, 221) none repeat scroll 0% 0%; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous;" valign="top">

  <p class="MsoNormal" style="text-align: right; line-height: 130%;" align="right"><span style="font-size: 8.5pt; line-height: 130%; color: rgb(136, 136, 102);"><a><span style="border: 1pt none windowtext; padding: 0cm; color: rgb(136, 136, 102); text-decoration: none;">89</span></a></span></p>

  </td>
  <td style="border-style: none solid none none; border-color: -moz-use-text-color rgb(221, 221, 221) -moz-use-text-color -moz-use-text-color; border-width: medium 1pt medium medium; padding: 0.75pt 1.5pt; background: white none repeat scroll 0% 0%; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous;" valign="top">

  <p class="MsoNormal" style="line-height: 130%;"><span style="font-size: 8.5pt; line-height: 130%; font-family: &quot;Courier New&quot;; color: black;">    cout<b>&lt;&lt;</b>s<b>&lt;&lt;</b>endl</span><span style="font-size: 8.5pt; line-height: 130%; font-family: &quot;Courier New&quot;; color: black;">;</span><span style="font-size: 8.5pt; line-height: 130%; font-family: &quot;Courier New&quot;; color: black;"></span></p>

  </td>
 </tr>
 <tr>
  <td style="border-style: none solid solid; border-color: -moz-use-text-color rgb(215, 215, 215) rgb(153, 153, 136) rgb(221, 221, 221); border-width: medium 1pt 1pt; padding: 0cm 6pt; background: rgb(238, 238, 221) none repeat scroll 0% 0%; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous;" valign="top">

  <p class="MsoNormal" style="text-align: right; line-height: 130%;" align="right"><span style="font-size: 8.5pt; line-height: 130%; color: rgb(136, 136, 102);"><a><span style="border: 1pt none windowtext; padding: 0cm; color: rgb(136, 136, 102); text-decoration: none;">90</span></a></span></p>

  </td>
  <td style="border-style: none solid none none; border-color: -moz-use-text-color rgb(221, 221, 221) -moz-use-text-color -moz-use-text-color; border-width: medium 1pt medium medium; padding: 0.75pt 1.5pt; background: white none repeat scroll 0% 0%; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous;" valign="top">

  <p class="MsoNormal" style="line-height: 130%;"><span style="font-size: 8.5pt; line-height: 130%; font-family: &quot;Courier New&quot;; color: black;">    <b>if</b> </span><span style="font-size: 8.5pt; line-height: 130%; font-family: &quot;Courier New&quot;; color: black;">(</span><span style="font-size: 8.5pt; line-height: 130%; font-family: &quot;Courier New&quot;; color: black;">offset
  <b>&gt;=</b></span><span style="font-size: 8.5pt; line-height: 130%; font-family: &quot;Courier New&quot;; color: rgb(0, 153, 153);">0</span><span style="font-size: 8.5pt; line-height: 130%; font-family: &quot;Courier New&quot;; color: black;">)</span><span style="font-size: 8.5pt; line-height: 130%; font-family: &quot;Courier New&quot;; color: black;"> </span><span style="font-size: 8.5pt; line-height: 130%; font-family: &quot;Courier New&quot;; color: black;">{</span><span style="font-size: 8.5pt; line-height: 130%; font-family: &quot;Courier New&quot;; color: black;"></span></p>

  </td>
 </tr>
 <tr>
  <td style="border-style: none solid solid; border-color: -moz-use-text-color rgb(215, 215, 215) rgb(153, 153, 136) rgb(221, 221, 221); border-width: medium 1pt 1pt; padding: 0cm 6pt; background: rgb(238, 238, 221) none repeat scroll 0% 0%; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous;" valign="top">

  <p class="MsoNormal" style="text-align: right; line-height: 130%;" align="right"><span style="font-size: 8.5pt; line-height: 130%; color: rgb(136, 136, 102);"><a><span style="border: 1pt none windowtext; padding: 0cm; color: rgb(136, 136, 102); text-decoration: none;">91</span></a></span></p>

  </td>
  <td style="border-style: none solid none none; border-color: -moz-use-text-color rgb(221, 221, 221) -moz-use-text-color -moz-use-text-color; border-width: medium 1pt medium medium; padding: 0.75pt 1.5pt; background: white none repeat scroll 0% 0%; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous;" valign="top">

  <p class="MsoNormal" style="line-height: 130%;"><span style="font-size: 8.5pt; line-height: 130%; font-family: &quot;Courier New&quot;; color: black;">      <b>for</b> </span><span style="font-size: 8.5pt; line-height: 130%; font-family: &quot;Courier New&quot;; color: black;">(</span><b><span style="font-size: 8.5pt; line-height: 130%; font-family: &quot;Courier New&quot;; color: rgb(68, 85, 136);">int</span></b><span style="font-size: 8.5pt; line-height: 130%; font-family: &quot;Courier New&quot;; color: black;"> i<b>=</b>offset</span><span style="font-size: 8.5pt; line-height: 130%; font-family: &quot;Courier New&quot;; color: black;">;</span><span style="font-size: 8.5pt; line-height: 130%; font-family: &quot;Courier New&quot;; color: black;"> i<b>&lt;</b>offset<b>+</b>size</span><span style="font-size: 8.5pt; line-height: 130%; font-family: &quot;Courier New&quot;; color: black;">();</span><span style="font-size: 8.5pt; line-height: 130%; font-family: &quot;Courier New&quot;; color: black;"> i<b>++</b></span><span style="font-size: 8.5pt; line-height: 130%; font-family: &quot;Courier New&quot;; color: black;">)</span><span style="font-size: 8.5pt; line-height: 130%; font-family: &quot;Courier New&quot;; color: black;"> </span><span style="font-size: 8.5pt; line-height: 130%; font-family: &quot;Courier New&quot;; color: black;">{</span><span style="font-size: 8.5pt; line-height: 130%; font-family: &quot;Courier New&quot;; color: black;"></span></p>

  </td>
 </tr>
 <tr>
  <td style="border-style: none solid solid; border-color: -moz-use-text-color rgb(215, 215, 215) rgb(153, 153, 136) rgb(221, 221, 221); border-width: medium 1pt 1pt; padding: 0cm 6pt; background: rgb(238, 238, 221) none repeat scroll 0% 0%; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous;" valign="top">

  <p class="MsoNormal" style="text-align: right; line-height: 130%;" align="right"><span style="font-size: 8.5pt; line-height: 130%; color: rgb(136, 136, 102);"><a><span style="border: 1pt none windowtext; padding: 0cm; color: rgb(136, 136, 102); text-decoration: none;">92</span></a></span></p>

  </td>
  <td style="border-style: none solid none none; border-color: -moz-use-text-color rgb(221, 221, 221) -moz-use-text-color -moz-use-text-color; border-width: medium 1pt medium medium; padding: 0.75pt 1.5pt; background: white none repeat scroll 0% 0%; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous;" valign="top">

  <p class="MsoNormal" style="line-height: 130%;"><span style="font-size: 8.5pt; line-height: 130%; font-family: &quot;Courier New&quot;; color: black;">     
    cout<b>&lt;&lt;</b>i<b>&lt;&lt;</b></span><span style="font-size: 8.5pt; line-height: 130%; font-family: &quot;Courier New&quot;; color: rgb(187, 136, 68);">&quot;  &quot;</span><b><span style="font-size: 8.5pt; line-height: 130%; font-family: &quot;Courier New&quot;; color: black;">&lt;&lt;</span></b><span style="font-size: 8.5pt; line-height: 130%; font-family: &quot;Courier New&quot;; color: black;">M<b>-&gt;</b>bl</span><span style="font-size: 8.5pt; line-height: 130%; font-family: &quot;Courier New&quot;; color: black;">[</span><span style="font-size: 8.5pt; line-height: 130%; font-family: &quot;Courier New&quot;; color: black;">i</span><span style="font-size: 8.5pt; line-height: 130%; font-family: &quot;Courier New&quot;; color: black;">]</span><b><span style="font-size: 8.5pt; line-height: 130%; font-family: &quot;Courier New&quot;; color: black;">&lt;&lt;</span></b><span style="font-size: 8.5pt; line-height: 130%; font-family: &quot;Courier New&quot;; color: rgb(187, 136, 68);">&quot; 
  &quot;</span><b><span style="font-size: 8.5pt; line-height: 130%; font-family: &quot;Courier New&quot;; color: black;">&lt;&lt;</span></b><span style="font-size: 8.5pt; line-height: 130%; font-family: &quot;Courier New&quot;; color: black;">M<b>-&gt;</b>rowActivity</span><span style="font-size: 8.5pt; line-height: 130%; font-family: &quot;Courier New&quot;; color: black;">[</span><span style="font-size: 8.5pt; line-height: 130%; font-family: &quot;Courier New&quot;; color: black;">i</span><span style="font-size: 8.5pt; line-height: 130%; font-family: &quot;Courier New&quot;; color: black;">]</span><b><span style="font-size: 8.5pt; line-height: 130%; font-family: &quot;Courier New&quot;; color: black;">&lt;&lt;</span></b><span style="font-size: 8.5pt; line-height: 130%; font-family: &quot;Courier New&quot;; color: rgb(187, 136, 68);">&quot; 
  &quot;</span><b><span style="font-size: 8.5pt; line-height: 130%; font-family: &quot;Courier New&quot;; color: black;">&lt;&lt;</span></b><span style="font-size: 8.5pt; line-height: 130%; font-family: &quot;Courier New&quot;; color: black;">M<b>-&gt;</b>bu</span><span style="font-size: 8.5pt; line-height: 130%; font-family: &quot;Courier New&quot;; color: black;">[</span><span style="font-size: 8.5pt; line-height: 130%; font-family: &quot;Courier New&quot;; color: black;">i</span><span style="font-size: 8.5pt; line-height: 130%; font-family: &quot;Courier New&quot;; color: black;">]</span><b><span style="font-size: 8.5pt; line-height: 130%; font-family: &quot;Courier New&quot;; color: black;">&lt;&lt;</span></b><span style="font-size: 8.5pt; line-height: 130%; font-family: &quot;Courier New&quot;; color: rgb(187, 136, 68);">&quot; 
  &quot;</span><b><span style="font-size: 8.5pt; line-height: 130%; font-family: &quot;Courier New&quot;; color: black;">&lt;&lt;</span></b><span style="font-size: 8.5pt; line-height: 130%; font-family: &quot;Courier New&quot;; color: black;">M<b>-&gt;</b>rowPrice</span><span style="font-size: 8.5pt; line-height: 130%; font-family: &quot;Courier New&quot;; color: black;">[</span><span style="font-size: 8.5pt; line-height: 130%; font-family: &quot;Courier New&quot;; color: black;">i</span><span style="font-size: 8.5pt; line-height: 130%; font-family: &quot;Courier New&quot;; color: black;">]</span><b><span style="font-size: 8.5pt; line-height: 130%; font-family: &quot;Courier New&quot;; color: black;">&lt;&lt;</span></b><span style="font-size: 8.5pt; line-height: 130%; font-family: &quot;Courier New&quot;; color: black;">endl</span><span style="font-size: 8.5pt; line-height: 130%; font-family: &quot;Courier New&quot;; color: black;">;</span><span style="font-size: 8.5pt; line-height: 130%; font-family: &quot;Courier New&quot;; color: black;"></span></p>

  </td>
 </tr>
 <tr>
  <td style="border-style: none solid solid; border-color: -moz-use-text-color rgb(215, 215, 215) rgb(153, 153, 136) rgb(221, 221, 221); border-width: medium 1pt 1pt; padding: 0cm 6pt; background: rgb(238, 238, 221) none repeat scroll 0% 0%; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous;" valign="top">

  <p class="MsoNormal" style="text-align: right; line-height: 130%;" align="right"><span style="font-size: 8.5pt; line-height: 130%; color: rgb(136, 136, 102);"><a><span style="border: 1pt none windowtext; padding: 0cm; color: rgb(136, 136, 102); text-decoration: none;">93</span></a></span></p>

  </td>
  <td style="border-style: none solid none none; border-color: -moz-use-text-color rgb(221, 221, 221) -moz-use-text-color -moz-use-text-color; border-width: medium 1pt medium medium; padding: 0.75pt 1.5pt; background: white none repeat scroll 0% 0%; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous;" valign="top">

  <p class="MsoNormal" style="line-height: 130%;"><span style="font-size: 8.5pt; line-height: 130%; font-family: &quot;Courier New&quot;; color: black;">      </span><span style="font-size: 8.5pt; line-height: 130%; font-family: &quot;Courier New&quot;; color: black;">}</span><span style="font-size: 8.5pt; line-height: 130%; font-family: &quot;Courier New&quot;; color: black;"></span></p>

  </td>
 </tr>
 <tr>
  <td style="border-style: none solid solid; border-color: -moz-use-text-color rgb(215, 215, 215) rgb(153, 153, 136) rgb(221, 221, 221); border-width: medium 1pt 1pt; padding: 0cm 6pt; background: rgb(238, 238, 221) none repeat scroll 0% 0%; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous;" valign="top">

  <p class="MsoNormal" style="text-align: right; line-height: 130%;" align="right"><span style="font-size: 8.5pt; line-height: 130%; color: rgb(136, 136, 102);"><a><span style="border: 1pt none windowtext; padding: 0cm; color: rgb(136, 136, 102); text-decoration: none;">94</span></a></span></p>

  </td>
  <td style="border-style: none solid none none; border-color: -moz-use-text-color rgb(221, 221, 221) -moz-use-text-color -moz-use-text-color; border-width: medium 1pt medium medium; padding: 0.75pt 1.5pt; background: white none repeat scroll 0% 0%; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous;" valign="top">

  <p class="MsoNormal" style="line-height: 130%;"><span style="font-size: 8.5pt; line-height: 130%; font-family: &quot;Courier New&quot;; color: black;">    </span><span style="font-size: 8.5pt; line-height: 130%; font-family: &quot;Courier New&quot;; color: black;">}</span><span style="font-size: 8.5pt; line-height: 130%; font-family: &quot;Courier New&quot;; color: black;"> <b>else</b> </span><span style="font-size: 8.5pt; line-height: 130%; font-family: &quot;Courier New&quot;; color: black;">{</span><span style="font-size: 8.5pt; line-height: 130%; font-family: &quot;Courier New&quot;; color: black;"></span></p>

  </td>
 </tr>
 <tr>
  <td style="border-style: none solid solid; border-color: -moz-use-text-color rgb(215, 215, 215) rgb(153, 153, 136) rgb(221, 221, 221); border-width: medium 1pt 1pt; padding: 0cm 6pt; background: rgb(238, 238, 221) none repeat scroll 0% 0%; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous;" valign="top">

  <p class="MsoNormal" style="text-align: right; line-height: 130%;" align="right"><span style="font-size: 8.5pt; line-height: 130%; color: rgb(136, 136, 102);"><a><span style="border: 1pt none windowtext; padding: 0cm; color: rgb(136, 136, 102); text-decoration: none;">95</span></a></span></p>

  </td>
  <td style="border-style: none solid none none; border-color: -moz-use-text-color rgb(221, 221, 221) -moz-use-text-color -moz-use-text-color; border-width: medium 1pt medium medium; padding: 0.75pt 1.5pt; background: white none repeat scroll 0% 0%; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous;" valign="top">

  <p class="MsoNormal" style="line-height: 130%;"><span style="font-size: 8.5pt; line-height: 130%; font-family: &quot;Courier New&quot;; color: black;">     
  cout<b>&lt;&lt;</b></span><span style="font-size: 8.5pt; line-height: 130%; font-family: &quot;Courier New&quot;; color: rgb(187, 136, 68);">&quot;No solution available!&quot;</span><b><span style="font-size: 8.5pt; line-height: 130%; font-family: &quot;Courier New&quot;; color: black;">&lt;&lt;</span></b><span style="font-size: 8.5pt; line-height: 130%; font-family: &quot;Courier New&quot;; color: black;">endl</span><span style="font-size: 8.5pt; line-height: 130%; font-family: &quot;Courier New&quot;; color: black;">;</span><span style="font-size: 8.5pt; line-height: 130%; font-family: &quot;Courier New&quot;; color: black;"></span></p>

  </td>
 </tr>
 <tr>
  <td style="border-style: none solid solid; border-color: -moz-use-text-color rgb(215, 215, 215) rgb(153, 153, 136) rgb(221, 221, 221); border-width: medium 1pt 1pt; padding: 0cm 6pt; background: rgb(238, 238, 221) none repeat scroll 0% 0%; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous;" valign="top">

  <p class="MsoNormal" style="text-align: right; line-height: 130%;" align="right"><span style="font-size: 8.5pt; line-height: 130%; color: rgb(136, 136, 102);"><a><span style="border: 1pt none windowtext; padding: 0cm; color: rgb(136, 136, 102); text-decoration: none;">96</span></a></span></p>

  </td>
  <td style="border-style: none solid none none; border-color: -moz-use-text-color rgb(221, 221, 221) -moz-use-text-color -moz-use-text-color; border-width: medium 1pt medium medium; padding: 0.75pt 1.5pt; background: white none repeat scroll 0% 0%; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous;" valign="top">

  <p class="MsoNormal" style="line-height: 130%;"><span style="font-size: 8.5pt; line-height: 130%; font-family: &quot;Courier New&quot;; color: black;">    </span><span style="font-size: 8.5pt; line-height: 130%; font-family: &quot;Courier New&quot;; color: black;">}</span><span style="font-size: 8.5pt; line-height: 130%; font-family: &quot;Courier New&quot;; color: black;"></span></p>

  </td>
 </tr>
 <tr>
  <td style="border-style: none solid solid; border-color: -moz-use-text-color rgb(215, 215, 215) rgb(153, 153, 136) rgb(221, 221, 221); border-width: medium 1pt 1pt; padding: 0cm 6pt; background: rgb(238, 238, 221) none repeat scroll 0% 0%; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous;" valign="top">

  <p class="MsoNormal" style="text-align: right; line-height: 130%;" align="right"><span style="font-size: 8.5pt; line-height: 130%; color: rgb(136, 136, 102);"><a><span style="border: 1pt none windowtext; padding: 0cm; color: rgb(136, 136, 102); text-decoration: none;">97</span></a></span></p>

  </td>
  <td style="border-style: none solid solid none; border-color: -moz-use-text-color rgb(221, 221, 221) rgb(221, 221, 221) -moz-use-text-color; border-width: medium 1pt 1pt medium; padding: 0.75pt 1.5pt; background: white none repeat scroll 0% 0%; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous;" valign="top">

  <p class="MsoNormal" style="line-height: 130%;"><span style="font-size: 8.5pt; line-height: 130%; font-family: &quot;Courier New&quot;; color: black;">}</span><span style="font-size: 8.5pt; line-height: 130%; font-family: &quot;Courier New&quot;; color: black;"></span></p>

  </td>
 </tr>
</tbody></table>

<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);"> </span></p>

<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);"> </span></p>

<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">I know I didn’t answer everthing, but I have to go now..</span></p>

<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);"> </span></p>

<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">Tim</span></p>

<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);"> </span></p>

<div style="border-style: solid none none; border-color: rgb(181, 196, 223) -moz-use-text-color -moz-use-text-color; border-width: 1pt medium medium; padding: 3pt 0cm 0cm;">

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

</div>

<p class="MsoNormal"> </p>

</div></div><p class="MsoNormal">First I include the model, then the output, and at the end
the questions:</p><div><div></div><div class="h5"><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>
    MP_model &amp;model = MP_model::getDefaultModel();<br>
    model.setSolver(new OsiClpSolverInterface);<br>
    model.verbose();<br>
<br>
    enum {storeA, storeB, storeC, storeD, numS}; <br>
    enum {Input1, Input2, numI};<br>
    enum {Output1, numO};<br>
<br>
    MP_set
S(numS);         // Stores<br>
    MP_set I(numI);       
    // Inputs<br>
    MP_set O(numO);       
    // Outputs<br>
<br>
    MP_subset&lt;2&gt; Input(S,I);<br>
    Input.insert(S,I);<br>
    Input.display(&quot;Input&quot;);<br>
    MP_subset&lt;2&gt; Output(S,O);<br>
    Output.insert(S,O);<br>
    Output.display(&quot;Output&quot;);<br>
    <br>
    //this will be easier with an array??<br>
    MP_data InputVal(Input);<br>
    InputVal(storeA,Input1)=1; InputVal(storeA,Input2)=3;<br>
    InputVal(storeB,Input1)=3; InputVal(storeB,Input2)=3;<br>
    InputVal(storeC,Input1)=4; InputVal(storeC,Input2)=2;<br>
    InputVal(storeD,Input1)=3; InputVal(storeD,Input2)=1;<br>
<br>
    MP_data OutputVal(Output);<br>
    OutputVal(storeA,Output1)=1;<br>
    OutputVal(storeB,Output1)=1.5;<br>
    OutputVal(storeC,Output1)=2;<br>
    OutputVal(storeD,Output1)=1;<br>
<br>
    MP_variable x(I), y(O);<br>
    x.lowerLimit(I)=0;<br>
    y.lowerLimit(O)=0;<br>
<br>
    MP_constraint efficiency(S);<br>
    efficiency(S) = sum(I, InputVal(S, I) * x(I)) &lt;= sum(O,
OutputVal(S, O) * y(O));<br>
<br>
    minimize( (sum(O, OutputVal(storeB, O) * y(O))) - (sum(I,
InputVal(storeB, I) * x(I))));<br>
    <br>
    efficiency.display(&quot;constraints&quot;);<br>
    x.display(&quot;x&quot;);<br>
    y.display(&quot;y&quot;);<br>
<br>
    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   1  0  0<br>
1   1  0  0<br>
2   1  0  0<br>
3   1  0  0<br>
0   2  0  0<br>
1   2  0  0<br>
2   2  0  0<br>
3   2  0  0<br>
0   0  -0  0<br>
1   0  -0  0<br>
2   0  -0  0<br>
3   0  -0  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   0  0<br>
-1   1  -0<br>
-1   2  -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  3  0<br>
constraints<br>
0  -1.79769e+308  0  0  -0<br>
1  -1.79769e+308  0  0  -0<br>
2  -1.79769e+308  0  0  -0<br>
3  -1.79769e+308  0  0  -0<br>
x<br>
0   0<br>
1   0<br>
y<br>
0   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        / Input1, Input2, Output1 /<br>
O(A)   /  Input1, Input2 /<br>
I(A)    / Output1  /<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&#39;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:
&#39;return&#39; : conversion from &#39;size_t&#39; to &#39;int&#39;, possible loss of data<br>
        c:\program files\coin-flopcpp\flopcpp\src\mp_set.hpp(258)
: while compiling class template member function &#39;int
flopc::MP_subset&lt;nbr&gt;::size(void) const&#39;<br>
        with<br>
        [<br>
            nbr=2<br>
        ]<br>
        c:\program
files\coin-flopcpp\flopcpp\examples\dea.cpp(21) : see reference to class
template instantiation &#39;flopc::MP_subset&lt;nbr&gt;&#39; being compiled<br>
        with<br>
        [<br>
            nbr=2<br>
        ]<br>
c:\program files\coin-flopcpp\flopcpp\src\mp_set.hpp(243) : warning C4267:
&#39;initializing&#39; : conversion from &#39;size_t&#39; to &#39;const int&#39;, possible loss of data<br>
        c:\program
files\coin-flopcpp\flopcpp\src\mp_set.hpp(232) : while compiling class template
member function &#39;void flopc::MP_subset&lt;nbr&gt;::insert(const
std::vector&lt;_Ty&gt; &amp;)&#39;<br>
        with<br>
        [<br>
            nbr=2,<br>
            _Ty=int<br>
        ]<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&#39;t compile, I get this error:<br>
<br>
c:\program files\coin-flopcpp\flopcpp\examples\dea.cpp(51) : error C2678:
binary &#39;/&#39; : no operator found which takes a left-hand operand of type
&#39;flopc::MP_expression&#39; (or there is no acceptable conversion)<br>
        c:\program
files\coin-flopcpp\flopcpp\src\mp_constant.hpp(141): could be &#39;flopc::Constant
flopc::operator /(const flopc::Constant &amp;,const flopc::Constant &amp;)&#39;<br>
        c:\program
files\coin-flopcpp\coinutils\src\coinpackedvector.hpp(483):
or       &#39;CoinPackedVector operator /(const
CoinPackedVectorBase &amp;,const CoinPackedVectorBase &amp;)&#39;<br>
        c:\program
files\coin-flopcpp\coinutils\src\coinpackedvector.hpp(583):
or       &#39;CoinPackedVector operator /(const
CoinPackedVectorBase &amp;,double)&#39;<br>
        c:\program
files\coin-flopcpp\coinutils\src\coinpackedvector.hpp(625): or      
&#39;CoinPackedVector operator /(double,const CoinPackedVectorBase &amp;)&#39;<br>
        while trying to match the argument
list &#39;(flopc::MP_expression, flopc::MP_expression)&#39;<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  -1.79769e+308  0  0  -0<br>
1  -1.79769e+308  0  0  -0<br>
2  -1.79769e+308  0  0  -0<br>
3  -1.79769e+308  0  0  -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   0  0<br>
-1   1  -0<br>
-1   2  -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&#39;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</div></div>

</div>

</div>


<br>_______________________________________________<br>
FlopCpp mailing list<br>
<a href="mailto:FlopCpp@list.coin-or.org">FlopCpp@list.coin-or.org</a><br>
<a href="http://list.coin-or.org/mailman/listinfo/flopcpp" target="_blank">http://list.coin-or.org/mailman/listinfo/flopcpp</a><br>
<br></blockquote></div><br>