A more complex LP problem

Slides:



Advertisements
Similar presentations
Chapter 8: The Solver and Mathematical Programming Spreadsheet-Based Decision Support Systems Prof. Name Position (123) University.
Advertisements

Wyndor Example; Enter data Organize the data for the model on the spreadsheet. Type in the coefficients of the constraints and the objective function.
What is GAMS?. While they are not NLP solvers, per se, attention should be given to modeling languages like: GAMS- AIMMS-
MS&E 211 Quadratic Programming Ashish Goel. A simple quadratic program Minimize (x 1 ) 2 Subject to: -x 1 + x 2 ≥ 3 -x 1 – x 2 ≥ -2.
Convex Optimization Chapter 1 Introduction. What, Why and How  What is convex optimization  Why study convex optimization  How to study convex optimization.
WOOD 492 MODELLING FOR DECISION SUPPORT Lecture 6 LP Assumptions.
Lecture 7: Linear Programming in Excel AGEC 352 Spring 2011 – February 9, 2011 R. Keeney.
PROFESSOR GOODCHILD CEE 587 APRIL 15, 2009 Basic Optimization.
Math443/543 Mathematical Modeling and Optimization
Supply Chain Design Problem Tuukka Puranen Postgraduate Seminar in Information Technology Wednesday, March 26, 2009.
Solver & Optimization Problems n An optimization problem is a problem in which we wish to determine the best values for decision variables that will maximize.
3 Components for a Spreadsheet Linear Programming Problem There is one cell which can be identified as the Target or Set Cell, the single objective of.
CEM 514 Modeling of Construction Operations The LP/IP hybrid method for construction time-cost trade-off analysis By Samir Abdallah Sulaiman.
Introduction to Linear Programming
Chapter 3 Introduction to Optimization Modeling
Stevenson and Ozgur First Edition Introduction to Management Science with Spreadsheets McGraw-Hill/Irwin Copyright © 2007 by The McGraw-Hill Companies,
Two Discrete Optimization Problems Problem: The Transportation Problem.
START EXCEL BUILD OR RETRIEVE YOUR OPTIMIZATION MODEL SAVE YOUR WORKBOOK!! CHOOSE “Solver…” IN THE “Tools” MENU SPECIFY IN SOLVER DIALOG BOX: 1.CELL TO.
MobSched: An Optimizable Scheduler for Mobile Cloud Computing S. SindiaS. GaoB. Black A.LimV. D. AgrawalP. Agrawal Auburn University, Auburn, AL 45 th.
Quantitative Methods of Management
Supply Contract Allocation Gyana R. Parija Bala Ramachandran IBM T.J. Watson Research Center INFORMS Miami 2001.
Modeling.
Introduction to Linear Programming BSAD 141 Dave Novak.
DAY 10: EXCEL CHAPTER 8, 9, 10 Tazin Afrin September 23,
Mathematical Models & Optimization?
Chapter 24 – Multicriteria Capital Budgeting and Linear Programming u Linear programming is a mathematical procedure, usually carried out by computer software,
Goal Programming Linear program has multiple objectives, often conflicting in nature Target values or goals can be set for each objective identified Not.
Exact and heuristics algorithms
3 Characteristics of an Optimization Problem General descriptionKPiller Illustration Decisions that must be made; represented by decision variables How.
RESEARCH ASSISTANTS Mazyar Ghadirinejad & Farhood Rismanchian.
Math Programming Concept of Optimization (L.O. a ) Linear Programming Managerial Value of Information (L.O. d) Theory (L.O. b) Example Applications (L.O.
DAY 9: MICROSOFT EXCEL – CHAPTER 6 Sravanthi Lakkimsetty Sept 16, 2015.
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.
IE 312 Review 1. The Process 2 Problem Model Conclusions Problem Formulation Analysis.
Introduction to Integer Programming Integer programming models Thursday, April 4 Handouts: Lecture Notes.
-114- HMP654/EXECMAS Linear Programming Linear programming is a mathematical technique that allows the decision maker to allocate scarce resources in such.
Linear Programming McGraw-Hill/Irwin Copyright © 2012 by The McGraw-Hill Companies, Inc. All rights reserved.
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.
LINGO TUTORIAL.
Introduction to Optimization
Decision Support Systems
Computational problems, algorithms, runtime, hardness
Problem 1 Demand Total There are 20 full time employees, each can produce 10.
L14 Curve Fitting Homework Curve Fitting – least squares
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.
IENG 212 LAB 1 Research Assıstant: Kehınde Adewale ADESINA
Solver & Optimization Problems
Ch 11 Resource Constraints and Linear Programming
Wyndor Example; Enter data
The ABC’s of Optimization
How LINGO diagnoses solution issues
The ABC’s of Optimization
Integer Programming (정수계획법)
EE5780 Advanced VLSI Computer-Aided Design
Using WinQSB to solve Linear Programming Models
How What’sBest! diagnoses solution issues
Integer Programming with What’sBest
Integer Programming with LINGO
A more complex LP problem with What’sBest!
CPS 173 Computational problems, algorithms, runtime, hardness
A QUICK START TO OPL IBM ILOG OPL V6.3 > Starting Kit >
Integer Programming (정수계획법)
Modeling and Solving LP Problems in a Spreadsheet
A more complex LP problem
Integer Programming with What’sBest
Dr. Arslan Ornek DETERMINISTIC OPTIMIZATION MODELS
Chapter 1. Formulations.
BUS-221 Quantitative Methods
IENG 212 LAB 1 Research Assıstant: Kehınde Adewale ADESINA
Presentation transcript:

A more complex LP problem Set-based example using LINGO LSL2-1 A more complex LP problem Parking Assignment LINDO Systems www.lindo.com

A new apartment condominium conversion is almost complete. A More Complex LP Example: Parking Assignment LSL2-2 A new apartment condominium conversion is almost complete. City fathers require each apartment to be assigned at least one parking spot. How to formulate? Are there likely to be alternate optimal solutions? If there are, what should be done about it? Apartments are in purple. Parking slots are in green.

Apartments Parking LSL2-3 From C. H. von Lanzenauer

Parking Assignment: Input Data LSL2-4

Parking Assignment: What to do? LSL2-5 What are the decision variables? What sort of aggregation/approximation should we do? How do we measure “Best”? Simple total distance? What are the constraints? Other questions? How difficult would it be to minimize squared distance traveled?

LINGO, like What’sBest! supports all problem types: Modeling with LINGO Modeling Language LSL2-7 LINGO, like What’sBest! supports all problem types: Linear, Quadratic, Second Order Cone, Nonlinear, Stochastic, and Integer, Global solver with all. Three levels of sophistication in LINGO: 1) Simple scalar models as with Astro-Cosmo problem, 2) Set-based models: Use subscripted variables + more, 3) Program control + more: I/O with spreadsheets and databases, Solve several different models in a single run, Produce customized solution reports.

