Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
8 views

Book - Linear Programming

The document is an academic guide for a course on Linear Programming at National University Federico Villarreal, outlining study guidelines, objectives, and unit topics. It covers operations research, linear programming techniques, and applications in management, structured into four units with specific objectives and activities. The guide emphasizes the importance of effective study habits and provides resources for further learning, aiming to equip students with quantitative optimization techniques for decision-making.
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views

Book - Linear Programming

The document is an academic guide for a course on Linear Programming at National University Federico Villarreal, outlining study guidelines, objectives, and unit topics. It covers operations research, linear programming techniques, and applications in management, structured into four units with specific objectives and activities. The guide emphasizes the importance of effective study habits and provides resources for further learning, aiming to equip students with quantitative optimization techniques for decision-making.
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 91

National University

Federico
Villarreal

ACADEMIC
LINEAR LOVE

TOPICS III
CYCLE

itary
LINEAR PROGRAMMING

INDEX
Pages

GUIDELINES FOR THE STUDY…………………………………………….. …..4


a. Recommendations for the study of the subject………………………..4
b. Recommendations for the use of the academic guide……………………...4

INTRODUCTION……………………………………………………………………………5
GENERAL STUDY GUIDELINES………………………………………..…6
TUTORIALS…………………………………………………………………………………..7
SCHEDULE………………………………………………………………………….7
EVALUATION………………………………………………………………………………7
RESOURCES AND TEACHING MEDIA……………………………………………......8
GENERAL OBJECTIVES……………………………………………………………….9
FIRST UNIT:
OPERATIONS RESEARCH AND LINEAR PROGRAM………………....................10
SPECIFIC OBJECTIVES…………………………………………………………..10
INTRODUCTION…………………………………………………………………………..10
1.1 ORIGINS OF OPERATIONS RESEARCH……………………..10
1.1.1 Historical background……………………………………………………….10
1.1.2 What is Operations Research……………………………….........................12

1.2 OPERATIONAL RESEARCH TECHNIQUES……………………………...13


1.2.1 Definition of
Model…………………………………………………………………………...14
ACTIVITIES………………………………………………………………............15
1.3 THEORETICAL BASIS OF LINEAR PROGRAMMING………………...16
1.3.1 Definition of Linear Programming…………………………………………..16
1.3.2 Linear Program Feature…………………………………………...17
ACTIVITIES…………………………………………………………………….19
1.4 FORMULATION OF THE LINE PROGRAMMING MODEL…………..19
1.5 APPLICATIONS OF THE LINEAR PROGRAMMING MODEL IN MANAGEMENT
OF OPERATIONS…………………………………………………………………..20
SECOND UNIT:
2.1 GRAPHICAL METHOD – MAXIMIZATION AND MINIMIZATION SOLUTION….26
2.1.1 Mathematical representation of the linear model…………………………….26
2.1.2 Basic Solution………………………………………………………………….26
2.1.3 Feasible Region…………………………………………………………………..27

2
LINEAR PROGRAMMING

2.1.4 Geometric Interpretation……………………………………………………..28


ACTIVITIES…………………………………………………………………….39
2.2 SIMPLEX ALGORITHM – MAXIMIZATION SOLUTION AND
MINIMIZATION………………………………………………………………………..40
2.2.1 Slack and Excess Variables……………………………………………40
2.2.2 Examples of the use of the Slack and Excess variables …………...........41
2.2.3 The Simplex Algorithm – tabular representation………………………..41
2.2.4 Applications in some examples of Maximization and Minimization…42
ACTIVITIES…………………………………………………………………….47
THIRD UNIT:
3.1 Duality Theory…….………..………………………………………………..48
3.2 Relationships between Primal – Dual Solutions………………………………..48
3.2.1 Formulation of the Dual Program from Primal ……………………...........49
3.3 Sensitivity Analysis……………..……………………………………………..53
3.3.1 Importance of Sensitivity Analysis………………………………..…..54
3.3.2 Calculation tool ………………………………………………………...54
3.3.3 Changes in model parameters……………………………………..54
3.3.4 Practical applications to find the primal solution, the dual and the
variations of the Bi (availabilities) and Cj (objective function coefficients)
……………………………………………………………………………55
ACTIVITIES…………………………………………………………………….59
FOURTH UNIT:
4.1 The transportation problem……………..…………………………………………..61
4.2 Northwest Corner Method (N – O)…………………………….………..….61
4.3 Minimum Cost Method ………………………………………………...................64
4.4 Vogel Method…………………………………………..……………………………..68
4.5 Assignment Problem…………………………………………………………..........76
4.6 Hungarian Method……………………………………………………………………...77
ACTIVITIES…………………………………………………………………………82
GUIDELINES FOR STUDY
It is important to state that the most effective teaching-learning process is one where
the student is the main protagonist, therefore it is convenient to propose the following
recommendations for the best study of the subject as learning strategies, which will
meet the objectives set:
a. Recommendations for studying the subject:
> Plan, organize and manage the time you are going to dedicate to the
subject in general, to each of the units according to the conditions,

3
LINEAR PROGRAMMING

difficulties and work needs; otherwise the study plan will not be fulfilled.
> Reinforce the proposed topics through the guide text according to the
indication of the academic guide.
> Study in a place where you feel comfortable doing your readings and
homework. If possible, a place with light and free of noise.
> Investigate real situations where you can apply the knowledge you have
acquired.
> Work through the material in the order in which it is delivered. Don't forget to
carry out the activities that you have in your Text as well as in your
Academic Guide, try to carry out the work under the teamwork approach, in
order to optimize the reinforcements and other resources.
> Read the material several times, highlighting the main ideas to organize the
study material (summaries, synoptic tables, etc.), since it must be studied
with previously established goals, which will guide you in the development
of the subject.
b. Recommendations for the use of the academic guide
> This work is aimed at distance learning vocational training students,
therefore it is not a formal textbook; consequently, it is necessary to consult
other books, in order to expand your knowledge and interact fluently during
the sessions. Do it in advance.

> It is necessary to develop the activities proposed in each of the units, in


order to have a solid knowledge structure on the topics covered.

> Developing the questions for the activities in a necessary and conscious
way is a way to measure the progress of learning, as is reading, studying
and working with the teaching material on a daily basis. If the result of the
self-assessment is less than 60%, it is recommended to review the unit,
since studying in the distance learning modality requires will and discipline,
which, dear participant, you can achieve by dedicating at least one hour a
day to study, punctually complying with the dates for the delivery of
academic assignments.

> Review the bibliography and webography in order to delve deeper into the
topics covered.
INTRODUCTION

Linear programming is one of the subjects that generates the greatest


expectations in the students and professionals who take it. Because they are of utmost
importance for decision-making. Today, linear programming is a commonly used tool
that has saved thousands or millions of dollars for many companies in industrialized
countries around the world, and its application to other sectors of society has expanded
rapidly. Briefly stated, the most common type of application encompasses the general
problem of allocating limited resources among competing activities in the best possible
way (optimally).

It can be concluded that linear programming is important and valuable in the


daily and professional life of any person, and can have very diverse components
depending on its specific area of application: Business Administration, Engineering or
others. The object of study is scientific decision-making through the use of quantitative

4
LINEAR PROGRAMMING

techniques. It is important to have this definition clear and, in this way, we will realize
the breadth of its field.

For a Systems Engineering student, the study of linear programming must be


very essential in order to achieve his or her main objective: to be a professional capable
of facing all the changes that are taking place in the environment, continuous
improvement, where it is becoming increasingly necessary to control the variables in
order to then make the right decisions, since decision-making is the essential task of
organizations (small, medium and large) and of individuals who independently have to
face problems on a daily basis.

The Linear Programming Teaching Guide is organized into four units, each unit
is structured with its respective objectives, concepts and activities for the constant
preparation of the student.

The first unit presents the concepts of operations research and linear
programming. The second unit presents the points necessary to know the primal
solution of linear programming. The third unit provides theoretical knowledge with the
dual program and post-optimal analysis. Finally, in the fourth unit, special applications
of linear programming are developed.

In conclusion, we hope that the text will be an effective and didactic guide that
motivates the student to study and to dedicate himself adequately to achieving the
objectives set out in the course. The use of the guide must be complemented by the
student's deepening or expanding knowledge of the topics contained therein with the
base text and manual of the EUDED.

Mg. Eng. Luis A. Sakibaru Mauricio

5
LINEAR PROGRAMMING

GENERAL STUDY GUIDELINES

Studying in the modality you have chosen requires a great deal of effort and dedication, as well as
responsibility and good organization.

For this reason, when you begin studying our subject, it is important to provide you with some
guidance to optimize your academic performance:

> Find a comfortable and quiet place to read the teaching guide and the basic text. If
possible, a place with light and free of noise.
> Plan and organize a study schedule in which each subject has the necessary time
according to its degree of difficulty.
> Carry out a comprehensive reading, using techniques such as underlining, the use of
conceptual maps or visual organizers that allow you to identify the main ideas to reinforce
knowledge. Or otherwise, read the text many times until you understand the topic at hand.
> It is recommended that you carry out the activities proposed in this Teaching Guide as it
will allow you to verify the achievement of the learning.

It was decided to use a base text for the study, choosing the book: Introduction to Operations
Research, by the author Taha, Hamdy. We call this book Basic Text No. 1

In the first unit we must develop the study of Operations Research and the concepts of linear
programming. This topic can be found in chapter 1 and 2 of basic text 1.

In the second unit we will study the primal solution of linear programming for which chapter 2 of
basic text 1 will be studied.

In the third unit, duality and post-optimization of linear programming will be studied, which will be
found in chapters 2, 3 and 4 of basic text 2.

In the fourth unit we will study special applications of linear programming that will be found in
chapters 5, 6 and 7 of the basic text 1.

It is important to note that the purpose of the Teaching Guide is to clarify and reinforce the topics
covered in Basic Text 1; for example, you will find the solution to some exercises for each topic
proposed in the Basic Text, in this way we hope to contribute to the achievement of the proposed
objectives.

6
LINEAR PROGRAMMING

TUTORIALS
The tutorials will be developed by scheduling a tutorial calendar. These will be in person
and virtual.

SCHEDULE

Number of academic hours


In-person and virtual tutoring
Face-to-face hours Virtual hours Hours of Video Conference

Week 1 2 2,5 3
UNIT I
Week 2 2 2,5 3
Week 3 2 2,5 3
UNIT II
Week 4 2 2,5 3
Virtual partial evaluation Units I – II
UNIT III Week 5 2 2,5 3

Week 6 2 2,5 3

UNIT IV Week 7 2 2,5 3

Week 8 2 2,5 3
Final evaluation Units III – IV
16 20 24
TOTAL
60 academic hours
ASSESSMENT

The final average of the subject in the Face-to-Face – Virtual Modality is obtained by applying
the following percentage steps:

• Assessment of jobs interactive (YOU): (40%)


• Assessment partial (IV): (20%)
• Assessment end (EF): (40%)

PF = TI (0.4) + IV (0.2) + EF (0.4)

A student who drops the course will have an average of 00 (zero) on the final grade and will
have to register his/her enrollment again.

7
LINEAR PROGRAMMING

RESOURCES AND TEACHING MEDIA


Please consult the following texts and links
Unit I – II
• Taha, Hamdy (2012) Introduction to Operations Research. Pretince Hall Publishing.
USA.
7== /Éñg77= • Hillier, F. Lieberman D. (1999). Introduction to Operations Research. Mc Publishing
Graw Hill. Mexico.
• Winston, Wayne (2005). Operations Research. Applications and Algorithms. Editorial
Thomson / Auditorium. Mexico.

Electronic references:
http://www.investigaciondeoperaciones.net/
http://www.programacionlineal.net/
http://www.itlalaguna.edu.mx/academico/carreras/industrial/invoperaciones1/
http://www.gestiondeoperaciones.net/programacion_lineal/
programacion-lineal-metodo-grafico/
http://www.phpsimplex.com/eemplo_metodo_simplex.htm

• Taha, Hamdy (2012). Introduction to Operations Research. Pretince Hall Publishing.


USA.
Unit III – IV
• Lecca, Raffo (1997). Operations Research. MUNDIGRAF Publishing House, Peru.
• Bronson, Richard (2002). Operations Research. Mc Graw Hill Publishing House, Mexico.

V?
3=== /mÉge
• Anderson D. (1999). Introduction to Quantitative Models for Management. Editorial
Iberoamericana SA Mexico.

Electronic references:
http://www.investigaciondeoperaciones.net/
dualidad_en_programacion_lineal.html
http://www.gestiondeoperaciones.net/programacion_lineal/relaciones-de-
dualidad-en-programacion-lineal-como-pasar-de-primal-a-dual/
http://www.programacionlineal.net/sensibilidad.html
http://home.ubalt.edu/ntsbarsh/opre640S/PARTVIIS.HTM
http://www.investigacion-operaciones.com/modelo_de_transporte.htm
http://investigaciondeoperacionesind331.blogspot.pe/p/metodo-de-transporte.html

• Bonini, Charles, Hausman, Warren, Bierman, Harold. (2002). Quantitative Analysis for the
Business. Mc Graw Hill Publishing House. 9th Edition. Mexico.
Complementary
• Render, Heyzer (2000). Operations Management. Mc Graw Hill Publishing House. Mexico.
Texts • Prawda, J. (2002). Operations Research Methods and Models. Limusa Publishing House.
Mexico.
3== /S4giE

Platform Tools to be used on the virtual platform:


Virtual Forums, tasks, chat

Qe
00
Links, videos, exam, pages among others.

8
LINEAR PROGRAMMING

GENERAL OBJECTIVES

V Explain procedures to formulate mathematical models of linear programming, identifying their


elements with a critical and responsible attitude, assessing their importance in optimizing
resources.

V Introduce the student to the knowledge of the principles, techniques and philosophy in the
formulation of mathematical models of linear programming.

V Apply methodologies in the formulation and solution of transportation problems, with a critical
and responsible attitude, assessing their importance in business management.

V Provide students with quantitative optimization techniques in the field of engineering for the
use of available resources through linear programming in decision making.

• Specific objectives will be indicated at the beginning of each unit.

9
LINEAR PROGRAMMING

✓z
FIRST UNIT
OPERATIONS RESEARCH AND LINEAR PROGRAM

SPECIFIC OBJECTIVES
• Train students in the interpretation of the general model for linear programming, either
maximizing benefits or minimizing costs to achieve desired objectives in the company
through practical cases.

• Provide the basic knowledge of operations research, specifically linear programming,


applying linear algebra in operations management to provide the criteria for developing the
linear programming model.

INTRODUCTION

The objective of the course is for the student to learn to recognize the typical problems of
Operations Research so that he or she knows which technician to turn to in each case, for an
adequate study and solution of the same.
As its name indicates, Operations Research (OR), or Operational Research, is the investigation
of the operations to be performed for the optimal achievement of the objectives of a system or its
improvement. This discipline provides and uses scientific methodology in the search for optimal
solutions, as support in decision-making processes, in terms of optimal decision-making and in
systems that originate in real life.

1.1 ORIGINS OF OPERATIONS RESEARCH

1.1.1 Historical background

The term IO was first used in 1939 during World War II, specifically when the need
arose to investigate tactical and strategic air defense operations, given the incorporation
of a new radar during the German attacks on Great Britain.

The rapid advance of military technology means that British military executives and
administrators must turn to scientists for support and guidance in planning their defence.
The success of a small group of scientists working in conjunction with the military
executive in charge of operations on the “line” led to increased demand for their
services and the extension of the use of the methodology to the USA, Canada and
France, among others.

