FreePathBody

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

The second binding of VehicleBodyIfc, and what it demonstrates is that the fleet layer really was substrate-independent rather than merely arranged to look it: this file is the whole of what a fleet needs to run on a free path, and nothing above it changed to accept it.

What a free path does not have, it reports as not having. There is no interference between vehicles, so fracTimeBlocked and numTimesBlocked are registered and stay at zero, and zonesEntered is zero. Those are not missing rows: a free-path model asserts that vehicles do not obstruct one another, and a zero is that assertion showing up in the output where a reader can see it and compare it with a guide path's.

The manifest is here rather than on MovableResource. A movable resource carries whoever seized it, which is the passive protocol's answer and is exactly one entity; carrying several is a fleet's idea, so the fleet's binding is where it belongs. The capacity statistics come with it, with the same names and the same meanings the guide path's have, so the two are comparable.

A ModelElement, and that is not decoration. A body holds state that must be forgotten between replications -- what is aboard it -- and a guide path's body gets that for free by being a model element already. A body written any other way does not, and a manifest that survives a replication starts the next one with a vehicle that has no room and no explanation. Found by the first study to run three replications with loads still aboard when the horizon fell.

Parameters

resource

what actually moves, and what a vehicle seizes to record its commitment

Properties

Link copied to clipboard

How much of the room was used, time-weighted, or null for a single-load vehicle.

Link copied to clipboard
open override val cumulativeBlockedTime: Double

How long in total it has been unable to proceed. Zero where nothing can block.

Link copied to clipboard
open override val currentVelocity: Double

How fast it is going now.

Link copied to clipboard

How much of the time it was full, or null for a single-load vehicle.

Link copied to clipboard
open override val fracTimeBlocked: TWResponseCIfc

The fraction of time it could not proceed because something was in the way.

Link copied to clipboard
open override val fracTimeMoving: TWResponseCIfc
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open override var homeBase: String?

Where it waits when it has nothing to do, or null to wait where it stops.

Link copied to clipboard
open override val isAtCapacity: Boolean
Link copied to clipboard
open override val isCarryingLoad: Boolean
Link copied to clipboard
open override val isUnderTow: Boolean

True while somebody is moving it rather than it moving itself.

Link copied to clipboard
open override val loadCapacity: Int

How many loads it can carry at once.

Link copied to clipboard
open override val loadsPerLoadedMove: ResponseCIfc?

How many loads a loaded move carried, or null for a single-load vehicle.

Link copied to clipboard
open override val manifest: List<ProcessModel.Entity>

What is aboard, in the order it came aboard.

Link copied to clipboard
open override val movementQueue: HoldQueue

Where a waiter suspends while this body is under way.

Link copied to clipboard
open override val numLoadsAboard: Int
Link copied to clipboard

The mean number aboard, or null for a single-load vehicle.

Link copied to clipboard
open override val numTimesBlocked: CounterCIfc
Link copied to clipboard
Link copied to clipboard
open override val seizable: Resource

What a vehicle seizes to record that it is committed.

Link copied to clipboard
open override val spareCapacity: Int
Link copied to clipboard
open override var towVelocity: Double?

How fast it is being towed, or null when it is not.

Functions

Link copied to clipboard
open override fun alight(load: ProcessModel.Entity)
Link copied to clipboard
open override fun attachContinuationGate(gate: () -> Boolean?)

Installs a veto asked at every decision point of a journey: may it go on past this one?

Link copied to clipboard
open override fun beginTravelTo(destination: LocationIfc, purpose: MovePurpose, waiter: ProcessModel.Entity): HoldQueue?

Sends the vehicle to destination and reports where to wait for it.

Link copied to clipboard
open override fun board(load: ProcessModel.Entity)
Link copied to clipboard
open override fun endTow()

Puts it back to standing still after a tow, whether or not it went anywhere.

Link copied to clipboard
protected open override fun initialize()

This method should be overridden by subclasses that need actions performed to initialize prior to a replication. It is called once before each replication occurs if the model element wants initialization. It is called after beforeReplication() is called

Link copied to clipboard
open override fun toString(): String

Includes the model name, the id, the model element name, the parent name, and parent id