<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">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="gmail_extra">
<br><br><div class="gmail_quote">On Sat, Sep 14, 2013 at 10:58 PM, Papis Wongchaisuwat <span dir="ltr"><<a href="mailto:papis_31@hotmail.com" target="_blank">papis_31@hotmail.com</a>></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"><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 "symphony.h"</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>> Date: Fri, 13 Sep 2013 23:29:29 -0500<div class="im"><br>> From: <a href="mailto:hennebry@web.cs.ndsu.nodak.edu" target="_blank">hennebry@web.cs.ndsu.nodak.edu</a><br>
> To: <a href="mailto:papis_31@hotmail.com" target="_blank">papis_31@hotmail.com</a><br>> CC: <a href="mailto:symphony@list.coin-or.org" target="_blank">symphony@list.coin-or.org</a><br>> Subject: RE: [Symphony] biobjective problems<br>
> <br></div><div class="im">> On Sat, 14 Sep 2013, Papis Wongchaisuwat wrote:<br>> <br>> > 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>
> <br>> From reading the manual,<br>> I gather one can call sym_explicit_load_problem( ... )<br>> and follow it by calling sym_mc_solve( ... ) .<br>> Is there a reason that you cannot do that?<br>> <br>
> -- <br>
> Michael <a href="mailto:hennebry@web.cs.ndsu.NoDak.edu" target="_blank">hennebry@web.cs.ndsu.NoDak.edu</a><br>> "On Monday, I'm gonna have to tell my kindergarten class,<br>> whom I teach not to run with scissors,<br>
> 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>