However, the origin of Operational Research can be considered as prior to the Industrial
Revolution, although it was during this period that the type of problems that Operational
Research tries to solve began to arise. Since the Industrial Revolution and over the
years, a functional and geographic segmentation of the administration has arisen, which
gives rise

Yo 10-YO
LINEAR PROGRAMMING

to the executive or integration function of the administration to serve the interests of the
system as a whole.

Operational Research takes time to develop in the field of industrial management. The
use of scientific methodology in industry was incorporated at the beginning of the 1950s,
starting with the 2nd Industrial Revolution, driven by advances in Communications and
Computing, which laid the foundations for automation, and above all by the economic
flourishing and well-being of that period.

The first developments of this discipline (IO) referred to problems of task ordering,
distribution of workloads, planning and allocation of resources in the military field in its
beginnings, later diversifying, and finally extending to industrial, academic and
governmental organizations.
ORSA Foundation- Degenera don. Chames, Duality, Lemke, Matrix form and
decomposition.

of finding optimal policies in a Final healed


First Doctors cn
TO. Rowe. First IO study with the aim

on IO. MIT.
military detection system.
IO. Case Ins. Fundamentals of genetic
ter. Cidode lectures
at University College Of Technol ogy algorithms, Holland.
on of London. Ackoff and
Churchman. Here are my
interior point
First results in methods tutorials
USA. Created by IO groups Full PL. Gomory.
IT and O RS on PL Karma rkar.

England
in the three armies
Foundation m
Monolevel Perceptron.

Founded on
RAND
Corporation. , Donald Doudas.
Algorithm
* SIM PLEX Danzig
Taboo Search.
15. Working Group, chaired r conference on the 10th in Glover. EPR. Rumelhart
by PMS Blacket Created for the industry. Case Institute

Minskyy
the study of radar-controlled of Technology, Cleveland . Multi-level Perceptron. GemyyKirpatrick
anti-aircraft defense systems. annealed amula
Characterization of ccindi don es
of optimality. Kuhn-Tucker.
Dantzig, Ordnance and Wolfe.

Historical Line

Currently, IoT is applied to the private and public sectors, industry, marketing systems,
financial systems, transportation systems, health systems, etc., in developed countries,
“on the way to” countries, and in third world countries.

There are several associations around the world that bring together people (students,
scientists and professionals) interested in the study and application of Operational
Research. The largest of all is INFORMS, from the United States of America, an

Yo 11-YO
LINEAR PROGRAMMING

association that was born from the union of the ORSA Operation Research Society of
America, with 8,000 members, and the TIMS = Institute of Management Science with
6,000 members. There are also Canadian, European, Latin American and Asian
Associations federated in IFORS, the International Federation of Operation Research
Societies. The

Yo 12-YO
LINEAR PROGRAMMING

Latin American Operations Research Association, ALIO, brings together most of the
Associations of Central and South America. There are dozens of different magazines
published around the world. There are postgraduate programs (master's and doctorate)
in the specialty, in America and Europe.

1.1.2 What is Operations Research?


The following essential characteristics stand out in this discipline:
• A strong orientation towards Systems Theory.
• The participation of interdisciplinary teams.
• The application of the scientific method in support of decision making.

Based on these properties, a possible definition is: Operational Research is the


application of the scientific method by interdisciplinary teams to problems involving the
control and management of organized systems (man-machine); with the objective of
finding solutions that best serve the purposes of the system (or organization) as a
whole, framed in decision-making processes.

The steps to follow in the application of the scientific method (coinciding with those of
the General Systems Theory) are, in their simplest expression:

1. Recognize the Need.


2. Formulate the problem.
3. Build the model.
4. Collect Data.
5. Solve the Model.
6. Validate the Model and perform Sensitivity Analysis.
7. Interpret the results and implications.
8. Make the decision, implement it and control.

Another definition: Operational Research is the application of the scientific method to


the same problem by various sciences and techniques, in support of the selection of
solutions that are as optimal as possible.
Note that there is ONLY ONE problem, however there are different ways of observing
the same problem, depending on the objectives set to solve it.

Example: A decision process regarding inventory policy in an organization.

There are 4 administrative functions that have given rise to departments whose
objectives are:

Function Aim
Maximize the quantity of goods (services) produced and
Production
minimize the unit cost of production.

Marketing Maximize the quantity sold and minimize the unit cost of sales.

Minimize the capital required to maintain a certain level of


Finance
business.

Staff Maintain high morale and productivity among employees.

Regarding the INVENTORY and according to these OBJECTIVES:

The production department needs to produce as much as possible at minimum cost,

Yo 13-YO
LINEAR PROGRAMMING

which is achieved by manufacturing a single product continuously, as this achieves


greater efficiency and minimizes the time lost due to equipment changes when changing
items. This procedure achieves a large inventory with a small product line.

The marketing department also needs a large inventory, but to sell as much as possible,
it must stock the widest variety of products. Reasons for disagreement with the
production department.
To minimize the capital needed to run the business, the Finance department must
reduce the amount of money "committed" by, most directly, reducing inventories. It is
proposed that inventories should increase or decrease in proportion to the fluctuation in
sales.

In contrast, when sales are low, neither production nor personnel require reducing
production or staff. It is in the interest of the staff to maintain production at as constant a
level as possible, since dismissals imply repercussions on staff morale, loss of qualified
personnel, and new costs of training new personnel when required. This translates into
producing up to inventory level when sales are low and depleting it when sales are high.

Objectives listed and defined in this way are difficult to put into practice because of their
inconsistency from the point of view of the organization and the system as a whole. It is
the task and responsibility of the executive (manager) to determine an inventory policy
that suits the interests of the entire company and not just one of the subordinate
functions. The task of organization and management requires that the SYSTEM be
considered as a whole and this is the essence of managerial work. The executive must
decide and will use some method to do so. You may want to hire an Operations
Researcher, who will presumably be qualified to use scientific research to support the
decisions that the executive must make. This support is especially necessary when it
comes to finding “optimal” solutions to problems that originate in organizations and
services in general.

1.2 OPERATIONAL RESEARCH TECHNIQUES

In mathematical IO models, the decision variables can be integer or continuous, and the
objective and constraint functions are linear and nonlinear. The optimization problems
posed by these models gave rise to a variety of solution methods, each designed to
take into account the special mathematical properties of the model. The most prominent
and successful of these techniques is linear programming, where all functions,
objectives, and constraints are linear and all variables are continuous. Other techniques
that address other types of mathematical models are dynamic programming, integer
programming, non-linear programming, goal programming, network programming, etc.

In fact, all operations research techniques result in computational algorithms that are
iterative in nature. This means that

Yo 14-YO
LINEAR PROGRAMMING

The problem is solved in iterations and each new iteration brings the solution closer to
the optimal one. The iterative nature of algorithms often results in cumbersome and
tedious calculations. It is imperative that these algorithms be run on a computer.

The use of the computer as an essential instrument for solving IO models gave rise to a
prominent computational difficulty: that of the machine's rounding error. These errors
become more important as the number of iterations increases. The problem is even
more difficult when the model variables are restricted to integer values. Because the
computer does all calculations in floating point arithmetic (not integer), exact
representation of (some) integer values is not possible and appropriate tolerances must
be implemented to account for such inherent approximations.

Some mathematical models are so complex that it is impossible to solve them using any
of the available optimization algorithms. In such cases, it may be necessary to abandon
the search for the optimal solution and simply search for a good solution, using
heuristics. Most often, a heuristic applies short rules to produce a good solution to the
problem. The advantage of a heuristic over an exact optimization algorithm is that it is
generally faster to execute.

1.2.1. Definition of Model

It is the idealized representation of a reality, depending on the questions raised, a reality


can have various models.

The model is the representation of a system according to the objectives of the study of
the system. That is, for a certain system objective, certain parts of the system are
relevant; and if the study objective changes, the relevant parts of the system will
probably be different. This implies that depending on the objective of the study, a
system can be represented by different models.

U = f(xi, Y, )
IO models can be represented with equations which, although they may seem complex,
have a very simple structure:

U: It is the utility or execution value of the system.


X^ : They are the non-controllable, or dependent, variables whose values

Yj: These are the controllable, or independent, variables with given values.
will depend on the interrelationships and values of the independent variables.

f : It is a function in X
^ and Yj .
One or more so-called constraint equations or inequalities are often required to express
the fact that some (or all) of the uncontrollable variables can be managed within certain
limits. For example, the machine time allocated to the production of a product will
always have a positive value, and will not be greater than the total time available or
allocated for that purpose; another example, the sum of money budgeted for

15 -YO
LINEAR PROGRAMMING

each department in an organization or industry cannot exceed the sum of money


available, etc.
Once the model is obtained, it can be used to find exactly or approximately the
optimal values of the non-controllable variables, those
that produce the best performance of the system, that is, the solution to the problem.

SUMMA
RY
Operations Research is a set of technical and scientific procedures applied to problems related to the
control of organizations or systems (man-machine) in order to produce solutions
that best serve the objectives of the entire organization. Therefore, Operational
Research basically has 3 characteristics: system approach, the use of
interdisciplinary teams and the adaptation of the scientific method.

ACTIVITIES

1. Answer with true (T) and false (F) as appropriate:

a. The term IO is used for the first time, specifically when the need arises to
investigate tactical and strategic air defense operations, given the incorporation
of a new radar.
V F
b. One of the steps to follow in the application of the scientific method of IO is the
optimal achievement of the objectives of a system or its improvement.
V F
c. In mathematical IO models, the most prominent and successful of these
techniques is linear programming, where all functions, objectives, and
constraints are linear and all variables are continuous.

They are represented by the variable Xi


d. According to the IO model, the controllable, or independent, variables

2. Please circle the correct answer:

to. The rapid advance of military technology means that military executives and
administrators must turn to scientists, in which country did this event occur:

a) Americans
b) Spaniards
c) Japanese

d) English
e) Russians

b. The first conference on IoT in Industry was held in the year:


a) 1939
b) 1945

Yo 16
LINEAR PROGRAMMING

c) 1951
d) 1969
e) 1986

c. Dantzig's simplex algorithm through the SCOOP project was given in the year:
a) 1969
b) 1951
c) 1947
d) 1977
e) N. TO.

d. Currently, IoT is applied in:


a) Public Sector
b) Private Sector
c) Marketing systems
d) Financial Systems
e) All of the Above.

1.3 THEORETICAL BASIS OF LINEAR PROGRAMMING

1.3.1. Definition of Linear Programming

It is a method for determining an optimal program of efficient use or distribution of


limited resources, to achieve desired objectives.

The term programming refers to the process of determining a particular program or plan
of action.

One of the fundamental problems in decision-making is choosing from a possible set of


alternatives (feasible solutions to a problem of interest) the best or optimal decision,
according to a previously defined criterion.

Optimization is a technique that seeks, based on different mathematical models, the


efficient allocation of resources, always scarce, required in various productive activities
that compete with each other, with the purpose of satisfying the desired objectives in the
productive, financial, agricultural sector, among others, and which are usually the
maximization or minimization of some quantity such as: cost, benefit, time, waste, etc.

There are several optimization methods; some classical ones use differential calculus
and work well in many cases; non-classical ones, whose development is more recent,
are based on a series of models called Mathematical Programming Models, such as
linear programming models, integer programming models, non-linear programming
models, etc.

1.3.2. Linear Programming Feature

1. Objective Function (Zmax or Zmin)

^ , ^ ^ ,………^
It is equal to the (algebraic) sum of partial contributions to each of the decision
variables, 1 2, 3

Yo 17
LINEAR PROGRAMMING

n . That is, the objective function


is a linear combination of the decision variables.
n

C =X, j=1
Xj = Product, process, service of the j – th.
Where:
Cj = Cost, price, utility of the j – th product.

2. Variable restrictions must be of linear type:


n
>ai , X , ≤bi

1 =1
aij = Technical coefficient of resource i of the j – th product.
V i = 1, 2, 3,………,m

b^= Availability, resource of the i – th component.


Where:

3. The condition of irreversibility of the problem or condition of non-negativity

x , ≥^

V i = 1, 2, 3,………,n

This means that the product, process, service is equal to or greater than
zero.

4. Proportionality

The flow quantities of the different items entering and leaving the activity are always
proportional to the level of the activity. If you want to duplicate this level, simply
duplicate all the corresponding flows.

5. Additivity

It is to specify that the activity system be complete in the sense that a complete
accounting can be made of each item by activity. To be precise, for each item, the
total quantity specified by the system as a whole is required to be equal to the sum
of the quantities entering the various activities minus the sum of the quantities
leaving.

Yo 18
LINEAR PROGRAMMING

Example 1: Let be a linear program:

max 2 j=1 CjXj ……………………. Objective Function


Z


Subject to:

1 =1 ai
j Xj ≤ b^
Xj ≥0
V i = 1, 2, 3,………,m................Restrictions
V i = 1, 2, 3,………,n………Non-conditions
Negativity

Example 2: Let be a linear program:

z
min= ∑
J=1 CjXj ……………………. Objective Function


Subject to:

1 =1 ai
j Xj ≤ b^
Xj ≥0
V i = 1, 2, 3,………,m................Restrictions
V i = 1, 2, 3,………,n………Non-conditions
Negativity

SUMMAR
Linear programming is the set Y of mathematical techniques that aim to resolve the
following situation: Optimize (maximize or minimize) an objective function, a linear
function of several variables, subject to a series of restrictions, expressed by
linear inequalities.
Maximizing can be changed to minimizing, and the meaning of inequalities. In a
linear programming problem the following are involved:
• The function z = ax + by is called the objective function and it is necessary to
optimize. In that expression x and y are the decision variables, while a, b and
c are constants.
• The constraints must be linear inequalities. Their number depends on the

availability or needs, which are: less than (< or ≤); at least… (> or ≥).
problem at hand. The character of inequality is imposed by limitations,

Whether it is a matter of maximizing or minimizing, inequalities can occur in

The optimal solution to the problem will be a pair of values (Xiy y^) from the
either direction.

feasible set that makes f(x, y) take the maximum or minimum value.

Yo 19-YO
LINEAR PROGRAMMING

ACTIVITIES

1. Answer with true (T) and false (F) as appropriate:

✓z..........................................................................................................................................11
a. The term programming is a plan of action.

FIRST UNIT.........................................................................................................................11
OPERATIONS RESEARCH AND LINEAR PROGRAM..................................................11

C =X, j=1...................................................................................................................................19
1 =1...................................................................................................................................................19
= SECOND UNIT.................................................................................................................27
PRIMAL SOLUTION OF LINEAR PROGRAMMING.....................................................27
ENTER......................................................................................................................................48
Zj -.....................................................................................................................................48
Zj -.....................................................................................................................................48
Zj -.....................................................................................................................................50
ENTER......................................................................................................................................50
Zj -.....................................................................................................................................51
ENTER......................................................................................................................................52
SALE........................................................................................................................................52
Zj -.....................................................................................................................................53
€ THIRD UNIT.....................................................................................................................55
DUALITY AND POST-OPTIMAL ANALYSIS.................................................................55
X, + 2X2 < 200..........................................................................................................................59
X, + X2 < 140............................................................................................................................59
X, > 0 ; X, > 0............................................................................................................................59
Y + Y > 30........................................................................................................................59
—• 2Y + Y > 50...........................................................................................................59
And, > 0 ; And, > 0....................................................................................................................59
FOURTH UNIT....................................................................................................................69
SPECIAL APPLICATIONS OF LINEAR PROGRAMMING............................................69
2)........................................................................................................................................71
2)........................................................................................................................................72
3)........................................................................................................................................72

b. The restrictions on the variables are of the linear type.

