Package-level declarations

Types

Link copied to clipboard
data class AlightHere(val stop: Stop) : TourStopActionIfc

Put down everyone aboard who is bound for here.

Link copied to clipboard

A vehicle's commitment to a task.

Link copied to clipboard
data class AssignmentProposal(val vehicle: FleetVehicle, val task: Dispatcher.Task, val terms: Double? = null)

What an assignment policy returns.

Link copied to clipboard

Where a commitment has got to.

Link copied to clipboard
class Battery @JvmOverloads constructor(val capacity: Double, val chargePerDistance: Double, val chargePerTime: Double = 0.0, val chargingRate: Double = capacity, val initialCharge: Double = capacity)

A vehicle's energy store: how much it holds, how fast it empties, and how fast it fills.

Link copied to clipboard
data class BoardWaiting @JvmOverloads constructor(val stop: Stop, val limit: Int = Int.MAX_VALUE) : TourStopActionIfc

Take whoever is waiting here for somewhere further along, in the order they arrived, until the vehicle is full or limit have boarded.

Link copied to clipboard
open class Dispatcher @JvmOverloads constructor(val system: FleetSystem, assignmentPolicy: AssignmentPolicyIfc = NearestVehiclePolicy(), tourPolicy: TourPolicyIfc = CheapestInsertionTourPolicy(), discipline: Queue.Discipline = Queue.Discipline.FIFO, name: String? = null) : ModelElement

Decides which vehicle goes where, and owns the line of work waiting to be done.

Link copied to clipboard

Several actions, in order, at one stop.

Link copied to clipboard
data class Dwell(val duration: GetValueIfc) : TourStopActionIfc

Stand here for a while. The simplest thing only a seam that suspends could have expressed.

Link copied to clipboard

What a vehicle's failures are measured against.

Link copied to clipboard
class FailureModel(val basis: FailureBasis, val betweenFailures: RVariableIfc, val repairTime: RVariableIfc)

When a vehicle fails, and how long it takes to put right.

Link copied to clipboard
abstract class FleetSystem @JvmOverloads constructor(parent: ModelElement, assignmentPolicy: AssignmentPolicyIfc = NearestVehiclePolicy(), name: String? = null) : AgentModel

A fleet of self-directing vehicles, and the dispatcher that tasks them.

Link copied to clipboard
data class FleetTransportResult(val totalTime: Double, val waitForAssignment: Double, val waitForArrival: Double, val timeAboard: Double, val blockedTime: Double, val failedTime: Double, val routeLength: Double, val vehicleName: String, val numReassignments: Int)

What one transport cost the load that asked for it.

Link copied to clipboard
abstract class FleetVehicle @JvmOverloads constructor(val system: FleetSystem, name: String? = null, val loadCapacity: Int = 1, val battery: Battery? = null, val failureModel: FailureModel? = null) : ModelElement, FleetVehicleCIfc

A vehicle: the permanent identity a modeller declares, names, and reads statistics from.

Link copied to clipboard

Controlled access to a vehicle a dispatcher commits to tasks: the four policies it carries, what it is doing, and how its time was spent.

Link copied to clipboard

A free-path vehicle's body: a MovableResource that also carries a manifest.

Link copied to clipboard
open class FreePathFleet @JvmOverloads constructor(parent: ModelElement, spatialModel: SpatialModel, places: List<LocationIfc> = spatialModel.namedLocations, assignmentPolicy: AssignmentPolicyIfc = NearestVehiclePolicy(), name: String? = null) : FleetSystem

A fleet of self-directing vehicles on a free path, and the dispatcher that tasks them.

Link copied to clipboard
open class FreePathVehicle @JvmOverloads constructor(val fleet: FreePathFleet, initialLocation: String, velocity: RVariableIfc, name: String? = null, loadCapacity: Int = 1, stepSize: Double = 1.0, battery: Battery? = null, failureModel: FailureModel? = null) : FleetVehicle

A fleet vehicle that moves over a free path.

Link copied to clipboard
data class HoldUntilFull @JvmOverloads constructor(val stop: Stop, val maximumWait: GetValueIfc, val limit: Int = Int.MAX_VALUE) : TourStopActionIfc

Do not leave until the vehicle is full, or until the wait has run out.

Link copied to clipboard
sealed class Interruption(val vehicle: FleetVehicle, val at: Double, val location: String, val heldZones: List<Zone>, val wasDoing: TransporterState, val task: Dispatcher.Task?, val loadIsAboard: Boolean)

A vehicle has stopped and cannot carry on by itself.

Link copied to clipboard
fun interface InterruptionPolicyIfc

What happens when a vehicle stops and cannot carry on by itself.

Link copied to clipboard
class Line @JvmOverloads constructor(val name: String, val stops: List<LineStop>, val cyclic: Boolean = true)

A fixed sequence of stops a service runs, cycle after cycle.

Link copied to clipboard
class LineStop @JvmOverloads constructor(val stop: Stop, val action: TourStopActionIfc = DoInOrder(AlightHere(stop), BoardWaiting(stop)))

One stop of a line: where to call, and what to do on arriving.

Link copied to clipboard

Take possession of a load.

Link copied to clipboard

Repairs a broken vehicle where it stands, and leaves a flat one flat.

Link copied to clipboard

Be somewhere, and nothing more.

Link copied to clipboard
sealed class ServiceKind

What a vehicle is doing for itself when it is not carrying anything.

Link copied to clipboard

Put a load down, which is what discharges the commitment to carry it.

Link copied to clipboard
class Stop @JvmOverloads constructor(val system: FleetSystem, val location: String, name: String? = null) : ModelElement

A permanent place where loads wait to board whatever comes by.

Link copied to clipboard
interface StopContextIfc

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

Link copied to clipboard
interface StopControlIfc

Decides, stop by stop, whether a vehicle serves the next place in its tour.

Link copied to clipboard
sealed class StopInstruction

What a controller tells a vehicle to do about the next stop in its tour.

Link copied to clipboard
class TaskBoard

The read model an assignment policy is handed.

Link copied to clipboard
class TaskQ @JvmOverloads constructor(parent: ModelElement, name: String? = null, discipline: Queue.Discipline = Discipline.FIFO) : Queue<Dispatcher.Task>

The waiting line: the one queue this subsystem reports.

Link copied to clipboard

Where a task has got to. Transitions are checked; an illegal one raises (A1).

Link copied to clipboard
class Tour

Where a vehicle is going and what it does when it gets there.

Link copied to clipboard
class TourStop(val location: String, val action: TourStopActionIfc)

One leg of a tour: somewhere to be, and something to do there.

Link copied to clipboard

What a vehicle does when it gets there.

Link copied to clipboard
data class TransitResult(val totalTime: Double, val waitForVehicle: Double, val timeAboard: Double, val origin: String, val destination: String, val vehicleName: String, val numVehiclesPassed: Int)

What one ride cost the load that took it.

Link copied to clipboard

Told when a vehicle stops and when it comes back.