[AMPL 13322] multi obj.optimization.

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

[AMPL 13322] multi obj.optimization.

maya-21
Hello sir,

In AMPL can we optimize multi objective optimization (with equality & inequality  constraints) problem ? is there any example for that?.



kind regards

maya.

--
You received this message because you are subscribed to the Google Groups "AMPL Modeling Language" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/ampl.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

RE: [AMPL 13333] multi obj.optimization.

Robert Fourer-2
An AMPL model can have two or more objective functions defined.  However it is up to you to decide what to do with them.  For example you can optimize the first objective, then optimize the second objective subject to the first objective being held at its optimal value; see section 8.3 of the AMPL book (http://ampl.com/BOOK/CHAPTERS/11-linprog.pdf#page=6) for some examples.  Or you can combine the two objectives by minimizing alpha * the first + (1-alpha) * the second, where alpha is a parameter that can be varied between 0 and 1 to get different tradeoffs.  If you are lucky you might find a solution that achieves the optimal value of both objectives at the same time, but in general no such solution exists -- to optimize one objective, you have to allow the other one to take a suboptimal value.

In general, solvers only optimize one objective, so even if your model has several objectives, you will have to decide which objective to use in each optimization run.  The new Gurobi version 7.0 does have some multi-objective options; see the entry for 'multiobj' at http://www.gurobi.com/documentation/7.0/ampl-gurobi/parameters.html, and the related options mentioned in that entry.

Bob Fourer
[hidden email]

=======

From: [hidden email] [mailto:[hidden email]] On Behalf Of Maya Ks
Sent: Saturday, January 7, 2017 3:54 AM
To: [hidden email]
Subject: [AMPL 13322] multi obj.optimization.

In AMPL can we optimize multi objective optimization (with equality & inequality  constraints) problem ? is there any example for that?.


--
You received this message because you are subscribed to the Google Groups "AMPL Modeling Language" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/ampl.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: [AMPL 15285] multi obj.optimization.

vincent gao

Hello Bob,

I just saw this post. I am working on a hierarchical LP problem and would love to leverage multi-objective features of AMPL-Gurobi. However, I am having some difficulties specifying multiple objectives in AMPL. I was wondering if you have some examples?

Many thanks for your time in advance!

On Monday, January 9, 2017 at 10:51:42 AM UTC-6, Robert Fourer wrote:
An AMPL model can have two or more objective functions defined.  However it is up to you to decide what to do with them.  For example you can optimize the first objective, then optimize the second objective subject to the first objective being held at its optimal value; see section 8.3 of the AMPL book (<a href="http://ampl.com/BOOK/CHAPTERS/11-linprog.pdf#page=6" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fampl.com%2FBOOK%2FCHAPTERS%2F11-linprog.pdf%23page%3D6\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGrngNlggN6zWhWtTCKU5KYVS3lAQ&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fampl.com%2FBOOK%2FCHAPTERS%2F11-linprog.pdf%23page%3D6\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGrngNlggN6zWhWtTCKU5KYVS3lAQ&#39;;return true;">http://ampl.com/BOOK/CHAPTERS/11-linprog.pdf#page=6) for some examples.  Or you can combine the two objectives by minimizing alpha * the first + (1-alpha) * the second, where alpha is a parameter that can be varied between 0 and 1 to get different tradeoffs.  If you are lucky you might find a solution that achieves the optimal value of both objectives at the same time, but in general no such solution exists -- to optimize one objective, you have to allow the other one to take a suboptimal value.

In general, solvers only optimize one objective, so even if your model has several objectives, you will have to decide which objective to use in each optimization run.  The new Gurobi version 7.0 does have some multi-objective options; see the entry for 'multiobj' at <a href="http://www.gurobi.com/documentation/7.0/ampl-gurobi/parameters.html" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fwww.gurobi.com%2Fdocumentation%2F7.0%2Fampl-gurobi%2Fparameters.html\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNF39Ssu6pl8wkUh4L_lPhvgmUe9jA&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fwww.gurobi.com%2Fdocumentation%2F7.0%2Fampl-gurobi%2Fparameters.html\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNF39Ssu6pl8wkUh4L_lPhvgmUe9jA&#39;;return true;">http://www.gurobi.com/documentation/7.0/ampl-gurobi/parameters.html, and the related options mentioned in that entry.

Bob Fourer
<a href="javascript:" target="_blank" gdf-obfuscated-mailto="3t16t13_EQAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">am...@...

=======

From: <a href="javascript:" target="_blank" gdf-obfuscated-mailto="3t16t13_EQAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">am...@... [mailto:<a href="javascript:" target="_blank" gdf-obfuscated-mailto="3t16t13_EQAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">am...@...] On Behalf Of Maya Ks
Sent: Saturday, January 7, 2017 3:54 AM
To: <a href="javascript:" target="_blank" gdf-obfuscated-mailto="3t16t13_EQAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">am...@...
Subject: [AMPL 13322] multi obj.optimization.

In AMPL can we optimize multi objective optimization (with equality & inequality  constraints) problem ? is there any example for that?.


--
You received this message because you are subscribed to the Google Groups "AMPL Modeling Language" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/ampl.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

RE: [AMPL 15293] multi obj.optimization.

Robert Fourer-2
For more examples of models that have multiple objectives, see section 2.3 here,

   http://www.4er.org/CourseNotes/Book%20A/A-I.pdf#page=24

and the example in this presentation,

   http://ampl.com/MEETINGS/TALKS/2017_10_Houston_MB69.pdf

which introduces a second objective on slide 23 and has an example of a script trading off the two objectives beginning on slide 33.  For multiple objectives with Gurobi, use the options multiobj, multiobjmethod, and multiobjpre and associated user-defined suffixes described in http://www.gurobi.com/documentation/7.5/ampl-gurobi/parameters.html; reply if you need specific help with any of these.  A good description of how Gurobi uses priorities and weights for multi-objective optimization is given in this posting on the Gurobi user forum: https://groups.google.com/d/msg/gurobi/Wlem8kWNQ2A/8lx8RhBLBgAJ.

Bob Fourer
[hidden email]

=======

From: [hidden email] [mailto:[hidden email]] On Behalf Of vincent gao
Sent: Sunday, December 3, 2017 10:18 PM
To: AMPL Modeling Language
Subject: Re: [AMPL 15285] multi obj.optimization.

I just saw this post. I am working on a hierarchical LP problem and would love to leverage multi-objective features of AMPL-Gurobi. However, I am having some difficulties specifying multiple objectives in AMPL. I was wondering if you have some examples?


--
You received this message because you are subscribed to the Google Groups "AMPL Modeling Language" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/ampl.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: [AMPL 15304] multi obj.optimization.

vincent gao
Thanks a lot! This is really helpful. Now I think I understand how this should work.
I might need some help with the user-defined suffixes. I wrote the code below following http://users.iems.northwestern.edu/~4er/amplweb/NEW/suffixes.html, which does not seem to work:


suffix objpriority >= 0 integer;

minimize Obj1: var1;
minimize Obj2: var2;

let Obj1.objpriority := 10;
let Obj2.objpriority := 2;

It seems from the solution that Obj1 and Obj2 have the same priority, and a solution of minimized Obj1 + Obj2 is returned. Do I have a syntax error?

Many thanks for your help again!


On Monday, December 4, 2017 at 5:49:05 PM UTC-6, Robert Fourer wrote:
For more examples of models that have multiple objectives, see section 2.3 here,

   <a href="http://www.4er.org/CourseNotes/Book%20A/A-I.pdf#page=24" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fwww.4er.org%2FCourseNotes%2FBook%2520A%2FA-I.pdf%23page%3D24\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHQaqIlyyr6GahdIWGjRacxXh9eSQ&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fwww.4er.org%2FCourseNotes%2FBook%2520A%2FA-I.pdf%23page%3D24\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHQaqIlyyr6GahdIWGjRacxXh9eSQ&#39;;return true;">http://www.4er.org/CourseNotes/Book%20A/A-I.pdf#page=24

and the example in this presentation,

   <a href="http://ampl.com/MEETINGS/TALKS/2017_10_Houston_MB69.pdf" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fampl.com%2FMEETINGS%2FTALKS%2F2017_10_Houston_MB69.pdf\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEn2MkEZjn_IYwSqoqHUtTvWm1CrA&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fampl.com%2FMEETINGS%2FTALKS%2F2017_10_Houston_MB69.pdf\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEn2MkEZjn_IYwSqoqHUtTvWm1CrA&#39;;return true;">http://ampl.com/MEETINGS/TALKS/2017_10_Houston_MB69.pdf

which introduces a second objective on slide 23 and has an example of a script trading off the two objectives beginning on slide 33.  For multiple objectives with Gurobi, use the options multiobj, multiobjmethod, and multiobjpre and associated user-defined suffixes described in <a href="http://www.gurobi.com/documentation/7.5/ampl-gurobi/parameters.html" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fwww.gurobi.com%2Fdocumentation%2F7.5%2Fampl-gurobi%2Fparameters.html\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEFexgkXMhq8aNVLTu30SU87Sf7Qg&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fwww.gurobi.com%2Fdocumentation%2F7.5%2Fampl-gurobi%2Fparameters.html\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEFexgkXMhq8aNVLTu30SU87Sf7Qg&#39;;return true;">http://www.gurobi.com/documentation/7.5/ampl-gurobi/parameters.html; reply if you need specific help with any of these.  A good description of how Gurobi uses priorities and weights for multi-objective optimization is given in this posting on the Gurobi user forum: <a href="https://groups.google.com/d/msg/gurobi/Wlem8kWNQ2A/8lx8RhBLBgAJ" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/msg/gurobi/Wlem8kWNQ2A/8lx8RhBLBgAJ&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/msg/gurobi/Wlem8kWNQ2A/8lx8RhBLBgAJ&#39;;return true;">https://groups.google.com/d/msg/gurobi/Wlem8kWNQ2A/8lx8RhBLBgAJ.

Bob Fourer
<a href="javascript:" target="_blank" gdf-obfuscated-mailto="dPWgKIRcAwAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">am...@...

=======

From: <a href="javascript:" target="_blank" gdf-obfuscated-mailto="dPWgKIRcAwAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">am...@... [mailto:<a href="javascript:" target="_blank" gdf-obfuscated-mailto="dPWgKIRcAwAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">am...@...] On Behalf Of vincent gao
Sent: Sunday, December 3, 2017 10:18 PM
To: AMPL Modeling Language
Subject: Re: [AMPL 15285] multi obj.optimization.

I just saw this post. I am working on a hierarchical LP problem and would love to leverage multi-objective features of AMPL-Gurobi. However, I am having some difficulties specifying multiple objectives in AMPL. I was wondering if you have some examples?


--
You received this message because you are subscribed to the Google Groups "AMPL Modeling Language" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/ampl.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

RE: [AMPL 15307] multi obj.optimization.

Robert Fourer-2

There is a possibility that the optimal solution with the prioritized objectives is the same as the optimal solution for the summed objectives, but you can easily test this.  The prioritized objectives can be done in AMPL -- without recourse to the Gurobi multi-objective feature -- by use of commands like these:

   param Obj1val;
   subj to Obj1fix: var1 = Obj1val;

   drop Obj1fix;
   objective Obj1;
   solve;

   restore Obj1fix;
   let Obj1val := Obj1;
   objective Obj2;
   solve;

Then you can compare the result that you get after the second solve, to the result that you get from

   minimize Obj3: var1 + var2;

   drop Obj1fix;
   objective Obj3;
   solve;

If the two results are different, then if you can provide us with your example model and data, we will reproduce the problem and get it fixed.

Bob Fourer
[hidden email]
  

From: [hidden email] [mailto:[hidden email]] On Behalf Of vincent gao
Sent: Tuesday, December 5, 2017 4:41 PM
To: AMPL Modeling Language
Subject: Re: [AMPL 15304] multi obj.optimization.

 

Thanks a lot! This is really helpful. Now I think I understand how this should work.

I might need some help with the user-defined suffixes. I wrote the code below following http://users.iems.northwestern.edu/~4er/amplweb/NEW/suffixes.html, which does not seem to work:

 

 

suffix objpriority >= 0 integer;

 

minimize Obj1: var1;

minimize Obj2: var2;

 

let Obj1.objpriority := 10;

let Obj2.objpriority := 2;

 

It seems from the solution that Obj1 and Obj2 have the same priority, and a solution of minimized Obj1 + Obj2 is returned. Do I have a syntax error?

 

Many thanks for your help again!

 


On Monday, December 4, 2017 at 5:49:05 PM UTC-6, Robert Fourer wrote:

For more examples of models that have multiple objectives, see section 2.3 here,

   http://www.4er.org/CourseNotes/Book%20A/A-I.pdf#page=24

and the example in this presentation,

   http://ampl.com/MEETINGS/TALKS/2017_10_Houston_MB69.pdf

which introduces a second objective on slide 23 and has an example of a script trading off the two objectives beginning on slide 33.  For multiple objectives with Gurobi, use the options multiobj, multiobjmethod, and multiobjpre and associated user-defined suffixes described in http://www.gurobi.com/documentation/7.5/ampl-gurobi/parameters.html; reply if you need specific help with any of these.  A good description of how Gurobi uses priorities and weights for multi-objective optimization is given in this posting on the Gurobi user forum: https://groups.google.com/d/msg/gurobi/Wlem8kWNQ2A/8lx8RhBLBgAJ.

Bob Fourer
<a href="javascript:" target="_blank">am...@...

=======

From: <a href="javascript:" target="_blank">am...@... [mailto:<a href="javascript:" target="_blank">am...@...] On Behalf Of vincent gao
Sent: Sunday, December 3, 2017 10:18 PM
To: AMPL Modeling Language
Subject: Re: [AMPL 15285] multi obj.optimization.

I just saw this post. I am working on a hierarchical LP problem and would love to leverage multi-objective features of AMPL-Gurobi. However, I am having some difficulties specifying multiple objectives in AMPL. I was wondering if you have some examples?

--
You received this message because you are subscribed to the Google Groups "AMPL Modeling Language" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/ampl.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "AMPL Modeling Language" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/ampl.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: [AMPL 15310] multi obj.optimization.

vincent gao
Hi Bob,

Thanks a lot for your suggestion!

Attached please find my AMPL test model based on the Python example for multiple-objective (http://www.gurobi.com/documentation/7.5/examples/multiobj_py.html#subsubsection:multiobj.py) and suggestions in this discussion (https://groups.google.com/forum/#!msg/gurobi/Wlem8kWNQ2A/8lx8RhBLBgAJ). I simplified it to two objectives and adjusted coefficients so the solutions would be different if we prioritize obj1, prioritize obj2, or maximize the summed objectives.

I followed your suggestion to prioritize objectives in AMPL, and it works as expected. However, when I used the Gurobi multi-objective feature, the solution does not change as I change priority between obj1 vs obj2.



On Wednesday, December 6, 2017 at 10:02:55 AM UTC-6, Robert Fourer wrote:

There is a possibility that the optimal solution with the prioritized objectives is the same as the optimal solution for the summed objectives, but you can easily test this.  The prioritized objectives can be done in AMPL -- without recourse to the Gurobi multi-objective feature -- by use of commands like these:

   param Obj1val;
   subj to Obj1fix: var1 = Obj1val;

   drop Obj1fix;
   objective Obj1;
   solve;

   restore Obj1fix;
   let Obj1val := Obj1;
   objective Obj2;
   solve;

Then you can compare the result that you get after the second solve, to the result that you get from

   minimize Obj3: var1 + var2;

   drop Obj1fix;
   objective Obj3;
   solve;

If the two results are different, then if you can provide us with your example model and data, we will reproduce the problem and get it fixed.

Bob Fourer
<a onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;" href="javascript:" target="_blank" rel="nofollow" gdf-obfuscated-mailto="WKLR51fKAwAJ">am...@...
  

From: <a onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;" href="javascript:" target="_blank" rel="nofollow" gdf-obfuscated-mailto="WKLR51fKAwAJ">am...@... [mailto:<a onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;" href="javascript:" target="_blank" rel="nofollow" gdf-obfuscated-mailto="WKLR51fKAwAJ">am...@...] On Behalf Of vincent gao
Sent: Tuesday, December 5, 2017 4:41 PM
To: AMPL Modeling Language
Subject: Re: [AMPL 15304] multi obj.optimization.

 

Thanks a lot! This is really helpful. Now I think I understand how this should work.

I might need some help with the user-defined suffixes. I wrote the code below following <a onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fusers.iems.northwestern.edu%2F~4er%2Famplweb%2FNEW%2Fsuffixes.html\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFGsIeJnBnEya5KGSrRZ3G2aADD4Q&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fusers.iems.northwestern.edu%2F~4er%2Famplweb%2FNEW%2Fsuffixes.html\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFGsIeJnBnEya5KGSrRZ3G2aADD4Q&#39;;return true;" href="http://users.iems.northwestern.edu/~4er/amplweb/NEW/suffixes.html" target="_blank" rel="nofollow">http://users.iems.northwestern.edu/~4er/amplweb/NEW/suffixes.html, which does not seem to work:

 

 

suffix objpriority >= 0 integer;

 

minimize Obj1: var1;

minimize Obj2: var2;

 

let Obj1.objpriority := 10;

let Obj2.objpriority := 2;

 

It seems from the solution that Obj1 and Obj2 have the same priority, and a solution of minimized Obj1 + Obj2 is returned. Do I have a syntax error?

 

Many thanks for your help again!

 


On Monday, December 4, 2017 at 5:49:05 PM UTC-6, Robert Fourer wrote:

For more examples of models that have multiple objectives, see section 2.3 here,

   <a onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fwww.4er.org%2FCourseNotes%2FBook%2520A%2FA-I.pdf%23page%3D24\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHQaqIlyyr6GahdIWGjRacxXh9eSQ&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fwww.4er.org%2FCourseNotes%2FBook%2520A%2FA-I.pdf%23page%3D24\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHQaqIlyyr6GahdIWGjRacxXh9eSQ&#39;;return true;" href="http://www.4er.org/CourseNotes/Book%20A/A-I.pdf#page=24" target="_blank" rel="nofollow">http://www.4er.org/CourseNotes/Book%20A/A-I.pdf#page=24

and the example in this presentation,

   <a onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fampl.com%2FMEETINGS%2FTALKS%2F2017_10_Houston_MB69.pdf\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEn2MkEZjn_IYwSqoqHUtTvWm1CrA&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fampl.com%2FMEETINGS%2FTALKS%2F2017_10_Houston_MB69.pdf\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEn2MkEZjn_IYwSqoqHUtTvWm1CrA&#39;;return true;" href="http://ampl.com/MEETINGS/TALKS/2017_10_Houston_MB69.pdf" target="_blank" rel="nofollow">http://ampl.com/MEETINGS/TALKS/2017_10_Houston_MB69.pdf

which introduces a second objective on slide 23 and has an example of a script trading off the two objectives beginning on slide 33.  For multiple objectives with Gurobi, use the options multiobj, multiobjmethod, and multiobjpre and associated user-defined suffixes described in <a onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fwww.gurobi.com%2Fdocumentation%2F7.5%2Fampl-gurobi%2Fparameters.html\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEFexgkXMhq8aNVLTu30SU87Sf7Qg&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fwww.gurobi.com%2Fdocumentation%2F7.5%2Fampl-gurobi%2Fparameters.html\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEFexgkXMhq8aNVLTu30SU87Sf7Qg&#39;;return true;" href="http://www.gurobi.com/documentation/7.5/ampl-gurobi/parameters.html" target="_blank" rel="nofollow">http://www.gurobi.com/documentation/7.5/ampl-gurobi/parameters.html; reply if you need specific help with any of these.  A good description of how Gurobi uses priorities and weights for multi-objective optimization is given in this posting on the Gurobi user forum: <a onmousedown="this.href=&#39;https://groups.google.com/d/msg/gurobi/Wlem8kWNQ2A/8lx8RhBLBgAJ&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/msg/gurobi/Wlem8kWNQ2A/8lx8RhBLBgAJ&#39;;return true;" href="https://groups.google.com/d/msg/gurobi/Wlem8kWNQ2A/8lx8RhBLBgAJ" target="_blank" rel="nofollow">https://groups.google.com/d/msg/gurobi/Wlem8kWNQ2A/8lx8RhBLBgAJ.

Bob Fourer
[hidden email]

=======

From: [hidden email] [mailto:[hidden email]] On Behalf Of vincent gao
Sent: Sunday, December 3, 2017 10:18 PM
To: AMPL Modeling Language
Subject: Re: [AMPL 15285] multi obj.optimization.

I just saw this post. I am working on a hierarchical LP problem and would love to leverage multi-objective features of AMPL-Gurobi. However, I am having some difficulties specifying multiple objectives in AMPL. I was wondering if you have some examples?

--
You received this message because you are subscribed to the Google Groups "AMPL Modeling Language" group.
To unsubscribe from this group and stop receiving emails from it, send an email to <a onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;" href="javascript:" target="_blank" rel="nofollow" gdf-obfuscated-mailto="WKLR51fKAwAJ">ampl+uns...@googlegroups.com.
To post to this group, send email to <a onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;" href="javascript:" target="_blank" rel="nofollow" gdf-obfuscated-mailto="WKLR51fKAwAJ">am...@....
Visit this group at <a onmousedown="this.href=&#39;https://groups.google.com/group/ampl&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/group/ampl&#39;;return true;" href="https://groups.google.com/group/ampl" target="_blank" rel="nofollow">https://groups.google.com/group/ampl.
For more options, visit <a onmousedown="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;" href="https://groups.google.com/d/optout" target="_blank" rel="nofollow">https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "AMPL Modeling Language" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/ampl.
For more options, visit https://groups.google.com/d/optout.

test_multi.mod (2K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

RE: [AMPL 15354] multi obj.optimization.

Robert Fourer-2
We have posted an updated gurobi.exe which addresses the problem you reported with multiple objectives in Gurobi.
 
Bob Fourer
[hidden email]

=======

From: [hidden email] [mailto:[hidden email]] On Behalf Of vincent gao
Sent: Wednesday, December 6, 2017 11:25 AM
To: AMPL Modeling Language
Subject: Re: [AMPL 15310] multi obj.optimization.

Attached please find my AMPL test model based on the Python example for multiple-objective (http://www.gurobi.com/documentation/7.5/examples/multiobj_py.html#subsubsection:multiobj.py) and suggestions in this discussion (https://groups.google.com/forum/#!msg/gurobi/Wlem8kWNQ2A/8lx8RhBLBgAJ). I simplified it to two objectives and adjusted coefficients so the solutions would be different if we prioritize obj1, prioritize obj2, or maximize the summed objectives.

I followed your suggestion to prioritize objectives in AMPL, and it works as expected. However, when I used the Gurobi multi-objective feature, the solution does not change as I change priority between obj1 vs obj2.


--
You received this message because you are subscribed to the Google Groups "AMPL Modeling Language" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/ampl.
For more options, visit https://groups.google.com/d/optout.