question

Abdelillah AY avatar image
0 Likes"
Abdelillah AY asked Clair A commented

Program different work flow

Hello,

Fisrt, i want to thank you guys for helping my during my project.

I have a problem that is to model 3 different work flow with the same product and same machines; for exemple.

I have a product that has a probability to pass in 3 different process; Process "A" with 50% probability, Process "B" With 45% and Process "C" with 15% probabilité.

Now i have for exemple 2 machines and one source.

If the first product pass into process A. the processing time of machine 1 should be 100[T]; then it passes to a separator, it splits the product to 2 ...

An other product "in the same family" coming from the source if it has been picked to pass into process B. the processing time of machine 1 should be 50[T]; then it passes to separator it split the product to 3 ...

I hope you have got my point. thank you

FlexSim 18.2.2
process flowcodesimulationFloWorksc++ and user commands
· 2
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

Is your probability the frequency the product become to be part of process A, then maybe B, then maybe C and finally not a Process at all and get deleted?

Then I would use a dempirical statistical distribution. For each different probability I use a single dempirical global table - 1st column the probability in percent, 2nd column the logical answer true or false as 1or 0.

Depending on the logical true in a conditional decide I make the product to be an item of the process type A, B, C or nothing at all inside the OnCreation trigger of the source

  1. int itemAssigned = 1;
  2. item.labels.assert("Process","none");
  3. if(dempirical("globalTableProbabilityName",getstream(current) && itemAssigned)
  4. {
  5. item.Process = "A";
  6. itemAssigned = 0;
  7. // assign additional labels like outgoing port, process times and splitting value to more labels
  8. }
  9. // next conditional decide to choose if the item becomes a B process type

If you choose later to use the switch - case structure you should think of to assign numbers instead of characters or strings as label values.

Otherwise if the sum of all probabilities is 100 then you use a switch -case structure directly with a single dempirical global table. The statistical dempirical distribution returns 1,2 or 3 from the second column of the global table.

  1. switch(dempirical("globalTableDempircalName",getstream(current))
  2. {
  3. case 1:{
  4. // setting labels for process time, split value, ..
  5. break;}
  6. case 2:{
  7. // setting labels for process time, split value, ..
  8. break;}
  9. // and so on
  10. }

Then you can use the label values to send the item to different output ports, set the process time or split the item in separators.

5 |100000

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