question

Kshitij Dhake avatar image
0 Likes"
Kshitij Dhake asked Jason Lightfoot commented

Different processing times for a single label

I have 3 different labels going in to a processor. All 3 labels have different processing time for which, I have used values by case. Can anyone help me on how to divide one of the label processing times further more into percentage?

FlexSim 22.2.0
procesor
· 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.

1 Answer

Felix Möhlmann avatar image
1 Like"
Felix Möhlmann answered Felix Möhlmann commented

As Jeanette mentioned, you have to edit the code that determines the process time. In the example below I assumed that the missing 20% would be processed for the currently used value of 350s.

  1. /**Custom Code*/
  2. Object current = ownerobject(c);
  3. Object item = param(1);
  4.  
  5. Variant value = item.Type;
  6.  
  7. double retValue = 1;
  8.  
  9. if (value == "one"){ retValue = 150;}
  10. if (value == "two"){ retValue = 100;}
  11. if (value == "three"){
  12.     double rand = uniform(0, 100, getstream(current));
  13.     if(rand < 50) {
  14.         retValue = 70;
  15.     }
  16.     else if(rand < 80) {
  17.         retValue = 160;
  18.     }
  19.     else {
  20.         retValue = 350;
  21.     }    
  22. }
  23.  
  24. return retValue;

processor-time_1.fsm


· 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.