Sunteți pe pagina 1din 4

Solving Linear Programming Problem using LINGO software

ABC Transistor Radio Company


Code for execution:
!Objective Function;
Max = 8*A + 15*B + 25*C + (-1)*D + 15*E;

!Subject to constraints;
A >=0;
C >=0;
D >=0;
E >=0;

!Equations;
1*A + 2*B + 3*C + 3*E <=15;
2*A + 1*B + 2*D + 5*E <=20;
1*A + 2*B + 1*C + 1*D <=10;

Solution obtained on executing above program

Global optimal solution found.


Objective value: 125.0000
Infeasibilities: 0.000000
Total solver iterations: 4
Elapsed runtime seconds: 1.89

Model Class: LP

Total variables: 5
Nonlinear variables: 0
Integer variables: 0

Total constraints: 9
Nonlinear constraints: 0

Total nonzeros: 22
Nonlinear nonzeros: 0

Variable Value Reduced


Cost
A 0.000000
0.3333333
B 0.000000
1.666667
C 5.000000
0.000000
D 0.000000
1.000000
E 0.000000
10.00000

Row Slack or Surplus Dual


Price
1 125.0000
1.000000
2 0.000000
0.000000
3 0.000000
0.000000
4 5.000000
0.000000
5 0.000000
0.000000
6 0.000000
0.000000
7 0.000000
8.333333
8 20.00000
0.000000
9 5.000000
0.000000
Solving Linear Programming Problem using LINGO software
Case: Rama Furniture Company

Code for problem:


!Objectuve Function;
Max = 12*A + 20*B + 18*C + 40*D + 28*E;
!Subject to constraints;
A >=0;
B >=0;
C >=0;
D >=0;
E >=0;
!Equations;
4*A + 9*B + 7*C + 10*D + 14*E <=6000;
A + B + 3*C + 40*D + E <=4000;

Solution:

Global optimal solution found.


Objective value: 18666.67
Infeasibilities: 0.000000
Total solver iterations: 2
Elapsed runtime seconds: 0.09

Model Class: LP

Total variables: 5
Nonlinear variables: 0
Integer variables: 0

Total constraints: 8
Nonlinear constraints: 0

Total nonzeros: 20
Nonlinear nonzeros: 0

Variable Value Reduced


Cost
A 1333.333
0.000000
B 0.000000
6.666667
C 0.000000
3.333333
D 66.66667
0.000000
E 0.000000
13.33333

Row Slack or Surplus Dual


Price
1 18666.67
1.000000
2 1333.333
0.000000
3 0.000000
0.000000
4 0.000000
0.000000
5 66.66667
0.000000
6 0.000000
0.000000
7 0.000000
2.933333
8 0.000000
0.2666667

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