DispatchContext

What a policy is given, and the only things it may do.

Grows in later phases -- an auction in the negotiated phase, a feasible-action set in the re-tasking phase -- but AssignmentPolicyIfc.assign's signature never changes, so a policy written today keeps compiling.

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

The vehicle-to-task pairings available at this instant, as an object to enumerate and search.

Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
suspend fun KSLProcessBuilder.auction(cfp: CallForProposals, deadline: Double, selectBest: (List<Bid>) -> Bid? = ::lowestBidByName): Bid?

Runs a Contract-Net negotiation over the available vehicles and returns the winning bid.

Link copied to clipboard
fun distanceTo(vehicle: FleetVehicle, location: String): Double

Distance from where a vehicle is now to a location, along the guide path.

Link copied to clipboard

True when vehicle has room for what task brings aboard. A line cycle brings nobody of its own, so a vehicle full of riders may run the next one; every other task needs a free place.

Link copied to clipboard
fun zonesToEnter(vehicle: FleetVehicle, location: String): Int?

How many zones a vehicle still has to enter to reach a location. Of two vehicles at the same distance, the one with fewer is in front: it can move first.