are 621 quantitative methods for resource...

Post on 13-Apr-2018

228 Views

Category:

Documents

4 Downloads

Preview:

Click to see full reader

TRANSCRIPT

1

ARE 621 Quantitative Methods for Resource Economics

Lecture 7

Tatiana (Tanya) Borisova, 2030 Ag Sci Bld.,

tatiana.borisova@mail.wvu.edu

2

Plan

• Mid-Term Exam

• General Algebraic Modeling System (GAMS)

• GAMS solution to MIP warehouse location problem

3

Mid-Term Exam

• One hour

• Four sections:

1. Multiple choice • 10 out of 13 questions• 20 points total

2. True / False• 5 questions• 10 points total

4

Reminder: term-paper outline –due on Oct. 10

5

Mid-Term Exam (cont.)

• Four sections (cont.)

3. Short Answer• 2 out of 4 concepts• 10 points total

4. Problem• 6 out of 9 problems• 60 points total

• Do not forget to sign your name

6

General Algebraic Modeling System (GAMS)

7

8

9

10

11

Acme Block Company considers construction of warehouses to ship concrete blocks from 2 plants to 2 suburban locations.

Annual demand at each sub-urban locations is: Westwood -- 75 th. tons, and Eastwood -- 50 th. tons.

Acme has two plants. Plant 1 can produce 50 th. tons per year, and plant 2 can produce 75 th tons per year.

Three warehouse locations that Acme is considering are referred to as A, B, and C. They are described on the next slide. Only one warehouse can be built.

Warehouse Location Problem

Based on McCarl and Spreen

12

Warehouse Location Characteristics

WarehouseLocation

Annual Capacity (th. ton)

Construction Cost ($)

Life Span (years)

A Unlimited 500 10

B 60 720 12

C 70 680 10

Based on McCarl and Spreen

13

Warehouse Location Problem

Delivery Cost Per unit

Shipping Points Supply Warehouse

1 2 A B C A 1 6 - - - B 2 3 - - -

Warehouse

C 8 1 - - - Westwood 4 7 4 3 5 Demand Eastwood 8 6 6 4 3

Based on McCarl and Spreen

14

Warehouse Location Problem: MIP Model

Based on McCarl and Spreen

15Based on McCarl and Spreen

Construction cost

Transp. cost from plants to warehouses

Transp. cost from warehouses to markets

Transp. cost from plants to markets

Supply constr.

Demand constr.

Intermediate node const.Wareh. capacityconst.

Config.const.

Obj. F.

Non-negativity / integer const.

Warehouse Location Problem: MIP Model

16

Warehouse Location: MIP Formulation

Indices

i – plant index

j - demand point index

k - warehouse location index

Based on McCarl and Spreen

17

Data• Supply

• Demand

• Per unit transportation costsPlant to warehouseWarehouse to marketsPlant to markets

• Warehouse location characteristicsCapacityConstruction costLife span

18

Variables

Vk – 0-1 variable indicating whether k-th warehouse is constructed

Xik - continuous variable indicating the quantity shipped from supply point i to warehouse k;

Ykj - a continuous variable indicating the quantity shipped from warehouse k to demand point j;

Zij - a continuous variable indicating the quantity shipped from supply point i directly to demand point j.

19

MIP Model: Equations

• Objective function - total costMin Construction cost + Transp. cost from plants to warehouses +Transp. cost from warehouses to markets +Transp. cost from plants to markets

• Constraints– Supply – Demand – Warehouse Supply and Demand balance – Warehouse capacity– Configuration – only 1 warehouse– Non-negativity / integer / binary

20

Warehouse Location: GAMS Sets

Indices

i – plant index

k - warehouse location index

j - demand point index

SETS

SUPPLYL plants /S1,S2/

WAREHOUSE warehouse locations /A,B,C/

MARKET demand locations /D1,D2/

Based on McCarl and Spreen

21

GAMS Sets

22

23

Data Definitions

• Scalars• Parameters• Tables

24

25

GAMS Parameters• Annual demand at each sub-urban locations is: Westwood -- 75 th.

tons, and Eastwood -- 50 th. tons.

• Plant 1 can produce 50 th. tons per year, and plant 2 can produce 75 th tons per year.

PARAMETERS

SUPPLY(SUPPLYL) quantity available at each supply point /S1 50, S2 75/

DEMAND(MARKET) quantity demanded / D1 75, D2 50/;

26

GAMS: Parameter Definition

GAMS reserved word

Verbal description

Name of Data Item Index

Description

Name of each data set index

Parameter Value

semicolon

27

Data Definition: Tables

Delivery Cost Per unit

Shipping Points Supply Warehouse

1 2 A B C A 1 6 - - - B 2 3 - - -

Warehouse

C 8 1 - - - Westwood 4 7 4 3 5 Demand Eastwood 8 6 6 4 3

Based on McCarl and Spreen

28

GAMS: Tables

29

GAMS Tables

30

GAMS Tables

31

Remaining Information:

• Warehouse location characteristics

Warehouse Annual Capacity (th. ton)

Investment Cost (th. $)

Life Span (years)

A Unlimited 500 10

B 60 720 12

C 70 680 10

Based on McCarl and Spreen

32

Add Remaining Data

33

GAMS Variables

34

GAMS Variables

35

GAMS Variables

36

37

GAMS Equations: Declaration

38

GAMS Equations: Definition– Limits of Supply Available

• Xik - continuous variable indicating the quantity shipped from supply point i to warehouse k;

• Zij - a continuous variable indicating the quantity shipped from supply point i directly to demand point j.

39

GAMS Equations: Definition

• Min Requirements at Demand Market– Ykj - a continuous variable indicating the quantity shipped from

warehouse k to demand point j;– Zij - a continuous variable indicating the quantity shipped from

supply point i directly to demand point j.

Based on McCarl and Spreen

40

GAMS Equations: Definition

• Shipment balance constraints– Xik - continuous variable indicating the quantity shipped from

supply point i to warehouse k;– Ykj - a continuous variable indicating the quantity shipped from

warehouse k to demand point j;

Based on McCarl and Spreen

41

GAMS Equations: Definition

• Warehouse capacity constraint– Vk – 0-1 variable indicating whether k-th warehouse is

constructed– Ykj - a continuous variable indicating the quantity shipped from

warehouse k to demand point j;

Based on McCarl and Spreen

42

Recall: Warehouse Data

43

GAMS Equations: Definition

• Configuration constraint

Vk – 0-1 variable indicating whether k-th warehouse is constructedAmk = 1bm = 1

Based on McCarl and Spreen

44

GAMS Equations: Definition– Vk – 0-1 variable indicating whether k-th warehouse is constructed– Xik - continuous variable indicating the quantity shipped from supply

point i to warehouse k;– Ykj - a continuous variable indicating the quantity shipped from

warehouse k to demand point j;– Zij - a continuous variable indicating the quantity shipped from

supply point i directly to demand point j.

• Objective function:

45

46

47

GAMS Model

• Two ways to define a model:

Or

48

SOLVE Statement

49

50

51

52

53

54

55

56

57

58

59

60

61

62

63

64

65

66

67

68

Suggested Reading

• GAMS Tutorial by R. Rosenthalhttp://www.gams.com/docs/gams/Tutorial.pdf

• McCarl and Spreen, GAMS book, Ch. 5http://agecon2.tamu.edu/people/faculty/mccarl-bruce/books.htm

• Thompson and Thore - handout

69

70

Lab Work:

• Correct GAMS program for Warehouse Location Problem

• Few words about homework

top related