Help / Events

Events

16 GRS reference entries.

Model snap

Purpose
Runs after a completed Model session snapshot boundary. The event observes the model at the exact committed simulation time, without creating a UI render timer.
Syntax
begin model.snap event
    ...
end
Example
begin model.init event
    set snapCount = 0
end
begin model.snap event
    inc snapCount by 1
    print "model snap", snapCount to log
end
Notes
The first event runs at simulation time 0 after Init. Thereafter one event runs for each successful forward ModelExecutionSession.advanceTo() call, after all physics modules finish. Re-reading the immutable snapshot, pausing, or advancing to the same time does not fire it again. Each module executes its own defined model.snap handler, if present. This is not triggered by Qt paint/repaint and it is not a request to save the project file. 'begin model snap event' is accepted as an alias. Normal GRS restrictions on wait and functions still apply.
Related
model.init, Time duration, print to log

Vehicle event syntax

Purpose
Public Vehicle event syntax shared by OHT, AGV and AMR: vehicle. followed by the event name with underscores (pickup, setdown, speed_change, resume_to_drive, start_to_move, arrived_at_station, job_finished, job_selection, job_assigned, decelerate_to_destination, passing_station, destination_change). The old space form (begin Vehicle pickup event) was removed.
Syntax
begin vehicle.<event_name> event
    ...
end
Example
begin vehicle.job_assigned event
    print "job assigned" to log
end
Notes
The GRS compiler lowers these event declarations to the engine's existing internal callbacks. Existing project event keys still load for compatibility. The event actor Vehicle is available as this Vehicle. The same header works in OHT, AGV and AMR modules; steer change and for each ... in Vehicle are OHT only.
Related
Vehicle, Vehicle, OHT, AGV, AMR, GRS Events

Vehicle pickup

Purpose
Arrives at the physical pickup boundary.
Syntax
begin vehicle.pickup event
    ...
end
Example
begin vehicle.pickup event
    print "Vehicle pickup" to log
end
Notes
The Load is loaded at the existing physical pickup boundary. The engine uses an internal callback key; write the Vehicle event header in new GRS models.
Related
Vehicle, print to log

Vehicle setdown

Purpose
Arrives at the physical setdown boundary.
Syntax
begin vehicle.setdown event
    ...
end
Example
begin vehicle.setdown event
    print "Vehicle setdown" to log
end
Notes
The unloading completion occurs after the configured setdown dwell. The engine uses an internal callback key; write the Vehicle event header in new GRS models.
Related
Vehicle, print to log

Vehicle speed change

Purpose
Physical Vehicle speed changes.
Syntax
begin vehicle.speed_change event
    ...
end
Example
begin vehicle.speed_change event
    print "Vehicle speed change" to log
end
Notes
Uses existing engine speed transitions, not polling. The engine uses an internal callback key; write the Vehicle event header in new GRS models.
Related
Vehicle, print to log

Vehicle resume to drive

Purpose
A stopped Vehicle starts driving again.
Syntax
begin vehicle.resume_to_drive event
    ...
end
Example
begin vehicle.resume_to_drive event
    print "Vehicle resume to drive" to log
end
Notes
Uses a real resume transition. The engine uses an internal callback key; write the Vehicle event header in new GRS models.
Related
Vehicle, print to log

Vehicle start to move

Purpose
The Vehicle starts actual travel.
Syntax
begin vehicle.start_to_move event
    ...
end
Example
begin vehicle.start_to_move event
    print "Vehicle start to move" to log
end
Notes
Ignores the internal near-zero wake probe. The engine uses an internal callback key; write the Vehicle event header in new GRS models.
Related
Vehicle, print to log

Vehicle job finished

Purpose
A physical ScheduleJob reaches its completed handoff.
Syntax
begin vehicle.job_finished event
    ...
end
Example
begin vehicle.job_finished event
    print "Vehicle job finished" to log
end
Notes
Fires after setdown dwell. OHT: actor is the completed ScheduleJob (this Vehicle is its Vehicle). AMR / AGV: actor is the carrying Vehicle. The engine uses an internal callback key; write the Vehicle event header in new GRS models.
Related
Vehicle, print to log

Vehicle job selection

Purpose
A live ScheduleJob becomes selected.
Syntax
begin vehicle.job_selection event
    ...
