Solving an integer linear programming problem without a graph

1.7k Views Asked by At

I am new to linear prorgramming and so far I have been solving LP problems with the help of a graph solution. However, when there are more than 2 variables obviously I can't plot them on the graph.

This is the case in this exercise:

enter image description here

I am tyring to at least make a a correct model before I attempt to solve it.

This is what I have done so far:

ao - orange % in 1 litre of A , bo - orange % in 1litre of B, ac - cranberry % in C etc....

a, b, c, d, e - represent a litre of each drink respectively

40ao + 5bo + 100co >=20
40ag + 10bg + 100dg >=10
20bc >=5

a<=200, b<=400, c<=100, d<=50, e<=800

a + b + c + d + e = 500

a, b, c, d, e > 0

minimise: 1.5a + 0.75b + 2c + 1.75d + 0.25e

Is this the correct model for the problem? If not, please let me know if I have made any mistakes or missed/skipped something important.

1

There are 1 best solutions below

0
On BEST ANSWER

To define the variables was a good idea. You need additional relations between the variables a,b,c,d,e and the others. But it is not easy to find them, because of the different units. And it is hard to say, if the first three constraints are right. To simplify your model, you can use only 5 variables.

$X$: Amount of drink X in the punch (in litres) $\ ,\forall \ X \in \{A,B,C,D,E\}$

Equivalent to your definition.

Constraint for orange juice:

$0,4A+0.05B+C\geq 100$

The punch contains at least $20\%$ orange juice. $20\%$ of 500 litres is 100 litres.

Constraint for grapefruit juice:

$0.4A+0.1B+D \geq 50$

Constraint for cranberry juice:

$0.2B \geq 25$

My other constraints and my pbjective function are identical to yours $\color{blue}{\checkmark}$.