Mike:
The choice of transportation mode would normally be left to the customer or receiver of the shipment. If the receiver wishes to have less of his cash tied up in inventory, he may opt for truck deliveries. If his business is a high volume one that can easily burn through a carload in fairly short order, he may opt for taking his material by rail. You used the example of a lumber yard but, let's say the receiver is a small chemical distributor. His on site tank capacity could determine the mode of delivery, with smaller tanks requiring frequent truck deliveries and larger tanks allowing for rail delivery.
Who pays the railroad is dependent on the commercial terms of the sale. If the customer is purchasing on a delivered basis, the shipper will pay the railroad or trucking company and include the freight in their delivered pricing. If the commercial terms are prepaid and add, the shipper will still pay the freight but, will show it as a separate line item on the invoice to the customer. And, if the shipment is made collect, the receiver of the goods will pay the trucking company or railroad. Normally for this to happen, the receiver must have established credit with the carrier making the delivery.
If a short line is involved, whether they collect the money or the Class 1 they connect with is usually determined by the Class 1. Some short lines are what is known as settlement carriers meaning they can collect the freight for the entire movement and then settle up with each of the Class 1's involved in the movement. Whether the origin or destination carrier invoice the freight is determined by the shipping terms. In my experience however, it is far more common for the origin railroad to invoice either the shipper or receiver for the freight and then settle up with the other carriers in the route.
How much each railroad is paid is determined at the point the rate is first quoted. For example, let's say I am served by CN and you, my customer, are served by CSX. You want me to handle all of the freight so, I go to my CN account rep and provide him with the origin and destination, customer name at destination, the carrier that physically serves your location, the commodity to be shipped and it's STCC number and the approximate annual volume. The CN will then contact CSX to determine what their revenue requirement for this move would be. Once CN has that number in hand, they add their own revenue requirement and then provide me with a rate quote. I include that quote in my delivered pricing to you and, if you like my delivered price, a deal is done.
Curt