vroom icon indicating copy to clipboard operation
vroom copied to clipboard

how a job can avoid being last in a route (feature request)

Open answerquest opened this issue 1 month ago • 1 comments

Scenario:

  • In a company cab fleet, the jobs are employee home-drop locations
  • There is a company safety policy to never allow last drop to be of a female employee. There needs to be at least one male employee being dropped after them
  • We can express male/female as skill number 1 and 2 respectively in the job's json
  • So, we have to optimize such that across all routes, no job with skills containing 2 comes in the last step under its route.

Thoughts on how to make this happen?

Does assigning a high priority value to a job also bias it to come sooner rather than later in the output steps?

answerquest avatar Dec 01 '25 11:12 answerquest

Does assigning a high priority value to a job also bias it to come sooner

No, priority score is about choosing which jobs end up assigned or unassigned in a context where not all can be done. Doing some jobs earlier than others is more related to time window (TW) constraints.

I don't see a way to ensure this currently, but since this is a temporal thing you may be able to achieve what you want when playing around with TW. Having a smaller TW deadline for employees you don't want to be traveling alone would probably limit the occurrences in the solution, thought not providing a guarantee it won't happen. You could also have an iterative process where you solve, then check for unwanted situations, and if necessary reduce the relevant TW to make the "wrong" solution invalid in a next solving run, etc.

Depending on your use-case and problem layout, maybe you could also do some ad-hoc pre-processing, but I don't know the use-case enough to tell here.

jcoupey avatar Dec 02 '25 08:12 jcoupey