0% found this document useful (0 votes)
44 views45 pages

Or Lab Reports

This lab report describes using TORA software to solve maximization and minimization problems. It introduces TORA and how to use its interface to enter data and solve linear problems with two variables. As an example, the report details solving a Reddy Mikks Co. maximization problem and a minimization diet problem using the TORA software steps of opening the program, entering the objective functions and constraints, solving, and obtaining the optimal results.

Uploaded by

sadeed2017
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
44 views45 pages

Or Lab Reports

This lab report describes using TORA software to solve maximization and minimization problems. It introduces TORA and how to use its interface to enter data and solve linear problems with two variables. As an example, the report details solving a Reddy Mikks Co. maximization problem and a minimization diet problem using the TORA software steps of opening the program, entering the objective functions and constraints, solving, and obtaining the optimal results.

Uploaded by

sadeed2017
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 45

LAB REPORTS

Submitted by
SHEHZAD AHMAD
20PWIND0648

Submitted to
Dr. SIKANDAR BILAL KHATTAK

DEPARTMENT OF INDUSTRAIL ENGINEERING


UNIVERSITY OF ENGINEERING AND TECHNOLOGY
PESHAWAR, PAKISTAN
SHEHZAD AHMAD
OPERATION RESEARCH

LAB NO. 01

LAB TITLE:
Introduction to Operation Research Lab.
Introduction
Operation research is a discipline in which we make decisions through certain analytical
methods to find the solution. Here we are using different software to solve the problems each software
has its own usage according to the uses and its requirement.

Objectives
 To become familiar with different software packages
 To know about the different commands using in these software

Explanation
Operation research is covering most areas that is from forces to even transport services. Now
in this world competition is very important and also whether you want to increase your productivity than
how much features that you want to made in order to optimize the process.
In this discipline we are using different kind of software which gave us accurate results and can solve a
problem fastly as compared to manual method. So here we will use the following software:

1. LINGO
2. TORA
3. AMPL
4. EXCEL

LINGO Software
It is the optimization modeling software which can be use to solve linear, non-linear,
quadratic and integer optimization problems. LINGO provides a completely integrated package that
includes a powerful language for expressing optimization models having full featured environment of
editing in the problems.

Page 1 of 45
SHEHZAD AHMAD
OPERATION RESEARCH

TORA software
TORA is an algorithm i.e. a mathematical set of instructions or programs It is an
optimization system in the area of operations research which is very easy to use. Further, TORA is menu-
driven and Windows-based which is very helpful. The software can be executed in automated or tutorial
mode. The automated mode reports the final solution of the problem, usually in the standard format
followed in commercial packages, while the tutorial mode keeps on giving step-wise information about
the methodology and solution.
Uses Of TORA Software:-
There are following uses of Tora software.

Linear equation

Linear programming

Network model

Project planning

Page 2 of 45
SHEHZAD AHMAD
OPERATION RESEARCH

AMPL Software
The AMPL system supports the entire optimization modeling lifecycle formulation,
testing, deployment, and maintenance in an integrated way promotes rapid development and reliable
results. Using a high-level algebraic representation that describes optimization models, AMPL can
provide the head start you need to successfully implement large-scale optimization projects AMPL
integrates a modeling language for describing optimization data, variables, objectives, and constraints a
command language for debugging models and analyzing results and a scripting language for manipulating
data and implementing optimization strategies. All use the same concepts to promote streamlined
application-building.

Page 3 of 45
SHEHZAD AHMAD
OPERATION RESEARCH

EXCEL salver
It is a software which can be find in any version of Microsoft office in which it is in the form of
spreadsheet consisting of cells through which we can make different computations and solve many
problems. Besides this we can produced different kinds of command such is AND, IF, OR etc which are
really helping us to perform the different tasks automatically and this is its beauty to compute everything
easily that is in dragging mode.

Page 4 of 45
SHEHZAD AHMAD
OPERATION RESEARCH

Comments
By doing this lab I understand different software packages. I will use these software in linear
programming to solve different problems.
This lab introduced me about different software packages which are used in programming.

Conclusion:
From this lab report we learnt about operation research software and how it is been used for the
application of mathematics to give us solution of difficult questions. We know about the main application
of operation research. And how we will work in the EXCEL.

