AMPL objective function

21 views
Skip to first unread message

Diego André Sáenz Peña

unread,
Jan 11, 2018, 2:58:00 PM1/11/18
to am...@googlegroups.com
Hi Bob,

I found your email on a google group question: https://groups.google.com/forum/#!topic/ampl/eq3UADMUEaU. And mine is somehow similiar.

I am trying to reduce the landed cost from multiple suppliers to multiple customers, which combines cost of goods, tranportation cost and duty cost.

How do I code more multiple costs to be optimized? I see on pdfs and tutorials just one cost minimization for example:

Imágenes integradas 1

This is my objective function:
Imágenes integradas 2

and I coded:

minimize total_cost: sum {j in 1..J, k in 1..K, p in 1..P, b in 1..B, n in 1..N, t in 1..T} costFOB[p, j, k]*xpb[j,k,p,b,n,t];

How do I include in the above equation the international freight cost?

Hopefully I explained myself!

Thank you!!!




ptiwari

unread,
Jan 11, 2018, 3:20:15 PM1/11/18
to AMPL Modeling Language
You can define weight for each objective and combine all objectives in your objective function. Say you have two objectives then

param w1 := 0.5;
param w2 := 0.5;

minimize total_cost: w1* sum{..} + w2* sum{...} ;

You can change the value of w1 and w2 to give one objective more emphasis than others. 

Thanks,
Paras
Reply all
Reply to author
Forward
0 new messages