Let's look at what we need to know to calculate the tariff for transporting cargo by rail from station A to station B. This example also works well for taxi services, road freight and air transport.
So, the carrier company needs to transport cargo from station A to station B on the client's order. To do this, you first need to deliver an empty (empty) car to station A and pay for it, since the client only pays for the transportation of his cargo. After the cargo has been delivered to station B, the empty car again needs to be picked up and delivered to the next customer and again paid for. Moreover, we do not know in advance where this next client is, since at the time of concluding a transaction with the first client, we do not know who will be next after him. All these costs for empty mileage are part of the cost of transportation, and it must be included in the tariff.
Further, all the time that the car is occupied for a specific client, this car is not available to other clients, which is logical. There is a loss of profit that must be included in the tariff. Why do we call this lost profit, and not just marginality, since this transportation is actually our service? The fact is that during the time when the car is unavailable for other orders, not only transportation, but also loading/unloading and, mentioned above, empty mileage are included, only not in terms of kilometers, but in terms of days. Accordingly, it is necessary to estimate the time the car is fully occupied (called "turnover") and include it as a cost in the tariff.
So far, we have only considered cost factors for the service (without fixed costs, of course). How can we determine the rate? We can use the cost-plus method, when we take the cost and add a fixed marginality. However, is it wise to do this? There are several reasons why it is not wise. Here, at least, these. The carrier company may have advantages over its competitors that it would like to reflect in the price. For example, empty runs from different stations, that is, the cost of removing a car after delivery of cargo, may differ. Since the cost price is different, then different prices can be set. Further, at the moment in a given location there may be a shortage or surplus of cars (balance of supply and demand), I would also like to be able to take this into account. Finally, different customers may have different sensitivity to transportation costs (for example, if transportation is a large or small part of the customer's value chain). If the advantage in empty mileage can still be taken into account relatively easily, then to take into account the balance of supply and demand, elasticity curves need to be calculated, and to take into account the specifics of the client, segmentation needs to be done.
Solution
It is necessary to use algorithms and machine learning methods. For each shipment, they can calculate empty mileage to the level of origin and destination station, taking into account the advantages in empty mileage over competitors. The algorithms will also calculate the turnover of the car and the optimum points on the elasticity curves to balance supply and demand. Algorithms can segment customers based on dozens of different parameters.