Maybe I’m misunderstanding but if you just want to divide the jobs you could have a counter for the current driver and after assigning a job you increase the counter and wrap it when you exceed the number of drivers.
If you’re looking for a more fancy job division algorithm you should take a look at the classical traveling salesman problem but with multiple drivers. And even with one driver this is a tricky solution. If you are building an app that really needs a good solution for the vehicle routing problem you can maybe wrap the optaplanner Java library. (optaplanner.org) Good luck! Håkan On 17 Apr 2020, 04:42 +0200, Skip Kimpel via use-livecode <use-livecode@lists.runrev.com>, wrote: > I have working on creating a loop that would divide the number of jobs by > the number of users and then checking to see to see if it is evenly > divisible but that is kind of where I am stuck. Everything I have tried > thus far has proven to be unsuccessful. > > SKIP > > On Thu, Apr 16, 2020 at 10:36 PM Skip Kimpel <skiplon...@gmail.com> wrote: > > > Dev, I have already sorted the jobs out by proximity so I don't need to > > worry about that. Just need the distribution piece down. I agree, you > > have a good point an might prove valuable in the future. > > > > SKIP > > > > On Thu, Apr 16, 2020 at 10:33 PM Skip Kimpel <skiplon...@gmail.com> wrote: > > > > > Haha... Let me specify, I am looking to do this programmatically :) > > > > > > SKIP > > > > > > On Thu, Apr 16, 2020 at 10:31 PM Dev via use-livecode < > > > use-livecode@lists.runrev.com> wrote: > > > > > > > Since you would probably have long trips and short trips, I would try > > > > and allocate on an estimated time to complete basis so that all were > > > > busy > > > > for about the same time. > > > > > > > > > On 16-Apr-2020, at 8:23 PM, Skip Kimpel via use-livecode < > > > > use-livecode@lists.runrev.com> wrote: > > > > > > > > > > I have 15 "jobs" that need to be assigned to 7 "drivers". How would > > > > > you > > > > > evenly distribute the jobs to the drivers? In this case one of the > > > > drivers > > > > > would have 3 jobs while the others have two. > > > > > > > > > > Obviously, the number of drivers and number of jobs would fluctuate. > > > > > > > > > > This has been my mind twister for the night thus far :) > > > > > > > > > > SKIP > > > > > _______________________________________________ > > > > > use-livecode mailing list > > > > > use-livecode@lists.runrev.com > > > > > Please visit this url to subscribe, unsubscribe and manage your > > > > subscription preferences: > > > > > http://lists.runrev.com/mailman/listinfo/use-livecode > > > > > > > > > > > > > > > > > _______________________________________________ > > > > use-livecode mailing list > > > > use-livecode@lists.runrev.com > > > > Please visit this url to subscribe, unsubscribe and manage your > > > > subscription preferences: > > > > http://lists.runrev.com/mailman/listinfo/use-livecode > > > > > > > > _______________________________________________ > use-livecode mailing list > use-livecode@lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription > preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode _______________________________________________ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode