LAB 001 TO 009 solution
LAB 001 TO 009 solution
OLORUNNISOLA, OLUWATOMILAYO A.
MATRIC NUMBER: 207397
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)
Model Class: LP
Total variables: 2
Nonlinear variables: 0
Integer variables: 0
Total constraints: 4
Nonlinear constraints: 0
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.
Total variables: 2
Nonlinear variables: 0
Integer variables: 2
Total constraints: 2
Nonlinear constraints: 0
Total nonzeros: 4
Nonlinear nonzeros: 0
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)
Max = 1000*H+300*P;
!Constriants;
6*H+7*P<=40;
3*H+P<=11;
END
Model Class: LP
Total variables: 2
Nonlinear variables: 0
Integer variables: 0
Total constraints: 3
Nonlinear constraints: 0
Total nonzeros: 6
Nonlinear nonzeros: 0
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
Total variables: 2
Nonlinear variables: 0
Integer variables: 2
Total constraints: 3
Nonlinear constraints: 0
Total nonzeros: 6
Nonlinear nonzeros: 0
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
Model Class: QP
Total variables: 4
Nonlinear variables: 4
Integer variables: 0
Total constraints: 9
Nonlinear constraints: 1
Total nonzeros: 12
Nonlinear nonzeros: 6
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;
Model Class: QP
Total variables: 4
Nonlinear variables: 4
Integer variables: 0
Total constraints: 11
Nonlinear constraints: 1
Total nonzeros: 20
Nonlinear nonzeros: 6
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.
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.