# Linear modeling

Contenus

## Linear modeling

Let us take again the bases of the linear modelization within the framework of linear problem. The steps to follow are as follows:

1. What are the variables? their type can be integer, float or binary.
2. What are the constraints? since we are in linear modeling, the variables are isolated (that is to say that only a coefficient can modify the variables, first order operations such as addition and subtraction relate the variables).
3. What is the objective function? it can be a minimization or a maximization; since we are in linear modeling, the variables are isolated.
4. The problem of complexity and solution method will not be discussed in this chapter.

## Example 1

An industrialist has three plants suitable for the manufacture of two products. Each batch of product earns him a certain amount, and he knows the number of hours needed to manufacture each type of batch in his factories.

The industrialist wanting to maximize his profit, it is therefore necessary to find the best possible production.

Let us set decision variables:

• x1 = the number of batches of product 1
• x2 = the number of batches of product 2

Let us set the constraints:

• x1 ≤ 4 (second row of the table)
• 2 x2 ≤ 12 (third row of the table)
• 3 x1 + 2 x_2 ≤ 18 (fourth row of the table)
• x1 ≥ 0 and x2 ≥ 0 (the number of batches is always positive or zero)

Let us set the objective function:

• z = total profit (in thousands of euros)
• z = 3 x1 + 5 x2 (from the last row of the table)
• max z, i.e. we are looking for the maximum value that z can take

Which gives the mathematical model next :

This can be represented from a graphical point of view by (the choice space is in gray):

## Example 2

Now that the industrialist knows how to optimize his profit, he is trying to minimize his expenses. The latter consist solely of employees' wages and working hours. The manufacturer to estimate the minimum number of employees (MinEmp) to be assigned during each period of the day. Each employee must work shifts in order to maximize his presence time, a day has four shifts and these require special remuneration. All the data is described in the following table:

Let us set decision variables:

• x1= the number of employees on the first shift
• x2= the number of employees on the second shift
• x3= the number of employees on the third shift
• x4= the number of employees on the fourth shift
• x5= the number of employees on the fifth shift

Let us set the constraints:

• x≥ 48 (second row of the table)
• x+ x≥ 79 (third row of the table)
• etc.

Let us set the objective function:

• Z = the total cost
• Z = 170 x+ 160 x+ 175 x3+ 180 x4+ 195 x(from the last row of the table)
• min Z, i.e. we are looking for the minimum value that Z can take

Which gives the following mathematical model: FR FR EN ES