1 of 27

Building composite models

Chengcheng Fei

2 of 27

Motivation

  • The models we have looked at so far are often used as building blocks in making more complex models
  • It is not unusual to see a model that has multiple locations and is a composite of say resource allocation models to make goods, transport models to move them and then something like a feed or assembly model where we use the goods as an input to make other products and finally a final good transport.
  • This means we may need to glue together multiple types of models to adequately represent the entity we are trying to model

3 of 27

Motivation (continued)

  • Consider an example from the US milk industry.
  • We might have
    • a representation of dairy farms that produce raw milk in the form of a resource allocation model
    • movement of raw milk to several processing locations via a transport model
    • Processing of milk into fluid and cream plus ice cream, butter, yogurt, etc in the form of disassembly-assembly models
    • Movement of final products to consumption locations using multiple transportation models
  • This means we need to glue these three model types to represent either the industry as a whole or a vertically integrated firm in that industry

4 of 27

Basics of Model Gluing

  • When gluing models we typically have to take things that were assumed to be
    • fixed in availability like available supply

or

    • reflective of a single possible decision (like an items disposed of in one and only way - no choice)

and

    • Make them a consequence of choices involving variables

  • Suppose we consider this in the case of integrating a resource allocation – production model and a transport model

5 of 27

Basics of Model Gluing

  •  

6 of 27

Basics of Model Gluing

  •  

7 of 27

Basics of Model Gluing

  •  
  • Now we have a model ready for gluing
  • If this was to be our final model we would likely add some cost for supply and perhaps some constraints on supply and demand. We do not do that as we will gain those terms on the supply side when gluing

8 of 27

Basics of Model Gluing

  •  

9 of 27

Basics of Model Gluing

  •  

10 of 27

Basics of Model Gluing

  •  

11 of 27

Basics of Model Gluing

  •  

12 of 27

Basics of Model Gluing

  •  

13 of 27

Toward more Gluing

  • The possibilities for model gluing are large.
  • In our example we could do things like the following
    • Treat multiple products – here we would add a product dimension to the basic production and movement variable along with the supply demand balance between outgoing shipments and total production
    • Possibly add a disassemble component that cut animals into products replacing the dem variable.
    • Further, the meat product could be reassembled into packs or sausage or bologna. Then we would glue an assembly model in and possible outgoing products via another transport structure

14 of 27

Gluing Tableau Models

  • Suppose John has two dairy farms (Farm A and B) producing raw milk. Two milk processing companies (M1 and M2) would like to purchase milk from John. The milk processing companies require John to ship the raw milk to their facilities at his cost.
  • John has two possible feeding options, just feed standard feed mix or feed 90% standard feed mix and 10% soybean meal. If John feeds the cow more soybean meals, it will yield more milk, but also consumes more labor.
  • Prices of standard feed mix and soybean mills are $100 and $300 per US ton.
  • The processing companies will purchase milk @ $3.5/gallon. M1 will purchase 1000 gallons and M2 will buy 1200 gallons
  • More information is given in the tables.

15 of 27

Gluing Tableau Models

P1

P2

Yield (gallon per cow per day)

6

7

Standard Feed Mix (lb)

100

90

Soybean Meal (lb)

10

Labor (hour)

0.3

0.4

Processing cost ($)

4

5

Table 1: Cost and yield of feeding procedure for Farm A and Farm B

Farm A

Farm B

Cow (head)

100

200

Labor (Hour)

35

80

Table 2: Resource Availability of Farms

M1

M2

FarmA

0.3

0.6

FarmB

0.2

0.5

Table 3: Transportation cost ($/gallon)

16 of 27

Gluing Tableau Models

  • We first build the joint model of Farm A, in which we allow purchasing inputs, processing to output and selling outputs.

Sales

P1

P2

FeedMix

Soybean Meal

level

MAX

obj

3.5

-4

-5

-0.05

-0.15

Milk Balance

1

-6

-7

<=

0

Feed mix balance

100

90

-1

<=

0

soybean meal balance

10

-1

<=

0

labor

0.3

0.4

<=

35

cow

1

1

<=

100

non-negative

1,

1,

1,

1,

1,

>=

0

17 of 27

