question

Fiorenzo A avatar image
0 Likes"
Fiorenzo A asked Fiorenzo A commented

FLOOR STORAGE, PULL REQUIREMENT CODE [bug or not?]

Hi,

I realize this very simple model and I noticed an unusual behavior of the FloorStorage. When the FloorStorage is full and there is the first OnExit from it, even if a flowitem is ready to enter, the slot that has become free remains free. After another OnExit both the slots are replenished. I expected that immediately after the first OnExit the slot would be filled.

I realize the model in a very simple way:

  1. drag and drop in the model a Source, a Conveyor, a FloorStorage and a Sink.
  2. A-connection between Source and Conveyor, between Conveyor and FloorStorage and between FloorStorage and Sink.
  3. in the Flow tab of the FloorStorage insert a MinimumDwellTime of 3000 seconds.


To avoid the situation explained above, I modified the pullrequirement code.errorcode_rack.fsm

As you can see in the pictures below, I add the exitListener treenode value only if this value doesn't exists and I add it with EVENT_LISTEN_ONCE modality in the function "eventlisten".

Also when the code runs the openinput command, I noticed that we need a zero time waiting to separate the OnExit and immediately after the OnEntry events. In this way, when we assign the slot to the Flowitem OnExit from Conveyor, the slot is free in the warehouse because the OnExit event in the werehouse has already occurred. Previously, the assignment took place simultaneously and the slot, being still occupied, was not assigned. I generate this zero delay sending a message to the current object in zero seconds.

It's right my reasoning? We can consider this as a bug? I attach the model to the question.

@phil.bobo


thanks for the support.


FlexSim 20.2.2
rackflexsim 20.2.2pullrequirement
1601278000488.png (80.5 KiB)
1601278586593.png (110.0 KiB)
1601279295656.png (35.2 KiB)
errorcode-rack.fsm (47.8 KiB)
· 2
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Ben Wilson avatar image Ben Wilson ♦♦ commented ·

Hi @Fiorenzo A, was phil.b's answer helpful? If so, please click the red "Accept" button on their answer. Or if you still have questions, add a comment and we'll continue the conversation.

If we haven't heard back from you within 3 business days we'll auto-accept an answer, but you can always unaccept and comment back to reopen your question.

0 Likes 0 ·
Fiorenzo A avatar image Fiorenzo A Ben Wilson ♦♦ commented ·

yes, it is! But I forgot to accept! Now I do that!

0 Likes 0 ·

1 Answer

Phil BoBo avatar image
1 Like"
Phil BoBo answered

Yes, this is a bug. Your solution is good. You can also fix it using the delayednodefunction() command instead of Object.message(). Using delayednodefunction(), all of the code can be in one trigger.

I've updated the code for the next bugfix release. Thanks.

5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.