Case Study: Sigma Pie Company

MATP4700/ DSES4770 Math Models of Operations Research

Fall 2008

Handling 3-Dimensional Arrays

There are probably over 600 variables required in the project, so you will need to use sets.

Here are some lines from my model file:

set factories;
set demandcenters;

set finished;

set finarcs within {factories,demandcenters};      #  arcs for shipping finished pies
param finarccost{finished,finarcs} >= 0;           #  ...  and their costs

and from my data file indicating how to construct a three-dimensional parameter array finarccost to represent the cost of shipping the finished goods:

set factories := StPaul Seattle Sacramento Chattanooga Buffalo;
set demandcenters := Dallas SaltLake Toronto KansasCity
       Fresno Birmingham Philadelphia;

set finished := namebrand generic;

set finarcs :=
StPaul Dallas
StPaul SaltLake
StPaul Toronto
StPaul KansasCity
StPaul Birmingham
Seattle SaltLake
Seattle KansasCity
Seattle Fresno
Sacramento KansasCity
Sacramento Fresno
Sacramento SaltLake
Sacramento Dallas
Chattanooga Dallas
Chattanooga KansasCity
Chattanooga Birmingham
Chattanooga Philadelphia
Buffalo Toronto
Buffalo Birmingham
Buffalo Philadelphia;

param finarccost :=

[namebrand, *, *]
StPaul Dallas 7
StPaul SaltLake 6
StPaul Toronto 5
StPaul KansasCity 6
StPaul Birmingham 8
Seattle SaltLake 8
Seattle KansasCity 7
Seattle Fresno 7
Sacramento Dallas 7
Sacramento SaltLake 7
Sacramento KansasCity 7
Sacramento Fresno 6
Chattanooga Dallas 8
Chattanooga KansasCity 7
Chattanooga Birmingham 6
Chattanooga Philadelphia 7
Buffalo Toronto 7
Buffalo Birmingham 6
Buffalo Philadelphia 7

[generic, *, *]
StPaul Dallas 4
StPaul SaltLake 3
StPaul Toronto 3
StPaul KansasCity 3
StPaul Birmingham 5
Seattle SaltLake 4
Seattle KansasCity 4
Seattle Fresno 4
Sacramento Dallas 4
Sacramento SaltLake 4
Sacramento KansasCity 4
Sacramento Fresno 3
Chattanooga Dallas 4
Chattanooga KansasCity 4
Chattanooga Birmingham 3
Chattanooga Philadelphia 4
Buffalo Toronto 4
Buffalo Birmingham 3
Buffalo Philadelphia 4
;





John Mitchell
2008-09-30