0% found this document useful (0 votes)
3 views

LAB 001 TO 009 solution

The document contains a series of laboratory exercises focused on optimization problems using linear programming (LP) and integer linear programming (ILP). Each lab presents a scenario involving resource allocation for maximizing revenue or profit, with detailed mathematical models, constraints, and solutions obtained using LINGO software. Key findings include optimal production quantities and objective values for different scenarios, along with discussions on rounding and constraint satisfaction.
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

LAB 001 TO 009 solution

The document contains a series of laboratory exercises focused on optimization problems using linear programming (LP) and integer linear programming (ILP). Each lab presents a scenario involving resource allocation for maximizing revenue or profit, with detailed mathematical models, constraints, and solutions obtained using LINGO software. Key findings include optimal production quantities and objective values for different scenarios, along with discussions on rounding and constraint satisfaction.
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 11

TIE 513 LAB 001 TO 009

OLORUNNISOLA, OLUWATOMILAYO A.
MATRIC NUMBER: 207397

DEPARTMENT OF INDUSTRIAL AND PRODUCTION ENGINEERING,

FACULTY OF TECHNOLOGY, UNIVERSITY OF IBADAN.

LECTURER IN CHARGE: DR. A.D ADEYEYE

DECEMBER 2023

LAB 01: Suppose we consider producing chairs and tables using only 210m 2 of wood. Each
chair requires 6 m2 while table requires 7 m2 of wood. Each chair is sold at N12 and each table is
sold at N13. Let C and T denote the number of chairs and tables produced. Develop the model to
maximize revenue and solve (a)[i] LP relaxation of the problem and observe the objective value
(a)[ii] round up and round down the variable(s) that is/are fractional and note if round up/round
down violate any constraint. Also observe the objective value(s) (b) Solve the ILP problem and
observe the objective value. Discuss your observations.

SOLUTION

(ai)Maximize Z=12000C+13000T
Subject to:
6C+7T<=210 (this is the constraint for the wood)
C, T>=0 (this is the non-negativity constraint)

Using LINGO solver version 20.0 to solve:

Max = 12000*C + 13000*T;


!Subject to;
6*C + 7*T<=210;
C>=0;
T>=0;
END
Global optimal solution found.
Objective value: 420000.0
Infeasibilities: 0.000000
Total solver iterations: 0
Elapsed runtime seconds: 0.17

Model Class: LP

Total variables: 2
Nonlinear variables: 0
Integer variables: 0

Total constraints: 4
Nonlinear constraints: 0

Total non zeros: 6


Nonlinear non zeros: 0

Variable Value Reduced Cost


C 35.00000 0.000000
T 0.000000 1000.000

Row Slack or Surplus Dual Price


1 420000.0 1.000000
2 0.000000 2000.000
3 35.00000 0.000000
4 0.000000 0.000000

From the solution gotten, it is determined that to get the maximum revenue/profit of 420,000, 45
chairs should be produced and no tables should be produced. That is:
Z=420,000
C=35
T=0

(aii)Since the variables C and T are already Integers, there is no need to either round up or round
down the variables.

(b) Using LINGO solver version 20.0 to solve:


Max = 12000*C + 13000*T;
!Subject to;
6*C + 7*T<=210;
@GIN(C);
@GIN(T);
END

Global optimal solution found.


Objective value: 420000.0
Objective bound: 420000.0
Infeasibilities: 0.000000
Extended solver steps: 0
Total solver iterations: 0
Elapsed runtime seconds: 0.34

Model Class: PILP

Total variables: 2
Nonlinear variables: 0
Integer variables: 2

Total constraints: 2
Nonlinear constraints: 0

Total nonzeros: 4
Nonlinear nonzeros: 0

Variable Value Reduced Cost


C 35.00000 -12000.00
T 0.000000 -13000.00

Row Slack or Surplus Dual Price


1 420000.0 1.000000
2 0.000000 0.000000

Using Integer Linear Programming(ILP) to solve gives the same result of:
Z=420,000
C=35
T=0
The integer linear programming gave the same results of a maximum value of 420000 while
producing thirty-five (35) chairs and no tables. It also satisfies the constraint stated and all the
values are integers.

LAB 02: IPE Company wants to maximize their profits. They make N1000 for every handbag
and N300 for every purse. Employee 1 can make 6 handbags and 7 purses, but can’t work more
than 40 hours. Employee 2 can make 3 handbags and 1 purse, but can’t work more than 11 hours.
Construct the mathematical model to maximise profit. (a)[i] Solve LP relaxation of the problem
and observe the objective value (a)[ii] round up and round down the variable(s) that is/are
fractional and note if round up/round down violate any constraint. Also observe the objective
value(s) (b) Solve the ILP problem and observe the objective value. Discuss your observations.

SOLUTION
Let the number of handbags be represented by H and the number of purses by P
Maximise Z=1000H+300P
Subject to:
6H+7P<=40 (for employee 1)
3H+P<=11(for employee 2)