Page 5 of 45
SHEHZAD AHMAD
OPERATION RESEARCH

LAB NO:
02
LAB TITLE:
Maximization & Minimization Problem by TORA
INTRODUCTION
In this lab session we learnt about TORA software that aids in finding the optimized solution of a
given problem. It is comparatively easier to work with this software. Data once entered can be easily
edited. There are different modules of TORA software each is specified for a specific problem. In this lab
session we solved a problem containing two variables. Minimize Diet & Maximize Reddy Mikks Co.
Problem using TORA.

OBJECTIVES
 To know about TORA software.
 To know about how to solve maximization and minimization problems in TORA
software.
 To know about the window interface of the TORA software.
 To know about how to solve linear equation problems with two variables.
 To know about how to enter data in TORA software.

Problem Statement
In this lab session we solved two different problems. One is the maximization problem and the second
one is minimization problem. Problem statements of both the problems are given below: Reddy Mikks
Maximization Problem.

Page 6 of 45
SHEHZAD AHMAD
OPERATION RESEARCH

Constraints:

MINIMIZATION DIET PROBLEM:

Statement:

Constraints:

Page 7 of 45
SHEHZAD AHMAD
OPERATION RESEARCH

PROCEDURE
How to Operate TORA:
i. In the very first step open the TORA software by simply clicking on its icon. It will
show a window which looks like:

ii. Now click on the "Click Here" tab.


iii. In this way a new window open on the PC.

iv. Click on Linear Programming.


v. A new window will open up. Now select the options according to the desire.
vi. Click on go to input screen. Now enter the data information which manly includes
name of problem, variables it may contain and number of constraints:

Page 8 of 45
SHEHZAD AHMAD
OPERATION RESEARCH

REDDY MIKKS CO. MAXIMIZATION PROBLEM:


Reddy Mikks Co. Maximization Problem is stated in problem statement. Now follow the above
procedures mentioned in section 3.4.a for opening TORA.

Objective Function:
Maximize z =5x1+4x2
Constraints:
6x1+4x2≤24
X1+2X2≤6
-X1+X2≤1
X2≤2
X1, X2≥0

Solution:
Now enter the data and click on the tab shown in circle:

Page 9 of 45
SHEHZAD AHMAD
OPERATION RESEARCH

After clicking on solve menu an option will pop-up to either save file or not. So, just click on YES to save
file. After this another window will pop-up:
If you want to obtain graphical solution then a new screen would display in the next step:

Page 10 of 45
SHEHZAD AHMAD
OPERATION RESEARCH

Now just click on constraints listed at a side, then just click on "Click here to graph LP in one stroke"
An optimum result will be displayed over the graph. The point is your maximization result.

MINIMIZE DIET:
Minimization Diet problem is stated above in the problem statement.

Objective Function:
Minimize Z=0.3X1 + 0.9X2

Constraints:
1) X1 + X2 >=800
2) 0.23X1 - 0.30X2 <= 0
3) 0.03X1 - 0.01X2 >= 0
4) Non-negativity

Page 11 of 45
SHEHZAD AHMAD
OPERATION RESEARCH

Solution:
Now follow the same procedure as mentioned for the above problem but in this case click on to change
maximize to minimize:

Page 12 of 45
SHEHZAD AHMAD
OPERATION RESEARCH

Now just click on constraints listed at a side, then just click on "Click here to graph LP in one stroke"

Page 13 of 45
SHEHZAD AHMAD
OPERATION RESEARCH

Fig. 3.4.c.2) Optimized Solution

RESULTS & DISCUSSION:


Maximization result is obtained for Reddy Mikks Co. that is X1 12 and X2 coefficient interior 10 gives
maximum result.
Minimization result is also obtained for minimization diet problem

CONCLUSION:
Thus, from this lab session we concluded that it is very easy to solve any optimization real life
problem in TORA software. User just have to enter data and then simply click on solve. Solutions
obtained from this software are relatively more accurate. This software is also not intricate

LAB NO:
03

Page 14 of 45
SHEHZAD AHMAD
OPERATION RESEARCH

LAB TITLE:
Maximization & Minimization Problem by LINGO
Introduction
In this lab we solved three problems by taking help of software LINGO. In this we learnt
how to use the software through different commands and get the answer of what have required. LINGO is
a easiest software or tool designed to solve Linear, Nonlinear Quadratic optimization model in accurate
manner, easier and more efficient.

