Closed mospy26 closed 4 years ago
f1d0b024aae4e178034bc9c03e660b9b6a6504c4
Warehouse and stock correctly modelled - 12d118cc99dff8d4d775211495ba2d4a303d6361
Things needed to be fixed:
@mospy26 plz check the logic see if it's all good or if I missed anything
652f80fec707d1aa9d6da60cb5ded4c031938940
IDEA: 1) Sort the warehouses by total stock. 2) For each warehouse (most stock -> least), check if it can satisfy the order. 3) Get the first warehouse that satisfies the order. 4) If you cant satisfy the whole order, loop again until satisfied (use a boolean to check if order is impossible to be satisfied).
Algorithm still remaining to be done
Warehouse stuff finished but uses GREEDY SOLUTION (not optimal)...
Note: For these purposes, all warehouses that can fulfill the order are equally good – that is, we don’t have to find the ‘best’ warehouse for an order.