GuidedPathSpace

open class GuidedPathSpace @JvmOverloads constructor(parent: ModelElement, val network: GuidedPathNetwork, zoneContentionRule: ZoneContentionRuleIfc = FIFOZoneContentionRule(), collectLinkStatistics: Boolean = false, collectZoneStatistics: Boolean = false, name: String? = null) : ModelElement(source)

The runtime half of a guide path: it owns everything about the network that changes during a run.

The network describes the guide path and never changes. This owns which transporter holds which zone, resets all of it at the start of every replication, hosts the transporters, and reports how congested the path is. Splitting the two is not tidiness. A spatial model and a model element are both abstract classes, so one object cannot be both, and the split falls naturally along the line between what is fixed and what is not: nothing about the guide path itself can differ between replications, because the network has nothing to differ.

A network belongs to one running system. A second system attaching to the same network would share its zones and quietly corrupt both, so the attempt is refused rather than left to produce an inexplicable run.

Why this is its own class

Everything here is about space: who holds which zone, who is blocked behind whom, how far and how long anyone travelled. None of it is about how a modeller asks for a vehicle, and that is the one thing the two subsystems built on it disagree about. The passive GuidedPathTransportSystem has the entity hold a transporter and steer it; the active AgvSystem has the entity state a need and a dispatcher decide. Both move vehicles over zones in exactly the same way, and this is that way, named.

Neither subsystem owns the other. Each composes this layer, so the physics has one home and a per-carry statistic registered here is fed by whichever protocol delivered the load. A third consumer -- a rail network, a stacker crane, an AS/RS aisle -- needs this and none of the passive protocol, and can say so in its type.

Parameters

parent

the containing model element

network

the guide path to operate, already built

name

a name for the system

Inheritors

Constructors

Link copied to clipboard
constructor(parent: ModelElement, network: GuidedPathNetwork, zoneContentionRule: ZoneContentionRuleIfc = FIFOZoneContentionRule(), collectLinkStatistics: Boolean = false, collectZoneStatistics: Boolean = false, name: String? = null)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

Per delivered load: from the transporter being committed to it until the load is aboard, excluding the loading delay.

Link copied to clipboard

Whether the guide path audits itself once, as each replication ends.

Link copied to clipboard

Entities standing where they are while a transporter travels to collect them.

Link copied to clipboard

The transporters currently unable to proceed, with what each is waiting for.

Link copied to clipboard

Whether the space-exclusivity invariants are checked at the end of every instant in which the guide path did anything.

Link copied to clipboard

Whether coverage is collected for each link and each intersection.

Link copied to clipboard

Whether coverage is collected for every individual zone.

Link copied to clipboard

Whether the wait-for graph is walked when a transporter blocks.

Link copied to clipboard

Entities waiting on a transporter they are driving rather than riding.

Link copied to clipboard

Events scheduled per zone entered, computed when the replication ends.

Link copied to clipboard

Whether each intersection was covered, when link statistics were asked for.

Link copied to clipboard

Zones of each link covered by a transporter, when link statistics were asked for.

Link copied to clipboard

The fraction of each link's zones covered over the replication, computed when the replication ends in the same way a conveyor computes its cell utilization.

Link copied to clipboard
Link copied to clipboard

How many vehicles are held up by a vehicle that has nothing to do: parked on the travel path.

Link copied to clipboard

Vehicles held up by an occupier: see numBlockedByVehicle.

Link copied to clipboard

Vehicles held up by a zone's population: see numBlockedByVehicle.

Link copied to clipboard

Vehicle blocked time, decomposed by what was in the way: another vehicle, an occupier, or a population.

Link copied to clipboard

How many circular waits were found. At most one per replication, since finding one ends it.

Link copied to clipboard

How many events the guide path put on the calendar: traversals, rear releases, and retries.

Link copied to clipboard

How many holders are waiting for guide-path space to drain.

Link copied to clipboard

How many times a transporter was blocked behind one that had nothing to do at that instant.

Link copied to clipboard

How many requests were still waiting for their space when a replication ended.

Link copied to clipboard

How many transporters cannot claim the space ahead of them.

Link copied to clipboard

How many transporters are standing still with nothing to do.

Link copied to clipboard

How many transporters are travelling.

Link copied to clipboard

How many times guide-path space was taken by something that is not a vehicle.

Link copied to clipboard

How many zones are held by something other than a vehicle.

Link copied to clipboard

How many zones were entered, across the whole fleet.

