Draft: service_factor (job performance rate) #1216
Draft
+91
−44
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue
Addresses #336 (job performance rate).
This PR allows setting per-vehicle service_factor by which job service times are scaled. The repo in its current state produces valid solutions, however, as is mentioned by @jcoupey on the original issue, it currently doesn't have any smarts to prefer vehicles that have a more favourable service_factor. I'm looking to brainstorm ideas here to flesh this out a little more.
I figure this would require expanding the CostWrapper/Eval constructs with service_factor. I wonder if simply dividing the final cost by service_factor could be a solution as this would nudge all heuristics towards vehicles with more favourable service_factors but I fear this would too coarse of a way to do it, and it doesn't account for the differing service times it'd yield.
Expanding the whole Eval/CostWrapper setup with service_factor and requiring eval'ing those against a job index as well sounds like it'd be the way to go here. I'm looking for ways of getting this done without impacting performance. I figure this can be done similar to this PR's setup with vehicle_service, so some sort of matrix/array we'd be able to index into based on vehicle/job and pre-calculating all that before the solve starts, so there'd be no unneeded math and we can stick to integer arithmetic.
I'd love any feedback anyone's able to give me on this and work this out further, so please let me know!
Tasks
docs/API.md
(remove if irrelevant)CHANGELOG.md
(remove if irrelevant)