Objective
 To familiarize with LINGO software
 To apply practically the LINGO software on minimization and maximization problem.
 To compare result of LINGO with TORA software.

Problem statement
Reddy Mikks produces both interior and exterior paints from two raw materials, M1 and M2. The
following table provides the basic data of the problem

A market survey indicates that the daily demand for interior paint cannot exceed that for exterior paint by
more than 1 ton. Also, the maximum daily demand for interior paint is 2 tons.
Reddy Mikks wants to determine the optimum (best) product mix of interior and exterior paints that
maximizes the total daily profit.
The LP model, as in any OR model, has three basic components.

Decision Variable
In this problem, we have two decision variable
X1= Exterior paint, X2= Interior paint

Objectives Function
From the problem statement we find that we are going to maximize profit so let z represent profit

Page 15 of 45
SHEHZAD AHMAD
OPERATION RESEARCH

Maximize Z= 5x1+9x2

Constraints
From problem statement we are having five constraints,

6x1+4x2<=24

X1+2x2<=6

X2-x1<=1

X2<=2

X1>=0, x2>=0 (it will be activated by default in TORA)

Procedure
 1st run the LINGO software

Solution for Reddy Mikks problem


 Put the data which is given
 Use the (max) command for maximization
 Use the (min) command for minimization
 1st enter the data that is given:

Figure 4.1
 Now select on solve button the following window will occur as shown in fig 4.2.

Result
The result shows that this is an LP MODEL which is globally opted which means it is an internationally
standard model. The total number of variables used are 2 and the constraint are 5 with the objective value
of 21.0000.

Page 16 of 45
SHEHZAD AHMAD
OPERATION RESEARCH

Diet Problem
Ozark Farms uses at least 800 lb. of special feed daily. The special feed is a mixture of corn and
soybean meal with the following compositions:
lb. per lb. of feedstuff

Feedstuff Protein Fiber Cost (Si%)

Corn .09 .02 .30


Soybean meal .60 .06 .90
The dietary requirements of the special feed are at least 30% protein and at most 5% fiber.
Ozark Farms wishes to determine the daily minimum-cost feed mix.

Decision variables
In this problem our decision will be based on corn and soya bean, so we have two decision variables,
X1=pound of corn, x2=pound of soyabean

Objective function
Our objective is to minimize the cost, let z represent cost, the function is
Minimize z= 0.3x1+0.9x2

Constraint
Here we are having three constraints
a) X1+x2>=800

Page 17 of 45
SHEHZAD AHMAD
OPERATION RESEARCH

b) 0.09x1+0.6x2>=.3(x1+x2)
-0.21x1+0.3x2>=0
c) 0.02x1+0.06x2<=0.05(x1+x2)
-0.03x1+0.01x2>=0

Solution for minimizing the diet problem


 Again, start the LINGO


 Enter the data in the starting window:

 Now select the solver button we will get result as shown in fig 4.3.

RESULTS

Page 18 of 45
SHEHZAD AHMAD
OPERATION RESEARCH

The result shows that this is an LP MODEL which is globally opted which means it is an internationally
standard model. The total number of variables used are 2 and the constraint are 5 with the objective value
of 21.0000.

CONCLUSIONS:
This lab report is about introduction to the use of LINGO, use of their syntax, discussion of the results,
and the deciding of the different constraints, variables and objective functions as well.

Page 19 of 45
SHEHZAD AHMAD
OPERATION RESEARCH

LAB NO:
04
LAB TITLE:
“SOLVE LOAN POLICY MODELON TORA, LINGOAND
EXCEL SOLVER”
INTRODUCTION:
TORA and LINGO are two different software that are we using for both to solve the LP problems. Here
we are making the comparison of both in order to get the conclusion that which has the ability to give the
better solution. TORA is an operating software which is used mostly to solve mathematical models. It is
an easy and very interesting software as compare to others. It gives us very accurate results of the
problems. In this lab we will discuss the linear programming. Linear programming is a problem-solving
approach that has been developed to help managers making decisions

OBJECTIVE:
Objectives of this lab are

 To compare result of LINGO, TORA and Excel solver software.


 To know the OR problems solving techniques in TORA, LINGO and Excel Solver.
 To know about solving procedure of loan policy on different software.
 To know about modelling the problem for solving on the TORA, LINGO and Excel