2. Please circle the correct answer:

20 -YO
LINEAR PROGRAMMING

a. Restricting all variables to be greater than or equal to zero is:

a) Objective Function
b) Constant
c) Non-negativity condition
d) ayb
e) N. TO.

b. Defining the objective or goal you want to achieve is:

a) Programming
b) Objective function
c) Restrictions
d) Non-Negativity Condition
e) oh b.

1.4 FORMULATION OF THE LINEAR PROGRAMMING MODEL

To formulate linear programming problems, proceed as follows:

1. Understanding the Problem

It consists of carefully reading the problem in question and clearly identifying its objective.
To solve it is recommended to prepare an information matrix:

2. Definition of Decision Variables

It consists of symbolically representing all the parameters that enter into the formation of the
linear programming model.

x1
X2

Xm

3. Objective Function Formulation

It consists of defining the objective or goal that you wish to achieve. This function shows the
relationship between total production and the maximum utility to be achieved, or the minimum
cost to carry out said production or any other objective pursued.

Yo 21-YO
LINEAR PROGRAMMING

4. Statement of Restrictions

Because there are limited resources between competing activities, it is necessary to


formulate constraints that clearly show the conditions that must be met to solve the problem.

5. Formulation of Non-Negativity Conditions

It consists of restricting all variables Xj to be greater than or equal to zero.

1.5 APPLICATIONS OF THE LINEAR PROGRAMMING MODEL IN


OPERATIONS MANAGEMENT
J

This part should be given special importance because it is the most important tool within the field
of operational research. It provides us with a mathematical treatment of the problems.
We are going to pose the problems in an abstract way through mathematical modeling that will
allow us to solve them numerically.

1.5.1. Project optimization

This part of operational research deals with the treatment of problems through
mathematical modeling of the problem. It is about optimizing systems based on certain
premises.

In every system there will be a set of variables and the relationships between these
variables.

1.5.2. Examples

1. We have type A tables with 2 m 2345 of wood, 1 hour of work and a profit of 80 soles
each, and type B with 1 m2 of wood, 3 hours of work and 50 soles of profit. If there are
600 m2 of wood and a maximum of 900 hours, determine how to obtain the maximum
benefit. Formulate the linear programming program.

Solution:

Taking into account the following steps, we solve the problem:

1) Information Matrix

2 Definition of Decision Variables


X1= Number of tables of type A.
X2= Number of type B tables.

zmax 80X1 + 50X2


3 Objective Function Formulation

4 Statement of Restrictions

2X1 + X2 ≤ 600
X1 + 3X2 ≤ 900

X1 ≥ 0; X2 ≥ 0
5 Formulation of the Non-Negativity Condition

2. Two types of devices A and B are manufactured in workshops 1 and 2. In each of the
workshops, 100 hours of work are done per week. Each device A requires 3 hours of
workshop 1 and one hour of workshop 2. And each device B, 1 and 2 hours
respectively. Each device A is sold for 100 soles and each device B for 150 soles.
Calculate the number of devices in each

Yo 22-YO
LINEAR PROGRAMMING

Type A Type B Total


m2
Wood ( ) 2 1 600
Work (hours) 1 3 900
Benefits/) 80 50
type that must be produced to achieve maximum turnover. Formulate the linear
programming program.

Solution:

Taking into account the following steps, we solve the problem: 1) Information
Matrix

Type A Type B Total


Workshop 1 (hours) 3 1 100
Workshop 2 (hours) 1 2 100
Price per device (S/) 100 150

2) Definition of Decision Variables


X1= Number of type A devices.
X2= Number of type B devices.

zmax 100X1 + 150X2


3) Objective Function Formulation

4) Statement of Restrictions

3X1 + X2 ≤ 100
X1 + 2X2 ≤ 100

X1 ≥ 0; X2 ≥ 0
5) Formulation of the Non-Negativity Condition

3. Farm animals should take at least 60 mg of vitamin A and at least 90 mg of vitamin


B. There are two compounds with these vitamins. Compound 1 contains 10 mg of
vitamin A and 15 mg of B, and each dose costs $0.50. Compound 2 contains 10 mg
of each vitamin, and each dose costs $0.30. In addition, it is recommended not to
take more than 8 doses per day. Calculate what dose you need to take so that the
cost is minimal. Formulate the linear programming program.

Solution:

Taking into account the following steps, we solve the problem:

1) Information Matrix

Compound 1 Compound 2 Total


Vitamin A (mg) 10 10 60
Vitamin B (mg) 15 10 90
Cost ($/) 0,50 0,30
2) Definition of Decision Variables
X1= Number of doses of compound 1.
X2= Number of doses of compound 2.
3) Objective Function Formulation

Z
min = 0.50X1 + 0.30X2
4) Statement of Restrictions

10X1 + 10X2 ≥ 60
15X1 + 10X2 ≥ 90

Yo 23-YO
LINEAR PROGRAMMING

X1 ≥ 0; X2 ≥ 0
5) Formulation of the Non-Negativity Condition

4. Feed A and B are the two types of feed for cows. Food A costs 12 soles/ounce and
food B costs 8 soles/ounce. You want to minimize total food costs while meeting all
three vitamin restrictions. At least 30 units of vitamin P, 50 units of vitamin W and 60
units of vitamin Q are desired. Each ounce of A food provides 2 units of vitamin P, 4
units of vitamin W, and 7 units of vitamin Q. Food B provides 3 units of P, 3 units of
W, and 6 units of Q per ounce respectively. How many ounces of each food should
they buy? Formulate the linear programming program.

Solution:

Taking into account the following steps, we solve the problem:

1) Information Matrix

Total
Food A Food B
Vitamin P 2 3 30
Vitamin W 4 3 50
Vitamin Q 7 6 60
Price per device (S/) 12 8

2) Definition of Decision Variables


X1= Total ounces purchased of food A.
X2= Total ounces of food B purchased.

Zmin= 12X1 + 8X2


3) Objective Function Formulation

Yo 24-YO
LINEAR PROGRAMMING

4) Statement of Restrictions

4X1 + 3X2 ≤ 50
2X1 + 3X2 ≤ 30
7X1 + 6X2 ≤ 60

X1 ≥ 0; X2 ≥ 0
5) Formulation of the Non-Negativity Condition

SUMMARY
To carry out the approach of a linear program, it is important to know whether the problem
is to increase profits, benefits, etc. (Maximize) or decrease costs, expenses, etc.
(Minimize). To do this, the following steps are taken into account:
7 1. Information Matrix
8 2. Definition of decision variables
3. Objective Function Formulation
4. Statement of Restrictions
5. Formulation of the Non-Negativity Condition.

ACTIVITIES

1. Rulisa produces type I and II cake dough. Type I is sold at 5 euros per kilo,
spending 1 euro on ingredients and 2 on labor. Type II is sold for 3 euros and both
the ingredients and the work cost 1 euro. To make dough, two types of activities
are needed: kneading and baking. Rulisa has 18 hours of kneading and 12 hours
of baking per week. Type I dough requires 2 hours of kneading and 3 hours of
baking, while type II dough requires 3 hours of kneading and 1 hour of baking. If
the amount of dough that can be sold is unlimited, it optimizes Rulisa's weekly
profits. Formulate the linear programming program.

2. INTEL company produces two computer devices, (product 1 and product 2) and
requires metal parts and electrical components. Management wants to determine
how many units of each product to manufacture to maximize profit. For every unit
of product 1, 1 unit of metal parts and 2 units of electrical components are required.
For every unit of product 2, 3 units of metal parts and 2 units of electrical
components are needed. The company has 200 units of metal parts and 300
electrical components. Each unit of product 1 gives a profit of $2 and each unit of
product 2 gives a profit of $3.00

3. A chocolate factory has 500 kg stored. chocolate, 100 Kg. of almonds and 85 Kg.
of fruits. It produces two types of boxes: type A contains 3 kg. chocolate, 1 Kg. of
almonds and 1

1 25-YO
LINEAR PROGRAMMING

Kg. of fruit; type B contains 2 kg. chocolate, 1.5 Kg. of almonds and 1 Kg. of
fruits. The prices of type A and B boxes are €13 and €13.50, respectively. How
many boxes of each type should you make to maximize your sales?

4. A chemical company schedules the production of certain types of mixtures,


where material M is equal to $8 per package and weighs 4 kilos, material N is
equal to $5 per package and weighs 2 kilos. 100 kilos of the mix are required
and no less than 20 packets of N need to be used to make the mix. How many
packages should be used to minimize costs?

5. On a chicken farm, a "fattening" diet is given with a minimum composition of 15


units of substance A and another 15 of substance B. Only two types of
compounds are available on the market: type I with a composition of one A unit
and five B units, and type II with a composition of five A units and one B unit.
The price of type I is 10 euros and type II is 30 euros. The question is: What
quantities of each type should be purchased to cover needs at minimum cost?

6. Three chemical elements are to be obtained from substances A and B. A kilo of


A contains 8 grams of the first element, 1 gram of the second and 2 of the third;
a kilo of B has 4 grams of the first element, 1 gram of the second and 2 of the
third. It is desired to obtain at least 16 grams of the first element and the
quantities of the second and third must be at most 5 and 20 grams,
respectively; and the quantity of A is at most twice that of B. Calculate the kilos
of A and B that must be taken so that the cost is minimal if a kilo of A costs 2
euros and a kilo of B costs 10 euros. Can any restrictions be removed?

=
SECOND UNIT
PRIMAL SOLUTION OF LINEAR PROGRAMMING
J
SPECIFIC OBJECTIVES
• Provide the necessary knowledge for the optimal feasible solution, focusing on the
Dantzing algorithm as a basis for applying the simplex method to obtain the optimal
solution.
• Interpret the results of results in the cases of maximization and minimization.
• Identify the special cases of the optimal feasible solution and their respective interpretation
of results.

INTRODUCTION

The objective of this topic is for the student to learn to recognize Graphic methods and the
Simplex algorithm that helps make a decision by maximizing or minimizing with the optimal result.
The graphical method is a quick and easy way to solve Linear Programming problems, as long as
the model consists of two variables. For models with three or more variables, the graphical
method is impossible.
It consists of geometrically representing the restrictions, technical conditions and objective
function.

2.1 GRAPHICAL METHOD – MAXIMIZATION AND MINIMIZATION SOLUTION

Yo 26-YO
LINEAR PROGRAMMING

2.1.1 Mathematical representation of the linear model


A linear programming problem in two variables has the following standard formulation:
Maximize Z = f(X1, X2) = aX1 + bX2
1 +
≤C
Subject to: a1X
b1X

2
1
a2X1 b2X2
+ ≤C2
Cn 1 + bnX
3 ≤ Cn 1
Maximizing can be changed to minimizing, and the meaning of inequalities.
In a linear programming problem the following are involved:

be optimized. In that expression X


The function Z = aX1 + bX2 called the objective function and which needs to

1 and X2 are the decision variables, while a,


b, and c are constants.
• The constraints must be linear inequalities. Their number depends on the
problem at hand. The character of inequality is imposed by limitations,
availability or needs, which are: less than … ( < or ); at least… ( > or ). Whether
it is a matter of maximizing or minimizing, inequalities can occur in either
direction.

To the set of values of X


1 and X2 that verify each and every one of the
restrictions is called a feasible set (or region). Any point in this set can be a
solution to the problem; any point not belonging to this set cannot be a solution.

• The optimal solution to the problem will be a pair of values from the feasible set

1, X2) take the maximum or minimum value.


that makes f (X

2.1.2 Basic Solution


It is that which is found at the intersection of straight lines or hyperplanes or at the
intersection with coordinate axes.

Yo 27-YO
LINEAR PROGRAMMING

In a system where there are “n” variables and “m” constraints; a basic solution is
obtained by making (n + m) variables equal to zero and the values of the remaining
variables are determined by solving the “m” equations with “n” variables. The “n”
variables are called basic variables.

2.1.3.1 Basic Feasible Solution


It is a basic solution that belongs to the feasible region.

2.1.3.2 Basic Degenerate Feasible Solution


It is a basic feasible solution, in which one or more basic variables take the
value of zero.
If all the basic variables are positive, there will be a basic, non-degenerate
feasible solution.

2.1.3.3 Optimal solution or optimal program


It is a feasible solution that maximizes or minimizes the objective function (as
the case may be).

2.1.3 Feasible Region


It is one that meets all the restrictions and conditions of non-negativity.
The solution to a linear programming problem, assuming it exists, must lie in the region
determined by the various inequalities. This is called the feasible region, and may or
may not be bounded.

Bounded feasible Unbounded feasible region


region
The feasible region includes or does not include the sides and vertices, depending on
whether the inequalities are in the broad sense (≤ or ≥) or in the strict sense (< or >). If
the feasible region is bounded, its graphical representation is a convex polygon with a
number of sides less than or equal to the number of constraints.

2.1.4.1 Feasible Solution


It is any point located in the feasible region.
2.1.4 Geometric Interpretation

2.1.4.1 Properties of a Solution to the Linear Programming Problem

To find the solution of a linear program, it is necessary to execute two steps: first
the feasible region is found and then the optimal point (or points) on the feasible
region are found.

The optimal solution of a linear program has certain properties, the application of
which facilitates the task of calculating the optimal point (or points).

Theorem 1:
The set of all feasible solutions to the linear programming problem is a convex

1 28-YO
LINEAR PROGRAMMING

set.

Theorem 2:
The objective function reaches its maximum or minimum at an extreme point of
the convex set, generated by the set of feasible solutions to the linear
programming problem.
If it attains this maximum (minimum) at more than one extreme point, then it
takes the same value for every convex combination of these particular points.
Applications of these two theorems:
1. There is an extreme point of the convex polyhedron at which the objective
function has its maximum or minimum.
2. Each basic feasible solution corresponds to an extreme point of the convex
polyhedron.

The steps required to perform the method are:

1. Find the restrictions of the problem.


2. Non-negativity constraints, Xi ≥ 0, entail all possible values.
3. Substitute ≥ and ≤ by (=) for each constraint, which produces the equation of
a straight line.
4. Draw the straight line corresponding to each restriction on the plane. The
region in which each restriction is located, the area corresponding to each
restriction is defined by the sign corresponding to each restriction (≥ or ≤) a
point is evaluated before and after the drawn line, the point that satisfies the
inequality will indicate the corresponding area.
5. The space in which all three constraints are satisfied is the feasible area.
Each point located on the boundary of the feasible area space, that is, that
satisfies all the restrictions, represents a feasible point.
6. Parallel lines representing the objective function are drawn by assigning
arbitrary values to determine the slope and the direction in which the value of
the objective function increases or decreases.

7. The optimal solution can be determined by observing the direction in which


the objective function increases, the objective function is graphed, if it is a
minimization problem the optimal solution is the first feasible point that
touches the function Z, and if on the contrary it is a maximization problem,
then it will be the last of the feasible points that touches the function Z.

Therefore, the graphical method consists of outlining on the first quadrant


(due to the non-negativity condition) the region of feasible solutions, and
then graphing the objective function on it, the optimal program or programs
are located.

GRAPHICAL METHOD - MAXIMIZATION


Example 1:
Let the following Linear Program be:

Zmax = 5X1+ 3X2


Subject to:

3X1+5X2 ≤ 15
5X1+2X2 ≤ 10
X1, X2 ≥ 0

29 -YO
LINEAR PROGRAMMING

Solution

1. We equalize the inequalities like this:


3X1+5X2 = 15 (1)
5X1+2X2 = 10 (2)
2. We determine two points of each of the equations to find the line of the equation, like this:

From (1) If X1 = 0, X2 = 3 --------" p (0, 3)


L1
If X2 = 0, X1 = 5 --------• p (5, 0)

---------• p (0, 5) L2
From (2) If X1 = 0, X2 = 5
If X2 = 0, X1 = 2 ---------» p (2, 0)

3. We graph and find convex polygons; ≤ downwards or to the left with respect to the axis.

Yo 30-YO
LINEAR PROGRAMMING

4. We find the optimal solution taking into account the objective function and the points of the
equation, as follows:

Zmax = 5X1+ 3X2

p (0, 3) = 5(0)+ 3 (3) = 0 + 9 = 9


p (1; 2.4) = 5 (1) + 3 (2,4) = 5 + 7,2 = 12,2MAX
p (2, 0) = 5(2)+ 3 (0) = 10 + 0 = 10

Example 2:

Let the following Linear Program be:

Zmax = X1+ 1.5X2


Subject to:
2X1+ 2X2 ≤ 160
X1+ 2X2 ≤ 120

X1, X2 ≥ 0
4X1+ 2X2 ≤ 280
Solution

✓z..........................................................................................................................................11
1. We equalize the inequalities like this:

FIRST UNIT.........................................................................................................................11
OPERATIONS RESEARCH AND LINEAR PROGRAM..................................................11

C =X, j=1...................................................................................................................................19
1 =1...................................................................................................................................................19
= SECOND UNIT.................................................................................................................27
PRIMAL SOLUTION OF LINEAR PROGRAMMING.....................................................27
ENTER......................................................................................................................................48
Zj -.....................................................................................................................................48
Zj -.....................................................................................................................................48
Zj -.....................................................................................................................................50
ENTER......................................................................................................................................50

31 -YO
LINEAR PROGRAMMING

Zj -.....................................................................................................................................51
ENTER......................................................................................................................................52
SALE........................................................................................................................................52
Zj -.....................................................................................................................................53
€ THIRD UNIT.....................................................................................................................55
DUALITY AND POST-OPTIMAL ANALYSIS.................................................................55
X, + 2X2 < 200..........................................................................................................................59
X, + X2 < 140............................................................................................................................59
X, > 0 ; X, > 0............................................................................................................................59
Y + Y > 30........................................................................................................................59
—• 2Y + Y > 50...........................................................................................................59
And, > 0 ; And, > 0....................................................................................................................59
FOURTH UNIT....................................................................................................................69
SPECIAL APPLICATIONS OF LINEAR PROGRAMMING............................................69
2)........................................................................................................................................71
2)........................................................................................................................................72
3)........................................................................................................................................72

