DeadlockParticipant

data class DeadlockParticipant(val transporterName: String, val heldZoneNames: List<String>, val awaitedZoneName: String, val awaitedZoneReservedFor: String? = null)(source)

One transporter's part in a circular wait: what it holds, and what it is waiting for.

Participants are identified by name rather than by object reference so that a report can be logged, serialized, compared in a test, or held after the replication that produced it has ended, without keeping any simulation state alive.

Parameters

transporterName

the blocked transporter

heldZoneNames

the zones it occupies or has claimed, ordered rear to front

awaitedZoneName

the zone it cannot claim, which the next participant in the cycle holds

awaitedZoneReservedFor

the holder the awaited zone is reserved for, when it is free and what refuses it is a reservation rather than an occupant. Naming it is the difference between a usable report and a misleading one: without it a modeller reads two vehicles awaiting two zones, goes looking for a head-on vehicle conflict, and finds the zones empty.

Constructors

Link copied to clipboard
constructor(transporterName: String, heldZoneNames: List<String>, awaitedZoneName: String, awaitedZoneReservedFor: String? = null)

Properties

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

Functions

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