Solver software

PROBLEM STATEMENT:

Page 20 of 45
SHEHZAD AHMAD
OPERATION RESEARCH

PROCEDURE:
SOLVING ON TORA:
 Put the data in the given window when started but first select the number of constraints
and variables
 Then put the equations coefficient and go for the solving window:

 Go for the solve menu

Page 21 of 45
SHEHZAD AHMAD
OPERATION RESEARCH

RESULTS AND DISCUSSION:


From the problem we had to find the optimum solution according to the given requirement. So according
to the figure 1.3.
We find the optimum solution of values:
Z=1.03,
by putting X1(0), X2(0), X3(7.20), X4(0) and X5(4.80)

SOLVING ON LINGO:
 First insert the data on the window in equation form
 Then use a command max or min according to the requirement
 Write all the constraints
 Put the semicolon after each equation

The process is given as:

 Now the solution as given:

Page 22 of 45
SHEHZAD AHMAD
OPERATION RESEARCH

RESULTS AND DISCUSSION:


From the problem we had to find the optimum solution according to the given requirement. So according
to the figure 1.3.
We find the optimum solution of values:
Z=0.718,
by putting X1(0), X2(0), X3(7.20), X4(0) and X5(4.80)

Page 23 of 45
SHEHZAD AHMAD
OPERATION RESEARCH

LAB NO:
05

LAB TITLE:
“To solve Oil Refining blending problem on TORA, Excel Solver,
AMPL, LINGO”
Introduction
The process of oil refining can be start with distillation crude oil to produce intermediate gasoline
stocks and then blending these stocks to produce final gasolines. These are varying according to octane
number the more the octane number the better quality.

Objectives
 To solve oil refining problem on TORA, LINGO, EXCEL SOLVER, AMPL and
LINDO.
 To find better Software to find solution that is optimum.
 To know about the basic concept of the octane number in this problem.

Problem statement (OIL refining blending problem)


Shale Oil, located on the island of Aruba, has a capacity of 1,500,000 bbl. of crude oil per day.
The final products from the refinery include three types of unleaded gasoline with different
octane numbers (ON): regular with ON = 87, premium with ON = 89, and super with ON = 92.
The refining process encompasses three stages: (1) a distillation tower that produces feedstock
1ON = 822 at the rate of .2 bbl. per bbl. of crude oil, (2) a cracker unit that produces gasoline
stock 1ON = 982 by using a portion of the feedstock produced from the distillation tower at the
rate of .5 bbl. per bbl. of feedstock, and (3) a blender unit that blends the gasoline stock from the
cracker unit and the feedstock from the distillation tower. The company estimates the net profit
per barrel of the three types of gasoline to be $6.70, $7.20, and $8.10, respectively. The input
capacity of the cracker unit is 200,000 bbl. of feedstock a day. The demand limits for regular,
premium, and super gasoline are 50,000, 30,000, and 40,000 bbl., respectively, per day. Develop
a model for determining the optimum production schedule for the refinery.

Page 24 of 45
SHEHZAD AHMAD
OPERATION RESEARCH

Procedure
1st solving on TORA:
While solving on TORA the following procedure must follow:
 1st Run the TORA software
 Put the limits according to the decimal system
 Insert the the number of problem title, variables and constraints:
 Insert the required values as given below:
 Go to for solution and select the output screen:
 So the final solution will appear as shown in figure 7.1 and 7.2.

Page 25 of 45
SHEHZAD AHMAD
OPERATION RESEARCH

Page 26 of 45
SHEHZAD AHMAD
OPERATION RESEARCH

2nd solving on LINGO:

LINGO also helpful to solve the problem so here the following procedure should be
followed:
 1st open the command window
 Put all the constraints:
 Go for the solution tab:
 Output will be as shown in figure 7.3 and 7.4.

Page 27 of 45
SHEHZAD AHMAD
OPERATION RESEARCH

Comparison among the results of Both The Softwares


Both softwares gives the same result only difference is the number of iterations used in solution. As
TORA gives the optimal solution in 9 iterations, LINGO in 5 iterations

