DistanceBasedAlgorithm
Magento\InventoryDistanceBasedSourceSelection\Model\Algorithms\DistanceBasedAlgorithm
What it does
This class implements a distance-based source selection algorithm for Magento's Multi-Source Inventory (MSI).
Developers use it when they need to determine which warehouse or inventory source should fulfill an order based on geographic proximity to the shipping destination.
It calculates distances from each enabled source to the delivery address and prioritizes sources closest to the customer.
Public Methods
- execute()