; 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\MCMAT00H.PRN" MSG='Combine trip tables for assignment'
FILEO MATO[2] = "{SCENARIO_DIR}\output\TRANSITTAB_{alt}{year}.MAT",
 MO=131-133,141-143, DEC=18*s,
 NAME=PKWlkBus,PKWlkPrj,PKPNRBus,PKPNRPrj,PKKNRBus,PKKNRPrj,
      OPWlkBus,OPWlkPrj,OPPNRBus,OPPNRPrj,OPKNRBus,OPKNRPrj
FILEO MATO[1] = "X:\Projects\CRTPA\Model\C\BASE\OUTPUT\HWYTTAB_TEMP_{ALT}{YEAR}.MAT",
MO=121-124,NAME=HBW,HBO,NHB,TOTAL,DEC=6*S 
;MO=121-126, NAME=TRKIEII,SOVIEII,HOVIEII,TRKEE,SOVEE,HOVEE, DEC=6*s

FILEI MATI[3] = "{SCENARIO_DIR}\output\NHB_{alt}{year}.MAT"
FILEI MATI[2] = "{SCENARIO_DIR}\output\HBO_{alt}{year}.MAT"
FILEI MATI[1] = "{SCENARIO_DIR}\output\HBW_{alt}{year}.MAT"

PAR ZONEMSG=100
DistributeINTRASTEP ProcessID="FSUTMSDist", ProcessList=1-3

;DA
MW[50]=MI.1.1+MI.2.1+MI.3.1

;CARPOOL
MW[60]=(MI.1.2+MI.2.2+MI.3.2)*0.5+
        MI.1.3/{oc3vhbw}+
        MI.2.3/{oc3vhbnw}+
        MI.3.3/{oc3vnhb}

MW[124]=MW[50]+MW[60]
MW[121]=MI.1.1+MI.1.2*0.5+MI.1.3/{oc3vhbw}
MW[122]=MI.2.1+MI.2.2*0.5+MI.2.3/{oc3vhbnw}
MW[123]=MI.3.1+MI.3.2*0.5+MI.3.3/{oc3vnhb}


;FILLMW MW[1]  = MI.1.1,2,3,4,5,6   ; - HBW trips
;FILLMW MW[21] = MI.2.1,2,3,4,5,6  ; - HBNW trips
;FILLMW MW[41] = MI.3.1,2,3,4,5,6   ; - NHB trips

; PEAK TRANSIT
MW[131]=MI.1.4
MW[132]=MI.1.6
MW[133]=MI.1.8

; OFF-PEAK TRANSIT
MW[141]=MI.2.4 + MI.3.4
MW[142]=MI.2.6 + MI.3.6
MW[143]=MI.2.8 + MI.3.8

;MW[121]=MW[1]+MW[2]+MW[3]
;MW[122]=MW[21]+MW[22]+MW[23]
;MW[123]=MW[41]+MW[42]+MW[43]
;MW[124]=MW[121]+MW[122]+MW[123]


ENDRUN
