<div dir="ltr">It looks correct to me (without knowing what the second objective is). SYMPHONY converts all problems to minimization internally, so the negative objective values are just because we don&#39;t check whether the problem was maximization and negate the objective values if it is. This should be easy to change. You can file a ticket and I&#39;ll try to get to it.<br>

<br>Ted<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Sun, Sep 15, 2013 at 12:39 PM, Papis Wongchaisuwat <span dir="ltr">&lt;<a href="mailto:papis_31@hotmail.com" target="_blank">papis_31@hotmail.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">


<div><div dir="ltr">Thank you for a reply.<div>I tried to start from simple problem that I found in presentation online.</div><div><div>vmax [8x1, x2]</div><div>s.t. 7x1 + x2 &lt;= 56</div><div>28x1 + 9x2 &lt;= 252</div>

<div>3x1 + 7x2 &lt;=105</div><div>x1, x2 &gt;=0</div><div><br></div><div>In bicriteria.c, I use</div><div><div class="im"><div>#include &quot;symphony.h&quot;</div><div><br></div><div>int main(int argc, char **argv)</div>

<div>{</div><div><br></div><div>   sym_environment *env = sym_open_environment();</div><div>   sym_parse_command_line(env, argc, argv);</div><div>   sym_load_problem(env);</div><div><br></div></div><div>   sym_set_obj2_coeff(env, 1, 1);</div>

<div><br></div><div>   sym_mc_solve(env);</div><div><br></div><div>   sym_close_environment(env);</div><div><br></div><div>   return(0);</div><div><br></div><div>}</div></div><div><br></div><div>my lp file :</div><div><p>

Maximize <u></u><u></u></p>

<p><span style="font-family:&quot;Courier New&quot;">obj: 8 var_1 + var_2<u></u><u></u></span></p>

<p><span style="font-family:&quot;Courier New&quot;"> </span></p>

<p><span style="font-family:&quot;Courier New&quot;">Subject to <u></u><u></u></span></p>

<p class="MsoNormal"><span style="font-size:10.5pt;line-height:107%;font-family:&quot;Courier New&quot;"> C1: 7 var_1 + var_2 &lt;=
56<u></u><u></u></span></p>

<p class="MsoNormal"><span style="font-size:10.5pt;line-height:107%;font-family:&quot;Courier New&quot;">C2: 28 var_1 + 9 var_2 &lt;= 252<u></u><u></u></span></p>

<p class="MsoNormal"><span style="font-size:10.5pt;line-height:107%;font-family:&quot;Courier New&quot;">C3: 3 var_1+ 7 var_2 &lt;= 105<u></u><u></u></span></p>

<p class="MsoNormal"><span style="font-size:10.5pt;line-height:107%;font-family:&quot;Courier New&quot;">Bound<u></u><u></u></span></p>

<p class="MsoNormal"><span style="font-size:10.5pt;line-height:107%;font-family:&quot;Courier New&quot;">var_1&gt;=0<u></u><u></u></span></p>

<p class="MsoNormal"><span style="font-size:10.5pt;line-height:107%;font-family:&quot;Courier New&quot;">var_2&gt;=0<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:10.5pt;line-height:107%;font-family:&quot;Courier New&quot;">Integer</span></p>

<p class="MsoNormal"><span style="font-size:10.5pt;line-height:107%;font-family:&quot;Courier New&quot;">var_1</span></p><p class="MsoNormal"><span style="font-size:10.5pt;line-height:107%;font-family:&quot;Courier New&quot;">var_2</span></p>



<p class="MsoNormal"><span style="font-size:10.5pt;line-height:107%;font-family:&quot;Courier New&quot;">End <u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:10.5pt;line-height:107%;font-family:&quot;Courier New&quot;"><br>

</span></p><p class="MsoNormal"><span style="font-size:10.5pt;line-height:107%;font-family:&quot;Courier New&quot;">I got incorrect results. </span></p><p class="MsoNormal"><span style="font-size:10.5pt;line-height:107%;font-family:&quot;Courier New&quot;">This is what I got</span></p>

