Redistributing parts includes defining locations. An actual inventory of parts is established among the locations, and a desired allocation of the parts is established among the locations. A demand for the parts at each location is determined using the actual inventory and the desired allocation. Paths are determined, where a path transfers an excess part from one location to another location. A transfer function describing a cost of transferring the excess part along the paths is generated. The transfer function is optimized to achieve the desired allocation of the excess parts at a minimum cost.