question

Prasetya19 avatar image
0 Likes"
Prasetya19 asked Sebastián Cañas commented

How do I change process time on the processor based on product rework?

In my case, when an item is processed by the processor, the process time is determined based on the label (type 1 and type 2). But if the item undergoes rework, the process time will be different. Is it possible to implement it in flexsim?


For example, if item A has a process time of 2 hours and Item B has a process time of 3 hours, but if item A or item B undergoes rework, both items will be worked on for 1 hour.

FlexSim 24.0.3
process timeprocesorvalue by cases
· 1
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

Sebastián Cañas avatar image
0 Likes"
Sebastián Cañas answered Sebastián Cañas commented

@Prasetya19 ,

Yes, this logic is possible to implement in FlexSim. One solution is to set a label "Rework" to the item when they are created with a value 0. If they need rework you change the value of the label to 1.

In the Process Time field of the processor you can write a custom code like this:

  1. if (item.Type == 1 && item.Rework == 0){
  2. return 2; //Hours
  3. } else if (item.Type == 2 && item.Rework == 0){
  4. return 3; //Hours
  5. } else {
  6. return 1; //Hours
  7. }

This is assuming you are setting a label "Type" to the items to differentiate item A and B. Be also careful with the unit times. The else statement returns the process time for any type product that needs rework.

Hope this gives and idea.

· 4
5 |100000

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