How to know the output port number

How to know the output port number

athodupunoori
Participant Participant
9 Views
3 Replies
Message 1 of 4

How to know the output port number

athodupunoori
Participant
Participant

[ FlexSim 21.1.5 ]

In my project i would like to send the flow item to random ports. but i would like to know the port number where the flow item is going to.


Here i have a source as shown in picture below, with centerport connection to dispatcher which is connected to two forklifts. these forklift are used to transport material from source to queues.


here i would just like to know, which queue is getting the material now using custom code. the out can be as a integer or a object name.


1688591054322.png

0 Likes
Accepted solutions (1)
10 Views
3 Replies
Replies (3)
Message 2 of 4

natalie_white
Not applicable

Hi @Ankith T,

To receive a more accurate solution, please post your model or a sample model that demonstrates your question.

Proprietary models can be posted as a private question visible only to FlexSim U.S. support staff. You can also contact your local FlexSim distributor for phone or email help.

Do you want the port number to be printed to the console?

0 Likes
Message 3 of 4

athodupunoori
Participant
Participant

Thanks for the information. i would like to store the port number in global table.

0 Likes
Message 4 of 4

natalie_white
Not applicable
Accepted solution

You can do this by setting a trigger on your source that will set a label upon exit. The value of this label will be the port. Then, you can use a custom code activity to write the value of the label to your global table. An example is attached.

OutputPort.fsm

0 Likes