IENG313 Operation Research I

Slides:



Advertisements
Similar presentations
Thank you and welcome Linear Programming (LP) Modeling Application in manufacturing And marketing By M. Dadfar, PhD.
Advertisements

IEOR 4004 Midterm Review (part I)
Chapter 8: The Solver and Mathematical Programming Spreadsheet-Based Decision Support Systems Prof. Name Position (123) University.
Optimization problems using excel solver
Introduction to Mathematical Programming
IENG442 LINGO LAB3.
Linear Programming. Introduction: Linear Programming deals with the optimization (max. or min.) of a function of variables, known as ‘objective function’,
Wyndor Example; Enter data Organize the data for the model on the spreadsheet. Type in the coefficients of the constraints and the objective function.
Corso MAE Metodi Quantitativi per il Management Quantitative methods for Management Roma, 18 settembre - 24 ottobre 2003 Prof. Gianni Di Pillo Prof. Laura.
Linear Programming Problem
Introduction to Management Science
Operations Management Linear Programming Module B - Part 2
McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., Three Classic Applications of LP Product Mix at Ponderosa Industrial –Considered limited.
Optimization using Calculus
Operations Management
B-1 Operations Management Linear Programming Module B.
QM B Linear Programming
1 2TN – Linear Programming  Linear Programming. 2 Linear Programming Discussion  Requirements of a Linear Programming Problem  Formulate:  Determine:Graphical.
1 5. Linear Programming 1.Introduction to Constrained Optimization –Three elements: objective, constraints, decisions –General formulation –Terminology.
Linear Programming. Linear programming A technique that allows decision makers to solve maximization and minimization problems where there are certain.
B-1 Operations Management Linear Programming Module B.
Computational Methods for Management and Economics Carla Gomes Module 4 Displaying and Solving LP Models on a Spreadsheet.
Goals and aims To introduce Linear Programming To find a knowledge on graphical solution for LP problems To solve linear programming problems using excel.
Example 14.1 Introduction to LP Modeling. 14.1a14.1a | 14.2 | Linear Programming n Linear programming (LP) is a method of spreadsheet optimization.
1 1 Slides by John Loucks St. Edward’s University Modifications by A. Asef-Vaziri.
Linear Programming Models: Graphical and Computer Methods
1© 2003 by Prentice Hall, Inc. Upper Saddle River, NJ The Wyndor Glass Company Problem (Hillier and Liberman) The Wyndor Glass Company is planning.
Chapter 3 Introduction to Optimization Modeling
Introduction to Mathematical Programming OR/MA 504 Chapter 3.
Chapter 19 Linear Programming McGraw-Hill/Irwin
Decision Making via Linear Programming: A simple introduction Fred Phillips
Optimization Models Mathematical optimization models usually contain an objective (what to do) constraints (the rules that must be followed). Also referred.
Linear Programming Topics General optimization model LP model and assumptions Manufacturing example Characteristics of solutions Sensitivity analysis Excel.
1 DSCI 3023 Linear Programming Developed by Dantzig in the late 1940’s A mathematical method of allocating scarce resources to achieve a single objective.
We can make Product1 and Product2. There are 3 resources; Resource1, Resource2, Resource3. Product1 needs one hour of Resource1, nothing of Resource2,
Linear Programming An Example. Problem The dairy "Fior di Latte" produces two types of cheese: cheese A and B. The dairy company must decide how many.
1 Linear Programming Chapter 2 By Mohammad Shahid Khan M.Eco, MBA, B.Cs, B.Ed. Lecturer in Economics & Business Administration Department of Economics.
Linear Programming McGraw-Hill/Irwin Copyright © 2012 by The McGraw-Hill Companies, Inc. All rights reserved.
Introduction to Linear Programming BSAD 141 Dave Novak.
Linear Programming with Excel Solver.  Use Excel’s Solver as a tool to assist the decision maker in identifying the optimal solution for a business decision.
Linear Programming Copyright © 2015 McGraw-Hill Education. All rights reserved. No reproduction or distribution without the prior written consent of McGraw-Hill.
3 Characteristics of an Optimization Problem General descriptionKPiller Illustration Decisions that must be made; represented by decision variables How.
Chapter 1 Introduction n Introduction: Problem Solving and Decision Making n Quantitative Analysis and Decision Making n Quantitative Analysis n Model.
Monday WARM-UP: TrueFalseStatementCorrected Statement F 1. Constraints are conditions written as a system of equations Constraints are conditions written.
Chapter 2 Linear Programming Models: Graphical and Computer Methods
McGraw-Hill/Irwin Copyright © 2009 by The McGraw-Hill Companies, Inc. All Rights Reserved. Supplement 6 Linear Programming.
LINGO TUTORIAL. WHAT IS LINGO : LINGO is a software tool designed to efficiently build and solve linear, nonlinear, and integer optimization models. CREATING.
3 Components for a Spreadsheet Optimization Problem  There is one cell which can be identified as the Target or Set Cell, the single objective of the.
LINEAR PROGRAMMING.
1 Optimization Techniques Constrained Optimization by Linear Programming updated NTU SY-521-N SMU EMIS 5300/7300 Systems Analysis Methods Dr.
Introduction to Linear Programming and Formulation Meeting 2 Course: D Deterministic Optimization Year: 2009.
Linear Programming. George Dantzig 1947 NarendraKarmarkar Pioneers of LP.
1 Geometrical solution of Linear Programming Model.
Linear Programming McGraw-Hill/Irwin Copyright © 2012 by The McGraw-Hill Companies, Inc. All rights reserved.
Appendix A with Woodruff Edits Linear Programming Using the Excel Solver Copyright © 2010 by The McGraw-Hill Companies, Inc. All rights reserved.McGraw-Hill/Irwin.
LINGO TUTORIAL.
Excel’s Solver Use Excel’s Solver as a tool to assist the decision maker in identifying the optimal solution for a business decision. Business decisions.
An Introduction to Linear Programming
Linear Programming for Solving the DSS Problems
Linear Programming.
Engineering Economics (2+0)
Operations Management Linear Programming Module B
Wyndor Example; Enter data
Linear Programming Objectives: Set up a Linear Programming Problem
Duality Theory and Sensitivity Analysis
LINGO TUTORIAL 2.
Linear Programming I: Simplex method
Introduction to Linear Programming
Linear Programming.
Presentation transcript:

