TITLE
FAM;
INDEX
i := 1..4; !4 flight legs
k := 1..2; !2 fleet types
N := 1..8; !8 nodes
a := 1..9; !9 arcs/edges
grA[a] := (2,4,5,8,9); !ground Arcs for A's network
grB[a] := grA;
flA[a] := (1,3,6,7); ! flight Arcs for A's(and B's) network
flB[a] := flA;
N1[N] := N; ! All the nodes in A's network
N2[N] := N;
CL := (0); !CL and CG as defined on Pg 190 last paragraph
CL1 := CL;
CL2 := CL;
CG[a] := (8,9);
CG1 := CG;
CG2 := CG;
DATA
nPlus[N] := (0,2,4,5,0,0,9,8);
nMinus[N] := (8,9,2,0,5,4,0,0);
M[k] := (2,2); !total # of aircrafts of each type in inventory
O[k,N] := (1,0,2,0,4,3,0,0,
1,0,2,0,4,3,0,0);
I[k,N] := (0,1,0,2,0,0,4,3,
0,1,0,2,0,0,4,3);
c[i,k] := (200,400, 400,200, 200,400, 400,200);
BINARY VARIABLES
f[i,k]; ! 1 if fight leg i is serviced by fleet type k
VARIABLES
y[a,k]; ! # of aircraft of type k on ground arc a
MODEL
Min Z = SUM(i,k:c*f);
SUBJECT TO
cover[i]: SUM(k:f) = 1;
bal[N,k]: y[a:=nPlus[N],k] - y[a:=nMinus[N],k] + SUM(i=O:f) - SUM(i=I:f) = 0;
cp[k,CG,CL]: SUM(a=CG:y) + SUM(i=CL:f) <=M;
END