2. We determine two points of each of the equations to find the line of the equation, like this:
From (1) If X1 = 0, X2 = 80
If X2 = 0, X1 = 80
* p (0, 80)
L1
* p (80, 0)

Yo 32-YO
LINEAR PROGRAMMING

From (2) If X1 = 0, X2 = 60
If X2 = 0, X1 = 120
Zmax = X1+ 1.5X2 * p (0, 60)
-» p (120, 0)

From (3) If X1 = 0, X2 = 140 ” p (0, 140) L3


If X2 = 0, X1 = 70 • p (70, 0)

3. We graph and find convex polygons; ≤ downwards or to the left

Yo 33-YO
LINEAR PROGRAMMING

p (0, 60) = (0) + 1,5 (60) = 0 + 90 = 90


p (40; 40) = (40) + 1.5 (40) = 40 + 60 = 100 MAX
p (60, 20) = (60) + 1,5 (20) = 60 + 30 = 90
p (70, 0) = (70) + 1,5 (0) = 70 + 0 = 70

GRAPHIC METHOD - MINIMIZATION


Example 3:
Let the following Linear Program be:

Zmin = 10X1+ 30X2


Subject to:
X1+ 5X2 ≥ 15

5X1+ X2 ≥ 15
X1, X2 ≥ 0
Solution
1. We equalize the inequalities like this:

X1+ 5X2 = 15 (1)

5X1+ X2 = 15 (2)

2. We determine two points of each of the equations to find the line of the equation, like this:

✓z 11
FIRST UNIT * p (0, 3) L1 11
OPERATIONS RESEARCH AND • p(15, 0)
LINEAR PROGRAM 11
• p(0, 15)

C =X, j=1 L2 19
• p(3, 0)
1 =1 19
= SECOND UNIT 27
PRIMAL SOLUTION OF LINEAR PROGRAMMING 27
ENTER 48
Zj - 48
Zj - 48
Zj - 50
ENTER 50
Zj - 51
ENTER 52
SALE 52
Zj - 53
€ THIRD UNIT 55
DUALITY AND POST-OPTIMAL ANALYSIS 55
X, + 2X2 < 200 59
X, + X2 < 140 59

34 -YO
LINEAR PROGRAMMING

X, > 0 ; X, > 0 59
Y + Y > 30 59
—• 2Y + Y > 50 59
And, > 0 ; And, > 0 59
FOURTH UNIT 69
SPECIAL APPLICATIONS OF LINEAR PROGRAMMING 69
2) 71
2) 72
3) 72

3. We graph.

Yo 35-YO
LINEAR PROGRAMMING

NOTE:
In green: the points where the solution is located.
In red: the points that do not belong to the feasible region.

4. We find the optimal solution taking into account the objective function and the points of the
equation, as follows:

Zmin = 10X1+ 30X2

p (0;15) = 10(0) + 30(15) = 0 + 450 = 450


p (2.5; 2.5) = 10(2.5) + 30(2.5) = 15 + 75 = 100 Min
p (15; 0) = 10(15) + 30(0) = 150 + 0 = 150

Example 4:
Let the following Linear Program be:
Zmin = 3X1+ 2X2
Subject to:
5X1+ 2X2 ≥ 20

36 -YO
LINEAR PROGRAMMING

2X1+ 4X2 ≥ 20
3X1+ X2 ≥ 9
X1, X2 ≥ 0
Solution

✓z..........................................................................................................................................11
1. We equalize the inequalities like this:

FIRST UNIT.........................................................................................................................11
OPERATIONS RESEARCH AND LINEAR PROGRAM..................................................11

C =X, j=1...................................................................................................................................19
1 =1...................................................................................................................................................19
= SECOND UNIT.................................................................................................................27
PRIMAL SOLUTION OF LINEAR PROGRAMMING.....................................................27
ENTER......................................................................................................................................48
Zj -.....................................................................................................................................48
Zj -.....................................................................................................................................48
Zj -.....................................................................................................................................50
ENTER......................................................................................................................................50
Zj -.....................................................................................................................................51
ENTER......................................................................................................................................52
SALE........................................................................................................................................52
Zj -.....................................................................................................................................53
€ THIRD UNIT.....................................................................................................................55
DUALITY AND POST-OPTIMAL ANALYSIS.................................................................55
X, + 2X2 < 200..........................................................................................................................59
X, + X2 < 140............................................................................................................................59
X, > 0 ; X, > 0............................................................................................................................59
Y + Y > 30........................................................................................................................59
—• 2Y + Y > 50...........................................................................................................59
And, > 0 ; And, > 0....................................................................................................................59
FOURTH UNIT....................................................................................................................69
SPECIAL APPLICATIONS OF LINEAR PROGRAMMING............................................69
2)........................................................................................................................................71
2)........................................................................................................................................72
3)........................................................................................................................................72

2. We determine two points of each of the equations to find the line of the equation, like this:

From (1) If X1 = 0, X2 = 10 ----------• p (0, 10) p


If X2 = 0, X1 = 4 ---------• (4, 0)
L1

From (2) If X1 = 0, X2 = 5 ---------• p (0, 5) L2

Yo 37-YO
LINEAR PROGRAMMING

If X2 = 0, X1 = 10 ---------• p (10, 0)

From (3) If X1 = 0, X2 = 9 ---------• p (0, 9) L3


If X2 = 0, X1 = 3 ---------• p (3, 0)

3. We graph.

38 -YO
LINEAR PROGRAMMING

p (0.10)

p (2.5; 3.75) C
3- -

2- -

E p (10.0)

3
L3

L1

NOTE:
In green: the points where the solution is located.
In red: the points that do not belong to the feasible region.

4. We find the optimal solution taking into account the objective function and the points of the
equation, as follows:
Zmin = 3X1+ 2X2
p (0;10) = 3(0) + 2(10) = 0 + 20 = 20
p (2.5; 3.75) = 3(2.5) + 2(3.75) = 7.5 + 7.5 = 15 Min
p (10; 0) = 3(10) + 2(0) = 30 + 0 = 30

Yo 39-YO
LINEAR PROGRAMMING

GRAPHIC METHOD – MAXIMIZATION AND MINIMIZATION


(RESTRICTIONS – MIXED SIGNS)
Example 5:
Let the following Linear Program be:

Zmax = 10X1+ 40X2


Subject to:
10X1+ 2X2 ≤ 200
15X1+ 10X2 ≥ 150
X1, X2 ≥ 0
5X1+ 20X2 ≤ 400
Solution

✓z..........................................................................................................................................11
1. We equalize the inequalities like this:

FIRST UNIT.........................................................................................................................11
OPERATIONS RESEARCH AND LINEAR PROGRAM..................................................11

C =X, j=1...................................................................................................................................19
1 =1...................................................................................................................................................19
= SECOND UNIT.................................................................................................................27
PRIMAL SOLUTION OF LINEAR PROGRAMMING.....................................................27
ENTER......................................................................................................................................48
Zj -.....................................................................................................................................48
Zj -.....................................................................................................................................48
Zj -.....................................................................................................................................50
ENTER......................................................................................................................................50
Zj -.....................................................................................................................................51
ENTER......................................................................................................................................52
SALE........................................................................................................................................52
Zj -.....................................................................................................................................53
€ THIRD UNIT.....................................................................................................................55
DUALITY AND POST-OPTIMAL ANALYSIS.................................................................55
X, + 2X2 < 200..........................................................................................................................59
X, + X2 < 140............................................................................................................................59
X, > 0 ; X, > 0............................................................................................................................59
Y + Y > 30........................................................................................................................59
—• 2Y + Y > 50...........................................................................................................59
And, > 0 ; And, > 0....................................................................................................................59
FOURTH UNIT....................................................................................................................69
SPECIAL APPLICATIONS OF LINEAR PROGRAMMING............................................69
2)........................................................................................................................................71
2)........................................................................................................................................72

40 -YO
LINEAR PROGRAMMING

3)........................................................................................................................................72

2. We graph

Yo 41-YO
LINEAR PROGRAMMING

L3

NOTE:
In green: the points where the solution is located.
In red: the points that do not belong to the feasible region.

3. We find the optimal solution taking into account the objective function and the points of the
equation, as follows:
Zmax = 10X1 + 40X2
p (0, 20) = 10(0) + 40(20) = 0 + 800 = 800

✓z
p (320/19; 300/19) = 10(320/19) + 40(300/19) = 800 MAX
11
FIRST UNIT 11
OPERATIONS RESEARCH AND LINEAR PROGRAM 11

C =X, j=1 19
1 =1 19
= SECOND UNIT 27
LINEAR PROGRAMMING

PRIMAL SOLUTION OF LINEAR PROGRAMMING 27


ENTER 48
Zj - 48
Zj - 48
Zj - 50
ENTER 50
Zj - 51
ENTER 52
SALE 52
Zj - 53
€ THIRD UNIT 55
DUALITY AND POST-OPTIMAL ANALYSIS 55
X, + 2X2 < 200 59
X, + X2 < 140 59
X, > 0 ; X, > 0 59
Y + Y > 30 59
—• 2Y + Y > 50 59
And, > 0 ; And, > 0 59
FOURTH UNIT 69
SPECIAL APPLICATIONS OF LINEAR PROGRAMMING 69
2) 71
2) 72
3) 72

Example 6:

Let the following Linear Program be:

Zmin = 3X1+ 2X2


Subject to:
3X1+ 4X2 ≤ 12
3X1+ 2X2 ≥ 2
X1, X2 ≥ 0
Solution
1. We equalize the inequalities like this:
3X1+ 4X2 = 12 (1)
3X1+ 2X2 = 2 (2)
2. We determine two points of each of the equations to find the line of the equation, like this:
From (1) If X1 = 0, X2 = 3
If X2 = 0, X1 = 4
From (2) If X1 = 0, X2 = 1
If X2 = 0, X1 = 2/3 * p (0, 3)
♦ p (4, 0)

* p (0, 1)
L2 Yo 43-YO
* p (2/3, 0)
LINEAR PROGRAMMING

NOTE:
In green: the points where the solution is located.
In red: the points that do not belong to the feasible region.

4. We find the optimal solution taking into account the objective function and the points of the
equation, as follows:
Zmin = 3X1+ 2X2
p (0, 3) = 3(0) + 2(3) = 0 + 6 = 6
p (4; 0) = 3(4) + 2(0) = 12
p (2/3, 0) = 3(2/3) + 2(0) = 2 + 0 = 2 Min
p (0, 1) = 3(0) + 2(1) = 0 + 2 = 2 Min

SUMMAR
Y
To perform the graphic method it is important to know the following steps:
6. The sign restrictions ≥ or ≤ are changed to =.
7. Zero is assigned to each variable in order to determine points.
8. Draw the straight line corresponding to each restriction on the plane. The region in
which each restriction is located.
9. The area corresponding to each restriction is defined by the sign corresponding to
each restriction (≥ or ≤). A point is evaluated before and after the drawn line. The
point that satisfies the inequality will indicate the corresponding area.
10. The feasible region is considered where there is intensity of encounters of the lines
depending on the definition of the sign.

ACTIVITIES

2. Let the following be the linear program:

Zmax = 50X1+ 120X2


Subject to:
X1+ X2

110100X1+ 200X2 ≤ 10000
10X1+ 30X2 ≤ 1200
X1,X2 ≥ 0

2. Let the following be the linear program:


Zmin = 5X1+ 8X2
Subject to:
4X1+ 10X2 ≥ 40
10X1+ 5X2 ≥ 50
X1 X2 ≥ 0
7X1+ ,7X2 ≥ 49

2. Let the following be the linear program:

Zmax = 300X1+ 100X2


Subject to:
40X1+ 8X2 ≤ 800
X2 ≥ 60
10X1+ 5X2 ≥ 320
X1, X2 ≥ 0
2. Let the following be the linear program:
Zmin = 25X1+ 22X2
Subject to:
LINEAR PROGRAMMING

X1+ X2 ≤ 15
2000X1+ 3000X2 ≥ 24000

X1, X2
1000X1+ 500 X2 ≥ 10000

2.2. SIMPLEX ALGORITHM – MAXIMIZATION AND MINIMIZATION SOLUTION

The Simplex method is one of the methods that exist for calculating linear programs and consists
of a process that follows a series of steps starting from an original board (which is posed almost
identically as in matrix inversion), originating others until having determined a solution that is
called the optimal solution.
2.2.1. Slack and Excess Variables
There are restrictions such as inequalities, where there is always an “excess” or “missing”
amount that we do not yet know but that will need to be assumed (considered as an
unknown), so that it compensates for the other member of the restriction. This unknown
variable will be calculated or not, depending on the optimization of the objective function.
The slack variable is the one that will be added to the constraint variables, if the sign of
the inequality is ≤.
The excess variable is the one that will subtract the variables generated consecutively
and will add the so-called artificial variables with the purpose of compensating them in the
restrictions if the sign is ≥.
Artificial Variable: It is the variable that will be generated when the consecutive variables
are subtracted from the restrictions if the sign is ≥ in which said variable will be
represented by λ and it is the one that will be added, considering that said variable has a
null value.

Yo 45-YO
LINEAR PROGRAMMING

