Differences
This shows you the differences between two versions of the page.
— |
model:working_with_time [2025/02/18 04:09] (current) optrix created |
||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====Working With Time==== | ||
+ | While most ModelHost models only need to respond to changes in data, some models are time-sensitive (such as forecasting models, running averages/ | ||
+ | |||
+ | You can force an output to update once every second by making the output depend on the internal ModelHost clock. | ||
+ | |||
+ | <code python> | ||
+ | @mdl.part(" | ||
+ | def TimeTrigger(mod): | ||
+ | TX = mod.AddInput(" | ||
+ | Input = mod.AddInput(" | ||
+ | | ||
+ | </ | ||
+ | |||
+ | The code above will re-calculate the ' |