Current location - Training Enrollment Network - Mathematics courses - Mathematical modeling of answer
Mathematical modeling of answer
Linear programming model.

Set full-time waiter:

9 ~ 12+ 13 ~ 17:x 1

9 ~ 13+ 14 ~ 17:x2

Part-time waiter:

9~ 13: x3

10~ 14: x4

1 1~ 15: x5

12~ 16: x6

13~ 17: x7

Objective function: min {100 (x1+x2)+40 (x3+x4+X5+X6+X7)}

Constraints:

9~ 10 segment is not less than 4:

x 1+x2+x3 & gt; =4;

10~ 1 1 period shall not be less than 3:

x 1+x2+x3+x4 & gt; =3;

Similarly, you can always write down:

x 1+x2+x3+x4+X5 & gt; =4;

x2+x3+x4+X5+X6 & gt; =6;

x 1+x4+X5+X6+x7 & gt; =5;

x 1+x2+X5+X6+x7 & gt; =6;

x 1+x2+X6+x7 & gt; =8;

x 1+x2+x7 & gt; =8;

Otherwise, the total number of part-time waiters will be limited:

x3+x4+X5+X6+x7 & lt; =3.

Again, note that this is an integer programming, using mathematica to run the following statement:

Linear programming [{ 100, 100, 40, 40, 40,

40}, {{ 1, 1, 1, 0, 0, 0, 0}, { 1, 1, 1, 1, 0, 0, 0}, { 1, 1, 1, 1, 1,

0, 0}, {0, 1, 1, 1, 1, 1, 0}, { 1, 0, 0, 1, 1, 1, 1}, { 1, 1, 0, 0,

1, 1, 1}, { 1, 1, 0, 0, 0, 1, 1}, { 1, 1, 0, 0, 0, 0, 1}, {0,

0, - 1, - 1, - 1, - 1, - 1}}, {4, 3, 4, 6, 5, 6, 8,

8, -3}, automatic, integer]

The results are as follows:

{3, 4, 0, 2, 0, 0, 1}

Corresponding to the values of x 1 to x7, respectively.