You are on page 1of 3

National Polytechnic School Academic year: 2023/2024

Preparatory classes Module: Computer Science 3


2nd year

Directed work series N° 3


Linear Programming: Graphic and computer solutions

Exercise 01
A milling tool manufacturer makes two types of cutters: A and B. Type A cutters sell for 300 each, and
are manufactured with 1 unit of steel, 2 units of removable carbide and 1 unit of diamond synthetic.
Type B cutters sell for 200 each, and are manufactured with 2 units of steel, 1 units of removable carbide
and 1 unit of synthetic diamond.
The stocks are 5 units of steel, 5 units of carbide and 2 units of diamond. The manufacturer wants to
build at least 5 type A cutters and 5 type B cutters. The maintenance cost of the factory is 2500. How
should the manufacturer allocate his production to maximize his profit, is it profitable?

Exercise 02
A brooker needs, for its customers, 108 MWh of electricity for city 1 and 96 MWh of electricity for city
2. However, Kirchhoff's laws do not allow a distributor to target a single city for the energy transit. Two
distributors serve these cities: Distributor A can send 12 MWh to city 1 and 8 MWh to city 2 per lot
purchased; Distributor B can send 9 MWh to city 1 and 12 MWh to city 2 per lot purchased. The lots all
have the same price. How many lots must the brooker buy to meet the energy demand of the two cities?
Solve by graphical method.

Exercise 03
Solve by the graphical method then by the simplex the following problems:
1. A company that manufactures two types of products seeks to maximize its profit. Here is his
roadmap.

2. Likewise with the following linear program:

1 /2
Exercise 04
A student holds two part-time jobs, Job I and Job II. He never wants to work more than a total of 12
hours a week. He has determined that for every hour she works at Job I, he needs 2 hours of preparation
time, and for every hour he works at Job II, he needs one hour of preparation time, and he cannot spend
more than 16 hours for preparation. If he makes $40 an hour at Job I, and $30 an hour at Job II, how
many hours should he work per week at each job to maximize his income?

Exercise 05
BIM optimizes the construction, renovation and maintenance of buildings. Among the elements to be
optimized there are the workers. In general, there are 4 types of workers depending on their weekend.
The workers' wages depend on these days of leave:

The daily demands for workers are as follows:

How many people in each category must be employed in order to meet the demand and minimize the
cost of personnel? Give the canonical form of the problem and solve it using Solver Excel.

Exercise 06
A company makes three types of products, A, B, and C. Each product requires raw materials and labor,
as well as storage space. Here are the raw material, labor and storage needs for a unit of each of the 3
types of products:
• Product A: 4 kg of raw materials, 2 hours of labor, 1 unit of volume.
• Product B: 2 kg of raw materials, 1/2 hour of labor 1 unit of volume.
• Product C: 1 kg of raw materials, 3 hours of labor, 1 unit of volume.
Each product brings in 6 euros if it is of type A, 2 euros if it is of type B, and 4 euros if it is of type C.
The available resources are 6000 kg of raw materials, 4000 hours of labor. work, and 2,500 storage
volume units.
Model the linear program and solve it by hand using the simplex.
A competitor, who lacks raw materials, offers to buy 300 kg from this company, at a price of 1.5 euros
per kg. Do you think the company should accept this proposal? (Assume that she accepts it if it is
profitable, solve the problem by hand with the simplex.)

Exercise 07

In an electricity grid, the amount of energy that can pass from power plants to cities is limited by the
capacities of very high voltage lines. The problem is described as follows:
• Sources, represented by vertices, produce a quantity of energy
• Wells, represented by vertices, receive a quantity of energy
• Lines, represented by edges between a pair of vertices, through which the energy passes.

2 /2
This graph reads as follows:
• S is a fictitious source, which describes the production of the energy sources represented by
vertex 1 and vertex 2.
• T is a fictitious well, which describes the energy reception of the cities represented by vertex 3
and vertex 4.
• The lines are oriented, that is to say that the energy only passes in one direction. For example
the link (1, 3) can circulate up to 4 units of energy between vertex 1 and vertex 3.
• The links between S and the sources describe the energy production of the source. For example
the link (S, 1) says that source 1 can produce up to 10 units of energy.
• The links between the wells and T describe the energy demand of the well. For example the link
(3, T) says that city 3 requires 10 units of energy.
The objective function of this type of problem is:
• maximize the amount of energy that can be made to transit from S to T. The solution will provide
the amount of energy passing through each line. To calculate this flow, an arc is added between
the fictitious well and the unconstrained fictitious source. The optimal solution is equal to the
flow passing through this arc.
This problem is subject to two types of constraints:
• the sum of the energies entering a vertex minus the sum of the energies exiting the same vertex
is zero. That is to say that there are no energy losses in the network
• the energy passing through a line cannot be greater than the capacity of the line.
• the energy passing through a line is positive or zero.
The variables are therefore:
• for each row, a variable describes the amount of energy passing through it.

Formulate the linear problem for the graph given above and solve it via Excel.

Good Luck

3 /2

You might also like