There exist situations where the transportation cost is better estimated as a function of the number of vehicles required for transporting a load, rather than a linear function of the load. This provides a stepwise cost function, which defines the so-called Modular Hub Location Problem (MHLP, or HLP with modular capacities) that has received increasing attention in the last decade. In this paper, we consider formulations to be solved by exact methods. We show that by choosing a specific generalized linear cost function with slope and intercept depending on problem data, one minimizes the measurement deviation between the two cost functions and obtains solutions close to those found with the stepwise cost function, while avoiding the higher computational complexity of the latter. As a side contribution, we look at the savings induced by using direct shipments in a hub and spoke network, given the better ability of a stepwise cost function to incorporate direct transportation. Numerical experiments are conducted over benchmark HLP instances of the OR-library.