LINGO LAB 3/4.

Slides:



Advertisements
Similar presentations
بسم الله الرحمن الرحيم CONTENTS EXERCISES DIET PROBLEM REFERENCES
Advertisements

1 Material to Cover  relationship between different types of models  incorrect to round real to integer variables  logical relationship: site selection.
Lesson 08 Linear Programming
Linear Programming. Introduction: Linear Programming deals with the optimization (max. or min.) of a function of variables, known as ‘objective function’,
Linear Programming We are to learn two topics today: LP formulation
Planning with Linear Programming
Linear Programming Problem
BA 452 Lesson B.3 Integer Programming 11ReadingsReadings Chapter 7 Integer Linear Programming.
Session II – Introduction to Linear Programming
Aggregate Production Planning
Linear Programming Problem Formulation.
Operations Management Linear Programming Module B - Part 2
B-1 Operations Management Linear Programming Module B - New Formulations.
Kerimcan OzcanMNGT 379 Operations Research1 Integer Linear Programming Chapter 8.
WOOD 492 MODELLING FOR DECISION SUPPORT Lecture 6 LP Assumptions.
EMGT 501 HW # Due Day: Sep 14.
Linear Programming (6S) and Transportation Problem (8S)
Integer Programming Integer programming is a solution method for many discrete optimization problems Programming = Planning in this context Origins go.
Linear Goal Programming
1 1 Slide Chapter 14: Goal Programming Goal programming is used to solve linear programs with multiple objectives, with each objective viewed as a "goal".
1 Lecture 2 & 3 Linear Programming and Transportation Problem.
1 Lecture 2 MGMT 650 Linear Programming Applications Chapter 4.
Linear Programming OPIM 310-Lecture 2 Instructor: Jose Cruz.
B-1 Operations Management Linear Programming Module B - Harder Formulations.
Problem Set # 4 Maximize f(x) = 3x1 + 2 x2 subject to x1 ≤ 4 x1 + 3 x2 ≤ 15 2x1 + x2 ≤ 10 Problem 1 Solve these problems using the simplex tableau. Maximize.
Linear Programming Applications
Linear Programming Econ Outline  Review the basic concepts of Linear Programming  Illustrate some problems which can be solved by linear programming.
Review of Reservoir Problem OR753 October 29, 2014 Remote Sensing and GISc, IST.
1© 2003 by Prentice Hall, Inc. Upper Saddle River, NJ The Wyndor Glass Company Problem (Hillier and Liberman) The Wyndor Glass Company is planning.
Kerimcan OzcanMNGT 379 Operations Research1 Transportation, Assignment, and Transshipment Problems Chapter 7.
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.
Production Management Application by Aparna Asha. v Saritha Jinto Antony Kurian.
Integer Programming Integer programming is a solution method for many discrete optimization problems Programming = Planning in this context Origins go.
Spreadsheet Modeling & Decision Analysis:
THE GALAXY INDUSTRY PRODUCTION PROBLEM -
1 1 Slide © 2000 South-Western College Publishing/ITP Slides Prepared by JOHN LOUCKS.
Chapter 1. Formulations 1. Integer Programming  Mixed Integer Optimization Problem (or (Linear) Mixed Integer Program, MIP) min c’x + d’y Ax +
DISTRIBUTION AND NETWORK MODELS (1/2)
A LINEAR PROGRAMMING PROBLEM HAS LINEAR OBJECTIVE FUNCTION AND LINEAR CONSTRAINT AND VARIABLES THAT ARE RESTRICTED TO NON-NEGATIVE VALUES. 1. -X 1 +2X.
Introduction to Operations Management
Linear Programming and Applications
Integer Programming Definition of Integer Programming If requiring integer values is the only way in which a problem deviates from.
LINEAR PROGRAMMING.
1 1 © 2003 Thomson  /South-Western Slide Slides Prepared by JOHN S. LOUCKS St. Edward’s University.
Linear Programming (LP) Problems MAX (or MIN): c 1 X 1 + c 2 X 2 + … + c n X n Subject to:a 11 X 1 + a 12 X 2 + … + a 1n X n
LINEAR PROGRAMMING MEANING:
Problems in Combinatorial Optimization. Linear Programming.
Transportation and Distribution Planning Matthew J. Liberatore John F. Connelly Chair in Management Professor, Decision and Information Techologies.
1 Geometrical solution of Linear Programming Model.
1 Introduction To Linear Programming l Today many of the resources needed as inputs to operations are in limited supply. l Operations managers must understand.
Linear Programing Problem
Example 15: A manufacturer has 4 warehouses and 5 vendors all in different cities. In the first warehouse there are 50 products, in the second warehouse.
Using Variable Domain Functions
Problem 1 Demand Total There are 20 full time employees, each can produce 10.
USING SETS IN LINGO What Are Sets?
Operations Management Linear Programming Module B
Integer Programming (정수계획법)
Optimization II.
LINGO TUTORIAL 2.
LP Modeling Most common type of LP involves allocating resources to activities Determining this allocation involves choosing the levels of the activities.
Chapter 8 Goal Programming.
LINGO LAB 4.
LINGO LAB 3/4.
Linear Programming Introduction.
Integer Programming (정수계획법)
Chapter 6 Network Flow Models.
Slides by John Loucks St. Edward’s University.
Linear Programming Introduction.
Chapter 1. Formulations.
Presentation transcript:

LINGO LAB 3/4

Example 2 Suppose that we have 3 jobs (1, 2, 3) waiting for being performed and 3 machines (A, B, C) that can be used to perform these jobs. The assignment costs of the jobs to the machines are given in the following table. Find the minimum total cost one-to-one assignment between the jobs and the machines by using lingo programming.

Min z= 9x11+6x12+3x13+4x21+5x22+6x23+3x31+7x32+11x33 Subject to x11+x12+x13=1 x21+x22+x23=1 x31+x32+x33=1 x11+x21+x31=1 x12+x22+x31=1 x13+x23+x33=1 x11, x12,x13,x21,x22,x23,x31,x32 and x33 are binary variables

Example 3 Find the optimal solution by using LINGO Max z= 3x1+x2+3x3 Subject to -x1+2x2+x3≤4 4x2-3x3 ≤ 2 X1-3x2+2x3 ≤ 3 x1,x2 and x3 ≥ 0 and integer

Solve the following knapsack problem by using lingo software : Example 4 Solve the following knapsack problem by using lingo software : Maximize z= 5X1+3X2+8X3+9X4+4X5 Subject to 3X1+X2+5X3+4X4+X5=25 0≤X1 ≤2 , 0 ≤X2 ≤1 , 0 ≤X3 ≤4 , 0 ≤X4 ≤2, 0 ≤X5 ≤1 X1,X2,X3,X4,and X5 and integer.

Example 1 : Find the optimal solution of the following model Min z = 200X1 + 250X2 + 320X3 s.t. 13X1 + 11X2 +9X3≥12000 X1 ≤ 5000 X2 ≤ 4000 X3 ≤ 10000 X3 ≥ 100 X1, X2, X3 ≥ 0 and integer

Example : Solve the following LP problem MAX 4X1+2X2+3X3+6X4-4X5-11X6 3X1+X2+5X3+2X4-2X5-X6 ≤ 9 -X1+X2+X3+2X4-3X6 ≤ 3 2X1-X2-4X3+X4+X5-X6 ≤ -2 X1,X2,X3,X4,X5and X6 are binary variables

Toolco has contracted with Automate to supply their automotive discount stores with wrenches and chisels. Automate weekly demand consists of 1500 wrenches and 1200 chisels. Toolco’s present one-shift capacity is not large enough to produce the requested units and must use overtime and possibly subcontracting with other tool shops. The result is an increase in the production cost per unit, as shown in the following table. The market restricts wrenches to chisels to a ratio of at least 2:1. Tool Production type Weekly production range (units) Unit cost ($)   Wrenches regular 0-540 2.00 overtime 541-800 2.80 subcontracting 801-∞ 3.00 Chisel 0-620 2.10 621-900 3.20 901-∞ 4.20

Min 2x1+2.8x2+3x3+2.1x4+3.2x5+4.2x6 S.T x1+x2+x3>=1500 x4+x5+x6>=1200 2(x1+x2+x3)-(x4+x5+x6)=0 0<=x1<=540 541<=x2<=800 801<=x3 0<=x4<=620 621<=x5<=900 901<=x5

The Maximum Flow Problem

Fred has $3200 to invest over the next six years Fred has $3200 to invest over the next six years. At the beginning of each year he can invest money in one- or two year time deposit. The bank pays 9 percent interest on one-year time deposits and 18 percent interest on two- year time deposits. In addition, West World Limited will offer three-year certificates stating at the beginning of the second year. These certificates will return 29 percent (total). If Fred reinvests his money available every year, formulate a linear program to show him how to maximize his total cash at hand at the end of the sixth year.