2.2.2. Examples of using the Slack and Excess variables

+ ^ 2 + 0^3 +

2^2 3^1+ 2^2


1. Zmax = ^1 ^1 +≤ 4------------►

2. Zmin = 2^1
^ + 0^3 + 0^4 + Mλ1 + Mλ
-

3. Zmax = 5^1 + 3^2 + Mλ1 +


2
Excess Variable
Variable

2^1+ 4^2 ≥ 5 2^1 +


Artificial

3^1+ ^2 ≥ 2 4^2
^
- =5

3^1+ ^
3 =2
2

^ +^
Mλ2

2^ + 3^
1 2 =2

– ^1 ^2 + λ
1 2 = 4

2^1+ +λ
2.2.3. The Simplex Algorithm + =2 Artificial Variable
Tabular Representation

3 ^2
=4
To represent the tabulation of the
simplex algorithm, the following steps are required:

1. The system of equations where a base is present is established.


2. The variables, their coefficients and their costs, as well as the magnitudes (Bi) of the
second member of the equations, are arranged on an original board. On said board
the variables and magnitudes will be located or arranged according to an order which
the calculation procedure allows us.
3. Inside the board we will arrange the variables whose coefficients allow us to form the
base in a box.
4. As was done in the calculation of the inverse matrix of a given matrix, we determine
the PIVOT element; starting from the previous calculation of the row Zj – Cj for the
variable that enters the solution as the case may be; lower negative value if it is a
maximization and higher positive value if it is a minimization.
5. We determine the lowest positive coefficient for the output variable by dividing each Bi
value by the corresponding element of the input variable column, the one found
previously, then the intersection of the input and output variables determines the pivot.
6. Once the pivot and semi-pivots have been determined, each of the elements or
coefficients are determined on the next board as is done in the matrix inversion
process.
7. The remaining steps are similar until the optimal solution is found, that is, when in the
row Zj – Cj, there is no negative for maximization and if it is minimization in the row Zj
– Cj there is no positive value.

2.2.4. Applications in some examples of Maximization and Minimization

Zmax = ^1 + 2^2
1. Let the following linear program be given the solution by the simplex algorithm.

2^1+ ^2 ≤ 4
^1- ^2 ≤ 6
SA:

Yo 46-YO
^ ≥ 0; ^ ≥0
LINEAR PROGRAMMING

1 2
1st Step:

Zmax = ^1 + 2^2 + 0^3 + 0^4


2^1+ ^2 + ^3
The system of equations is established where a base is presented:

^1- ^2 + ^4 = 6
=4

Here ^3 and ^4 slack variables will be initially formed.


2nd Step:
The variables, their coefficients and costs or utilities, as well as the magnitudes of the
second member are arranged in an original board as follows:

ENTER
C
SALE Ck Xk Bi
1 2 0 0
^ ^ ^ ^
1 2 3 4
0 ^3 4 2 1 1 0 α = 4/1 = 4
^
4
zi
0 6 1 -1 0 1 α = 6/-1 = -6

zi -G
0 0 0 0 0
-1 -2 0 0

Zj -
As it is a matter of maximization so that the row of

will have to Cj must the


choose be zero or positive.
variable In this
that should case
enter the there
secondis board.
still no optimal solution. You

Zj -
It is chosen in the

Cj when it comes to maximization the smallest negative, in this


case (-2) in this column is the variable ^2 so that this variable can enter, it must exit, ^3
or ^4 as the case may be, for this it is necessary to do:

α = 4/1 = 4 and α = 6/-1 = -6

The variable that should come out will be ^3 because it is the smallest positive. Don't
take the negatives into account. So the 2nd board is as follows:

Xk
Ck
1 2 0 0
^ ^ ^ ^
Bi j 1 2 3 4
^2
Ck

2 4 2 1 1 0
^
0 4 10 3 0 1 1

zi 8 4 2 2 0

Z-CJ 3 0 2 0

The intersection of the variable that enters and exits is the Pivot and the other values in
the same column are considered as the semi pivot /
Calculating on the second board:

Yo 47-YO
LINEAR PROGRAMMING

1st row: Pivotal coefficients: 4/1 ; 2/1 ; 1/1 ;1/1 ; 0/1


2nd row: The following rule must be applied: CI – CP x SP
Where:
CI = Initial coefficients (from the previous board)
CP = Pivotal coefficients (of what has been found)
SP = Semi – pivot in this case -1

Applying the rule we have:

✓z..........................................................................................................................................11
FIRST UNIT.........................................................................................................................11
OPERATIONS RESEARCH AND LINEAR PROGRAM..................................................11

C =X, j=1...................................................................................................................................19
1 =1...................................................................................................................................................19
= SECOND UNIT.................................................................................................................27
PRIMAL SOLUTION OF LINEAR PROGRAMMING.....................................................27
ENTER......................................................................................................................................48
Zj -.....................................................................................................................................48
Zj -.....................................................................................................................................48
Zj -.....................................................................................................................................50
ENTER......................................................................................................................................50
Zj -.....................................................................................................................................51
ENTER......................................................................................................................................52
SALE........................................................................................................................................52
Zj -.....................................................................................................................................53
€ THIRD UNIT.....................................................................................................................55
DUALITY AND POST-OPTIMAL ANALYSIS.................................................................55
X, + 2X2 < 200..........................................................................................................................59
X, + X2 < 140............................................................................................................................59
X, > 0 ; X, > 0............................................................................................................................59
Y + Y > 30........................................................................................................................59
—• 2Y + Y > 50...........................................................................................................59
And, > 0 ; And, > 0....................................................................................................................59
FOURTH UNIT....................................................................................................................69
SPECIAL APPLICATIONS OF LINEAR PROGRAMMING............................................69
2)........................................................................................................................................71
2)........................................................................................................................................72
3)........................................................................................................................................72

Yo 48-YO
LINEAR PROGRAMMING

Zj -
Watching the queue

Cj, on the 2nd board all are zeros and positive, therefore the
optimal solution has been reached.

^2 = 4 and ^4 = 10, and all those not involved ^1, ^


They intervene in the optimal solution:
3

Zmax = ^1 + 2^2 + 0^3 + 0^4 = 0 + 2(4) + 0 + 0(10) Zmax = 8


take values of zero.

Zmin = 5^1 + 6^2


2. Let the following linear program be:

^ +^ ≥2
SA:

4^ + ^ ≥ 4
1 2

^ ≥ 0; ^ ≥0
1 2

1 2
1st Step:
The system of equations is established where a base is presented:

Zmin = 5^1 + 6^2 ^ 0^4 + Mλ1


^1+ ^2 - ^3 + λ1
+0 3 + + Mλ2

4^1+ ^2 - ^4 + λ2 = 4
=2

Here the excess and artificial variables -^3; -^4; +λ1; +λ2 will be initially formed.
2nd Step:
The variables, their coefficients and costs or utilities, as well as the magnitudes of
the second member are arranged in an original board as follows:

ENTER
C
Ck Xk B λ1 λ2
5 6 0 0 M M
^ ^ ^ ^
1 2 3 4
λ1
λ2
M 2 1 1 -1 0 1 0 α = 2/1 = 2
SALE
Zi
4--------- M 4 4 1 0 -1 0 1 α = 4/4 = 1
7M 5M 2M -M -M M M
ZC 5M-5 2M-6 -M -M 0 0

Zj -
As it is a matter of minimization so that the row can be an optimal solution

Cj must be negative values and zeros, if M is considered to have a value of


1. In this case there is still no optimal solution. You will have to choose the variable
that should enter the second board.

It is chosen in the

M, in this case (5M) in this column is the variable ^1 so that this variable can enter,
Zj when it comes to minimization the highest positive value of the

it must exit, λ1 or λ2 as the case may be, for this it is necessary to do:

Yo 49-YO
LINEAR PROGRAMMING

α = 2/1 = 2 and α = 4/4 = 1


The intersection of the variable that enters and exits is the Pivot and the other values
in the same column are considered as the semi pivot /

Yo 50-YO
LINEAR PROGRAMMING

Calculating on the second board:


1st row: Pivotal coefficients: (4/4); (4/4); (1/4); (0/4); (-1/4); (0/4); (1/4)
2nd row: The following rule must be applied:
CI – CP x SP
Where:
CI = Initial coefficients (from the previous board)
CP = Pivotal coefficients (of what has been found)
SP = Semi – pivot in this case 1

Applying the rule we have:

2 – 1(1) = 2 – 1 = 1
1 – 1 (1) = 1 - 1 = 0
1 – 1/4 (1) = 1 - 1/4 = 3/4
-1 – 0 (1) = -1 – 0 = -1
0 – -1/4 (1) = 0 + 1/4 = 1/4
1 – 0 (1) = 1 – 0 = 1
0 – 1/4 (1) = 0 - 1/4 = -1/4

The variable that should come out will be λ2 because it is the lowest positive value of
the α. So the 2nd board is as follows:

ENTER
Cl
Xk ^1 ^2 ^3 λ1 λ
5 6 0 0 M M

BI j
λ1
SALE Ck 2

M 1 0 3/4 -1 1/4 1 -1/4 α = (1)/(1/4) = 4


^
5 1 1 1 1/4 0 -1/4 0 1/4 α = (1)/(-1/4) =-4

zl M+5 5 3M/4+5/4 -M M/4-5/4 M -M/4+5/4


-
zl cl
DX 0 3M/4-19/4 -M M/4-5/4 0 -5M/4+5/4
The intersection of the variable that enters and exits is the Pivot and the other values
in the same column are considered as the semi pivot /
Calculating on the second board: 1st row: Pivot coefficients: (1/1/4); (0/1/4); (3/4/1/4);
(-1/1/4); (1/4/1/4); (0/1/4); (1/4/1/4) 2nd row: The following rule must be applied: CI – CP x
SP

Where:
CI = Initial coefficients (from the previous board)
CP = Pivotal coefficients (of what has been found) SP = Semi-pivot in this case -1/4

Yo 51-YO
LINEAR PROGRAMMING

Applying the rule we have:

1 – 4(-1/4) = 1 + 1 = 2
1 – 0 (-1/4) = 1 - 0 = 1
1/4 – 3 (-1/4) = 1/4 + 3/4 = 1
0 – -4 (-1/4) = 0 – 1 = -1
-1/4 – 1 (-1/4) = -1/4 + 1/4 = 0
0 – 4 (-1/4) = 0 + 1 = 1
1/4 – -1 (-1/4) = 1/4 - 1/4 = 0

Ck Xk
C ^
5 6
^
0
^
0
^
M M

Bi j 1 2 3 4 λ1 λ2
0 ^4
5
4 0 3 -4 1 4 -1
^
1
Zi
2 1 1 -1 0 1 0

Z-CJ
10 5 5 -5 0 5 -1/10

D 0 -1 -5 0 -M+5 -M

Zj -
Watching the queue

Cj, on the 3rd board all are zeros, negatives and more
negatives, therefore the optimal solution has been reached.

^4 = 4 and ^1 = 2, and all those not involved ^2, ^


They intervene in the optimal solution:
3 take values of zero.
Zmin = 5X1 + 6X2 + 0X3 + 0X4 + M/1 + M/2
= 5(2) + 6(0) + 0(0) + 0(0) + 0 + 0
Zmin = 10

SUMMARY
To perform the Simplex Algorithm it is important to know the following steps:
1. For the sign restrictions ≥ or ≤ know what type of variable has to be used to
form the equation =.
2. Place the coefficients of the entire linear program plus the added variables.
3. According to the result Zj – Cj (Maximization) and Zj (Minimization) the
entering column will be defined.
4. Always keep in mind that to know which row enters the α's must be the
lowest positive value.
5. The solution must always be zeros and positive numbers
if it is maximization; zeros, negative numbers and
negative Ms if it is minimization to know that the last board of the simplex
algorithm has been reached.
6. On the last board, the Zj will demonstrate the results of the objective
function.

1 52-YO
LINEAR PROGRAMMING

ACTIVITIES

1. Let the following linear program be:

Zmax = ^1 + 2^2

^ + 3^ ≤ 18
^ +^ ≤8
SA:
1 2

2^ + ^ ≤ 14
1 2

^ ≥ 0; ^ ≥0
1 2

1 2
From the optimal solution using the simplex algorithm.

2. Let the following linear program be:

Zmin = 3^1 + ^2

^ + 2^ ≥ 5
^ +^ ≥2
SA:
1 2

^ ≥ 0; ^ ≥0
1 2

1 2
From the optimal solution using the simplex algorithm.

Zmin = 2400^1 + 4000^2


3. Let the following linear program be:

100^1+ 100^2 ≥ 5
SA:

25^1+ 100^2 ≥ 2
^1≥ 0; ^2≥0
From the optimal solution using the simplex algorithm.

Zmax = 4^1 + 3^2


4. Let the following linear program be:

^1+ 5^2 ≤ 10
SA:

2^1+ 3^2 ≤ 15
^1≥ 0; ^2≥0

THIRD UNIT
DUALITY AND POST-OPTIMAL ANALYSIS
Ji

SPECIFIC OBJECTIVES
• Provide theoretical knowledge related to the dual problem.

Yo 53—
LINEAR PROGRAMMING

• Interpret the results of the problem, shadow price.

INTRODUCTION

The objective of this topic is for the student to learn the concepts of duality since associated with each
linear problem there is another linear programming problem called dual problem (PD), which has
important properties and notable relationships with respect to the original linear problem, a problem that,
in contrast to the dual, is then called a primal problem (PP).

3.1 DUALITY THEORY

Duality is characterized because for every linear programming maximization program there exists an
equivalent minimization problem, and conversely; for every linear programming minimization problem
there exists an equivalent maximization problem.

3.2 RELATIONSHIPS BETWEEN PRIMAL – DUAL SOLUTIONS.

The theoretical importance lies in the conceptualization that is not given of the mathematical relations
between the primal and the dual, which allows finding the solution of one of the problems and obtaining
at the same time the solution of its equivalent problem.

Primal Dual
Minimization
Maximization Restriction ≤
Restriction ≥ Restriction ≥
Restriction ≤ Availability
Objective Function: utility, Coefficients are the same but
profit, cost Primal coefficients transposed from the primal

The relationships can be listed as follows:


a) The dual problem has as many variables as the primal program has constraints.
b) The dual problem has as many restrictions as the primal program has variables.

c) The coefficients of the objective function of the dual problem are the terms independent of the
constraints or availabilities of the primal program.
d) The independent terms of the constraints or availabilities of the dual are the coefficients of the
objective function of the primal problem.
e) The technical coefficient matrix of the dual problem is the transpose of the technical matrix of the
primal problem.
f) The sense of the inequalities of the restrictions of the dual problem and the sign of the variables of
the same problem depend on the form of the sign of the variables of the primal problem and the
sense of the restrictions of the same problem. (See table).
g) If the primal program is a maximization problem, the dual program is a minimization problem.
h) The dual problem of a dual problem is the original primal program.

Yo 54-YO
LINEAR PROGRAMMING
3.2.1 Formulation of the Dual Program from Primal.

Next, a dual program will be developed from the primal to analyze the development of
transposing a linear program and turning it into a dual program.

The Electronic Company SA produces radios and televisions. Each radio is sold with a profit of
30 soles while each television sold earns 50 soles. Both products must pass through departments
A and B (circuit printing and assembly) monthly, 200 and 140 hours/month are available for
departments A and B respectively.
Each radio requires 1 hour of A and 1 hour of B, each television requires 2 hours of A and 1 hour
of B. What is the production schedule that maximizes profit?

Solution:

1. Program approach in primal