Link copied to clipboard

Per delivered load: from the load being aboard until it is set down, excluding the unloading delay.

Link copied to clipboard

Entities aboard a transporter that is carrying them.

Link copied to clipboard

How far a loaded transporter travelled.

Link copied to clipboard

Whether an idle transporter obstructing another ends the replication instead of being warned about and counted.

Link copied to clipboard

How long each request waited for its space to drain. Zero when the space was already free.

Link copied to clipboard

How much of a transport was spent unable to claim the space ahead. The quantity a free-path model cannot produce at all, which is why it is reported per transport and not only as a fraction of each transporter's time.

Link copied to clipboard

The transporters on this guide path, in the order they were declared.

Link copied to clipboard

The requests that have asked for space and not yet been granted it, oldest first.

Link copied to clipboard

Which of several transporters waiting for one zone is let in when it frees.

Link copied to clipboard
@set:KSLStringControl(allowedValues = ["FIFO", "LoadedFirst"], comment = "Which waiting transporter is let into a zone when it frees")
var zoneContentionRuleName: String

The contention rule by name, so a scenario or an app can change it without holding a rule object. Reading it reports the rule's own toString when the rule is one no name stands for.

Link copied to clipboard

Whether each individual zone was covered, when zone statistics were asked for.

Link copied to clipboard

How many zones a loaded transporter crossed.

Link copied to clipboard

The fraction of the guide path's zones that are covered by a transporter.

Functions

Link copied to clipboard

The space this holder currently holds, or null when it holds none.

Link copied to clipboard

The zone of this set that is already promised to somebody else, or null when none is.

Link copied to clipboard

The zone of this set that a parked vehicle is standing in, or null when none is.

Link copied to clipboard
fun holdZoneFor(holder: ZoneHolderIfc, zone: Zone, duration: Double, action: ZoneHoldActionIfc, onOverlap: ZoneOverlap = ZoneOverlap.RAISE): ZoneRequest

Takes a zone for a stated duration, and gives it back without being asked again.

Link copied to clipboard
fun holdZonesFor(holder: ZoneHolderIfc, zones: List<Zone>, duration: Double, action: ZoneHoldActionIfc, onOverlap: ZoneOverlap = ZoneOverlap.RAISE): ZoneRequest

Takes a set of zones together for a stated duration, and gives them back without being asked.

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

True when a vehicle is standing in this zone that nothing in the model will move again.

Link copied to clipboard

True while this holder holds guide-path space.

Link copied to clipboard

True while space is draining for this holder.

Link copied to clipboard
fun releaseZones(allocation: ZoneAllocation)

Gives back exactly the space this allocation covers, and complains if it is not current.

Gives back whatever a holder holds, or gives up what it asked for and never got.

Link copied to clipboard
protected open override fun replicationEnded()

Reports any transporter still waiting when a replication ends.

Link copied to clipboard

What this holder has asked for and not yet been given, or null.

Link copied to clipboard
fun requestZone(holder: ZoneHolderIfc, zone: Zone, action: ZoneHoldActionIfc, onOverlap: ZoneOverlap = ZoneOverlap.RAISE): ZoneRequest

Asks for a zone, which closes to new traffic at once and is held as soon as it has drained.

Link copied to clipboard
fun requestZones(holder: ZoneHolderIfc, zones: List<Zone>, action: ZoneHoldActionIfc, onOverlap: ZoneOverlap = ZoneOverlap.RAISE): ZoneRequest

Asks for a set of zones, which all close to new traffic at once and are held together.

Link copied to clipboard

Starts a transporter that a TransporterMovementGateIfc halted at a zone boundary.

Link copied to clipboard

Switches reporting for the three movement queues. Off by default.

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

Link copied to clipboard

The transporters standing still right now because this one is in their way.

Link copied to clipboard
fun tryHoldZoneFor(holder: ZoneHolderIfc, zone: Zone, duration: Double, action: ZoneHoldActionIfc): ZoneRequest?

Takes one zone for a stated duration unless it is already promised, in which case: null.

Link copied to clipboard
fun tryHoldZonesFor(holder: ZoneHolderIfc, zones: List<Zone>, duration: Double, action: ZoneHoldActionIfc): ZoneRequest?

Takes a set of zones for a stated duration, and answers null when some zone of it is already promised.

Link copied to clipboard

Asks for one zone unless it is already promised to another holder, in which case: null.

Link copied to clipboard

Asks for a set of zones, and answers null when some zone of it is already promised.