The objective in this model is to maximize the total profit contribution. This is computed using the following expression:

[OBJECTIVE] MAX =

@SUM( FINGOOD: PRICE * BATCH) -

 @SUM( RAWMAT( R): COST( R) *

  @SUM( FINGOOD( F): USED( R, F)));

Total profit, of course, is total revenue minus total expenses. Total revenue is the sum over the finished goods of the price of each finished good multiplied by the batch size of each finished good or, in LINGO syntax :

@SUM( FINGOOD: PRICE * BATCH)

Total expenses are computed by taking the sum over the raw materials of the price of the raw material multiplied by the amount of each raw material used. This is computed with the expression:

@SUM( RAWMAT( R): COST( R) *

    @SUM( FINGOOD( F): USED( R, F))