IENG313 Operation Research I RESEARCH ASSISTANTS Mazyar Ghadirinejad & Farhood Rismanchian

Introduction Lingo is a software that helps you to model and solve some kinds of optimization problems, such as: Linear Nonlinear Integer It consists of 3 parts: Variables: Quantities to find the optimum value of objective function. Objective Function: A formula to optimize the model, for example: maximize profit, maximize products, minimize cost and etc. Constraints: Define the limits of the variables.

Linear Programming f(x1, x2, …,xn) = c1x 1± c2x2 ± … ± cnxn is a linear function. Note that we have no power of 2, 3 or … f(x1, x2, …,xn) ≥ b or f(x1, x2, …,xn) ≤ b is a linear inequality. A linear programming problem (LP) is an optimization problem to max. or min. of the linear objective function. The values of decision variables should satisfy a set of constraints.

Notes Variable names must begin with a letter A-Z and continue with letters and digits 0-9. They are not case sensitive. Enter the objective function by typing: MIN=…; or MAX= … ; Each statement (line) must be end in a semi-colon (;). Asterisk used to denote multiplication (*) . carat sign is used as a power symbol (^) In nonlinear programming. Comments are initiated with exclamation point (!). Parentheses should use to define the order of mathematical operations. Type the constraints after the objective function without: “St.”, “Such that” and “Subject to”. In Lingo, the lower bound for variables is zero.

A simple example A company produces product A and B. Product A sells for $3 per unit, and product B sells for $5 per unit. Producing a unit of product A requires 2 unit of raw material 1 and 1 unit of raw material 2. Producing a unit of product B requires 5 unit of raw material 1 and 2 unit of raw material 2. 60 units of raw material 1 and 25 unit of raw material 2 are available. Formulate an LP that can be used to maximize revenue.

