Zend certified PHP/Magento developer

Magento2 Source selection based on Sellable Quantity

I’m trying to modify the Source Selection algorithm based on the following condition:

Sort by Sellable(available) Quantity (Descending) and then location sort priority

I have tried many tutorials but it’s not working, I tried to override the following model MagentoInventorySourceSelectionModelAlgorithmsPriorityBasedAlgorithm but not work.
Is there any way to override distance-based and Priority Based Algorithms to my own algorithms?