question

Claudia P3 avatar image
0 Likes"
Claudia P3 asked Claudia P3 commented

How to wait for an event: Processor is available

Hi, I have a flow of material that need to be batched and wait until the processor is available before aquire the resource. When the processor will be available the resource is going to take the item flow and take it to the processor. But I can't do that with "wait for an event" because I don't find that option.

SimulacionPF.fsm

FlexSim 21.2.0
processflowprocessorwait for eventflexsim 21.2.0first available
simulacionpf.fsm (75.4 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

·
Felix Möhlmann avatar image
0 Likes"
Felix Möhlmann answered Claudia P3 commented

It would probably work best, if you added the processor(s) as a resource to the process flow as well and simply acquire it before the operator. Then release it again by listening for the "ProcessFinish" event in a wait for event activity.
Make sure to assign them to a different label on the token than the operators so you can properly release them.

· 3
5 |100000

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

Claudia P3 avatar image Claudia P3 commented ·

Thanks! that was really helpful. But I have another question, I created the processors (8 of them) as resoucers in the same group. But I have some products that can not be produced in some of them (processor 2 and 3), Is there a way to acquire the other resource than 2 and 3 if I create them with arrays?captura-de-pantalla-2021-08-23-103636.png

0 Likes 0 ·
Felix Möhlmann avatar image Felix Möhlmann Claudia P3 commented ·

You could use an array of values and reference the processor through the group index

Group("<GroupName>")[index]

but keeping the reference of the resource as the group itself is probably easier in the long run.

If there are only a few distinct cases of which processors are valid, you could send the tokens to different acquire activities based on their type. If you then give each processor a label with a unique value (for example just create a label "Num" and number them from 1 to 8) you can exclude certain processors by adding a query to the activity.

All acquire activities would link to the same resource.

1629730406088.png

In the example, the processors with Num = 2 and Num = 3 would not be a option.

Alternatively, if you have numerous different types, all requiring a different subset of the processors you could do the following:

Each processor gets an array label "ValidTypes" (arbitrary name) , that holds information about which types the processor can work on. For example [1, 0, 0, 1] would mean the processor can work on type 1 and type 4. (If your types are text values, you can map them to a numberwith the "Values By Case" option of the "Assign Labels" activity.) Assuming the type of items is stored in token.type, you would then use the query from the following screenshot.

1629731241438.png

Then, only a processor with the array value of the corresponding type set to 1 can be acquired. ("puller" is a reference to the token in the query)

AcquireByArray.fsm

0 Likes 0 ·
1629730406088.png (11.1 KiB)
1629731241438.png (11.2 KiB)
acquirebyarray.fsm (31.5 KiB)
Claudia P3 avatar image Claudia P3 Felix Möhlmann commented ·

Thanks Felix! I could do it with your answer..

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.