<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><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>#include "symphony.h"</div><div><br></div><div>int main(int argc, char **argv)</div><div>{</div><div><br></div><div>&nbsp; &nbsp;sym_environment *env = sym_open_environment();</div><div>&nbsp; &nbsp;sym_parse_command_line(env, argc, argv);</div><div>&nbsp; &nbsp;sym_load_problem(env);</div><div><br></div><div>&nbsp; &nbsp;sym_set_obj2_coeff(env, 1, 1);</div><div><br></div><div>&nbsp; &nbsp;sym_mc_solve(env);</div><div><br></div><div>&nbsp; &nbsp;sym_close_environment(env);</div><div><br></div><div>&nbsp; &nbsp;return(0);</div><div><br></div><div>}</div></div><div><br></div><div>my lp file :</div><div><p class="MsoPlainText">Maximize <o:p></o:p></p>

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

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

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

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

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

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

<p class="MsoNormal"><span style="font-size:10.5pt;line-height:107%;font-family:
&quot;Courier New&quot;">var_2&gt;=0<o:p></o:p></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&nbsp;<o:p></o:p></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.&nbsp;</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: 'Courier New'; 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: 'Courier New'; 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: 'Courier New'; font-size: 14px; line-height: 14px;"><br></span></div><div><span style="font-family: 'Courier New'; font-size: 14px; line-height: 14px;"><br></span></div><br><div><hr id="stopSpelling">From: ted@Lehigh.EDU<br>Date: Sun, 15 Sep 2013 12:27:26 -0400<br>Subject: Re: [Symphony] biobjective problems<br>To: papis_31@hotmail.com<br>CC: hennebry@web.cs.ndsu.nodak.edu; symphony@list.coin-or.org<br><br><div dir="ltr"><div><div><div>sym_set_obj2_coeff(env, i, j) sets the objective function coefficient of variable "i" to value "j" 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'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't gotten to it yet.<br><br></div>Cheers,<br><br></div>Ted<br></div><div class="ecxgmail_extra">

<br><br><div class="ecxgmail_quote">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 class="ecxgmail_quote" 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 &nbsp;bicriteria.c file in Examples. I tried running with the data set and I got several solutions as I am supposed to get.&nbsp;</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 "symphony.h"</div><div><br></div><div>int main(int argc, char **argv)</div><div>{</div><div><br></div><div>&nbsp; &nbsp;sym_environment *env = sym_open_environment();</div><div>&nbsp; &nbsp;sym_parse_command_line(env, argc, argv);</div>

<div>&nbsp; &nbsp;sym_load_problem(env);</div><div><br></div><div>&nbsp; &nbsp;sym_set_obj2_coeff(env, 1, -1);</div><div><br></div><div>&nbsp; &nbsp;sym_mc_solve(env);</div><div><br></div><div>&nbsp; &nbsp;sym_close_environment(env);</div><div><br></div><div>&nbsp; &nbsp;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&nbsp;<span style="line-height:22px;font-size:12pt;">sym_set_obj2_coeff(env, 1, -1) means? &nbsp;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 class="ecxim"><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 class="ecxim">&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'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; "On Monday, I'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."  --  Lily<br></div></div>                                               </div></div>
<br>_______________________________________________<br>
Symphony mailing list<br>
<a href="mailto:Symphony@list.coin-or.org">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>(610) 628-1280<br>ted 'at' lehigh 'dot' edu<br><a href="http://coral.ie.lehigh.edu/~ted" target="_blank">coral.ie.lehigh.edu/~ted</a><br>


</div></div></div>                                               </div></body>
</html>