Sunteți pe pagina 1din 6

HOMEWORK 1

Q4)
In this problem we defined 13 variables which are representing the
vegetable, meat and desert types. Our objection function is minimizing the
total cost with using these foods. Minimal requirements of carbohydrates,
vitamins, protein, and fats per meal were respectively 5, 10, 10, and 2. In
this case we calculated usage of the foods with their cost/serving.

Min Z = 0.1 X1 + 0.12 X2 + 0.13 X3 + 0.09 X4 + 0.1 X5 + 0.07 X6 + 0.7 X7


+ 1.2 X8 + 0.63 X9 + 0.28 X10 + 0.42 X11 + 0.15 X12 + 0.12 X13

S.T
X1 + X2 + X3 + 2 X4 + 4 X5 + 5 X6 + 2 X7 + 3 X8 + 3 X9 + X10 + X11 + X12 +
X13 5
3 X1 + 5 X2 + 5 X3 + 6 X4 + 2 X5 + X6 + X7 + 8 X8 + 6 X9 + 3 X10 + 2X11
10
X1 + 2 X2 + X3 + X4 + X5 + X6 +3 X7 + 5 X8 + 6 X9 + X10 10
2 X4 + X5 + X6 + X7 + 2 X8 + X9 2
X1 , X2 , X3 , X4 1
X1 , X2 , X3 , X4 >0
We wrote the code in Lindo although we write > for our last constraint ,
Lindo write its model like >= . So some foods usages are equal zero.
In this situation our Z value is 0.9000000
Reduced costs are respectively
X3 , X7 , X8 , X10 , X11 ,X12 , X13 ={0.025,0.385,0.67,0.175,0.42,0.15,0.12}
If we increase these variables objective function will increase by 1 unit.

Ranges in which the basis is unchanged:


Objective Coefficient Ranges:
Current

Allowable

Variable

Coefficient

Increase

FOOD( 1)

0.1000000

0.5000000E-02

FOOD( 2)

0.1200000

0.9000000E-01

FOOD( 3)

0.1300000

FOOD( 4)

0.9000000E-01

0.1500000E-01

FOOD( 5)

0.1000000

0.5000000E-02

FOOD( 6)

0.7000000E-01

0.3500000E-01

FOOD( 7)

0.7000000

INFINITY

FOOD( 8)

1.200000

INFINITY

FOOD( 9)

0.6300000

0.1500000

FOOD( 10)

0.2800000

INFINITY

FOOD( 11)

0.4200000

INFINITY

FOOD( 12)

0.1500000

INFINITY

FOOD( 13)

0.1200000

INFINITY

Allowable
Decrease
INFINITY
INFINITY
0.2500000E-01
INFINITY
INFINITY
INFINITY
0.3850000
0.6750000
0.3000000E-01
0.1750000
0.4200000
0.1500000
0.1200000

INFINITY

Righthand Side Ranges:


Allowable
Decrease
INFINITY
INFINITY
4.000000
INFINITY
INFINITY
INFINITY
INFINITY
INFINITY
INFINITY

Current

Allowable

Row

RHS

Increase

5.000000

10.00000

10.00000

11.00000

10.00000

2.000000

2.000000

2.666667

0.000000

1.000000

0.000000

1.000000

0.000000

0.000000

0.000000

1.000000

10

0.000000

1.000000

INFINITY
INFINITY
INFINITY
INFINITY
INFINITY
INFINITY
INFINITY
INFINITY
1.000000
1.000000
1.000000
1.000000
1.000000
1.000000
1.000000
1.000000
0.3333333
1.000000
1.000000
1.000000
1.000000

11

0.000000

1.000000

12

0.000000

0.000000

13

0.000000

0.000000

14

0.000000

0.6666667

15

0.000000

0.000000

16

0.000000

0.000000

17

0.000000

0.000000

18

0.000000

0.000000

19

1.000000

4.000000

20

1.000000

2.000000

21

1.000000

INFINITY

22

1.000000

4.000000

23

1.000000

4.000000

24

1.000000

4.000000

25

1.000000

INFINITY

26

1.000000

INFINITY

27

1.000000

INFINITY

28

1.000000

INFINITY

29

1.000000

INFINITY

30

1.000000

INFINITY

31

1.000000

INFINITY

Q5)
In this problem we defined 12 variables representing which products will
produce in which machine. Our objection function is minimizing the total
production cost with using hour restrictions. We already know minimal
requirements of products and maximum available machine hours.

Min Z = 4 X11 + 4 X12 + 5 X13 + 7 X14 + 3 X21 + 7 X22 + 5 X23 + 6 X24 + 12 X31
+ 10 X32 + 8 X33 + 11 X34
S.T
X11 + X12 + X13 + X14 4000
X21 + X22 + X23 + X24 5000
X31 + X32 + X33 + X34 3000

0.3 X11 +0.2 X21 + 0.8 X31 1500


0.25 X12 + 0.3 X22 +0.6 X32 1200
0.2 X13 + 0.2 X23 + 0.6 X33 1500
0.2 X14 + 0.25 X24 + 0.5 X34 2000

In this situation our Z value is 56000.00

Produ
ct1
Produ
ct2
Produ
ct3
1667
2333
5000
500
2500

Machi
ne1
1666,
667

Machi
ne2
2333,
333

Machi
ne3

Machi
ne4

5000

500

2500

units
units
units
units
units

Product1
Product1
Product2
Product3
Product3

should
should
should
should
should

produce
produce
produce
produce
produce

Reduced costs are respectively

in
in
in
in
in

Machine
Machine
Machine
Machine
Machine

1
2
1
2
3

X13 , X14 , X22 , X23 , X24 ,X31 , X34 ={ 1.67,3.00,4.00,2.67, 3.00,2.00,1.00}


If we increase these variables objective function will increase by 1 unit.

Ranges in which the basis is unchanged:


Objective Coefficient Ranges:
Current

Allowable

Variable

Coefficient

Increase

X( 1, 1)

4.000000

0.000000

X( 1, 2)

4.000000

1.666667

X( 1, 3)

5.000000

INFINITY

X( 1, 4)

7.000000

INFINITY

X( 2, 1)

3.000000

2.666667

X( 2, 2)

7.000000

INFINITY

X( 2, 3)

5.000000

INFINITY

X( 2, 4)

6.000000

INFINITY

X( 3, 1)

12.00000

INFINITY

X( 3, 2)

10.00000

1.000000

X( 3, 3)

8.000000

2.000000

X( 3, 4)

11.00000

INFINITY

Allowable
Decrease
4.000000
0.000000
1.666667
3.000000
3.000000
4.000000
2.666667
3.000000
2.000000
2.000000
INFINITY
1.000000

Righthand Side Ranges:


Allowable
Decrease
2333.333
3500.000
500.0000
380.0000
316.6667
316.6667

Current

Allowable

Row

RHS

Increase

4000.000

1266.667

5000.000

1900.000

3000.000

527.7778

1500.000

700.0000

1200.000

INFINITY

1500.000

300.0000

8
2000.000

2000.000

INFINITY

S-ar putea să vă placă și