Set Based Models in LINGO LSL2-8 Why LINGO? Scalability: The big (overwhelming?) advantage of set based models is that they are scalable. The same model works for a 4 by 7 parking problem and for a 40 by 700 parking problem. Typical Set-Based Formulation has three sections: 1) SETS: Describes types of objects making up the model, or the “shape” of the data without saying anything about the size of the problem. 2) Constraints: Describes the mathematical relations among variables and parameters, 3) DATA: Specifies the data for a specific instant, e.g., “today’s problem”.

Parking Assignment Problem LSL2-6 xij = number of slots at parking lot i assigned to apartment j Total distances traveled Parking lot constraints Demand constraints 8

LSL2-9 Parking Problem Formulated in LINGO with SETS ! Generic set-based LINGO model of parking problem(parkinga); SETS: SPOT: CAP; ! Each group of spots has a capacity; APT: DEM; ! Each apartment group has a demand; SXP( SPOT, APT): COST, X; ! Each combination has a cost and number assigned; ENDSETS DATA: ! Give names for parking spots; SPOT = P1_7 P8_20 P21_34 P35_43 P44_49 P50_67 P68_79 P80_97 P98_111 P112_139; APT = ! Names for apartment groups; A1_2 A3_5 A6_8 A9_29 A30_34 A35_42 A43_49 A50_52 A53_59 A60_62; COST = 33 26 10 18 22 24 25 33 34 72 23 5 6 29 7 8 9 24 21 40 42 12 23 43 20 21 8 20 24 36 53 29 38 48 24 8 12 23 50 46 36 37 48 57 27 23 10 11 36 39 19 9 25 49 24 37 21 12 8 31 9 13 37 57 35 41 23 29 7 24 32 35 58 74 41 35 33 12 20 21 24 43 50 73 48 32 31 20 20 13 32 46 61 88 51 41 40 29 22 7; DEM = 7 6 4 23 10 11 13 9 19 12; CAP = 7 13 14 9 6 18 12 18 14 28; ENDDATA

