question

Yash Patel avatar image
0 Likes"
Yash Patel asked Felix Möhlmann commented

how to access and manipulating arrival table with process flow?

Is it possible for me to look up the value in the arrival table which have not yet triggered and swap them with the current trigger based on model condition. for example below is the original arrival table.


Time Name Quantity Label

1 Part 1 X

2 Part 1 Y

3 Part 1 Y

4 Part 1 Z

5 Part 1 X

6 Part 1 Y

7 Part 1 Z


lets say now at time 4 when part Z is supposed to be created, target batch size is 3 I want part Y which was to be generated at time 6 to be generated now and same will be swapped with part Z which will now be generated at time 6. and this swap should only happen if there is availably to of part in future like


Time Name Quantity Label

1 Part 1 X

2 Part 1 Y

3 Part 1 Y

4 Part 1 Y

5 Part 1 X

6 Part 1 Z

7 Part 1 Z


which function can I use to access the arrival table and change / swap

FlexSim 24.2.2
processs flowarrival table
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 Felix Möhlmann commented

The schedule table is stored in the activity's attribute tree. Once you cast it as a table you can read and write to it just like a global table.

  1. Table schedule = Model.find("Tools/ProcessFlow/ProcessFlow/Source>variables/arrivals");
  2. schedule[2][4] = 8;

Though I would suggest to simply not have predetermined labels in the source at all. Keep a list of yet to be produced parts somewhere (for example in a global variable array). Then, whenever a token is generated it dynamically checks which part is "best" to be produced now. That way you don't need to worry about finding the next schedule row that has not triggered, swapping entries to a different row and resetting the table to its original state on model reset.

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