Using LINGO solver version 20.0 to solve:

Max = 1000*H+300*P;
!Constriants;
6*H+7*P<=40;
3*H+P<=11;
END

Global optimal solution found.


Objective value: 3666.667
Infeasibilities: 0.000000
Total solver iterations: 1
Elapsed runtime seconds: 0.37

Model Class: LP

Total variables: 2
Nonlinear variables: 0
Integer variables: 0

Total constraints: 3
Nonlinear constraints: 0

Total nonzeros: 6
Nonlinear nonzeros: 0

Variable Value Reduced Cost


H 3.666667 0.000000
P 0.000000 33.33333

Row Slack or Surplus Dual Price


1 3666.667 1.000000
2 18.00000 0.000000
3 0.000000 333.3333

Z=3666.667
H=3.666667
P=0
Since the values are not integers;
Rounding up the variables,
H=4
P=0
Z=1000(4)+300(0)=4000

Checking for constraint 1


6(4)+7(0)=24
Since 24<40, constraint 1 is not violated

Checking for constraint 2


3(4)+1(0)=12
Since 12>11, constraint 2 is violated

Rounding down the values,


H=3
P=0
Z=1000(3)+300(0)=3000

Checking for constraint 1


6(3)+7(0)=18
Since 18<40, constraint 1 is not violated

Checking for constraint 2


3(3)+1(0)=9
Since 9<11, constraint 2 is not violated

(b) using the integer linear programming


Using LINGO solver version 20.0 to solve:
MAX = 1000*B + 300*P;
6*B + 7*P <= 210;
3*B + P <= 11;
@GIN(B);
@GIN(P);
END

Global optimal solution found.


Objective value: 3600.000
Objective bound: 3600.000
Infeasibilities: 0.000000
Extended solver steps: 0
Total solver iterations: 0
Elapsed runtime seconds: 0.50

Model Class: PILP

Total variables: 2
Nonlinear variables: 0
Integer variables: 2

Total constraints: 3
Nonlinear constraints: 0
Total nonzeros: 6
Nonlinear nonzeros: 0

Variable Value Reduced Cost


B 3.000000 -1000.000
P 2.000000 -300.0000

Row Slack or Surplus Dual Price


1 3600.000 1.000000
2 178.0000 0.000000
3 0.000000 0.000000

Z=3600
H=3
P=2
It can be observed that rounding down the values gave an objective value of 3000 which satisfies
both constraints stated, on the other hand, rounding up the values gave an objective value of
4000 but did not satisfy both constraints stated.
The integer linear programming gave the results of a maximum value of 3600 while producing
three(3) handbags and two(2) purses. It also satisfies the constraints stated and all the values are
integers.

LAB 04: A company wants to manufacture welding flux that will give maximum weld-metal
toughness as a function of the proportions of flux ingredients. The proportions of the 4
ingredients of interest are represented by x1, x2, x3, and x4. The regression function for
toughness is given as:

TOUGHNESS = -3.31038x1+0.62389x2-0.26209x3-
0.84441x4+0.06680x1x2+0.10098x1x3+0.12913x1x4-0.03063x2x3-0.02394x2x4-0.00737x3x4

The lower and upper limits of the flux ingredient as determined by experiment is given in the
table below.
Flux Ingredient Lower Upper Limit
Limit
X1 15 35
X2 15 32.4
X3 10 40
X4 8 40
(a)Develop the mathematical model, write the LINGO program and prescribe the flux ingredient
proportion that gives the highest toughness.
(b)In order to reduce amount of fume, it is required that 20% of the flux should be made up of
additional ingredient. Determine the optimum composition for the flux. Show your model and
LINGO program as in (a). NOTE: Present and discuss your results.

SOLUTION
(a)Max toughness = -3.31038x1+0.62389x2-0.26209x3-
0.84441x4+0.06680x1x2+0.10098x1x3+0.12913x1x4-0.03063x2x3-0.02394x2x4-0.00737x3x4
Subject to:
x1>=15, x1<=35 (limit for ingredient 1)
x2>=15, x1<=32.4 (limit for ingredient 2)
x3>=10, x1<=40 (limit for ingredient 3)
x4>=8, x1<=40 (limit for ingredient 4)
x1, x2, x3, x4 >= 0

Using LINGO version 20.0 to solve to solve:


MAX = -3.31038*x1 + 0.62389*x2 - 0.26209*x3 - 0.84441*x4 + 0.06680*x1*x2 +
0.10098*x1*x3 + 0.12913*x1*x4 - 0.03063*x2*x3 - 0.02394*x2*x4 - 0.00737*x3*x4;
!SUBJECT TO;
x1 >= 15;
x1 <= 35;
x2 >= 15;
x2 <= 32.4;
x3 >= 10;
x3 <= 40;
x4 >= 8;
x4 <= 40;
END

Local optimal solution found.


Objective value: 175.4812
Infeasibilities: 0.000000
Total solver iterations: 7
Elapsed runtime seconds: 0.22

