Shipping costs for Multiagent Systems: Algorithmic, Game-Theoretic, and Logical Foundations