__timestep
Time ContextbothDer Index des aktuellen Zeitschritts — 0 am Anfang des Szenarios, 1 am nächsten Schritt und so weiter. Als Scope-Variable in jeder Formel und Act-Methode verfügbar. Nützlich für periodische Logik („einmal pro Jahr"), Startbedingungen oder jede Regel, die von der absoluten Zeit innerhalb des Szenarios abhängt.
Signatur
__timestep : integer (scope variable)
Beispiel
// Apply annual raise on January (monthly steps)
if __timestep % 12 == 0 && __timestep > 0 {
agent.get_prop("salary", -1) * 1.03
} else {
agent.get_prop("salary", -1)
}