FreePathVehicle

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(source)

A fleet vehicle that moves over a free path.

Everything a modeller uses -- assignments, batteries, failures, the manifest, every statistic -- is on FleetVehicle and is the same as it is for a vehicle on a guide path. What is here is the body and the three answers a substrate owes: how to move it while somebody pushes, and what to record about where it stopped.

Parameters

stepSize

how far apart the decision points of a journey are. It fixes how quickly a breakdown, a flat battery or a redirection is observed, and it is ignored where the spatial model cannot say what lies between two places -- there a journey is one step and the vehicle arrives before anything can stop it

Constructors

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

Properties

Link copied to clipboard
Link copied to clipboard

What actually moves. A MovableResource, so the passive verbs work on it unchanged.

Functions

Link copied to clipboard
protected open override fun failureInterruption(failureNumber: Int, repairTime: Double): Interruption.Failed

Nothing is held and nobody is obstructed. A vehicle stopped on a free path is in nobody's way, which is what a free path means; a policy asking isObstructingNow is told no, and a policy that tows only obstructing vehicles will correctly never tow on this substrate.

Link copied to clipboard
protected open override fun outOfChargeInterruption(): Interruption.OutOfCharge

Builds the interruption for a flat battery. See failureInterruption.

Link copied to clipboard
protected open override fun towJourney(location: String, waiter: ProcessModel.Entity): HoldQueue?

A tow along the free path: the same geometry an ordinary journey uses, at whatever speed somebody is pushing it. The speed is already set on the body by the time this is called.