Formulating the problem Variables: x1: units of product A that should be produced x2: units of product B that should be produced Objective Function: Max Z= 3x1 + 5x2 Subject to (constraints): 2x1 + 5x2 ≤ 60 (Raw material 1 constraint) 1x1 + 2x2 ≤ 25 (Raw material 2 constraint) x1 ≥ 0 x2 ≥ 0

Solving a LINGO Model Each model can be solved by: Clicking the solve button Selecting Solve from the LINGO menu Using Ctrl+S keyboard shortcut.

LINGO Solver Status Window If no errors are found, the LINGO solver status window appears:

LINGO Solution Report Window

Developing a LINGO Model in Windows Modeling Problem: The CompuQuick Corporation produces two models of computers - Standard and Turbo. CompuQuick can sell every Standard unit it produces for a profit contribution of $100, and each Turbo unit for a contribution of $150. At the CompuQuick factory, the Standard computer production line can produce, at most, 100 computers per day. At the same time, the Turbo computer production line can turn out 120 computers per day. Furthermore, CompuQuick has a limited supply of daily labor. In particular, there is a total of 160 hours of labor available each day. Standard computers require 1 hour of labor, while Turbo computers are relatively more labor intense requiring 2 hours of labor. The problem for CompuQuick is to determine the mix of Standard and Turbo computers to produce each day to maximize total profit without exceeding line and labor capacity limits.

Developing a LINGO Model in Windows In general, an optimization model will consist of the following three items: Objective Function is a formula that expresses exactly what it is you want to optimize. In business oriented models, this will usually be a profit function you wish to maximize or a cost function you want to minimize. Models may have, at most, one objective function. In our example, the objective function will compute the company's profit as a function of the output of Standards and Turbos.

Developing a LINGO Model in Windows 2. Variables: Variables are the quantities you have under your control. You must decide what the best values of the variables are. For this reason, variables are sometimes also called decision variables. In our example we will have two variables: one corresponding to the number of Standards to produce and the other corresponding to the number of Turbos to produce. 3. Constraints: Limitation on the values of the variables in a model (e.g., time, raw materials, your budget, etc). In our example, we will have one constraint for each of our production lines and one constraint on the total labor used.

Developing a LINGO Model in Windows Variables: We will let the variables STANDARD and TURBO denote the number of Standard and Turbo computers to produce, respectively. Objective Function is to maximize total profit as the sum of the profit of the Standard computer ($100) multiplied by the total Standard computers produced (STANDARD) and the profit of the Turbo computer ($150) multiplied by the total Turbo computers produced (TURBO). Finally, we tell LINGO we want to maximize an objective function by preceding it with "MAX =". Therefore, our objective function is written on the first line of our model window as:

Developing a LINGO Model in Windows Modeling Problem: The CompuQuick Corporation produces two models of computers - Standard and Turbo. Profit of every Standard computer unit is $100, and Profit of every Standard computer unit is $150. Limitation of Standard computer production line is at most, 100 per day, and for Turbo computer production line is at most, 120 per day. Total labor available is 160 hours each day. Standard computers require 1 hour of labor, while Turbo computers require 2 hours of labor. Objective function is maximizing the total profit.

Developing a LINGO Model in Windows Therefore, our objective function is: MAX = 100 * STANDARD + 150 * TURBO; Constraints: The number of Standard and Turbo computers produced must be constrained to the production line limits of 100 and 120, respectively. STANDARD <= 100; TURBO <= 120; The final constraint on the amount of labor used can be expressed as: STANDARD + 2 * TURBO <= 160;

Developing a LINGO Model in Windows You may have noticed that: Each mathematical expression in LINGO is terminated with a semicolon. Less-than-or-equal-to (<=) signify greater-than-or-equal-to (≥). Wrting an expression in more than one line: MAX = 100 * STANDARD + 150 * TURBO; Comments begin with an exclamation point (!) and end with a semicolon (;) For example: X = 1.5 * Y + Z / 2 * Y; !This is a comment; X = 1.5 * !This is a comment of a constraint; Y + Z / 2 * Y;

