ScoringAssignmentPolicy

Scores every feasible pairing and takes the best.

Here to show that the feasible set is usable rather than merely present. It is also the shape a cost-function or value-function policy has: enumerate the available actions, score each, choose one. A rule like nearest-vehicle is a special case of it -- score by distance to the pickup and the two agree exactly, which ScoringPolicyTest asserts, because two shapes that are supposed to be interchangeable should be shown to be so rather than asserted to be.

Greedy across tasks: the best pairing is taken, both parties removed, and the next best chosen from what remains. That can be beaten on a set of tasks better matched jointly; a policy wanting that has the same enumerable set to solve over and should do so rather than reaching for this.

Parameters

score

lower is better. Given the candidate and the whole feasible set, so a score may be relative -- "how much worse than the best alternative for this task" is a legitimate thing to want, and it needs the set.

Constructors

Link copied to clipboard

Properties

Link copied to clipboard

Functions

Link copied to clipboard
open suspend override fun KSLProcessBuilder.assign(context: DispatchContext): List<AssignmentProposal>
Link copied to clipboard
open override fun toString(): String