question

Raja Sekaran avatar image
1 Like"
Raja Sekaran asked Raja Sekaran commented

How to control two types of task executers using traffic control?

In my model, I have used two different task executers (one is operator and another one is agv) will move the flowitems from Queue 1 to Queue 2 via Network nodes(1,2,3,4). I have attached the model for your reference.sample.fsm

The constraints are

Between NN2 to NN3,

1. Only two operators can travel at the same time

or

2.One operator and one agv can travel at the same time

or

3. If two agv's are waiting, Only one agv can travel between NN2 to NN3

How to achieve the above constraints using traffic controller?

Thanks in advance.

FlexSim 16.2.0
traffic control
sample.fsm (22.6 KiB)
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

Joerg Vogel avatar image
1 Like"
Joerg Vogel answered Raja Sekaran commented

You can control the access and behavior to the controlled network in the OnRequestEntry Triggers return values. They are coded into the defined Parameter

TC_ON_ENTRY_REQUEST_DEFAULT and TC_ON_ENTRY_REQUEST_ALLOW

Here you can find a code example.

More information can find here in the answers forum if you type the keyword trafficcontrollinfo in the search field.

· 5
5 |100000

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

Joerg Vogel avatar image Joerg Vogel commented ·

The source code in the above link contains the deprecated command "eq". This was the command to compare two value in an older Flexsim version.

0 Likes 0 ·
Raja Sekaran avatar image Raja Sekaran Joerg Vogel commented ·

Hi Jorg, Thanks for your reply. I have tried this coding in OnEntryRequest trigger but it still not working the way i wanted. Here i have attached the edited model for your reference. Kindly help me with this.traffic-control-custom-code-onentryrequest-trigger.fsm

1 Like 1 ·
Joerg Vogel avatar image Joerg Vogel Raja Sekaran commented ·

Sure, I attached the model:

Since you use the TC_ON_ENTRY_REQUEST_QUEUE parameter, you have to handle the queued members in the on Exit Trigger of the TrafficControl object. The function has to check which object leaves the controlled area and if the area is empty. Then the function grants the entry for the waiting members as you defined it.

2 Likes 2 ·
Show more comments