Parking Model: Constraints and Objective LSL2-10 !----------------------------------------------------; ! Minimize total distance travelled; MIN = @SUM(SXP(i,j): COST(i,j) * X(i,j)); ! Capacity constraints for each group of spots; @FOR( SPOT( i): @SUM( APT( j): X( i, j)) <= CAP( i); ); ! Demand constraints for each group of apartments; @FOR( APT( j): @SUM( SPOT( i): X( i, j)) = DEM( j);

Parking Problem: Default Solution Report LSL2-11 Global optimal solution found. Objective value: 1804.000 Infeasibilities: 0.000000 Total solver iterations: 26 Variable Value X( P1_7, A9_29) 7.000000 X( P8_20, A6_8) 4.000000 X( P8_20, A9_29) 9.000000 X( P21_34, A9_29) 7.000000 X( P21_34, A43_49) 7.000000 X( P35_43, A35_42) 9.000000 X( P44_49, A43_49) 6.000000 X( P50_67, A3_5) 6.000000 X( P50_67, A30_34) 10.00000 X( P50_67, A53_59) 2.000000 X( P68_79, A1_2) 7.000000 X( P68_79, A53_59) 5.000000 X( P80_97, A50_52) 9.000000 X( P80_97, A53_59) 9.000000 X( P98_111, A35_42) 2.000000 X( P98_111, A53_59) 3.000000 X( P112_139, A60_62) 12.00000

Spreadsheets with LINGO LSL2-12 It is very easy in LINGO to retrieve input data from and return results to a spreadsheet. The only change needed is to the DATA section, e.g., DATA: SPOT = @ole("parkings.xls"); ! Get data from spreadsheet; APT = @ole("parkings.xls"); ! from corresponding range; COST = @ole("parkings.xls"); DEM = @ole("parkings.xls"); CAP = @ole(); ! Will use open spreadsheet if no name; ENDDATA . . . ! Send the results back; @ole("parkings.xls") = x; @ole("parkings.xls") = obj;

Spreadsheets vs. LINGO LSL2-13 Spreadsheet advantages: 1) Large audience of users familiar with spreadsheets 2) Excellent report formatting, graphing, etc. 3) Good for two dimensional problems, e.g., suppliers & customers. LINGO Advantages: 1) Scalability and flexibility. Very easy to solve a 3 supplier, 5 customer, 2 period problem today, and a 10 supplier, 50 customer, 4 period problem tomorrow. No tedious copying of formulae. 2) Auditability: Very easy to see all the formulae in one place. 3) Multiple dimensions are not a problem, e.g. 10 suppliers, 50 customers, 12 periods, 60 products. 4) Sparse sets are easily handled, e.g., not all suppliers carry all products, do not serve all customers, etc.

Thank you for your attention. For more information, please visit www.m-focus.co.th or Call 02-513-9892