Departments Products
Radios Televisions Availability
TO 1 2 200
B 1 1 140
Utility 30 50

^1= Number of radios to be produced monthly.


2. Definition of Variables
^2= Number of televisions that must be produced monthly.
3. Objective Function Formulation
Zmax = 30X1 + 50X2

Yo 55-YO
LINEAR PROGRAMMING
4. Statement of restrictions

X1 + 2X2 ≤ 200
X1 + X2 ≤ 140
5. Formulation of the Non-Negativity Condition

X1 ≥ 0; X2 ≥ 0
DUAL FORMULATION

a. Taking the primal approach:

Zmax = 30X1 + 50X2


SA:

X1
And^
+ 2X2 ≤ 200 Y \
X1+ X2 ≤ 140 Y where i = 1, …., m.
X1 ≥ 0; X2 ≥ 0
b. Primal resources are optimized, for this the objective function will be changed according to
the aforementioned table considering the new variables (Y):

Zmin = 200y1 + 140y2

Analyzing: If the electronics company had to rent its resources to another company, then it
has to find the value of the 200 hours of department A and 140 hours of department B. This
company that acquires the lease will try to minimize the value of the corresponding resources.

c. Regarding restrictions:
The combined value of the resources to produce a radio is: Y1 + y2, on the other hand, a radio
produces a profit of 30 soles to the company. So the combined value of all the resources
used to produce a radio is at least 30 soles: And
1 +y2 ≥ 30.
Similarly, the combined value of all resources to produce a television is: 2y1 +y2 ≥ 50.

Representing the duality in a linear program we have:

Zmin = 200y1 + 140y2


SA:
y1 + y2 ≥ 30 (1)
2y1 + y2 ≥ 50 (2)

y1 ≥ 0; y2 ≥ 0

56 -YO
LINEAR PROGRAMMING
Doing a Primal – Dual analysis:

Zmax = 30X, + 50X2 Zmin = 200Y1 + 140Y2

SA: SA:

X, + 2X2 < 200 Y + Y > 30

X, + X2 < 140 —• 2Y + Y > 50

X, > 0 ; X, > 0 And, > 0 ;


And, > 0
Developing by the Simplex Algorithm, we have:

Zmin = 200y1 + 140y2 + 0y3 + 0y4 + MA + MA2

+ 21 = 30
SA:
Y1 Y2 -Y3
+

2Y1 + Y2 -Y4 +A2 = 50


Y1 ≥ 0; Y2 ≥ 0
Place the variables that are used as data in the dual program problem and also add the variables that
have been generated according to the sign.

Yk
Cj 200 140 0 0 M M
Bt Y1 And^
TO
Ck 1 a2
AND AND to
M 30 1 1 -1 0 1 0 α = 30/1 = 30
1

M A2 50 2 1 0 -1 0 1 α = 50/2 = 25
Zj 80M 3M 2M -M -M M M
Zj - Cj 3M-200 2M-140 -M -M 0 0
TO
1

A
M 0 1/2 -1 1/2 1 -1/2 α = 5/1/2 = 10
5
200 25 1 1/2 0 -1/2 0 1/2 α = 25/1/2 =50
Zj 5M+5000 200 M/2+100 -M M/2-100 M -M/2+100

Y2
Zj - Cj 0 M/2-40 -M M/2-100 0 -3M/2+100

A
140 10 0 1 -2 1 2 -1
200 20 1 0 1 -1 -1 1
Zj 5400 200 140 -80 -60 80 60
Zj - Cj 0 0 -80 -60 -M+80 -M+60

Finding the Optimal Solution:


Zmin =200Y1 + 140Y2 + 0Y3 + 0Y4 + Mλ1 + Mλ2

Zmin = 200(20) + 140(10) + 0(0)+ 0(0) + 0 + 0


Replacing:

Zmin = 5400

2. Let the following be a Linear Program in primal:


Zmin = 10X1 + 18X2 + 4X3
SA:

Yo 57-YO
LINEAR PROGRAMMING
2X1 + + 5X3 ≥ 30 AND
3X2 + X3 ≥ 4 Y2
X2
X1 +
X1 ≥ 0; X2 ≥ 0; X3 ≥ 0
Move on to the Dual Program.

1. Moving to the Dual Program


Zmax = 30y1 + 4y2

✓z
SA:
11
FIRST UNIT 11
OPERATIONS RESEARCH AND LINEAR PROGRAM 11

C =X, j=1 19
1 =1 19
= SECOND UNIT 27
PRIMAL SOLUTION OF LINEAR PROGRAMMING 27
ENTER 48
Zj - 48
Zj - 48
Zj - 50
ENTER 50
Zj - 51
ENTER 52
SALE 52
Zj - 53
€ THIRD UNIT 55
DUALITY AND POST-OPTIMAL ANALYSIS 55
X, + 2X2 < 200 59
X, + X2 < 140 59
X, > 0 ; X, > 0 59
Y + Y > 30 59
—• 2Y + Y > 50 59
And, > 0 ; And, > 0 59
FOURTH UNIT 69
SPECIAL APPLICATIONS OF LINEAR PROGRAMMING 69
2) 71
2) 72
3) 72

Y1 ≥ 0; Y2 ≥ 0
Developing:

Yo 58-YO
LINEAR PROGRAMMING

4Y2 SA:
Zmax = 30Y1 + + 0Y3 + 0Y4 + 0Y5

2Y1 + Y2 +Y3
3Y2
= 10 (1)
Y1 Y4
5Y1 Y2
+ + = 18 (2)
+
+Y5 = 4
Y1 ≥ 0; Y2 ≥ 0

Alrea
Cj 30 4 0 0 0
ck Yk Bt Yi AND Y4 Y5

0 Y3 10 2 1 1 0 1 α = 10/2 = 5
AND
Ye
0 18 1 3 0 1 0 α = 18/1 = 18
0 4 5 1 0 0 1 α = 4/5 = 0,8
Zj 0 0 0 0 0 0
-30 -14 0 0 0
Y3
Zj - Cj
0 42/5 0 3/5 1 0 -2/5
AND,
AND.
0 86/5 0 14/5 0 1 -1/5
30 4/5 1 1/5 0 0 1/5
Zj 24 30 6 0 0 6
Zj - Cj 0 2 0 0 0

Yo 59-YO
LINEAR PROGRAMMING
Finding the optimal solution:
Zmax = 30Y1 + 4Y2 + 0Y3+ 0Y4 + 0Y5

Zmax = 30(4/5) + 4(0) + 0(42/5)+ 0(86/5) + 0(0)


Replacing:

Zmax = 24

Why is the dual program proposed?


On the one hand, it allows solving linear problems where the number of restrictions is greater than the number of

SUMMAR
variables. Y
Thanks to the theorems that we will present below, the solution of one of the
problems (primal or dual) automatically provides us with the solution of the other
program.

What does your solution mean?


Duality allows for important economic interpretations of linear programming
problems.
b.
Can the solution of the dual be obtained from the primal?
Duality allows the generation of methods such as the dual simplex method of great
importance in post-optimization analysis and in parametric linear programming.

Another advantage of duality is the possibility of solving some problems


graphically.

3.3 SENSITIVITY ANALYSIS

Sensitivity Analysis is concerned with the quantification of the effects on the optimal solution of
changes in the parameters of the mathematical model. When we write a model, we assume
that the values of the parameters are known with certainty; but in reality, the values are not
always true, since, for example, variations in the costs of materials, labor, or the price of a
product cause changes in the coefficients of the objective function. Likewise, delays in
shipments from suppliers, strikes, unforeseen deterioration and other unforeseen factors will
generate changes in the availability of resources.

Changes in the mathematical model, which can sometimes be quantified without having to re-
solve the model, are related to: Changes in the coefficients of the decision variables in the
objective function (Gains per unit of decision variable) or Changes in the right-hand sides of the
restrictions that define the model. (Amount of available resources) The effects of changes in
the coefficients within the matrix are very difficult to quantify, and therefore in these cases it is

6
0
LINEAR PROGRAMMING
advisable to run the model again with the changes. First we will see when only one coefficient
changes; then we will see when several coefficients change simultaneously.

3.3.1 Importance of Sensitivity Analysis

a. Linear programming models are often large and expensive, therefore they cannot
be used for a single case.
b. The elements given as data for a linear programming problem are most often
estimates, therefore it is necessary to investigate or take into account more than
one set of possible cases.

3.3.2 Calculation tool


Two different ways are recommended, depending on the available technology and the
complexity of the problem.
1. If you have a programmable calculator or computer and the program is small, you
can solve the model with the experimental data as many times as you want for
later analysis.
2. If the problem is very complex, it is not necessary to solve the entire model over
and over again, but certain properties of the sensitivity method can be used to
make adjustments to the optimal solution.

3.3.3 Changes in model parameters


Sensitivity analysis is carried out on:
1. Changes in levels of scarce resources (Bi variation).
2. Changes in the coefficients of the objective function (Coefficients of basic
variables and coefficients of non-basic variables).
3. Changes in technological coefficients (Variations in the aij for basic and non-
basic variables).
4. Removing and adding restrictions.
5. Adding new variables.

The analysis to be carried out will be done taking into account the greatest impact on
the optimal solution due to variations in the values of the parameters due to inaccuracy
in the estimates. We begin by investigating the consequences of the variations in the
coefficients of the objective function and available resources, then continue analyzing
the variations of the aij appearance of a new restriction or need to add a new variable.

3.3.4 Practical applications to find the primal solution, the dual and the variations of
the Bi (availabilities) and Cj (coefficients of the objective function).

A carpenter makes two types of wooden tables. Each type 1 table requires 4 hours of
primary machining (part preparation) and 4 hours of secondary machining (assembly
and varnishing). Similarly, each table of type 2 requires 3 hours of primary machining
and 7 hours of secondary machining. The daily availabilities of primary and secondary
machining are 40 and 56 machine hours respectively. The sale of a table of type 1
brings a profit of 70 euros, while the sale of a table of type 2 brings a profit of 90
euros.

Machining time
Daily availability
(hours)
(machine hours)
Type of table Type 1 Type 2
Primary machining 4 3 40

Yo 61—
LINEAR PROGRAMMING

Secondary machining 4 7 56
Profit (€) 70 90

It is about determining the number of tables of each type that must be produced daily
to maximize the profit obtained.

Primal Maximization Model


Zmax = 70X1 + 90X2
SA:
4X1 + 3X2 ≤ 40
4X1 + 7X2 ≤ 56
X1 ≥ 0; X2 ≥ 0
Dual Minimization Model
Zmin = 40y1 + 56y2
SA:
4Y1 + 4Y2 ≥ 70
3Y1 + 7Y2 ≥ 90
X1 ≥ 0; X2 ≥ 0

Yo 62—
LINEAR PROGRAMMING

B, AND, Yz
Ci 40 56 0 0 M M
ck Yk And^ 1 2
TO
AND to to
M 70 4 4 -1 0 1 0 α = 70/4 = 17,5
1
M A2 90 3 7 0 -1 0 1 α = 90/7 = 12,9
Zj 160M 7M 11M -M -M M M

TO
Zj - Cj 7M-40 11M-56 -M -M 0 0
M 130/7 16/7 0 -1 4/7 1 -4/7 α = 65/8 = 8,1
1
56 AND 90/7 3/7 1 0 -1/7 0 1/7 α = 30
Zj 130M/7+720 16M/7+24 56 -M 4M/7-8 M -4M/7+8
Zj - Cj 16M/7-16 0 -M 4M/7-8 0 -11M/7+8

A
40 65/8 1 0 -7/16 1/4 7/16 -1/4
56 75/8 0 1 3/16 -1/4 -3/16 1/4
Zj 850 40 56 -7 -4 7 4
Zj - Cj 0 0 -7 -4 -M+7 -M+4

Optimal Program:

Zmin = 850
Y1 = 65/8
Y1= 75/8; And the other variables are zeros.

1. Sensitivity of the Cj coefficients of the Objective Function or variation of the coefficients of


the Primal Board and Dual Board functional.

According to the final solution of the example:


Objective: (A Cj), △Bi. Determine the variation of the functional coefficients and availability.

-(Zj – Cj) ≤ ACj ≤-(Zj – Cj)


aik aik

aik>0 aik<0 Negative technical coefficients

Negative VariationLower Limit Positive Variation


Upper Limit

LI = Cj - V Cj LS = Cj + △ Cj

2. Sensitivity of the coefficients of Availability or variation of availability (Dual Board)

(To Bi)

-(Zj – Cj) ≤ ABi ≤-(Zj – Cj)


aik aik

aik<0 aik>0 Negative technical coefficients

Yo 63-YO
LINEAR PROGRAMMING

Negative Positive Variation


VariationLower Upper Limit
Limit
LI = Bi - V Bi LS = Bi +ABi

Applying:

Sensitivity analysis of the functional coefficients. Applying the primal solution of the previous example, that is;
maximizing.

Last Primal board developed in Simplex Algorithm:


Zmax = 600X1 + 1000X2

Ck X X X X X
Cj 600 1000 0 0 0
Bt X4
k 1 2 3 5
1000 X2 500 0 1 1,25 -2,5 0
6000 X 1 600 1 0 -1,5 5 0
0 X5 180 0 0 0,05 -0,5 1
Zj 860000 600 1000 350 500 0
Zj – Cj 0 0 350 500 0

-(Zj – Cj) ≤ ACj ≤-(Zj – Cj) aik aik

aik>0 aik<0

Variation C1:

- (500) ≤ △ Cj ≤ -(350)
5 -1,25

- 100 ≤ A Cj ≤ 233.33

LS = (600+233.33)X1 + 1000X2
LS = 823.33X1 +56X2
LI = (600-100)X1 + 100X2
LI = 500X1 + 1000X2

Variation C2:

- (350) ≤ A Cj ≤ -(500)
1,25 -2,5

- 280 ≤ A Cj ≤ 200

LS = 600X1 + (1000+200)X2
LS = 600X1 + 1200X2
LI = 600X1 + (1000-280)X2
LI = 600X1 + 720X2
Interpretation:
The coefficients of the first variable of the functional can vary from 500 to 833.33 and the optimal solution does
not vary.
The coefficients of the second variable of the functional can vary from 720 to 1200 and the optimal solution
does not vary.

Yo 64-YO
LINEAR PROGRAMMING
Analysis of variation in Bi-availabilities. Dual Board from the previous example:

C 40 56 0 0 M M
Ck Yk Bt AND, Y2 AND Y4
to
1 2
to
40 65/8 1 0 -7/16 1/4 7/16 -1/4
AN
56 75/8 0 1 3/16 -1/4 -3/16 1/4
Zj 850 40 56 -7 -4 7 4
Zj – Cj 0 0 -7 -4 -M+7 -M+4

- (Zj – Cj) ≤ △Bi ≤-(Zj – Cj) aik aik

aik<0 aik>0

Variation B1:

- (-7) ≤ Bi ≤ -(-4)
- 7/16 1/4

aik<0 aik>0

- 16 ≤ Bi ≤ 16

LS = (40+16)y1 +56Y2
LS = 56Y1 +56Y2

LI = (40-16)Y1 +56Y2
LI = 24Y1 +56Y2

Variation B2:

- (-4) ≤ Bi ≤ -(-7)
- 1/4 3/16

aik<0 aik>0

- 16 ≤ A Bi ≤ 37.33

LS = 40Y1 + (56+37.33)Y2
LS = 40Y1 +93.33Y2

Yo 65-YO
LINEAR PROGRAMMING

LI = 40Y1 + (56-16)Y2
LI = 24 y1 + 40 Y2

