Sei sulla pagina 1di 2

To begin, displayed below are region plots showing where each of the inequalities for this question are

satisfied:

Combining the feasible regions for these different plots together, I get the plot
of feasible solutions for the system as a whole:

Where:
0 x1

2
;
3

0 x2 x1 + 1

4 x1
2

2
x1 2 ;
3

0 x2

2 x1 3 ;

0 x2 3 x1

Applying the linprog.m function to minimize the above system of inequalities


gives the solution:
2
x1 =
3
5
x2 =
3
which produces a function value of 2.667.
In order to maximize the function, I negate the function to get: 2x2 x1 .
Applying this to the linprog.m function produces the solution:
x1 = 3
x2 = 0

The function value for these value is: 3.

Potrebbero piacerti anche