<p class="MsoNormal"><span style="font-size:10.5pt;line-height:107%;font-family:&quot;Courier New&quot;">First Objective: -64.000 Second Objective: 0.000 Range: 0.468750-1.000000</span></p></div><div><span style="font-family:&#39;Courier New&#39;;font-size:14px;line-height:14px">First Objective: -47.000 Second Objective: -15.000 Range: 0.000000-0.468750</span></div>

<div><span style="font-family:&#39;Courier New&#39;;font-size:14px;line-height:14px"><br></span></div><div><font face="Courier New"><span style="font-size:14px;line-height:14px">What did I do wrong?</span></font></div><div>

<font face="Courier New"><span style="font-size:14px;line-height:14px"><br></span></font></div><div><font face="Courier New"><span style="font-size:14px;line-height:14px">Thank you,</span></font></div><div><font face="Courier New"><span style="font-size:14px;line-height:14px">Papis</span></font></div>

<div><span style="font-family:&#39;Courier New&#39;;font-size:14px;line-height:14px"><br></span></div><div><span style="font-family:&#39;Courier New&#39;;font-size:14px;line-height:14px"><br></span></div><br><div><hr>From: ted@Lehigh.EDU<br>

Date: Sun, 15 Sep 2013 12:27:26 -0400<div class="im"><br>Subject: Re: [Symphony] biobjective problems<br></div>To: <a href="mailto:papis_31@hotmail.com" target="_blank">papis_31@hotmail.com</a><br>CC: <a href="mailto:hennebry@web.cs.ndsu.nodak.edu" target="_blank">hennebry@web.cs.ndsu.nodak.edu</a>; <a href="mailto:symphony@list.coin-or.org" target="_blank">symphony@list.coin-or.org</a><div>

<div class="h5"><br><br><div dir="ltr"><div><div><div>sym_set_obj2_coeff(env, i, j) sets the objective function coefficient of variable &quot;i&quot; to value &quot;j&quot; in the second objective, as documented here:<br>

<br><a href="http://www.coin-or.org/SYMPHONY/man-5.5/node176.html" target="_blank">http://www.coin-or.org/SYMPHONY/man-5.5/node176.html</a><br>

<br></div>At the moment, setting the objective coefficients one by one is the only way to specify a second objective through the API. Of course, you can also just directly set the objective function in SYMPHONY&#39;s internal representation of the instance.<br>



<br>I have plans to improve this and to add the ability to specify two objectives through a modeling language, such as GMPL, but I haven&#39;t gotten to it yet.<br><br></div>Cheers,<br><br></div>Ted<br></div><div>

<br><br><div>On Sat, Sep 14, 2013 at 10:58 PM, Papis Wongchaisuwat <span dir="ltr">&lt;<a href="mailto:papis_31@hotmail.com" target="_blank">papis_31@hotmail.com</a>&gt;</span> wrote:<br><blockquote style="border-left:1px #ccc solid;padding-left:1ex">






<div><div dir="ltr"><div style="line-height:21px;color:rgb(68,68,68);font-size:15px">I found  bicriteria.c file in Examples. I tried running with the data set and I got several solutions as I am supposed to get. </div><div style="line-height:21px;color:rgb(68,68,68);font-size:15px">



However, I am not sure whether I got a correct result.</div><div style="line-height:21px;color:rgb(68,68,68);font-size:15px">These are some parts of bicriteria.c file</div><div style="line-height:21px;color:rgb(68,68,68);font-size:15px">



<div>#include &quot;symphony.h&quot;</div><div><br></div><div>int main(int argc, char **argv)</div><div>{</div><div><br></div><div>   sym_environment *env = sym_open_environment();</div><div>   sym_parse_command_line(env, argc, argv);</div>