SUMMARY
Sensitivity analysis is carried out on: Changes in the levels of scarce resources. Changes in the
coefficients of the objective function (coefficients of basic variables and coefficients of non-basic
variables). Changes in technological coefficients (variations in aij for basic and non-basic
variables). Removing and adding restrictions. Adding new variables.

ACTIVITIES

Zmax = ^1 + 2^2
1. Let the following linear program be:

^ + 3^ ≤ 18
^ +^ ≤8
SA:
1 2

2^ + ^ ≤ 14
1 2

^ ≥ 0; ^ ≥0
1 2

1 2
Move to the dual program and perform your sensitivity analysis.

Zmin = 3^1 + ^2
2. Let the following linear program be:

^ + 2^ ≥ 5
^ +^ ≥2
SA:
1 2

^ ≥ 0; ^ ≥0
1 2

1 2
Move to the dual program and perform your sensitivity analysis.

3. Let the following linear program be:

Zmin = 2400^1 + 4000^2

100^1+ 100^2 ≥ 5
SA:

25^1+ 100^2 ≥ 2
^1≥ 0; ^2≥0
Move to the dual program and perform your sensitivity analysis.

Zmax = 4^1 + 3^2


4. Let the following linear program be:

^ + 5^
SA:
1 2 ≤ 10

1 66—l
LINEAR PROGRAMMING

2^1+ 3^2 ≤ 15
^1≥ 0; ^2≥0
Move to the dual program and perform your sensitivity analysis.

FOURTH UNIT
SPECIAL APPLICATIONS OF LINEAR PROGRAMMING

SPECIFIC OBJECTIVES

• To provide the student with theoretical knowledge related to the special applications of
linear programming.
• Solve the transportation and assignment cases to find the expected profitability values.
• Apply algorithms derived from linear programming in specific cases.

INTRODUCTION

The transportation problem is a special type of problem within linear programming and has
to do with determining and establishing optimal schemes for transporting merchandise or
products already known from supply locations to locations where they are required, and with
the knowledge of the individual costs proportional to the quantity transported, the total cost
can be found with the sum of all these particular costs.

1 67-YO
LINEAR PROGRAMMING

The transportation problem


4.1 The formulation of a classic transportation problem can be determined as the
distribution of any product from production centers called origins to another group of
reception centers called destinations in such a way that those transported quantities
satisfy the demand with the minimum total cost. As shown graphically and in tabular
form:

C1
1 2 3 4
1 C11 C12 n a1
C21 C22 C2 a2
n1
2

m C^1 C^2 c
-mn A.
M
bj bj bj bj

There are several methods to determine an initial basic feasible solution which vary in
time to determine the solution.

Northwest Corner Method (N – W)


4.2
To use the Northwest Corner method, the following steps must be taken:

1. When a real transportation problem is out of balance, adding either artificial origins

follows: ∑ a = ∑ bj
or destinations balances it.
2. A flow matrix is constructed as ^

3. At position 1,1 which is the northwestern end of the matrix, assign the minimum (a
1; b1) subtract X11 from the supply a1 or the demand b1 , obviously one of
these quantities becomes zero.
4. If a1 is less than b1, it will go to position (2,1) and do X21= MIN

1; b1 ) if on the other hand if a1 is greater than b1 it will move to position (1,


(to

2) X12= MIN (a1; b2).


5. The same logic continues until the path ends, whether by columns or rows.
6. The minimum costs are replaced in the unit price table where the total cost is
obtained.

PROBLEM:
A soft drink company wants new markets. This company has factories in A, B, C and
wants to supply these markets, whose warehouses are in: W, X, Y and Z; the monthly
capacities of the factory are 100, 150 and 170 units respectively.
The unit shipping costs are as follows:

Yo 68-YO
LINEAR PROGRAMMING

Destination
W X AND Z
Origin
TO 12 20 12 5
B 17 14 21 10
C 16 15 15 5

Determine an initial basic feasible solution and minimum total cost using the N – O
corner method.
Solution:
1. First, place the data clearly in our operations table.

2. Our chart must be balanced, that is, the origins must be equal to the destinations.

X11= min (ai;bi) a^ >bi


3. It starts by solving in cell (1,1) or the Northwest corner and minimizing:

to
a
X11
1
= min (100; 70)

b^ = 100 – 70 = 30
=

1-

Having done this step, we recommend the following table:

___ai;b^
We move to the cell below We
6- e —
AA o-
——
a9

move to the next cell

In X11 as a1 >b1 , we see cell (1,2)

= min (a
X12

1;b 2)

to
= min (30; 90) = 30

1 <b2—► b
X11

2 =b
2 -a1 = 60
we move to cell (2, 2)

1 69-YO
LINEAR PROGRAMMING

= min (a
1;b
X22

2)

to
X22= min (150; 60) = 30

1 <b2—► a
2 =a
2 -b2 = 90
We move to cell (2, 3)
w X AND Z
T 12
O
20 12 5
30

B
17 14 21 10
* 150

C
16 15 15 20
170

b1 70 90 120 140
to
X23= min (
2;b3)
X23
= min (90; 1200) = 90
b3

w X AND Z a1
T 12
O
20 12 5
30

B
17 14 21 10
150

C
16 15 15 20
* 170

b1 70 90 30 140

3;b
to
X33= min (

3)

Yo 70-YO
LINEAR PROGRAMMING

to
= min (170; 30) = 30

3 >a2—► a
X33

3 =a
3 -b2 = 140
We move to cell (3, 4)

X11= 70 x 12 = 840
X12= 30 x 20 = 600
X22= 60 x 14 = 840
X23= 90 x 21 = 1890
X33= 30 x 15 = 450
X34= 140 x 20 = 2800

CT = 7420
The minimum Total Cost is equal to 7420 new soles.
The other variables assume the value of 0 (zero)

4.3 Minimum Cost Method

The minimum cost method is an algorithm developed with the aim of solving
transportation or distribution problems, yielding better results than methods
such as the northwest corner method, since it focuses on routes that present
lower costs. The flow chart of this algorithm is much simpler than the previous
ones since it simply involves assigning the largest possible number of units
(subject to supply and/or demand restrictions) to the least expensive cell in the
entire matrix until the method ends.

PROBLEM:
A Peruvian energy company has four generating plants to meet the daily
electricity demand in four cities: Lima, Arequipa, Ancash and Ica. Plants 1, 2, 3
and 4 can satisfy 80, 30, 60 and 45 million KW per day respectively. The needs
of the cities of Lima, Arequipa, Ancash and Ica are 70, 40, 70 and 35 million
kW per day

Yo 71-YO
LINEAR PROGRAMMING
respectively.

The costs associated with sending energy supplies per million kW between
each plant and each city are recorded in the following table.

Lime Arequipa Ancash Ica


Floor 1 5 2 7 3
Floor 2 3 6 6 1
Floor 3 6 1 2 4
Floor 4 4 3 6 6

Formulate a linear programming model that can meet the needs of all cities
while minimizing the costs associated with transportation.

Solution:

Lime Arequipa Ancash Ica Offer


5 2 7 3
Floor 1
80
3 6 6 1
Floor 2
30
6 1 2 4
Floor 3
40 60
4 3 6 6
Floor 4
45
Demand 70 40 70 35

In this case there is a tie, which is broken arbitrarily, so anyone is assigned


the highest possible amount.

Then that assigned amount is subtracted from the demand of Arequipa and the
supply of "Plant 3", in a very logical process. Since Arequipa is left without
demand, this column disappears, and the first process is repeated.

Lime Arequipa Ancash Ica Offer


5 7 3
Floor 1
80
AND

3 6
Floor 2
30
o
cor

6 2 4
Floor 3
60
4 6 6
Floor 4
45
Demand 70 70 35

72 -YO
LINEAR PROGRAMMING

New allocation process

Floor 1

Floor 2

Floor 3

Floor 4

Demand

New allocation process

Floor 1

Floor 2

Floor 3

Floor 4

Demand

New allocation process

Floor 1

Floor 2

Floor 3

Floor 4

Demand

Yo 73-YO
LINEAR PROGRAMMING

Once the previous table is finished, we will realize that there will only be one row left,
therefore we assign the units and the method is finished.

Floor 1

Floor 2

Floor 3

Floor 4

Demand
The table of assignments (which we must develop in parallel) looks like this:

Lime Arequipa Ancash Ica Offer

Floor 1 25 50 5
80
Floor 2 30
30
Floor 3 40 20
60
Floor 4 45
45
Demand 70 40 70 35
The costs associated with distribution are:

Decision Cost per Total


Variable Activity Contribution
Variable Unit

X11 25 5 125

X12 0 2 0

X13 50 7 350

X14 5 3 15

X21 0 3 0

X22 0 6 0

X23 0 6 0

X24 30 1 30

X31 0 6 0

X32 40 1 40

X33 20 2 40

X34 0 4 0

Yo 74-YO
LINEAR PROGRAMMING

X41 45 4 180

X42 0 3 0

X43 0 6 0

X44 0 6 0
TOTAL 780

4.4 Vogel Method

Vogel's method is a heuristic method for solving transportation problems capable of


reaching a basic, non-artificial solution from the start. This model requires a generally
greater number of iterations than other heuristic methods that exist for this purpose,
however, it produces better initial results than the latter.

The method consists of carrying out an algorithm that consists of 3 fundamental steps
and 1 more that ensures the cycle until the culmination of the method.

1. Step 1:
For each row and column, determine a penalty measure by subtracting the two lowest
costs in rows and columns.

2. Step 2:
Choose the row or column with the highest penalty, that is, from the subtraction
performed in "Step 1" the highest number must be chosen. In case of a tie, a choice must
be made arbitrarily (based on personal judgment).

3. Step 3
From the row or column with the highest penalty determined in the previous step, we
must choose the cell with the lowest cost, and assign the largest possible number of units
to it. Once this step is completed, an offer or demand will be satisfied, therefore the row
or column will be crossed out. In the case of a tie, only 1 will be crossed out, and the
remaining row or column will have an offer or demand equal to zero (0).

4. Step 4: Cycle and exceptions


- If exactly one row or column with zero offer or
demand, stop.
- If a row or column with positive supply or demand remains unchecked,
determine the basic variables in the row or column using the minimum cost method,
stop.
- If all rows and columns that are not crossed out have zero supply and demand,
determine the zero basic variables by the minimum cost method, stop.
- If none of the above cases apply, return to step 1 until the offers and demands have
been exhausted.

PROBLEM:
A Peruvian energy company has four generating plants to meet the daily electricity demand
in four cities: Lima, Arequipa, Ancash and Ica. Plants 1, 2, 3 and 4 can satisfy 80, 30, 60
and 45 million KW per day respectively. The needs of the cities of Lima, Arequipa, Ancash
and Ica are 70, 40, 70 and 35 million kW per day respectively.
The costs associated with sending energy supplies per million kW between each plant and
each city are recorded in the following table.

Yo 75-YO
LINEAR PROGRAMMING

Lime Arequipa Ancash Ica


Floor 1 5 2 7 3
Floor 2 3 6 6 1
Floor 3 6 1 2 4
Floor 4 4 3 6 6

Formulate a linear programming model that can meet the needs of all cities while
minimizing the costs associated with transportation.

Solution:

The first step is to determine the penalty measures and record them in the cost table, as
shown below.

Lime Arequipa Ancash Ica Offer Penalty

Floor 1 5 2 7 3 80 1
Floor 2 3 6 6 1 30 2 The two lowest
values in the row,
Floor 3 6 1 2 4 60 1 2 and 3. These are
Floor 4 4 3 6 6 45 1 subtracted (2 – 3)
Absolute value =
Demand 70 40 70 35 1
Penalty 1 1 4 2
The two lowest values in the column, 3 and 4
These values are subtracted (3 – 4). Absolute values =
1

The next step is to choose the largest penalty, like this:

Yo 76-YO
LINEAR PROGRAMMING

Lime Arequipa Ancash Ica Offer Penalty


Floor 1 5 2 7 3 80 1
Floor 2 3 6 6 1 30 2
Floor 3 6 1 2 4 60 1
Floor 4 4 3 6 6 45 1
Demand 70 40 70 35
Penalty 1 1 4 2

In this step we choose the highest penalty “4”, and proceed to select the column or row to
which it corresponds.

The next step is to choose the lowest value from this column, and in a parallel table the
largest possible number of units is assigned to it. We can see that the lowest cost is "2" and
that a maximum of 60 units can be assigned to that cell, "which is the capacity of plant 3."

Lime Arequipa Ancash Ica Offer Penalty


Floor 1 5 2 7 3 80 1
Floor 2 3 6 6 1 30 2
Floor 3 6 1 2 4 60 1
Floor 4 4 3 6 6 45 1
Demand 70 40 70 35
Penalty 1 1 4 2
This is the lowest value in the penalized column, therefore the largest number of units possible is
assigned to it, which in this case is 60 units.

Lime Arequipa Ancash Ica Offer


Floor 1 80
Floor 2 30
Floor 3 60 60
Floor 4 45
Demand 70 40 70 35

Since the "Plant 3" row has already allocated all its capacity (60 units) it must disappear.

Yo 77-YO
LINEAR PROGRAMMING

Lime Arequipa Ancash Ica Offer Penalty


Floor 1 5 2 7 3 80 1
Floor 2 3 6 6 1 30 2

Floor 4 4 3 6 6 45 1
Demand 70 40 10 35
Penalty 1 1 4 2

The row corresponding to the Plant that has no units left is eliminated; also, we observe
how Ancash's demand changes; now it only needs 10 units, since the amount already
assigned is subtracted.

The end of the cycle has been reached, therefore the process is repeated.
Lime Arequipa Ancash Ica Offer Penalty
Floor 1 5 2 7 3 80 1
Floor 2 3 6 6 1 30 2

Floor 4 4 3 6 6 45 1
Demand 70 40 10 35

Penalty 1 1 0 2

Since there is a tie in this case, we arbitrarily choose


Lime Arequipa Ancash Ica Offer Penalty
Floor 1 5 2 7 3 80 1
Floor 2 3 6 6 1- 30 2
Floor 4 4 3 6 6 45 1
Demand 70 40 10 35

Penalty 1 1 0 2

The lowest value in this column is 1

Yo 78-YO
LINEAR PROGRAMMING

SOLUTION CHART
Lime Arequipa Ancash Ica Offer Penalty
Floor 1 80
Floor 2 30 30
Floor 3 60 60
Floor 4 45
Demand 70 40 70 35
Penalty
Therefore we assign in this cell the largest number of units possible, that is, 30,
given the capacity of “Plant 2”

Lime Arequipa Ancash Ica Offer Penalty


Floor 1 5 2 7 3 80 1

Floor 4 4 3 6 6 45 1
Demand 70 40 70 35
Penalty 1 1 0 2
Since “Plant 2” has run out of units, it is eliminated and Ica’s demand is now 35 –
30 = 5.

We start a new iteration

Lime Arequipa Ancash Ica Offer Penalty


Floor 1 5 2 7 3 80 1
Floor 4 4 3 6 6 45 1
Demand 70 40 10 5
Penalty 1 1 1 3
The lowest value in this column is 3, therefore we assign it the largest number of units
possible, which is restricted by the demand of Ica, which is only 5 units.
SOLUTION CHART
Lime Arequipa Ancash Ica Offer
Floor 1 5 80
Floor 2 30 30
Floor 3 60 60
Floor 4 45
Demand 70 40 10 35

Yo 79-YO
LINEAR PROGRAMMING

We can see how the demand for Ica is satisfied, therefore it will disappear, likewise the
supply of plant 1 is limited to 80 – 5 = 75 units.

Lime Arequipa Ancash Offer Penalty


Floor 1 5 2 7 75 1
6
Floor 4 4 3 45 1
Demand 70 40 10
Penalty 1 1 1

We continue with the iterations,


Lime Arequipa Ancash Offer Penalty
Floor 1 5 2 7 75 3
Floor 4 4 3 6 45 1
Demand 70 40 10
Penalty 1 1 1

SOLUTION CHART
Lime Arequipa Ancash Ica Offer
Floor 1 40 5 80
Floor 2 30 30
Floor 3 60 60
Floor 4 45
Demand 70 40 70 35

Lime Ancash Offer Penalty


Floor 1 5 7 35 3
4
Floor 4 6 45 1
Demand 70 10
Penalty 1 1

Yo 80-YO
LINEAR PROGRAMMING

We start another iteration

Lime Ancash Offer Penalty


Floor 1 5 7 35 2
Floor 4 4 6 45 2
Demand 70 10
Penalty 1 1
We break the tie arbitrarily

Lime Ancash Offer Penalty


Floor 1 5 7 35 2
Floor 4 4 6 45 2
Demand 70 10
Penalty 1 1

SOLUTION CHART
Lime Arequipa Ancash Ica Offer
Floor 1 40 5 80
Floor 2 30 30
Floor 3 60 60
Floor 4 45 45
Demand 70 40 70 35

Lime Ancash Offer Penalty


Floor 1 5 7 35 2

Demand 25 10
Penalty 1 1

At the end of this iteration we can see how the table has one row left uncrossed and with
positive values, therefore we assign the basic variables and have concluded the method.

Lime Ancash Offer


Floor 1 5 7 35
Demand 25 10

Yo 81-YO
LINEAR PROGRAMMING

SOLUTION CHART
Lime Arequipa Ancash Ica Offer
Floor 1 25 40 10 5 80
Floor 2 30 30
Floor 3 60 60
Floor 4 45 45
Demand 70 40 70 35
Now we can observe how each demand is satisfied without exceeding the levels
established by the supply of each Plant.
The costs associated with distribution are:

Decision Cost per Total


Variable Variable Activity Unit Contribution
X11 25 5 125
X12 40 2 80
X13 10 7 70
X14 5 3 15
X21 0 3 0
X22 0 6 0
X23 0 6 0
X24 30 1 30
X31 0 6 0
X32 0 1 0
X33 60 2 120
X34 0 4 0
X41 45 4 180
X42 0 3 0
X43 0 6 0
X44 0 6 0
TOTAL 620

Floor 1 Lim
e

Floor 2 Arequip
a

Floor 3 Ancas
h

Floor 4 Ica

Yo 82-YO
LINEAR PROGRAMMING

4.5 Assignment Problem


The allocation problem is a variation of the original transportation problem, a variation in
which the decision variables X(i,j) can only take binary values, that is, be zero (0) or one
(1) in the optimal solution, which assumes that supply and demand are perfectly aligned,
in fact both are equal to one (1).
There are many cases in which, as engineers, we can use the assignment problem to
solve various situations, among which we can mention the assignment of personnel to
machines, tools to jobs, schedules to teachers, candidates to vacancies, guests to
rooms, diners to tables, sellers to territorial areas, etc.
In the assignment model, the fundamental idea of resolution is: which source best
satisfies the destination? And since we have associated the model with a wide variety of
circumstances, this question can be asked in multiple contexts, such as: which candidate
is ideal for the vacancy? Or, which personnel is suitable for the production line? Or,
which personnel is best to carry out a certain task? A particular characteristic of the
assignment model is that for its resolution it is not necessary for the number of sources
to be equal to the number of destinations, which is very common in real life taking into
account its application, since generally the number of applicants is exaggeratedly higher
than the number of vacancies (logically referring to the application of the model to the
context of labor supply and demand).
So, suppose we want to assign n tasks to n workers. Each task does not require the
completion of another to be performed. We assume that tasks are so simple that they
can be performed by any worker and that workers have no preference for performing
one task or another. It is conditioned that a task can only be performed by a single
worker and that a worker can only perform a single task. The execution of a task i by a
worker j has a cost cij and all costs are defined in a matrix as follows:
Table 1.- Cost matrix for the allocation problem

Task 1 Task 2 Task 3 Task n


...
Worker 1 C11 C12 C13 C1n
...
Worker 2 C21 C22 C23 C2n
...
Worker 3 C31 C32 C33 C3n

... ... ... ... ... ...


Worker n Cn1 Cn2 Cn3 CNN
...

The goal is to determine which task is assigned to each worker such that the total cost is
minimum and the constraints that each task can only be assigned to one worker and that
each worker can only perform one task are respected.
In the assignment problem, the number of tasks is considered equal to the number of
workers. If there are more tasks than workers, it is possible to define fictitious workers
(with very high costs). Once an assignment to real workers is obtained, the
corresponding tasks can be eliminated from the problem, so that either a second
assignment to real workers or new workers can be found. Similarly, it is common to
define dummy tasks when there are more workers than tasks, so that real tasks are

83-YO
LINEAR PROGRAMMING

assigned to the most efficient workers; once real tasks are assigned to a subset of
workers, idle workers can be given new tasks (possibly in new jobs) or fired.
The allocation problem can also be posed in terms of benefits. Suppose we have n
workers and n tasks that we must assign to them. A benefit aij is obtained for each task i
performed by worker j. As before, a task can only be assigned to one worker and a
worker can only perform one task. In this case we want to know what task to assign to
each worker so that the total profit is maximized. For this case, we have a benefits
matrix:

Table 1.- Benefit matrix for the allocation problem


Task 1 Task 2 Task 3 ... Task n

Worker 1 a11 a12 a13 a1n


...

Worker 2 a21 a22 a23 a2n


...
Worker 3 a31 a32 a33 a3n
...

... ... ... ... ... ...


Worker n an1 an2 an3 ann
...

4.6 Hungarian Method.


Moving away slightly from the idea expressed in previous modules regarding the ease of
solving problems related to operational research, especially those related to
transportation, through the use of technological tools such as WinQSB, LINGO, TORA,
STORM, Excel, etc. It is worthwhile, whether for academic or engineering culture
purposes, to solve the assignment problem using the algorithm that was created for this
purpose, such as the Hungarian Method.

The Hungarian method is an optimization method for assignment problems, known as


such because the first contributions to the definitive classical method were by Dénes
König and Jenő Egerváry, two Hungarian mathematicians. The algorithm as detailed
below is designed for solving minimization problems only, it will then be a matter of
adding an additional step to address maximization exercises.

- HUNGARIAN ALGORITHM, STEP 1


First of all, it is worth remembering that the Hungarian method works on an m*n cost
matrix (in this case known as an m*m matrix, since the number of rows is equal to
the number of columns m = n). Once this has been constructed, the smallest
element must be found in each row of the matrix.

- HUNGARIAN ALGORITHM, STEP 2


Once the previous procedure is completed, a new m*n matrix must be built, in which
the values resulting from the difference between each cost and the minimum value of
the row to which each cost corresponds will be recorded (minimum value found in the
first step).

- HUNGARIAN ALGORITHM, STEP 3


This step consists of carrying out the same procedure as in the two previous steps,
now referring to the columns, that is, the minimum value of each column is found,
with the difference that this is found from the matrix resulting from the second step,
then a new matrix will be built in which the values resulting from the difference

Yo 84-YO
LINEAR PROGRAMMING

between each cost and the minimum value of the column to which each cost
corresponds will be recorded, a matrix called "Reduced Cost Matrix".

- HUNGARIAN ALGORITHM, STEP 4


Next, horizontal or vertical lines or both (only of these types) must be drawn with the
objective of covering all the zeros of the reduced cost matrix with the smallest
number of lines possible. If the number of lines is equal to the number of rows or
columns, the optimal solution has been obtained (the best assignment according to
the optimization context). If the number of lines is less than the number of rows or
columns, proceed with step 5.

- HUNGARIAN ALGORITHM, STEP 5


This step consists of finding the smallest element of those values that are not
covered by the lines in step 4, now it will be subtracted from the remaining elements
that are not covered by the lines; then this same value will be added to the values
that are at the intersections of the horizontal and vertical lines, once this step is
finished you must return to step 4.

PROBLEM:

The manufacturing company "Jiménez y Asociados" wishes to carry out a preventive


maintenance day on its three main machines A, B and C. The time required to perform
maintenance on each machine is 1 day, however the maintenance workday cannot last
more than one day, taking into account that the company has three maintenance service
providers, a maintenance team must be assigned to each machine in order to be able to
carry out preventive maintenance. Considering that the cost of the task varies for each
particular machine depending on the degree of specialization of each maintenance
service provider team, the correct team must be assigned to the indicated machine in
order to minimize the total cost of the day. The associated costs can be seen in the
following table:

Yo 85-YO
LINEAR PROGRAMMING

SOLUTION:

Machine 1 Machine 2 Machine 3


Team of
€ 10 € 9 € 5
Maintenance 1
Maintenance
€ 9 € 8 € 3
Team 2
Maintenance
€ 6 € 4 € 7
Team 3

1. STEP 1
We find the smallest element of each row

Minor element of
Machine 1 Machine 2 Machine 3
the row
Team of
10 9 5 5
Maintenance 1
Maintenance
9 8 3 3
Team 2
Maintenance
6 4 7 4
Team 3

2. STEP 2
We build a new matrix with the differences between the values of the original matrix
and the smallest element of the row to which it corresponds.

Machine 1 Machine 2 Machine 3


Team of
5 4 0
Maintenance 1
Maintenance
6 5 0
Team 2
Maintenance
2 0 3
Team 3
3. STEP 3
((10 – 5) (9 – 5) (5 – 5))

((9 – 3) (8 – 3) (3 – 3))

((6 – 4) (4 – 4) (7 – 4))
In the matrix built in the previous step, step 1 is carried out this time in relation to the
columns, therefore we choose the smallest element of each column. We also build a
new matrix with the difference between the values of matrix 2 and the smallest element
of the column to which each value corresponds.

Machine 1 Machine 2 Machine 3


Team of
5 4 0
Maintenance 1
Maintenance
6 5 0
Team 2

Yo 86-YO
LINEAR PROGRAMMING

Maintenance
2 0 3
Team 3
Minor element of
2 0 0
the Column

Yo 87-YO
LINEAR PROGRAMMING

REDUCED COST MATRIX


Machine 1 Machine 2 Machine 3
Team of
3 4 0
Maintenance 1
Maintenance
4 5 0
Team 2
Maintenance
0 0 3
Team 3

4. STEP 4
In this step we will draw the smallest number of combinations of horizontal and vertical
lines with the aim of covering all the zeros of the reduced cost matrix.

REDUCED COST MATRIX


Machine 1 Machine 2 Machine 3
Team of
3 4 0 )
Maintenance 1
Maintenance
4 5 0 )
Team 2
Maintenance
Team 3 0 0 3

