!Keyword: truck, routing, multiperiod planning;
! Full truckload routing problem
! Minimize trucks in use on Monday(and thus on Tues., etc.)
 MIN  TLL1 + TPL1 + TRL1 
    + TLP1 + TPP1 + TRP1
    + TLR1 + TPR1 + TRR1 
ST
!Period 1;
!Trucks into Los Angeles on Monday = trucks out on Tuesday
   2) TLL1 + TPL1 + TRL1 - TLL2 - TLP2 - TLR2 = 0
!Trucks into Phoenix on Monday = trucks out on Tuesday
   3) TLP1 + TPP1 + TRP1 - TPL2 - TPP2 - TPR2 = 0
!Trucks into Reno on Monday = trucks out on Tuesday
   4) TLR1 + TPR1 + TRR1 - TRL2 - TRP2 - TRR2 = 0
!Demand requirements for period 1
   5) TLR1 > 1
   6) TRL1 > 1
!Period 2, etc.;
   7) TLL2 + TPL2 + TRL2 - TLL3 - TLP3 - TLR3 = 0
   8) TLP2 + TPP2 + TRP2 - TPL3 - TPP3 - TPR3 = 0
   9) TLR2 + TPR2 + TRR2 - TRL3 - TRP3 - TRR3 = 0
  10) TLP2 > 2
  11) TRL2 > 1
!Period 3, etc.;
  12) TLL3 + TPL3 + TRL3 - TLL4 - TLP4 - TLR4 = 0
  13) TLP3 + TPP3 + TRP3 - TPL4 - TPP4 - TPR4 = 0
  14) TLR3 + TPR3 + TRR3 - TRL4 - TRP4 - TRR4 = 0
  15) TLP3 > 1
  16) TPL3 > 1
!Period 4, etc.;
  17) TLL4 + TPL4 + TRL4 - TLL5 - TLP5 - TLR5 = 0
  18) TLP4 + TPP4 + TRP4 - TPL5 - TPP5 - TPR5 = 0
  19) TLR4 + TPR4 + TRR4 - TRL5 - TRP5 - TRR5 = 0
  20) TLR4 > 1
  21) TPL4 > 1
!Period 5, etc.;
  22) TLL5 + TPL5 + TRL5 - TLL6 - TLP6 - TLR6 = 0
  23) TLP5 + TPP5 + TRP5 - TPL6 - TPP6 - TPR6 = 0
  24) TLR5 + TPR5 + TRR5 - TRL6 - TRP6 - TRR6 = 0
  25) TLR5 > 1
  26) TRP5 > 1
!Period 6, etc.;
  27) TLL6 + TPL6 + TRL6 - TLL7 - TLP7 - TLR7 = 0
  28) TLP6 + TPP6 + TRP6 - TPL7 - TPP7 - TPR7 = 0
  29) TLR6 + TPR6 + TRR6 - TRL7 - TRP7 - TRR7 = 0
  30) TPR6 > 1
  31) TRP6 > 1
!Period 7, etc.;
  32) TLL7 + TPL7 + TRL7 - TLL1 - TLP1 - TLR1 = 0
  33) TLP7 + TPP7 + TRP7 - TPL1 - TPP1 - TPR1 = 0
  34) TLR7 + TPR7 + TRR7 - TRL1 - TRP1 - TRR1 = 0
  35) TPR7 > 1
  36) TRL7 > 1
END

