question

Ruben M4 avatar image
0 Likes"
Ruben M4 asked Ruben M4 commented

Create a Global table automatically, containing some specific token label values

Hello everybody,

I'm a noob in FlexSim and I don't have much time to improve my FlexSim skills, so I'd like to ask for your help if it's not too much trouble:

Specifically, I would like to automatically create a global table where the column headers would be the name of some specific token labels that I could choose beforehand, and the rows the value of these labels for each token. I would like to create each table entry for all tokens that pass through a particular point in the process flow. I think it is possible to create it using custome code, but I don't really know the flexsim programming language.

I am adding a schematic to explain it graphically:
screenshot-3.pngThank you very much in advance.

FlexSim 21.2.2
global tableprogrammingcreating global table with custome code
screenshot-3.png (167.8 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 Ruben M4 commented

There is a pre-made option for this in the custom code activity.

1634057180153.png

1634057393830.png

This will add a new row to the table named at the top and paste in the values in the order that the fields appear (First field -> first column, second field -> second column, ...)

You will probably want to choose "Delete All Rows" in the reset option of the global table to start with an empty table each run (the headers will remain).

1634057283974.png


1634057180153.png (17.2 KiB)
1634057283974.png (5.2 KiB)
1634057393830.png (14.0 KiB)
· 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.

Ruben M4 avatar image Ruben M4 commented ·

ok, thank you so much!

Could I asked you another question?

Now I'm extracting data of times with the command 'Model.time' with which I obtained the number of time until that moment. But is there any command to obtain a date instead a number of minutes or hours (depending of the configuration) , automatically?

0 Likes 0 ·
Felix Möhlmann avatar image Felix Möhlmann Ruben M4 commented ·
Model.dateTime.toString()

returns a string (text) containing the date and time of day.

0 Likes 0 ·