Gluing Tableau Models

  • Now, we add a dimension to the SALES and PROD variables that tells the location of activity by supply region (s) and the associated data for prices, cost, resource usage, resource endowment and yield
  • In the tableau we prepare one more tableau for Farm B and then glue them diagonally.

Sales

P1

P2

FeedMix

Soybean Meal

level

obj

3.5

-4

-5

-0.05

-0.15

MAX

Milk Balance

1

-6

-7

<=

0

Feed mix balance

100

90

-1

<=

0

soybean meal balance

10

-1

<=

0

labor

0.3

0.4

<=

80

cow

1

1

<=

200

non-negative

1,

1,

1,

1,

1,

>=

0

18 of 27

Sales FarmA

P1 FarmA

P2 FarmA

Feed

Mix FarmA

Soybean Meal FarmA

Sales FarmB

P1 FarmB

P2 FarmB

Feed

Mix FarmB

Soybean Meal FarmB

level

obj

3.5

-4

-5

-0.05

-0.15

3.5

-4

-5

-0.05

-0.15

Max

Milk Balance FarmA

1

-6

-7

<=

0

Feed mix balance FarmA

100

90

-1

<=

0

SoyMeal balance FarmA

10

-1

<=

0

labor FarmA

0.3

0.4

<=

35

cow FarmA

1

1

<=

100

Milk Balance FarmB

1

-6

-7

<=

0

Feed mix balance FarmB

100

90

-1

<=

0

soy meal balance FarmB

10

-1

<=

0

labor FarmB

0.3

0.4

<=

80

cow FarmB

1

1

<=

200

non-negative

1,

1,

1,

1,

1,

1,

1,

1,

1,

1,

>=

0

19 of 27

Gluing Tableau Models

  • Now we set up the transportation model
  • As we don’t know the supply availability of Farm A and B, we set the RHS parameter as “a” and “b”

A/M1

A/M2

B/M1

B/M2

obj

0.3

0.6

0.2

0.5

MIN

Farm A supply balance

1

1

<=

a

farm B supply balance

1

1

<=

b

M1 demand balance

-1

-1

<=

-1000

M2 Demand balance

-1

-1

<=

-1200

20 of 27

Gluing Tableau Models

  • Now we will change the model to a maximization model and include a sale price.

A/M1

A/M2

B/M1

B/M2

obj

3.2

2.9

3.3

3

MAX

Farm A supply balance

1

1

<=

a

farm B supply balance

1

1

<=

b

M1 demand balance

1

1

>=

1000

M2 Demand balance

1

1

>=

1200

21 of 27

Gluing Tableau Models

  • Now we will change supply from being exogenously fixed to being an endogenous variable

A/M1

A/M2

B/M1

B/M2

Supply A

Supply B

obj

3.2

2.9

3.3

3

Max

Farm A supply balance

1

1

-1

<=

0

farm B supply balance

1

1

-1

<=

0

M1 demand balance

1

1

>=

1000

M2 Demand balance

1

1

>=

1200

22 of 27

Gluing Tableau Models

  • Note here that the Supply variables in the transport model are equivalent to the SALEs Variables in the Joint products model. So we glue there and remove the price term allowing it to appear against the MVE variable in the transport model

Sales FarmA

P1 FarmA

P2 FarmA

FeedMix FarmA

Soybean Meal FarmA

Sales FarmB

P1 FarmB

P2 FarmB

Feed Mix FarmB

Soybean Meal FarmB

level

obj

3.5

-4

-5

-0.05

-0.15

3.5

-4

-5

-0.05

-0.15

Max

Milk Balance FarmA

1

-6

-7

<=

0

Feed mix balance FarmA

100

90

-1

<=

0

Soybean Meal balance FarmA

10

-1

<=

0

labor FarmA

0.3

0.4

<=

35

cow FarmA

1

1

<=

100

Milk Balance FarmB

1

-6

-7

<=

0

Feed mix balance FarmB

100

90

-1

<=

0

soybean meal balance FarmB

10

-1

<=

0

labor FarmB

0.3

0.4

<=

80

cow FarmB

1

1

<=

200

non-negative

1,

1,

1,

1,

1,

1,

1,

1,

1,

1,

>=

0

A/M1

A/M2

B/M1

B/M2

Supply A

Supply B

obj

3.2

2.9

3.3

3

Max

Farm A supply balance

1

1

-1

<=

0

farm B supply balance

