Error on Count of the number of entities in container

95 views
Skip to first unread message

jame...@uvg.edu.gt

unread,
Mar 6, 2021, 9:46:27 AM3/6/21
to Jaamsim Users Discussion Group
This model used to work, but for some reason now it throws an error when the container arrives at the RemoveFrom process.  As far as I know, the expression is correct:  

this.obj.Count 

I sincerely don´t know what the error is.  Any guidance will be appreciated.
aeropuerto.cfg

Harry King

unread,
Mar 7, 2021, 6:48:32 PM3/7/21
to Jaamsim Users Discussion Group
Jose,

This is the same problem with the AttributeDefinitionList input. You can find the problem by examining the .log file generated by JaamSim when it reads the .cfg file. Open the .log file in Notepad++ and scroll down until you find the following lines:

Pasajeros  AttributeDefinitionList  {  {  tipo  0  }  {  ttotal  0  s  }  {  serv  0  s  }  {  equip  1  }  {  mano  0  }  }
*** INPUT ERROR *** Entity: Pasajeros, Keyword: AttributeDefinitionList - Expected an input with 2 value(s), received: ttotal  0  s

This tells you that there is a problem with the AttributeDefinitionList input for Pasajeros. The entries for ttotal and serv should be { ttotal 0[s] } and { serv 0[s] }

A secondary problem is that it is possible to start the model despite the input error and that the resulting runtime error does not generated a popup message. I will look into those problems.

Harry

jame...@uvg.edu.gt

unread,
Mar 7, 2021, 9:47:59 PM3/7/21
to Jaamsim Users Discussion Group
Harry, I'm running this model with version 2020-12, before the changes you mentioned in the previous problem.  That is why the model runs but I get a different error, I'm attaching the screenshot.
error.png

jame...@uvg.edu.gt

unread,
Mar 7, 2021, 10:09:21 PM3/7/21
to Jaamsim Users Discussion Group
One more piece of information that might be useful for you, the model runs fine on version 2020-7 but not on 2020-8 so apparently there was some changes introduced in version 2020-08 that changed the behaviour but I can't seem to find information on how to access the number of entities in a container.

Harry King

unread,
Mar 7, 2021, 11:19:58 PM3/7/21
to Jaamsim Users Discussion Group
Jose,

The output 'Container' was added to RemoveFrom in 2020-08, and its 'obj' output was changed to return the last entity that was unloaded. Your model works correctly when the input to NumberOfEntities is changed to 'this.Container.Count'.

Incidentally, the error message bug I mentioned has already been fixed in next release (2021-02). Your model runs fine with this release once the attribute definitions are fixed.

Harry

jame...@uvg.edu.gt

unread,
Mar 8, 2021, 10:06:12 AM3/8/21
to Jaamsim Users Discussion Group
Thanks a lot Harry!!  That is the part I was missing, how to access the number of entities in the container.  Seems like I need to get up to date with all the changes in the last few months!!
Reply all
Reply to author
Forward
0 new messages