As can be seen, the smallest number of horizontal and/or vertical lines needed to cover
the zeros of the reduced cost matrix is equal to 2, therefore, since it is smaller than the
number of rows or columns, it is necessary to resort to step 5.

5. STEP 5
In this step we select the smallest element of the non-underlined elements.

REDUCED COST MATRIX


Machine 1 Machine 2 Machine 3
Team of
3 4 0 )
Maintenance 1
Maintenance
4 5 0 )
Team 2
Maintenance
Team 3 0 0 3

Minor element of the


non-underlined
3

Then we proceed to subtract from the non-underlined elements and add to the
elements located at the intersections of the lines, in this case there is a single
intersection (3).

Yo 88-YO
LINEAR PROGRAMMING

REDUCED COST MATRIX


Machine 1 Machine 2 Machine 3
Team of
0 1 0
Maintenance 1
Maintenance
1 2 0
Team 2
Maintenance
0 0 6
Team 3

Now that this step has been completed, we move on to step 4.


Machine 1 Machine 2 Machine 3
Team of 0) 0 )
1
Maintenance 1
Maintenance
1 2 0 )
Team 2
Maintenance
Team 3 0 0 6 3

Now we see how it is necessary to draw three lines (the same number of rows
or columns of the matrix) and thus we have reached the final tabulation, in
which the optimal assignments are determined by simple observation.

REDUCED COST MATRIX


Machine 1 Machine 2 Machine 3
Team of
0 1 0
Maintenance 1
Maintenance
1 2 0
Team 2
Maintenance
0 0 6
Team 3

Therefore, the assignment that represents the lowest cost for the preventive
maintenance day determines that Team 1 performs the maintenance of
Machine 1, Team 2 performs the maintenance of Machine 3, and Team 3
performs the maintenance of Machine 2, a day that will have a total cost of 17
monetary units.

SUMMARY
The Transport model seeks to minimize the cost of transporting goods from a
number of sources to various destinations; the supply at each source and the
demand at each destination are known. There are different types of transport
models to obtain the optimal result.
The Allocation problem consists of assigning or allocating different resources.
Strictly speaking, the problem is to dedicate a group of resources to different
purposes, so that all the purposes are achieved and only one resource is allocated to each of
them.

1 89-YO
LINEAR PROGRAMMING

ACTIVITIES

1. The company “Chemicos del Caribe SA” has 4 sulfur deposits that must be used to
manufacture 4 different types of products (A, B, C, D), in addition, for each liter
made of products A, B, C, and D, one liter of sulfur is used. It is known that the
capacities of each tank are 100L, 120L, 80L, 95L respectively. The company has an
order for 125L of substance A, 50L of substance B, 130L of substance C and 90L of
substance D. The costs that react the production of each chemical with each deposit
are presented below:

TO B C D
Device 1 2 3 4 6
Device 2 1 5 8 3
Device 3 8 5 1 4
Device 4 4 5 6 3

Formulate a Northwest method solution to this problem so that the order is fulfilled
and costs are minimized.

2. A company has four canneries supplying four warehouses, and management wants
to determine the minimum cost shipping schedule for its monthly production of
canned tomatoes. The supply from canneries, the demands from warehouses, and
the shipping costs per case of canned tomatoes are shown in the following Table:

Shipping cost ($) per load


Store
E (1) F (2) G (3) H (4) Production
A (1) 25 35 36 60 15
Canning B (2) 55 30 45 38 6
plants C (3) 40 50 26 65 14
D (4) 60 40 66 27 11
Demands 10 12 15 9

Formulate a solution using the minimum cost method for this problem so that the
order is fulfilled and costs are minimized.

3. A company dedicated to the import and distribution of computers has partners in


England and Germany as supplier countries, and three distribution points, identified
as Region 1, Region 2 and Region 3. England has 7,200 computers available, while
Germany has 5,300. Region 1 is known to require 5,500 computers, while both
Region 2 and Region 3 require 3,500 computers each. The unit transportation costs
associated from each origin to each destination are shown in the following table:

Yo 90-YO
LINEAR PROGRAMMING

Region 1 Region 2 Region 3


England $ 12 $7 $ 10
Germany $8 $ 11 $9

Formulate a solution using Vogel's method for this problem so that the order is
fulfilled and costs are minimized.

4. In the JAV company. The general management located in Bogotá has


decided that each of the 4 vice presidents will visit one of the company's 4
plants located in different cities.
Management begins by estimating the costs to the company of sending
each vice president to each plant. With these costs the manager can
evaluate any particular designation based on the following cost matrix:

PLANT
VICE PRESIDENT 1 2 3 4

Finance (F) 24 10 21 11

Marketing (M) 14 22 10 15

Operations (O) 15 17 20 19

Staff (P) 11 19 14 13

Establish the minimum cost allocation plan. Using the Hungarian method

Yo 91-YO

You might also like