Model Class: QP

Total variables: 4
Nonlinear variables: 4
Integer variables: 0

Total constraints: 9
Nonlinear constraints: 1

Total nonzeros: 12
Nonlinear nonzeros: 6

Variable Value Reduced Cost


X1 35.00000 0.000000
X2 32.40000 0.000000
X3 40.00000 0.000000
X4 40.00000 0.000000

Row Slack or Surplus Dual Price


1 175.4812 1.000000
2 20.00000 0.000000
3 0.000000 8.058340
4 17.40000 0.000000
5 0.000000 0.7790900
6 30.00000 0.000000
7 0.000000 1.984998
8 32.00000 0.000000
9 0.000000 2.604684

Z=175.4812
X1=35
X2=32.4
X3=40
X4=40
The flux ingredient proportion that gives the highest toughness are X3 and X4.

(b)
MAX = -3.31038*x1 + 0.62389*x2 - 0.26209*x3 - 0.84441*x4 + 0.06680*x1*x2 +
0.10098*x1*x3 + 0.12913*x1*x4 - 0.03063*x2*x3 - 0.02394*x2*x4 - 0.00737*x3*x4;
Subject to:
x1 >= 15;
x1 <= 35;
x2 >= 15;
x2 <= 32.4;
x3 >= 10;
x3 <= 40;
x4 >= 8;
x4 <= 40;
x1 + x2 + x3 +x4 >= 0.8*48;
x1 + x2 + x3 +x4 <= 0.8*175.4182;

Using LINGO solver version 20.0 to solve


MAX = -3.31038*x1 + 0.62389*x2 - 0.26209*x3 - 0.84441*x4 + 0.06680*x1*x2 +
0.10098*x1*x3 + 0.12913*x1*x4 - 0.03063*x2*x3 - 0.02394*x2*x4 - 0.00737*x3*x4;
!subject to;
x1 >= 15;
x1 <= 35;
x2 >= 15;
x2 <= 32.4;
x3 >= 10;
x3 <= 40;
x4 >= 8;
x4 <= 40;
x1 + x2 + x3 +x4 >= 0.8*48;
x1 + x2 + x3 +x4 <= 0.8*175.4182;
END

Local optimal solution found.


Objective value: 169.9766
Infeasibilities: 0.000000
Total solver iterations: 7
Elapsed runtime seconds: 0.19

Model Class: QP

Total variables: 4
Nonlinear variables: 4
Integer variables: 0

Total constraints: 11
Nonlinear constraints: 1

Total nonzeros: 20
Nonlinear nonzeros: 6

Variable Value Reduced Cost


X1 35.00000 0.000000
X2 25.33456 0.000000
X3 40.00000 0.000000
X4 40.00000 0.000000

Row Slack or Surplus Dual Price


1 169.9766 1.000000
2 20.00000 0.000000
3 0.000000 6.807279
4 10.33456 0.000000
5 7.065440 0.000000
6 30.00000 0.000000
7 0.000000 1.422322
8 32.00000 0.000000
9 0.000000 1.994741
10 101.9346 0.000000
11 0.000000 0.7790900

Z=169.9766
X1=35
X2=25
X3=40
X4=40
It was observed that adding an additional ingredient to make up 20% of the flux gives a lower
objective value than when it was just four ingredients and the proportion of X2 reduced
compared to when it was just four ingredients.

LAB 05 – 09: MODELING AND SOLUTION OF COMPLEX REAL LIFE PROBLEMS

Starting with complex, unstructured real-life problem with multiple objectives, the student is to
provide a model formulation, use an optimiser to solve the model and provide practical
recommendations based on his solution analysis.

OBJECTIVE

The objective of these student laboratory works is to apply and compare various mathematical
modelling techniques to solve real-life problems with multiple objectives. This involves the
development and solution of linear combination of objective functions, compromise constraint
models, Compromise Programming (CP), and Goal Programming (both Non pre-emptive and
Pre-emptive/Lexicographic). The aim is to understand the relative strengths of these methods in
response to changes in weight structure and their applicability in different scenarios.
EQUIPMENT
Computer with optimisers and solvers installed.

PROCEDURE

1. LAB 05- 06: Select a real-life problem with bi-objectives in consultation with the
lecturer. (i) Develop the linear combination of objective functions mathematical model of
the problem and solve (ii) Develop the compromise constraint model of the problem and
solve. Note: Use different weight structures for the objectives, discuss the results and
compare the relative strengths of the methods in terms of their response to changes in
weight structure.
2. LAB 07-09: Select a real-life problem with multiple objectives in consultation with the
lecturer. Develop the mathematical model of the multi-objective problem and solve using
(i) Compromise Programming (CP) (ii) Non pre-emptive Goal programming (NGP) (iii)
Pre-emptive/ lexicographic Goal Programming.

ANALYSIS AND REPORT


A managerial report should be produced on the problem, its solution, and the ensuing
recommendations.

You might also like