Developing a LINGO Model in Windows LINGO does not distinguish between uppercase and lowercase in variable names. Thus, “TURBO, Turbo, Turbo” would all be considered equivalent: all names must begin with an alphabetic character (A-Z). Subsequent characters may be either alphabetic, numeric (0-9) or the underscore (_). Names may be up to 64 characters in length. LINGO’s editor is "syntax aware“. When it encounters LINGO keywords, it displays them in blue, Comments are displayed in green, Matching parentheses are also highlighted in red and all remaining text is displayed in black.

Developing a LINGO Model in Windows The model of our example:

Problem 1 A least cost diet has to be planned for the kitchen of the Strong Boys High School. The total daily requirements of the nutritional elements for healthy young boys, and the cost and the nutritional contents of general food types are given in the following table. Consider that each student may eat at most 16 units of food stuff per day and the amount of protein taken from animal sources should not be more than the 60% of the total protein intake. Formulate as an LP model.

Solution: Objective: To obtain minimum cost daily diet which satisfying the Nutritional requirements and eating capacity Decision Variables: Xj number of units of food type j into the daily diet of the student (where j=1 (milk), 2(meat), 3(bread), 4(vegetables)).

Model: Objective Function: Min Z= 0.42X1+0.68X2+0.32X3+0.17X4 Subject to: Calories: 160X1+210X2+120X3+150X4 ≤ 2700 Carbohydrate: 110X1+130X2+110X3+120X4 ≥ 300 Protein: 90X1+190X2+90X3+130X4 ≥ 250 Vitamins: 50X1+50X2+75X3+70X4 ≥ 60 Protein balance: 90X1+190X2 ≤ 0.6(90X1+190X2+90X3+130X4) Or: 36X1+76X2-54X3-78X4 ≤ 0 Eating Capacity: X1+X2+X3+X4 ≤ 16 Non-negativity: Xj ≥ 0 ; j=1,2,3,4

Problem 2 Steelco manufactures two types of steel at three different steel mills. During a given month, each steel mill has 200 hours of blast furnace time available. Because of differences in the furnaces at each mill, the time and cost to produce a ton of steel differs for each mill. The time and cost for each mill are shown in the bellow table Each month, Steelco must manufacture at least 500 tons of steel 1 and 600 tons of steel 2. Formulate an LP to minimize the cost of manufacturing the desired steel. xij: tons of steel j that reached from mill i, where i=1,2,3 and j=1,2.

  Steel Steel 2 Cost ($) Time (Minutes) Mill 1 10 20 11 22 Mill 2 12 24 9 18 Mill 3 14 28 30

Lingo Model:

Problem 3 Walnut Orchard has two farms that grow wheat and corn. Because of different soil conditions, there are differences in the yields and costs of growing crops on the two farms. The yields and costs are shown in the following table. Each farm has 100 acres available for cultivation; 11000 bushels of wheat and 7000 bushels of corn must be grown. Determine a planting plan that will minimize the cost of meeting these demands.  

  Farm 1 Farm 2 Corn yield/acre 500 bushels 650 bushels Cost/acre of corn $ 100 $ 120 Wheat yield/acre 400 bushels 350 bushels Cost/acre of wheat $ 90 $ 80

Solution: Objective: To decide how many acres to devote to wheat and corn in each farm, so that total cost of producing requested wheat and corn is minimized. Decision Variables: xij: amount of acres devoted to produce i in farm j, where i= 1, 2 and j = 1, 2.  

MODEL: Min Z = 100 x11 + 120 x12 + 90 x21 + 80 x22 S.T: x11 + x21 ≤ 100 x12 + x22 ≤ 100 500 x11 + 650 x12 ≥ 7000 400 x21 + 350 x22 ≥ 11000 xij ≥ 0 for all i,j

LINGO Solver Status Window

LINGO Solution Report Window

Free Variables By default, a LINGO variable has a lower bound of zero and an upper bound of infinity. @FREE removes the lower bound of zero and lets a variable take negative values, rendering it unconstrained in sign, or free. The syntax is: @FREE( variable_name); where variable_name is the name of the variable you wish to make free. The @FREE function may be used in a model anywhere you would normally enter a constraint.