Quiz Study Guide — Chapter 8
This deck is a checklist, not a summary. Every slide is phrased as something you should be able to state or recognize without looking it up.
The through-line
Movement can be free (“entities with little feet”), resource-constrained (a worker or vehicle must be available), or space-constrained (a conveyor with a finite number of cells).
Spatial movement
DistancesModelMovableResource and poolsmove, moveWith, transportWithConveyors
requestConveyor, rideConveyor, exitConveyorconvey and transferToYou should be able to:
SpatialModel subclass must implementDistancesModel and attach it to a process modelMovableResource and name the default allocation ruleWith “entities with little feet” you model movement with delay(). An infinite supply of movers is implicitly assumed and only the move-time matters.
With resource-constrained movement, a finite resource — a worker, a vehicle — may itself be unavailable, so the part may wait for a mover.
Three ResourcePoolWithQ instances:
diagnosticWorkers — DW1, DW2repairWorkers — RW1, RW2, RW3transportWorkers — all eight workers: DW1, DW2, TW1, TW2, TW3, RW1, RW2, RW3So each worker appears both in its station’s pool and in the transport pool.
Order matters at a station:
seize(transportWorkers, seizePriority = KSLEvent.MEDIUM_PRIORITY) gives parts waiting for processing (default, higher priority) precedence over parts merely waiting for transport.
A spatial model represents the physical space: it provides the distance between locations and a defaultLocation.
A subclass must implement, besides defaultLocation:
distance(fromLocation, toLocation): DoublecompareLocations(firstLocation, secondLocation): Boolean| Concrete model | Distance basis |
|---|---|
DistancesModel |
An origin/destination matrix — the simplest |
| Great Circle | GPS coordinates with a circuity factor |
| Euclidean 2D Plane | Straight-line distance between 2D points |
| Rectangular Grid | Rows \(\times\) columns of cells starting at \((0,0)\) |
DistancesModelLocation class of DistancesModel, and implement LocationIfc.addDistance defaults symmetric to true.Entity implements SpatialElementIfc and has initialLocation, previousLocation, currentLocation, isMoving, and velocity — but no nextLocation.| Class | Role |
|---|---|
MovableResource |
Subclass of Resource also implementing SpatialElementIfc and VelocityIfc |
MovableResourceWithQ |
Constructed as (parent, initialLocation, velocityRV, name) |
MovableResourcePoolWithQ |
A “motor pool” of movable resources with a shared request queue |
MovableResourceSelectionRuleIfc |
Default returns all currently available movable resources |
MovableResourceAllocationRuleIfc |
Picks one from the eligible list, given the request’s location |
Default allocation rule: ClosestMovableResourceAllocationRule — allocate the mover nearest the request’s location.
| Rule | When you would choose it |
|---|---|
Furthest... |
Return movers from the outskirts of the spatial model to more central activities |
Random... |
Pick uniformly among the available movers |
LeastUtilized... |
Balance load by utilization |
LeastSeized... |
Balance load by seize count |
Per movable resource the KSL adds FracTimeMoving, FracTimeTransporting, and FracTimeMovingEmpty to the ordinary resource statistics.
moveWith requires the entity and the movable resource to be at the same location — it moves them together.transportWith(mover, toLoc, ...) wraps that whole pattern into one call, defaulting to zero load/unload delays and the resource’s default velocity. It does not require a manual seize() first.A Conveyor is a ModelElement made of a series of Segments, each with a String origin and destination, divided into equal-size cells of length cellSize, moving at a single velocity, with type ACCUMULATING or NON_ACCUMULATING.
Strings — conveyors do not use a spatial model, though the strings may match the names of LocationIfc instances elsewhere.maxCellsAllowed.ACCUMULATING
The conveyor keeps running. Items behind a blockage continue forward until they cannot advance, queueing on the conveyor itself.
NON_ACCUMULATING
The entire conveyor disengages when an item enters at an entry cell or stops at a destination. All items stop; spacing stays constant while moving.
In the “work on the conveyor” variant, the accumulating case shows near-zero queue lengths at the workers — the queue physically lives on the conveyor as occupied cells. The non-accumulating case shows a severe bottleneck at the entry access queue, because the whole conveyor stops during processing.
For plan-dependent space, use a mapOf(testPlan to cellsNeeded) and pass numCellsNeeded = cellsNeeded to convey(...), with maxCellsAllowed = 2 on the conveyor.
| Function | Effect |
|---|---|
requestConveyor(conveyor, entryLocation, numCellsNeeded) |
Allocates cells and returns a ConveyorRequestIfc — the “ticket to ride”. The entity holds the cells (blocking the entry cell) but is not yet riding. |
rideConveyor(conveyorRequest, destination) |
Occupies the cells and moves to the destination; updates currentLocation if the destination implements LocationIfc |
exitConveyor(conveyorRequest) |
Moves through the occupied cells — a real delay — then deallocates them |
| Function | Effect |
|---|---|
convey(conveyor, entry, destination, numCells) |
Single call combining request + ride + exit |
transferTo(request, nextConveyor, entryLocation) |
Transfer to a different conveyor: suspend while accessing cells on the next one, then exit the current |
For plan-dependent space, pair a mapOf(testPlan to cellsNeeded) with numCellsNeeded = cellsNeeded on the convey(...) call.
| Statistic | Meaning |
|---|---|
Conveyor:loc:AccessQ:NumInQ |
Number waiting at loc to get cells |
Conveyor:loc:AccessQ:TimeInQ |
Time waiting at loc for cells |
Conveyor:from->to:NumOccupiedCells |
Occupied cells in that segment |
Conveyor:from->to:CellUtilization |
Fraction of that segment’s cells occupied over time |
Conveyor:NumOccupiedCells |
Total occupied cells across the whole conveyor |
This chapter’s question bank has no numeric items — these are practice problems built from the formulas and rules it tests in other formats. Expect the quiz to test the same relationships, not these exact numbers.
cellSize = 1. How many cells does it have, and how are they numbered?transportWith performs.transportWith() does not require a manual seize() first.moveWith() requires the entity and mover to start at the same location.Strings; conveyors do not use a spatial model.exitConveyor() takes simulation time — it is not instantaneous.requestConveyor the entity holds cells but is not riding.DistancesModel distances may be asymmetric, though symmetric defaults to true.Closest....FurthestMovableResourceAllocationRule; the default is ClosestMovableResourceAllocationRule.moveWith to the destination \(\to\) unloading delay \(\to\) release.