Conclusion
From this lab we concluded that this problem can be solved by TORA, LINDO, Excel
Solver, AMPL and LINGO. All software’s gives same result with different approaches. So, in this lab we
learn have learnt about different software’s to solve this type of question.

Page 28 of 45
SHEHZAD AHMAD
OPERATION RESEARCH

Lab#6
Solve Urban Planning problem on Excel Solver

Introduction
This lab deals with solving urban planning problem on excel solver using an already made
template. Urban planning deals with three general areas: (1) building new housing developments
(2) upgrading inner-city deteriorating housing and recreational areas, and (3) planning public
facilities. The constraints associated with these projects are both economic and social. The
objectives in urban planning vary. In new housing developments, profit is usually the motive for
undertaking the project. In the remaining two categories, the goals involve social, political,
economic and cultural considerations.

Objectives
 To install solver in excel
 To understand how to enter a problem in solver
 To be able to interpret the results generated through excel solver

Problem Statement

Procedure for Solution

Page 29 of 45
SHEHZAD AHMAD
OPERATION RESEARCH

Decision variables:
X1 = number of units of single-family homes
X2 = number of units of double family homes
X3 = number of units of triple family homes
X4 = number of units of quadruple family homes
X5 = number of units of demolished homes

Objective function:

Maximize z=1000 x 1+ 1900 x 2+2700 x 3+3400 x 4

Constraints
x 5≤300 ;
0.18 x 1+ 0.28 x 2+0.4 x 3+0.5 x 4≤0.2125 x 5
50 x 1+70 x 2+130 x 3+160 x 4+2 x 5≤15000
x 1≥0.2( x 1+ x 2+ x 3+ x 4 )
x 2≥0.1(x 1+ x 2+ x 3+ x 4 )
x 3+ x 4≥0.25(x 1+ x 2+ x 3+ x 4)

Obtaining Solution in Excel Solver


 Install and activate the Excel Solver
 Click the File tab, click Options, and then click the Add-Ins category.
 In the Manage box, click Excel Add-ins, and then click Go.
 The Add-Ins dialog box appears.
 In the Add-Ins available box, select the Solver Add-in check box, and then click OK.
 If Excel displays a message that states it can't run this add-in and prompts to install it,
click Yes to install the add-ins.
 The commands for using the Solver add-in appears on the Data tab, in the Analysis group
 To define and solve problem, enter the initial information as shown in figure5.1.

Figure5.1 Defining the Problem in Excel


 Click on solver. A popup window appears as shown in figure5.2.

Page 30 of 45
SHEHZAD AHMAD
OPERATION RESEARCH

Figure 5.2 Solver Parameters

 In the Set Objective box, enter a cell reference or name for the objective cell. The objective
cell must contain a formula (in this case, =SUMPRODUCT (B3:F3, B$10: F$10)).
 Since this is a maximization problem, check the max box.
 In the By Changing Variable Cells box, enter a name or reference for each decision variable
cell range. Separate the non-adjacent references with commas. The variable cells must be
related directly or indirectly to the objective cell.
 In the Subject to the Constraints box, enter any constraints that you want to apply by doing
the following:
 In the Solver Parameters dialog box, click Add.
 In the Cell Reference box, enter the cell reference or name of the cell range for which you
want to constrain the value.
 Choose <=, =, or >= for the relationship in the Constraint box, type a number, a cell
reference or name, or a formula.
 Click solve. The result generated is shown in figure5.3.

Page 31 of 45
SHEHZAD AHMAD
OPERATION RESEARCH

Figure 5.3 solution generated through excel solver

Results and discussion


Linear programming does not guarantee an integer solution automatically, and this is the reason
for rounding the continuous values to the closest integer. The rounded solution calls for
constructing 180 (= 36 + 99 + 45) units and demolishing 245 old homes, which yields $345,600
in taxes.

Conclusion
Solver is a Microsoft Excel add-in program which can be used for what-if analysis. Use Solver to
find an optimal (maximum or minimum) value for a formula in one cell — called the objective
cell — subject to constraints, or limits, on the values of other formula cells on a worksheet.
Solver works with a group of cells, called decision variables or simply variable cells that are
used in computing the formulas in the objective and constraint cells. Solver adjusts the values in
the decision variable cells to satisfy the limits on constraint cells and produce the result for the
objective cell.