<div>   sym_load_problem(env);</div><div><br></div><div>   sym_set_obj2_coeff(env, 1, -1);</div><div><br></div><div>   sym_mc_solve(env);</div><div><br></div><div>   sym_close_environment(env);</div><div><br></div><div>   return(0);</div>



<div><br></div><div>}</div><div><br></div><div>#endif</div></div><div style="line-height:21px;color:rgb(68,68,68);font-size:15px"><br></div><div style="line-height:21px;color:rgb(68,68,68);font-size:15px">Does anyone know what <span style="line-height:22px;font-size:12pt">sym_set_obj2_coeff(env, 1, -1) means?  When should I use 1 or -1?</span></div>



<div style="color:rgb(68,68,68)"><span style="line-height:22px">My sample data is a minimization problem.</span></div><div style="color:rgb(68,68,68)"><span style="line-height:22px"><br></span></div><div style="color:rgb(68,68,68)">



<span style="line-height:22px">Thank you,</span></div><div style="color:rgb(68,68,68)"><span style="line-height:22px">Papis</span></div><br><div>&gt; Date: Fri, 13 Sep 2013 23:29:29 -0500<div><br>&gt; From: <a href="mailto:hennebry@web.cs.ndsu.nodak.edu" target="_blank">hennebry@web.cs.ndsu.nodak.edu</a><br>



&gt; To: <a href="mailto:papis_31@hotmail.com" target="_blank">papis_31@hotmail.com</a><br>&gt; CC: <a href="mailto:symphony@list.coin-or.org" target="_blank">symphony@list.coin-or.org</a><br>&gt; Subject: RE: [Symphony] biobjective problems<br>



&gt; <br></div><div>&gt; On Sat, 14 Sep 2013, Papis Wongchaisuwat wrote:<br>&gt; <br>&gt; &gt; I would like to run bi-objective Set cover and Set pack problems. Attached files are some examples that I want to run. MCKP and these problems are quite different. I don&#39;t know how to apply MCKP or either use any other ways to run these problems.<br>



&gt; <br>&gt; From reading the manual,<br>&gt; I gather one can call sym_explicit_load_problem( ... )<br>&gt; and follow it by calling sym_mc_solve( ... ) .<br>&gt; Is there a reason that you cannot do that?<br>&gt; <br>


&gt; -- <br>
&gt; Michael   <a href="mailto:hennebry@web.cs.ndsu.NoDak.edu" target="_blank">hennebry@web.cs.ndsu.NoDak.edu</a><br>&gt; &quot;On Monday, I&#39;m gonna have to tell my kindergarten class,<br>&gt; whom I teach not to run with scissors,<br>



&gt; that my fiance ran me through with a broadsword.&quot;  --  Lily<br></div></div>                                               </div></div>
<br>_______________________________________________<br>
Symphony mailing list<br>
<a href="mailto:Symphony@list.coin-or.org" target="_blank">Symphony@list.coin-or.org</a><br>
<a href="http://list.coin-or.org/mailman/listinfo/symphony" target="_blank">http://list.coin-or.org/mailman/listinfo/symphony</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br>Dr. Ted Ralphs<br>Associate Professor, Lehigh University<br><a href="tel:%28610%29%20628-1280" value="+16106281280" target="_blank">(610) 628-1280</a><br>ted &#39;at&#39; lehigh &#39;dot&#39; edu<br>

<a href="http://coral.ie.lehigh.edu/~ted" target="_blank">coral.ie.lehigh.edu/~ted</a><br>


</div></div></div></div></div>                                               </div></div>
</blockquote></div><br><br clear="all"><br>-- <br>Dr. Ted Ralphs<br>Associate Professor, Lehigh University<br>(610) 628-1280<br>ted &#39;at&#39; lehigh &#39;dot&#39; edu<br><a href="http://coral.ie.lehigh.edu/~ted" target="_blank">coral.ie.lehigh.edu/~ted</a><br>


</div>