end
Example
begin vehicle.job_selection event
    print "Vehicle job selection" to log
end
Notes
OHT: actor is the selected ScheduleJob; unchanged selection does not re-fire. AMR / AGV: actor is the Vehicle the Job was assigned to. The engine uses an internal callback key; write the Vehicle event header in new GRS models.
Related
Vehicle, print to log

Vehicle decelerate to destination

Purpose
The Vehicle reaches the final prepared travel span.
Syntax
begin vehicle.decelerate_to_destination event
    ...
end
Example
begin vehicle.decelerate_to_destination event
    print "Vehicle decelerate to destination" to log
end
Notes
Fires on actual movement in the final span. The engine uses an internal callback key; write the Vehicle event header in new GRS models.
Related
Vehicle, print to log

Vehicle arrived at station

Purpose
The Vehicle reaches its pickup or setdown Station.
Syntax
begin vehicle.arrived_at_station event
    ...
end
Example
begin vehicle.arrived_at_station event
    print "Vehicle arrived at station" to log
end
Notes
Fires once at the arrival boundary before the pickup/setdown event. The engine uses an internal callback key; write the Vehicle event header in new GRS models.
Related
Vehicle, print to log

Vehicle job assigned

Purpose
An idle OHT begins its next Job or explicit travel.
Syntax
begin vehicle.job_assigned event
    ...
end
Example
begin vehicle.job_assigned event
    print "Vehicle job assigned" to log
end
Notes
2026-10-17: fires on Idle-to-travel/Pickup transition; actor is the assigned Vehicle. The engine uses an internal callback key; write the Vehicle event header in new GRS models.
Related
Vehicle, print to log

Vehicle passing station

Purpose
The OHT passes a Station on its route.
Syntax
begin vehicle.passing_station event
    ...
end
Example
begin vehicle.passing_station event
    print "Vehicle passing station" to log
end
Notes
2026-10-17: fires for each physically crossed Station, excluding departure; no fleet-wide polling. The engine uses an internal callback key; write the Vehicle event header in new GRS models. wait is not allowed inside a passing station event (the vehicle is moving through the Station): compile error GRS_SEMA_WAIT_IN_PASSING_STATION_EVENT.
Related
Vehicle, print to log

Vehicle destination change

Purpose
The OHT starts a new travel leg toward its destination.
Syntax
begin vehicle.destination_change event
    ...
end
Example
begin vehicle.destination_change event
    print "Vehicle destination change" to log
end
Notes
2026-10-17: fires at travel-leg start (initial travel or post-pickup delivery), up to twice per Job. The engine uses an internal callback key; write the Vehicle event header in new GRS models.
Related
Vehicle, print to log

Vehicle OHT / AGV / AMR differences

Purpose
The vehicle.<event_name> header is the only spelling: there are no separate Def_OHT / Def_AGV / Def_AMR headers. It works in OHT, AGV (AMR Core Fixed Path) and AMR modules with the same 12 event names.
Syntax
begin vehicle.<event_name> event
    ...
end
Example
begin vehicle.passing_station event
    print "passing ", vehicle.passing_station_name to log
end
Notes
Observation is enabled only for events you implement and never changes physics. This Vehicle is the actor Vehicle. passing station radius for AMR / AGV is max(250 mm, body radius); vehicle.passing_station_name reads the station just passed. wait is not allowed inside a passing station event (the vehicle is moving through the Station): compile error GRS_SEMA_WAIT_IN_PASSING_STATION_EVENT. for each ... in Vehicle is OHT only: an AMR / AGV module that uses it is rejected before the run.
Related
Vehicle, AMR, AGV, OHT, GRS Events

Humanoid event syntax

Purpose
Humanoid uses the same 12 event names (begin humanoid.pickup event, ...). Job means humanoid_transfer; pickup/setdown fire when humanoid_pick/humanoid_place start.
Syntax
begin humanoid.<event_name> event
    ...
end
Example
begin humanoid.job_finished event
    print "done ", this Humanoid to log
end
Notes
this Humanoid is humanoid_self(); humanoid_event_place() reads the place just passed (within 400 mm) inside passing station. resume to drive occurs only in live walking. wait is not allowed inside a passing station event (the vehicle is moving through the Station): compile error GRS_SEMA_WAIT_IN_PASSING_STATION_EVENT.
Related
Humanoid, GRS Events