1

1

-1

<=

0

M1 demand balance

1

1

>=

1000

M2 Demand balance

1

1

>=

1200

23 of 27

Sales FarmA

mA

P2 FarmA

Feed Mix FarmA

SoybeanMeal FarmA

Sales FarmB

P1 FarmB

P2 FarmB

Feed Mix FarmB

SoybeanMeal FarmB

AM1

AM2

BM1

BM2

Supply A

Supply B

obj

3.5

-4

-5

-0.05

-0.15

3.5

-4

-5

-0.05

-0.15

3.2

2.9

3.3

3

MAX

Milk Balance FarmA

1

-6

-7

<=

0

Feed mix balance FarmA

100

90

-1

<=

0

soybean meal balance FarmA

10

-1

<=

0

labor FarmA

0.3

0.4

<=

35

cow FarmA

1

1

<=

100

Milk Balance FarmB

1

-6

-7

<=

0

Feed mix balance FarmB

100

90

-1

<=

0

soybean meal balance FarmB

10

-1

<=

0

labor FarmB

0.3

0.4

<=

80

cow FarmB

1

1

<=

200

Farm A supply balance

1

1

-1

<=

0

farm B supply balance

1

1

-1

<=

0

M1 demand balance

-1

-1

<=

-1000

M2 Demand balance

-1

-1

<=

-1200

Farm A Supply demand balance

-1

1

<=

0

Farm B supply demand balance

-1

1

<=

0

non-negative

1,

1,

1,

1,

1,

1,

1,

1,

1,

1,

1,

1,

1,

1,

1,

1,

>=

0

Note we have linked milk transport to milk production

24 of 27

We can simplify the model to be this format

Sales FarmA

P1 FarmA

P2 FarmA

Feed Mix FarmA

Soybean Meal FarmA

Sales FarmB

P1 FarmB

P2 FarmB

Feed Mix FarmB

Soybean Meal FarmB

AM1

AM2

BM1

BM2

obj

-4

-5

-0.05

-0.15

-4

-5

-0.05

-0.15

3.2

2.9

3.3

3

Milk Balance FarmA

1

-6

-7

<=

0

Feed mix balance FarmA

100

90

-1

<=

0

soybean meal balance FarmA

10

-1

<=

0

labor FarmA

0.3

0.4

<=

35

cow FarmA

1

1

<=

100

Milk Balance FarmB

1

-6

-7

<=

0

Feed mix balance FarmB

100

90

-1

<=

0

soybean meal balance FarmB

10

-1

<=

0

labor FarmB

0.3

0.4

<=

80

cow FarmB

1

1

<=

200

Farm A supply balance

-1

1

1

<=

0

farm B supply balance

-1

1

1

<=

0

M1 demand balance

1

1

>=

1000

M2 Demand balance

1

1

>=

1200

non-negative

1,

1,

1,

1,

1,

1,

1,

1,

1,

1,

1,

1,

1,

1,

>=

0

25 of 27

Toward more Gluing—Tableau

  • As the example in the mathematical notation part
    • If the farms have multiple products
      • We built the joint model tableau with multiple output
      • We then built multiple transportation models to ship products
      • Gluing the joint models with transportation models by adding supply demand balance between the SALES variable in joint models and SUPPLY variables in transportation models

26 of 27

Toward more Gluing– tableau

  • Possibly disassemble an input like milk into component parts like skim milk and cream, then ship to customers
    • Setup disassembly model Tableau to disassemble milk to skim milk and cream
    • Multiple disassembly models are need if you have more than one disassembling facilities
    • Build more transportation model, not only for different locations, but also for different products
    • Gluing joint model with disassembly model(s). The SALES variables in joint models are equivalent to INPUT variables in disassembly models.
    • Gluing the big model with transportation models. The OUTPUT variables in disassembly model are equivalent to Supply variable in Transportation model

27 of 27

Toward more Gluing– tableau

  • Further, the skim milk, cream and butter disassembled from the raw milk can be processed to diary products, e.g ice cream, yogurt, sour cream, and different types of cheeses.
    • Build assembly model tableau
    • Then we can glue one assembly model after gluing disassembly model and change the transportation model to ship the final products. The output variables in disassembly model will be the input variables in assembly model and the output variables in assembly model will replace the supply availability parameters in transportation model