In my experience, there are two types of logistics modeling questions that require truck transportation costs.
In the first, a shipper will operate a fleet of its own vehicles and would like to estimate costs. In such cases, it is usually important to model both fixed costs of using additional vehicles and the variable costs of operating vehicles (which vary with distance travelled and/or time operated). Any cost approximation should be careful to appropriately model these fixed costs.
In the second type of problem, a shipper will outsource truck transportation to meet its shipping needs. Here is a bit more detail about that scenario:
Purchased truck transportation:
In this case, a shipper needs to purchase freight transportation from third parties (like trucking companies (carriers) or from third-party logistics (3PL) firms). Different types of truck service are available for purchase, most notably truckload, less-than-truckload, or small package services. Each type of service is priced somewhat differently. It is quite common that truckload services on a lane $(i,j)$ are priced per trailerload, and thus a step function for cost is often needed. LTL and package services on a lane are typically priced per weight (or per some weight-and-cubic-volume measure like dimensional weight), and there are often rate breaks where the price per weight decreases at larger weights making piecewise-linear cost functions necessary. Often these functions do not have strictly-decreasing slopes since they may include shoulders where cost is fixed for a certain weight range.
c(x)
function (because this is just a replacement of a simple function with a more complicated one in your code) and rather, what are some examples of more realistic cost functions, correct? $\endgroup$