Page 32 of 45
SHEHZAD AHMAD
OPERATION RESEARCH

Lab#7
Solving Reddy Mikks on AMPL
Introduction
This lab deals with solving Reddy Mikks and diet problem on AMPL. A Mathematical
Programming Language (AMPL) is an algebraic modeling language to describe and solve high-
complexity problems for large-scale mathematical computing (i.e., large-scale optimization and
scheduling-type problems).
The Reddy Mikks problem is a two- variable maximization problem that requires determining
the daily amounts to be produced of exterior and interior paints. Similarly, the diet problem is a
two- variable minimization problem that seeks to minimize the total daily cost (in dollars) of the
feed.

Objectives
 To understand the general layout of AMPL
 To be able to write a program in AMPL
 To solve a maximization and minimization problem using AMPL
 To recall a model written in notepad in AMPL
 To be able to interpret results generated by AMPL

Problem Statement#1
Reddy Mikks produces both interior and exterior paints from two raw material M1, M2. The
following table provides the basic data of problem:

Figure 7.1 Tons of raw material per ton

A market survey indicates that the daily demand for interior paint cannot exceed that for exterior
paint more than 1 ton. Also, the maximum daily demand for interior paint is 2 tons. Reddy Mikks
wants to determine the optimum (best) product mix of interior and exterior paints that maximizes
the total daily profit?

Procedure for Solution


Decision variables:
x 1 = Tons produced daily of exterior paint

Page 33 of 45
SHEHZAD AHMAD
OPERATION RESEARCH

x 2 = Tons produced daily of interior paint


Objective function:

Maximize z=5 x 1+ 4 x 2

Constraints
6 x 1+ 4 x 2≤ 24
x 1+2 x 2≤ 6
x 2−x 1 ≤1
x2≤2

Obtaining Solution in AMPL


Procedure
Following things should be kept in mind while writing a problem in AMPL

 Variables must be declared using the var keyword.


 All lines of code must end with a semi-colon.
 The objective starts with maximize or minimize, a name, and a colon (:). After that, the
objective statement appears.
 Each constraint starts with cn (n = 1, 2, 3…n) and a colon. After that, the equation or
inequality appears.
 Names must be unique. A variable and a constraint cannot have the same name.
 AMPL is case sensitive. Keywords must be in lower case.
 To solve the problem use, solve command followed by semi colon.
 To see the values of variables, type display (variable name) followed by a semi colon.

Figure 7.2 shows Reddy Mikks problem solved in AMPL.

Page 34 of 45
SHEHZAD AHMAD
OPERATION RESEARCH

Figure 7.2 AMPL interface

In order to recall an already written problem in notepad in AMPL, use model (filename).txt. In
this case, it was salmank, as shown in figure 7.3.

Figure 7.3 Recalling the model

Results and discussion


The result generated through AMPL tells us that it took 2 iterations to solve the problem. The
value of the objective function at the optimal solution is 21 tons as was determined graphically.
After the display command, it tells us that the optimal solution is to produce 3 tons and 1.5 tons
of exterior and interior paints.

Conclusion
AMPL is a comprehensive and powerful algebraic modeling language for linear and nonlinear
optimization problems, in discrete or continuous variables. It uses common notation and familiar
concepts to formulate optimization models and examine solutions, while the computer manages
communication with an appropriate solver. AMPL’s flexibility and convenience render it ideal
for rapid prototyping and model development, while its speed and control options make it an
especially efficient choice for repeated production runs.

Page 35 of 45
SHEHZAD AHMAD
OPERATION RESEARCH

LAB NO:09

LAB TITLE:
“TO solve the Minimal Spanning Tree problem on TORA”
Introduction:
The minimal spanning tree algorithm directly come from network analysis in which there are
different kind of network so it deals with linking the nodes of the network, directly or indirectly using the
shortest total length of connecting branches.

Objectives:
 To know minimal spanning tree algorithm
 To study different problems regarding this algorithm
 To find the possible shortest way for different connected network
Problem statement:

Page 36 of 45
SHEHZAD AHMAD
OPERATION RESEARCH

Procedure:
 First run the TORA software
 Select minimal spanning tree and then go to input screen:

 Now put the required data such as no. of nodes and name it as well:

 Now click on solve problem and then go to output screen:

Page 37 of 45
SHEHZAD AHMAD
OPERATION RESEARCH

 the following result will occur:

Conclusion:
From this lab we concluded that we can easily the minimal spanning tree problem on TORA.
Here is our interest to find the solution of the different routes with the shortest distance each and that path
we selected is our optimum solution.

Results:
In this lab we determine the solution of the shortest way for the cable distribution of the wire so
our purpose is also fulfilling and the customer satisfaction is also fulfilling

Page 38 of 45
SHEHZAD AHMAD
OPERATION RESEARCH

LAB NO: 10
TRANSPORTAION MODEL SOLVING BY TORA & LINGO
PROBLEM STATEMENT:
MG Auto has three plants in Los Angeles, Detroit, and New Orleans, and two major distribution centers
in Denver and Miami. The capacity of the three plants during the next quarter are 1000, 1500, and 1200
cars. The quarterly demand in the two distribution centers are 2300 and 1400 cars. The transportation
costs per car on the different routes is given in the following table

Demand supply table for MG Problem


Denver Miami Supply
Los Angeles X11 80 X12 215 1000
Detroit X21 100 X22 108 1500
New Orleans X31 102 X32 68 1200
Demand 2300 1400

Page 39 of 45
SHEHZAD AHMAD
OPERATION RESEARCH

Page 40 of 45
SHEHZAD AHMAD
OPERATION RESEARCH

Lab#11
Solving Networking Problems on TORA (shortest routing and
Maximum Flow)

Introduction
This lab deals with solving two network models on TORA. The network model is the most
efficient way to link a number of locations directly or indirectly, finding the shortest route
between two cities, determining the maximum flow in a pipeline network, determining the
minimum-cost flow in a network that satisfies supply and demand requirements at different
locations and scheduling the activities of a project.
The minimal spanning tree (a network optimization algorithm) deals with linking the nodes of a
network, directly or indirectly, using the shortest total length of connecting branches. The
shortest route model (a network optimization algorithm) determines the shortest route between a
source and destination in a transportation network. Other situations can also be represented be
the same model, as illustrated in this lab.

Objectives
 To understand the general network problem.
 To solve two network problems on TORA using shortest route and maximum flow model.
 To interpret the results generated by TORA.

Problem Statement#1(Shortest Route)


The network in figure 12.1 gives the distances in miles between a pair of cities. Determine the
shortest route between cities 1 and 8.

Figure 12.4 Cities and their distances in miles

Page 41 of 45
SHEHZAD AHMAD
OPERATION RESEARCH

Solution in TORA
Enter the data as shown in the figure 12.5.

Figure 12.5 Entering data

Click on solve to get the solution.

Figure 12.6 Minimal spanning tree output summary

Page 42 of 45
SHEHZAD AHMAD
OPERATION RESEARCH

Also, distance between cities of desire can be seen too by entering the node names as shown
below. The shortest distance between cities 1 and 8 is 8 miles.

Figure 12.7 Distance between cities 1 and 8

Problem Statement#2 (Maximum Flow)

Determine the maximal flow in each arc for the network in figure 12.8

Figure 12.8 Network model

Solution in TORA

Page 43 of 45
SHEHZAD AHMAD
OPERATION RESEARCH

Enter the data as shown in the figure 12.9.

Figure 12.9 Entering data

Click on solve to get the solution.

Figure 12.10 Maximal flow output summary

Results and discussion


The shortest route from city 1 to 8 calculated by TORA is 8 miles. The shortest path that is to be
followed is from city 1 to 3 to 6 and then 8. It took 6 iterations to solve the model and the
maximal flow between the networks is 19. Distances between each node are given in the table.

Conclusion
Shortest path algorithms are applied to automatically find directions between physical locations,
such as driving directions on web mapping websites like MapQuest or Google Maps. For this
application fast specialized algorithms are available.
This problem involves a directed network with arcs carrying flow. The only relevant parameter
is the upper bound on arc flow, called arc capacity. The problem is to find the maximum flow
that can be sent through the arcs of the network from some specified node s, called the source, to
a second specified node t, called the sink. Applications of this problem include finding the
maximum flow of orders through a job shop, the maximum flow of water through a storm sewer
system, and the maximum flow of product through a product distribution system, among others.

Page 44 of 45

You might also like