-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
58 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
.. _multiple-objectives: | ||
|
||
|
||
Multiple objectives | ||
---------------------------------- | ||
|
||
To consider multiple objectives in an AMPL model, use | ||
:ref:`solver option <solver-options>` ``obj:multi``. | ||
Otherwise, only the 1st objective is considered | ||
(or any objective specified by ``obj:no``.) | ||
|
||
.. code-block:: ampl | ||
minimize total_cost {s in STORE}: | ||
sum {j in FOOD} cost[s,j] * Buy[j]; | ||
minimize total_number: sum {j in FOOD} Buy[j]; | ||
See the | ||
:ref:`Multi-objective AMPL Colab notebooks <https://colab.ampl.com/tags/multiple-objectives.html>` | ||
for examples. | ||
|
||
|
||
Blended objectives | ||
************************************************ | ||
|
||
By default, all objectives are blended together | ||
(summed up with the corresponding signs.) | ||
Suffixes ``.objweight`` can be used to change the individual weights | ||
and objective senses, according to the option ``obj:multi:weight``. | ||
|
||
|
||
Lexicographical objectives | ||
******************************************************** | ||
|
||
To apply hierarchical optimization, use suffix ``.objpriority``, | ||
as described in the ``obj:multi`` option description. | ||
|
||
.. code-block:: ampl | ||
maximize ReverseSeniority {e in 1..2, i in I: E[i]==e}: | ||
sum {t in V[i]: Pr[i, t]==0} | ||
S[i] * x[i, t] | ||
suffix objpriority (2-e)*S_range + 1 + S[i] - min {j in I} S[j]; | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters