9.4 Formulas Terms

The building block of the objective function and the constraints is a formula which specifies the coefficients to the variables. Variables that are not mentioned will auto- matically have a coefficient of zero.

When you are working with the objective function or a simple constraint, the formula term consists of a variable and its associated coefficient, or just a single constant. The coefficient can either be placed in front of the variable or trailing it. These terms are then added together to make a formula.

Examples of formulas:

    200 Shift1ProdA + 400 Shift1ProdB
    50% * 170 Workforce - HoursOvertime
    3x  +  y/3  -  67.33*47% z  +  1.32/(45%+10%)

Terms in structured constraints consist of coefficients, up to eight data vectors, and a decision vector. For example, the following terms for the vector variable Inventory are legal:

   8.8 Inventory
   InvtCost * Inventory
   12%/2 * InvtCost * InvtCount * Inventory

Note that the multiplication performed is a element wise multiplication, not a matrix multiplication. When the vectors being multiplied have the same set of index variables, the result is what you would expect. However, when the index variable sets are not identical, the vectors are expanded and replicated in the missing dimensions.

For example, if Cost and Sales are defined by:

   DATA
      Cost[product] =  (1,2,3);
      Sales[month]  =  (12,16,18,20);

the vectors are first expanded to:

             (1,2,3)              (12,12,12)
   Cost  =   (1,2,3)    Sales =   (16,16,16)
             (1,2,3)              (18,18,18)
             (1,2,3)              (20,20,20)

and then multiplied element by element to obtain:

                    (12, 24, 36)
   Cost * Sales =   (16, 32, 48)
                    (18, 36, 54)
                    (20, 40, 60)

When two or more variables share the same coefficient i.e. the coefficients have a common divisor, you can factor them out using parentheses. This will be explained better in the Parentheses section later in this chapter.

Simple terms are valid in structured constraints and get expanded appropriately. Sums and macros are also valid terms and are discussed in later sections in this chapter.


Back To Top | Maximal Home Page | Table of Contents | Previous Page | Next Page