Max = S5+1.09X5+1.18Y4+1.29Z3; !S.T; X1+Y1+S1=3200 X2+Y2+Z2+S2=S1+1.09X1 X3+Y3+Z3+S3=S2+1.09X2+1.18Y1 X4+Y4+S4=S3+1.09X3+1.18Y2 X5+S5=S4+1.09X4+1.18Y3+1.29Z2

Model: Max = 6500X1+7000X2+2250X3+2500X4; !S.T; 700X1+850X2+300X3+350X4<=1200; 550X1+550X2+150X3+200X4<=700; 400X1+350X2+100X3+170X4<=400; X1+X2>=1; -X3+X4<=1;

Model: Max = 6500*X1+7000*X2+2250*X3+2500*X4; !S.T; 700*X1+850*X2+300*X3+350*X4<=1200; 550*X1+550*X2+150*X3+200*X4<=700; 400*X1+350*X2+100*X3+170*X4<=400; X1+X2>=1; -X3+X4<=1; @BIN(X1); @BIN(X2); @BIN(X3); @BIN(X4); End

A cargo plane has three compartments for storing cargo: front, centre and rear. These compartments have the following limits on both weight and space: Compartment Weight capacity (tonnes) Space capacity (cubic metres) Front 10 6800 Centre 16 8700 Rear 8 5300 Furthermore, the weight of the cargo in the respective compartments must be the same proportion of that compartment's weight capacity to maintain the balance of the plane.The following four cargoes are available for shipment on the next flight: Cargo Weight (tonnes) Volume (cubic metres/tonne) Profit (£/tonne) C1 18 480 310 C2 15 650 380 C3 23 580 350 C4 12 390 285 Any proportion of these cargoes can be accepted. The objective is to determine how much (if any) of each cargo C1, C2, C3 and C4 should be accepted and how to distribute each among the compartments so that the total profit for the flight is maximised. Formulate the above problem as a linear program

Modeling Variables We need to decide how much of each of the four cargoes to put in each of the three compartments. Hence let: xij be the number of tonnes of cargo i (i=1,2,3,4 for C1, C2, C3 and C4 respectively) that is put into compartment j (j=1 for Front, j=2 for Centre and j=3 for Rear) where xij >=0 i=1,2,3,4; j=1,2,3 Note here that we are explicitly told we can split the cargoes into any proportions (fractions) that we like.

Constraints cannot pack more of each of the four cargoes than we have available x11 + x12 + x13 <= 18 x21 + x22 + x23 <= 15  x31 + x32 + x33 <= 23  x41 + x42 + x43 <= 12 the weight capacity of each compartment must be respected x11 + x21 + x31 + x41 <= 10  x12 + x22 + x32 + x42 <= 16  x13 + x23 + x33 + x43 <= 8 the volume (space) capacity of each compartment must be respected 480x11 + 650x21 + 580x31 + 390x41 <= 6800  480x12 + 650x22 + 580x32 + 390x42 <= 8700  480x13 + 650x23 + 580x33 + 390x43 <= 5300 the weight of the cargo in the respective compartments must be the same proportion of that compartment's weight capacity to maintain the balance of the plane [x11 + x21 + x31 + x41]/10 = [x12 + x22 + x32 + x42]/16 = [x13 + x23 + x33 + x43]/8

Objective The objective is to maximise total profit, i.e. Max 310[x11+ x12+x13] + 380[x21+ x22+x23] + 350[x31+ x32+x33] + 285[x41+ x42+x43]

Max 310[x11+ x12+x13] + 380[x21+ x22+x23] + 350[x31+ x32+x33] + 285[x41+ x42+x43] x11 + x12 + x13 <= 18 x21 + x22 + x23 <= 15  x31 + x32 + x33 <= 23  x11 + x21 + x31 + x41 <= 10  x12 + x22 + x32 + x42 <= 16  x13 + x23 + x33 + x43 <= 8 480x11 + 650x21 + 580x31 + 390x41 <= 6800  480x12 + 650x22 + 580x32 + 390x42 <= 8700  480x13 + 650x23 + 580x33 + 390x43 <= 5300 [x11 + x21 + x31 + x41]/10 = [x12 + x22 + x32 + x42]/16 = [x13 + x23 + x33 + x43]/8