Annotation Interface Lag
Marks a field as a lagged value to be updated at the start of each simulation time interval.
At each period update the annotated field will receive the value of its specified source, read from the same object before any lag assignments are written. This read-first semantics ensures correct behaviour for multi-period lag chains (e.g. L3 ← L2 ← L1 ← current) regardless of field declaration order.
Specify the source using exactly one of:
field()— name of a field on the same object to copy directly.getter()— name of a no-argument getter method on the same object to invoke.
If both are specified, getter takes precedence. If neither is specified,
UpdateManager.applyAnnotations(Object) will throw an IllegalArgumentException.
Example — direct field reference:
@Lag(field = "labC4")
private Les_c4 labC4L1;
Example — getter method:
@Lag(getter = "getHouseholdStatus")
private Indicator demStatusHhL1;
Example — multi-period lag chain (L2 ← L1, then L1 ← current getter):
@Lag(field = "yEmpPersGrossMonthL1")
private Double yEmpPersGrossMonthL2;
@Lag(getter = "getYEmpPersGrossMonth")
private Double yEmpPersGrossMonthL1;
- See Also:
-
Optional Element Summary
Optional Elements
-
Element Details
-
field
-
getter
-