question

Jiawei D avatar image
0 Likes"
Jiawei D asked Regan Blackett answered

How to use a source to control another source

Hi, I have two sources, A and B. I would like to use source A to control the output of source B in a way that every time source A generates one part then source B can generate one. And source A is controlled by a interval time.

Is there a way to create such flow? Thanks!

FlexSim 17.2.5
source sequence
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

Regan Blackett avatar image
0 Likes"
Regan Blackett answered

You've got two options to do this.

Two Source Objects, Opening and Closing Ports

Like your description says you can have two Sources, one with your desired interval time, and a second with an Inte-rarrival time of zero (this means that the source can create new flowitems with no delay between creation events).

Set SourceB to during the OnReset and Exit triggers it closes output ports. On SourceA's OnExit Trigger tell it open the outputs of Source B.


Process Flow

The Alternative option is to use a short set of Process Flow activities.

Create a General Process flow window, and use an Event Triggered Source activity to listen to the OnExit event of Source A. Then use a Create Object activity to create a flowitem into an Object like a Queue to represent where SourceB's flowitem starts its process. Then put in a Sink activity to end the Process Flow.

Both would give the same results, in my opinion the Process Flow option is a little more direct and easy.

Sere this example: create-flowitem-in-response-to-creation-event.fsm


5 |100000

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