> 
> I'm not sure, if I correctyl understood the second way. When I try to
> add a new integer var:
> var Z{a in Art, s in Supp}, integer, >= 0;
> 
> 
> 
> and in goal function try to minimize sume of order cost + delivery
> cost:
> minimize goal: sum{a in Art,s in Supp} ((OrdQty[a,s] * Prices[a,s]) +
> Z[a,s]);
> 
> 
> I'm not sure how to calculate the Z elements with the formula
> Z[a,s] = (ceil(OrdQty[a,s]/ArtPackQty[a])*DeliveryCost[a,s]);  /* how
> to model it in the file? */
> 
> 
> 
> Is it that what you suggested, or I don't understand it ?
> 

I mean the following:

s.t. foo{a in Art, s in Supp} : Z[a,s] >= OrdQty[a,s]/ArtPackQty[a];
/* due to minimization you may think this inequality as equality
   Z[a,s] = ceil(OrdQty[a,s]/ArtPackQty[a]) */

minimize goal: sum{a in Art,s in Supp} ((OrdQty[a,s] * Prices[a,s])+
        (Z[a,s]*DeliveryCost[a,s]);




_______________________________________________
Help-glpk mailing list
Help-glpk@gnu.org
https://lists.gnu.org/mailman/listinfo/help-glpk

Reply via email to