Integrator in Submodels

28 views
Skip to first unread message

Knut Arild Maråk

unread,
May 8, 2024, 8:07:12 PMMay 8
to JaamSim Users Discussion Group
Hi, 

I'm testing out the use of the Integrator-object. I want to show the completed distance by integrating the values from a speed variable. 

I get it to work fine when the Integrator is place in the main model (without a UnitDelay-object), but can't get the Integrator to work when placed in a SubModel. 

The error message tells me to use a UnitDelay-object, but that doesn't help. Maybe I'm using the UnitDelay-object wrongly. 
Integratortesting.cfg

Harry King

unread,
May 8, 2024, 9:14:50 PMMay 8
to JaamSim Users Discussion Group
Knut,

The error message is misleading. The problem is your entry to the 'InputValue' input to the Integrator. It should be sub.Speed, not this.Speed. 'Speed' is an attribute of the Distance sub-model, not the Integrator. Also, you need to set an input value for Speed keyword for the Distance sub-model, say 0[m/s]. The revised model is attached.

Harry

Integratortesting - HK.cfg

Knut Arild Maråk

unread,
May 10, 2024, 4:02:36 PMMay 10
to JaamSim Users Discussion Group
Thanks a lot for the quick response. I will read the User Manual even more carefully next time.
Reply all
Reply to author
Forward
0 new messages