Help / Getting Started

Getting Started

3 GRS reference entries.

GRS file

Purpose
Simulation Studio Model Logic source file.
Syntax
*.grs
Example
begin model.init event
    print "ready" to log
end
Notes
GRS uses UTF-8 text. 2026-10-20: GRS was reduced to a minimal surface ahead of a full redesign. Supported: init events, model.snap, the 12 Vehicle events, if / else, while / for each, set / inc / dec, attributes, + - * / %, print ... to log, and all Humanoid events/functions. Anything else is rejected at Compile with GRS_REMOVED_SYNTAX.
Related
Init events, Vehicle event syntax, if / else, while, print to log

Init events

Purpose
Runs once at simulation time zero to initialize model values.
Syntax
begin model.init event
    ...
end
begin OHT.init event
    ...
end
begin AMR.init event
    ...
end
begin Humanoid.init event
    ...
end
Example
begin model.init event
    set count = 0
    print "model ready" to log
end
Notes
model.init runs once per model. OHT.init / AMR.init / Humanoid.init are the typed initializers used by Global Init.
Related
Global Init, set, print to log

Global Init / default OHT AMR Humanoid

Purpose
Create the default OHT, AMR and Humanoid counts directly from one global initialization event.
Syntax
begin model.init event
    vi_OHT = 10
    vi_Humanoid = 3
    vi_AMR = 3
end
Example
begin model.init event
    vi_OHT = 10
    vi_Humanoid = 3
    vi_AMR = 3
end
begin OHT.init event
    set i = 0
    while i < vi_OHT
    begin
        inc i by 1
        print "OHT", i, " is initialized" to log
    end
end
begin Humanoid.init event
    set i = 0
    while i < vi_Humanoid
    begin
        inc i by 1
        print "Humanoid", i, " is initialized" to log
    end
end
begin AMR.init event
    set i = 0
    while i < vi_AMR
    begin
        inc i by 1
        print "AMR", i, " is initialized" to log
    end
end
Notes
New global-init script has exactly one model.init with three positive integer vi_* values and these three typed events. At Compile the already-placed drawing supplies one OHT rail Level and one AMR floor Level (each with two distinct Stations); scripted Job Source is used with no synthetic traffic. Existing C++ Core creates vi_OHT/vi_AMR vehicles. Three-dimensional default humanoids are created at a floor Station. The typed init events run once at simulation time zero and print to the Studio message log. Other legacy and previously declared auto-bound scripts retain their existing behavior. All five previous helper initializers are NOT required for this opt-in.
Related
model.init, OHT.init, AMR.init, Humanoid.init, print to log