On-event entity generation

50 views
Skip to first unread message

Timothy Addison

unread,
Mar 20, 2024, 12:32:38 PMMar 20
to JaamSim Users Discussion Group
Hi, it is my first day with Jaamsim and have run into a roadblock in terms of what I am looking to accomplish. In essence, I want an EntityGenerator to create the first entity at time 0 when the simulation is run. Subsequently, I want all further entities to be generated in relation to an event i.e. a specific EntitySink consuming an entity.

Hopefully my request is clear, all help and guidance appreciated.

Lorenzo Ferro

unread,
Mar 21, 2024, 10:27:32 AMMar 21
to Timothy Addison, JaamSim Users Discussion Group
Hi.
Please, try the attached example, based on EntitySignal to check the arrival of an entity at a certain point, then setting the state in the SignalThreshold and using it as an ImmediateThreshold to release Entities from the EntityGenerator (previously set with InterArrivalTime = 0 s).
There are surely other smarter ways to do the same, for example using Attributes and setting them with the Assign function, in a more nested and programmatic way.
I prefer the method attached because it is almost auto explicative in graphical form.

Regards,
Lorenzo

Il giorno mer 20 mar 2024 alle ore 17:32 Timothy Addison <timothy....@gmail.com> ha scritto:
Hi, it is my first day with Jaamsim and have run into a roadblock in terms of what I am looking to accomplish. In essence, I want an EntityGenerator to create the first entity at time 0 when the simulation is run. Subsequently, I want all further entities to be generated in relation to an event i.e. a specific EntitySink consuming an entity.

Hopefully my request is clear, all help and guidance appreciated.

--
You received this message because you are subscribed to the Google Groups "JaamSim Users Discussion Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jaamsim-user...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/jaamsim-users/0e23483f-308b-4af4-b6b8-1264ab21b35an%40googlegroups.com.
test_call_entities.cfg

Timothy Addison

unread,
Mar 25, 2024, 7:53:41 AMMar 25
to JaamSim Users Discussion Group
Many thanks for putting together the example Lorenzo, this is exactly what I needed and functions perfectly.

Regards

Tim
Reply all
Reply to author
Forward
0 new messages