0

I have to sort, for each lorry that starts from a point in GIS map, warehouses by distances from each lorry.Trucks have to go at nearest warehouse having stock grater than 0. So, for example, if the nearest warehouses has not stock unities, truck have to go at second nearest warehouse. So I need to select all warehouses which has availablity about stock unities and select the nearest one of these selected agent. I've uploaded some pics, one one of these with code that I realized at the moment. Thanks.

enter image description here enter image description here

Alfonso
  • 15
  • 5
  • Can you please provide some sample input and expected output in Java code? There are many ways to develop load systems. Your pictures don't realy help to understand the problem, they are not even in a language I can speak. – Japhei Jul 03 '22 at 20:41
  • Does this answer your question? [How to use Comparator in Java to sort](https://stackoverflow.com/questions/2839137/how-to-use-comparator-in-java-to-sort) – Kaan Jul 03 '22 at 22:43
  • @Kaan no, it isn’t. – Alfonso Jul 04 '22 at 03:57
  • There isn’t much detail to describe what you want to do, what you already did, what happened vs what you expected. From what you posted already, it seems: warehouses have location and some quantity of product, and you want to sort them based on a starting location. Sounds like a comparator. Also, screenshots of code are not good.. anyone who wants to try out your code (to help) must type it themselves. – Kaan Jul 04 '22 at 04:38

0 Answers0