question

Ryusuke T avatar image
0 Likes"
Ryusuke T asked Phil BoBo commented

send to port error

Hi,

Please check the attached model.


In this model, a random type is generated at the source and the port is determined using user commands for queue2.

Type=1 goes to the multiprocessor, Type=2 goes to processor2, and Type=3 stays on queue2.

Running this simulation shows that type=2 gets stuck in queue2 in about 70 seconds and type=1 stops sending properly to the port in about 130 seconds.


Is there a cause and solution for this issue?

By the way, this model configuration (using user commands, etc.) is a simplified version of the customer's model, so I don't want to change the configuration itself.


Thank you in advance.

send to port error.fsm

FlexSim 23.0.10
send to port
5 |100000

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

1 Answer

·
Felix Möhlmann avatar image
1 Like"
Felix Möhlmann answered Phil BoBo commented

It seems to be connected to the issue discussed here.

In short: To keep an item in the queue, the Send to Port code should return -1. Returning 3 when there are only 2 output connection tells the queue: "The item is going to leave, but not through a specific port". It is normally used when the item is pushed to list. And as the other post shows, seems to cause problems when some items do leave through port connections.

· 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.

Ryusuke T avatar image Ryusuke T commented ·

@Felix Möhlmann ,

Thank you for answering.

I was not able to find the information you provided.

I set it to -1 and it worked fine.

0 Likes 0 ·
Phil BoBo avatar image Phil BoBo ♦♦ Ryusuke T commented ·

This behavior is documented in Fixed Resources Concepts

The -1 behavior is described in the "Send to Port Value" alert box.

The behavior for returning ports outside of the range of available ports is used by the feature described in the section titled "Alternatives to Using Port Connections," particularly "Pushing and Pulling from a List."

While it doesn't explicitly document that it uses non-existent port values to enable this functionality with lists, that is indeed how it works. Felix's description as "the item is going to leave, but not though a specific port" is a good explanation of how fixed resources' handle non-existent port values being returned via send to port. Ultimately, this functionality is used by the List pick options and may cause unexpected behavior if you try to use it otherwise.

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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