Several SimLang functions delay their arguments, and so allow what would otherwise be circular references. For example I can use STOCK as follows:
Foo = STOCK(Bar, 0)
Bar = Foo / TimePeriod
But I cannot use PULSE in a similar way, even though it delays its third argument. I would like to write
V Baz = PULSE(1, 1, Qux)
V Qux = IF(Baz, 1 + RAND * 10, PREVIOUS(Baz, 1))
intending the time interval of PULSE to be updated only when a unit is actually pulsed.
Otherwise no update happens. But when I do so, I get a complaint about circularity.
(Strictly speaking I see that circularity in Forio Simulate, not Epicenter, but I assume it
happens in both platforms.)
As I misunderstanding how PULSE works?
Dave