Blocking

98 views
Skip to first unread message

Trevor Miles

unread,
May 21, 2020, 8:13:46 AM5/21/20
to Jaamsim Users Discussion Group
@Harry, I seem to have come across a bug. In the Thresholds_Error model I used an ExpressionThreshold to show the state of EntityProcessor2. This throws a Java error for some reason. While obviously a BooleanIndicator is a better construct to show the state of the EntityProcessor, it isn't obvious to me why the ExpressionThreshold throws an error.

I'm trying to model a "typical" production line with accumulating conveyors that act as a queue between stations. In other words there is a max queue length between stations and when the conveyor is full the upstream station is blocked. The obvious way to model this is with ExpressionThreshold.

The complication comes in where there is a Branch in the production line to account for a slower process, or to make a variant. I need to have the thresholds act as as AND when they behave as an OR. In other words the upstream station is blocked when ALL downstream queues are full.

I have modeled this using EntityProcessor (with a Queue), EntityGate (controlled by an ExpressionThreshold on the next Queue), and EntityConveyor (to model the physical/minimum movement time between stations)

The tricky bit is when there are 2 or more stations after the current station. The current station is only blocked if the Queue before the "next" station is full. If I list all of the ExpressionThresholds of the possible downstream Queues, the EntityProcessor is blocked if any 1 of the downstream Queues is full.

Any guidance would be helpful.

What I was really hoping for was the following flow, which I am struggling to model:

- Queue A
- Seize A
- Delay A
- Queue B
- Seize B
- Release A
- Delay B

This would mean A is blocked until B is available.

Thresholds_Error.PNG
Thresholds_NoError.cfg
Thresholds_Error.cfg

Trevor Miles

unread,
May 21, 2020, 12:18:15 PM5/21/20
to Jaamsim Users Discussion Group
I've adjusted the model by adding another ExpressionThreshold that uses the following rules:

ExpressionThreshold8 OpenCondition { '[ExpressionThreshold6].Open || [ExpressionThreshold7].Open' }
ExpressionThreshold8 CloseCondition { '![ExpressionThreshold6].Open && ![ExpressionThreshold7].Open' }


I then use ExpressionThreshold8 on the EntityProcessor:

EntityProcessor2 OperatingThresholdList { ExpressionThreshold8 }

This seems like a lot of effort.

What I would love to see as an extension is for all "activities" - EntityProcessor, EntityConveyor, EntityDelay, ...- to have a "Release" variable that defaults to "OnExit" and an alternate of "OnSignal". The other "activities" would have a "Signal" variable with the name of the "activity" to release.

Harry King

unread,
May 21, 2020, 6:51:31 PM5/21/20
to Jaamsim Users Discussion Group
Hi Trevor,

This bug occurs when an ExpressionThreshold references the state of another ExpressionThreshold. It will be fixed in the next release.

I'll take a look at your model now and respond in a separate post.

Harry

Trevor Miles

unread,
May 22, 2020, 4:50:17 AM5/22/20
to Jaamsim Users Discussion Group
@Harry, I've simplified the model. The latest model is attached. The behaviour is not ideal because the decision logic in the Branch will become too complex in the generalized case where there are 10-20 alternatives.
Thresholds.cfg

Harry King

unread,
May 23, 2020, 5:49:24 PM5/23/20
to Jaamsim Users Discussion Group
Trevor,

The ExpressionThreshold bug you noted has been fixed in release 2020-07.

Harry
Reply all
Reply to author
Forward
0 new messages