Examples of Optimization Problems Solved Using LINGO Software

Slide Note
Embed
Share

This content provides examples of optimization problems solved using LINGO software. It includes problems such as job assignments to machines, finding optimal solutions, and solving knapsack problems. Detailed models, constraints, and solutions are illustrated with images. Optimization techniques and binary variables are utilized to find the most efficient solutions.


Uploaded on Aug 03, 2024 | 0 Views


Download Presentation

Please find below an Image/Link to download the presentation.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author. Download presentation by click this link. If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.

E N D

Presentation Transcript


  1. LINGO LINGO LAB LAB 3/4 3/4

  2. 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.

  3. 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

  4. 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

  5. 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.

  6. 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

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

  8. 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 Unit cost (units) ($) regular 0-540 2.00 Wrenches overtime 541-800 2.80 subcontracting 801- 3.00 regular 0-620 2.10 Chisel overtime 621-900 3.20 subcontracting 901- 4.20

  9. 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

  10. The Maximum Flow Problem

  11. 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.

  12. 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

  13. 1.A corporation is considering four possible investment opportunities. The following table present information about the investment (in $) profits: Project Present Value of Capital Required Year-wise by Project Expected Returns Year1 Year2 Year3 1 6500 700 550 400 2 7000 850 550 350 3 2250 300 150 100 4 2500 350 200 170 1200 700 400 Capital available for investment In addition, one or both of the projects 1 and 2 can consider but project 4 can consider if project 3 rejected. Formulate an integer programming model to determine which project should be accepted and which should be rejected to maximize the present value from accepted project. (20 points)

  14. 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;

  15. 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

  16. 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

  17. Modeling Variables We need to decide how much of each of the four cargoes to put in each of the three compartments. Hence let: xijbe 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.

  18. 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

  19. 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]

  20. 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

Related


More Related Content