StopContextIfc

What a vehicle knows, and what it can do, at the stop it has just reached.

Handed to TourStopActionIfc.perform so that an action written outside this library can do the two things that must be done in one particular way -- take a load aboard and put one down -- without being given the subsystem's internals to do it with.

Properties

Link copied to clipboard
abstract val onwardLocations: Set<String>

Everywhere the vehicle is still going after this stop.

Link copied to clipboard
abstract val stop: TourStop

The stop it arrived at.

Link copied to clipboard
abstract val tour: Tour

The round this stop belongs to, and how far through it the vehicle is.

Link copied to clipboard
abstract val vehicle: FleetVehicle

The vehicle that arrived.

Functions

Link copied to clipboard
abstract suspend fun KSLProcessBuilder.holdAt(stop: Stop, until: Double)

Holds the vehicle at stop until somebody joins the line there or until arrives.

Link copied to clipboard

Puts task's load down: measures the ride, waits out the unloading delay, takes it off the manifest, completes the task and the commitment behind it, and returns the load to its own process.

abstract suspend fun KSLProcessBuilder.setDown(ride: Stop.Ride)

Puts a rider down here and returns it to its own process.

Link copied to clipboard

Takes task's load aboard: waits out the loading delay, puts it on the manifest, marks the instant its ride begins, tells the dispatcher the vehicle has possession, and releases the load from its wait.

abstract suspend fun KSLProcessBuilder.takeAboard(ride: Stop.Ride)

Takes a waiting rider aboard: out of the stop's line, onto the manifest, and released from its wait.