Delayed Events

63 views
Skip to first unread message

john.b...@arup.com

unread,
Mar 1, 2026, 7:48:00 AMMar 1
to JaamSim Users Discussion Group
Hello,

I wonder if anyone has found a nice way to achieve the following use case.

I have an EntityConveyor which has, say, a travel time of 10 s. In order to control other parts of the model I'd like to have an indication of when an Entity is in the last 2 seconds of the conveyor. I want to use this to control/define an ExpressionThreshold: it's "open" if there is no item on the conveyor in the last 2 seconds of travel time; "closed" otherwise.

I can write little expressions to capture the entry time of an entity when it enters the conveyor and to calculate +8 and +10 seconds to define the window of interest and save these as attributes for each entity on the conveyor. I can also use the EntityList of the conveyor to find the first entity and hence the next +8 and +10 s times to use. These can be put into an ExpressionThreshold to see if SimTime is between these two limits and so set open or close. But, as the user manual makes clear, these states only get updated when events happen. So, it is not a robust approach.

Is there another approach that would work that I have missed, or could there be a need for a type of "delay object" that is used to schedule an event/update in the future based on a current event?

My current try at a workaround is to generate loads of events but this is bad for performance and intellectually quite "wrong"!

Best wishes,

John




john.b...@arup.com

unread,
Mar 2, 2026, 9:20:45 AMMar 2
to JaamSim Users Discussion Group
I have modified EntityConveyor.java which now allows a new input of X time before reaching end of conveyor to be set and a new Boolean output which is TRUE or FALSE depending on whether or not there are any entities within X time of reaching the end of the conveyor. This also creates an event when an entity will reach this end zone so that anything watching/connected to the conveyor (e.g. an ExpressionThreshold) will respond to this happening. I have run a few basic tests and it seems to work as intended. Shared for info in case anyone finds this useful. (In my case, it is handy to know when an entity is near the end of a conveyor to give it priority over a merging conveyor input when entering the next conveyor - see attached model which uses the new input/output - see screenshots.)
Test of Concept3-with_new_EntityConveyor.cfg
NEW_EntityConveyor.java
NewOutput.png
NewInput.png

john.b...@arup.com

unread,
Mar 13, 2026, 7:44:05 AMMar 13
to JaamSim Users Discussion Group
I have now "reversed" the logic so that it matches ReadyForNextEntity. As a result, the new output is called "NoEntityApproaching" which returns TRUE if no entities on the conveyor are within their exit proximity time of leaving the conveyor. When linked to a ExpressionThreshold it feels a bit more natural so that TRUE/GREEN means that a downstream element can be released without conflict/contention. New version attached here.
EntityConveyorREVISED_NAME_SENSE.java

Harry King

unread,
Mar 30, 2026, 9:46:19 PM (2 days ago) Mar 30
to JaamSim Users Discussion Group
Hi John,

Why not just represent the conveyor by two EntityConveyors: the first with a delay of 8 seconds, and the second with a delay of 2 seconds?

Harry

Reply all
Reply to author
Forward
0 new messages