I am working on my Masters project and was hoping you can give me some ideas on how to approach programming the following problem in java:
A trader wants to buy a list of items. There are multiple sellers/markets where he can buy the items from. The markets have different distances to the buyer. The buyer has to figure out a way of buying the cheapest items at the shortest distance possible.
Essentially the buyer wants to minimise his travel cost at the same time as trying to find the cheapest items.
I hope the description makes sense and if I am not clear please let me know and I will try to explain it differently.
So far I have a Buyer class, Seller class, Item class and Main class. I plan to put the buyer's location and the seller's locations using Java Point type.
I was thinking of using something like Dijkstra's algorithm for shortest path but the issue is that the buyer might get an item for cheaper if he travels slightly further.
Thanks in advance for your help and time.