ieng 313 operation research i

35
IENG313 Operation Research I RESEARCH ASSISTANTS Mazyar Ghadirinejad & Farhood Rismanchian

Upload: britanni-tillman

Post on 31-Dec-2015

34 views

Category:

Documents


0 download

DESCRIPTION

IENG 313 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: - PowerPoint PPT Presentation

TRANSCRIPT

IENG313 Operation Research I

IENG313Operation Research IRESEARCH ASSISTANTS

Mazyar Ghadirinejad&Farhood Rismanchian

IntroductionLingo is a software that helps you to model and solve some kinds of optimization problems, such as:Linear NonlinearInteger

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 Programmingf(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.

NotesVariable 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 exampleA 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.

Variables:x1: units of product A that should be producedx2: 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 0x2 0

Formulating the problemSolving a LINGO ModelEach model can be solved by:Clicking the solve button

Selecting Solve from the LINGO menu

Using Ctrl+S keyboard shortcut.

LINGO Solver Status WindowIf 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