; Do not change filenames or add or remove FILEI/FILEO statements using an editor. Use Cube/Application Manager.
RUN PGM=MATRIX PRNFILE="{Scenario_Dir}\OUTPUT\TDMAT00B.PRN" MSG='Prepare Vehicle Trip Table for Preassignment'
FILEO MATO[1] = "{Scenario_Dir}\OUTPUT\VEHTRIPS_PREASSIGN.MAT",
MO=1,NAME=PRELOADVEH
FILEI MATI[2] = "{Scenario_Dir}\OUTPUT\EETRIPS_{ALT}{Year}.MAT"
FILEI MATI[1] = "{Scenario_Dir}\OUTPUT\PSNTRIPS_TEMP_{ALT}{YEAR}.MAT"
PAR ZONEMSG=100

;P1=HBW,P2=HBS,P3=HBSR,P4=HBO,P5=NHB,P6=TT,P7=IE,P8=EE
MW[1]=(MI.1.HBW+MI.1.HBW.T)*0.5*{AOFAC_HBW}+
      (MI.1.HBSH+MI.1.HBSH.T)*0.5*{AOFAC_HBSH}+
      (MI.1.HBSR+MI.1.HBSR.T)*0.5*{AOFAC_HBSR}+
      (MI.1.HBO+MI.1.HBO.T)*0.5*{AOFAC_HBO}+
      (MI.1.NHB+MI.1.NHB.T)*0.5*{AOFAC_NHB}+
      (MI.1.TRKTAXI+MI.1.TRKTAXI.T)*0.5+
      (MI.1.IE+MI.1.IE.T)*0.5+
       MI.2.M1
;[2]=MW[1]*0.5

; The MATRIX module does not have any explicit phases.  The module does run within an implied ILOOP
; where I is the origin zones.  All user statements in the module are processed once for each origin.
; Matrix computation (MW[#]=) are solved for all values of J for each I.  Thus for a given origin zone I
; the values for all destination zones J are automatically computed.  The user can control the computations
; at each J by using a JLOOP.

ENDRUN
