Actually the unscheduled freight trains are the variables, the regular, scheduled passenger trains are the fixed portion.
Well, most railroads that I read of and road way up here in the northeast had operating rules that governed the types of trains that could hold the high iron, namely passenger trains, and most frieght worked around the passneger train schedules because of the timeleness of the service required. And since freight didn't need to be at an office by 9:00AM in the big city- the freight often travelled at night.
Just remember that a trains run day and night, so that train that is at one city at night was in another city during the day. Only in the major cities do they have "commuter curfews" where freight trains do not operate. Other than those few locations, the vast majority of places the freight trains vastly outnumber passenger trains so the freight trains run any time of day or night and they have to avoid the passenger trains. Actually a lot of freight does have to be someplace at a specific time (intermodal traffic, interchange traffic, auto parts, etc).
Dave H.