-
Notifications
You must be signed in to change notification settings - Fork 340
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Favorize some vehicles over others for some jobs #393
Comments
Adding this kind of soft constraint/penalization is something that usually is in conflict with the current solving approach and the way we set the optimization objective(s). See #263 for some background and discussions. In this specific case, the whole notion of priority is currently handled as a "forefront" optimization objective, overall travel time being a secondary objective. In this prospect, I think the approach you describe would work for your special use-case. On the other hand, I'm a bit circumspect at first on setting vehicle-dependant job priorities. First it would require to input much more data with a probably less intuitive API, then I'm not sure how we'd mix this with other ideas such as #359. @romainrey if you want to go ahead and experiment with this idea, getting a minimal implementation to work would be quite straightforward because there are not that many places in the codebase where we deal with priorities. I can provide pointers if needed. |
Hi Julien, Thanks for your quick answer, as usual! Also another use case in addition to the one I was describing is if you are planning a full week at the same time and the urgency of some job is different if they are done the Monday or the Friday. You could represent day and vehicle as a couple vehicle-day and then the priority would be specific for this pair, which would help solve the problem of the urgency of a job that changes. On the input data, yes but you could say that now for a job priority has to be a dict (vehicle1:priority1, ...) or an array if you assume knowing the order of the vehicles. But you could still let the possibility to only put an integer, and inside the function if it is only an integer then you just create the array yourself by replicating the integer. So that would not complexify the usage for those who don't want to use that option. For the others, I think that it is a very small cost for them for something that solve their problem. Also I could see 359 and this one merged as the priority of a vehicle could be handle by changing his priorities in all job. Anyways I also understand that as you mentioned in 263, there is tons of possible ways you could go for the development, and you have to pick the ideas that are coherent with the direction your are going to and which are popular, and that's perfectly fine especially given that you are maintaining that alone which is already very impressive. |
Running The outline of a POC work would be:
Happy to have any feedback if you give it a go. |
Hey I have been working on the feature this week, it looks to work for me, probably still needs some validation from you to see if the modifications made make sense! |
Closing, see #396 (comment). |
Hi,
I am running into a case where some vehicles have some relations with some of the jobs.
Let's say that I have commercial sellers that are used to work with the clients of their zone.
I want to put an incentive for the commercial of the zone to go to his clients instead of the clients of the other commercial.
Skills does not work because it would be forcing him to go to his, while the idea here is more a penalization than a hard constrain. Indeed some time a commercial can go see the client of his colleague if his colleague has much more work than him.
What could work would be to allow priorities of jobs to be dependent of the vehicles. So for each job instead of having a unique priority it would have n priorities with n being the number of vehicles.
What do you think, is there any other workaround?
Ps:
I am already using priorities to incentive on urgency of the job. So my idea was to do priority -> priority + 2 if it is the commercial that knows the client.
Thanks!
The text was updated successfully, but these errors were encountered: