```MODEL: ! TELEHUB3; ! Find number of direct T1 and T3 lines between each node pair, and number of lines via the single hub(node 1). A path via hub can have a mix of T1 and T3 lines; ! Keywords: telecommunications, network design, routing, hub network; SETS: ! We assume node 1 is the hub; NODE/ HUB E1 E2 E3 E4 E5 /:; LINK( NODE, NODE) | &2 #GT# &1 : DEMAND, VC1, FC1, VC3, FC3, T1, T3, USET1D, USET3D, USEH; ENDSETS DATA: ! Capacity of T1 and T3 lines; CAP1 = 10; CAP3 = 100; ! Call volume by node pair; ! E1 E2 E3 E4 E5; DEMAND = 0 1 0 3 0 !HUB; 5 4 1 215 !E1; 4 6 125 !E2; 558 171 !E3; 895;!E4; ! Fixed cost of a T1 line; FC1 = 18 19 18 15 19 32 32 22 17 34 28 18 31 17 18; ! Variable cost of a T1 line; VC1 = 2.55 2.25 2.45 2.05 4.50 3.00 2.85 3.45 2.65 3.00 2.50 1.75 2.40 1.60 1.90; FC3 = 55 55 55 55 120 70 70 70 85 70 70 85 70 85 85; VC3 = 2.20 1.80 2.20 1.40 3.50 2.10 1.40 2.45 2.05 2.80 1.75 1.70 1.75 0.90 1.80; ENDDATA ! Min sum of fixed + variable costs; MIN = @SUM( LINK(I,J): T1(I,J) * FC1(I,J) + USET1D(I,J) * VC1(I,J) + T3(I,J) * FC3(I,J) + USET3D(I,J) * VC3(I,J) ); @FOR(LINK(I,J): ! Capacity on a link >= amount used on link; T1(I,J) * CAP1 >= USET1D(I,J); T3(I,J) * CAP3 >= USET3D(I,J); ! We must carry the demand either direct or via the hub; DEMAND( I, J) <= USET1D( I, J) + USET3D( I, J) + USEH( I, J); ! Number of lines must be general integers; @GIN( T1(I,J) ); @GIN( T3(I,J) ); ); ! Anything not carried direct, must go via the hub; @FOR( NODE( I)| I #GT# 1: USET1D(1,I) + USET3D( 1, I) = DEMAND(1,I) + @SUM( LINK( S, T) | S #EQ# I #OR# T #EQ# I: USEH( S, T)); ); END ```