question

Cindy Azuero avatar image
0 Likes"
Cindy Azuero asked Phil BoBo commented

How to write on a table with replications?

Inside a replication I am writing some numbers to a table. I need that these numbers area written on the table for each replication without erasing the table. Something like:

Replication Value
1 5.1
1 6
2 4
2 3.2

The problem is that when I run the model from the experimenter it is not writing anything on the table. It only writes on it when I run the model without the experimenter. Also I cannot use the experimenter triggers, because I need the values to be written after some particular events happen.

FlexSim 16.2.1
global tableexperimenter
· 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.

Joerg Vogel avatar image Joerg Vogel commented ·

@Cindy Azuero you get into another problem, when your computer has got multiple cores and hyper threading. Then the replications and scenarios aren't anymore linear. A later scenario might finish before an older one has got the last replication has been done. The table values shouldn't have any dependencies to other replications nor scenarios.

1 Like 1 ·

1 Answer

Ben Wilson avatar image
1 Like"
Ben Wilson answered Ben Wilson commented

If you can't wait for the End of Replication trigger, you may consider instead writing to an external file. Your replications could append new lines to a comma separated text file. On each line you can include the scenario number, replication number, then the other data you are interested in.

The comma-separated-values text file could then be imported into Excel or FlexSim for whatever use you require.

Please check out this answer for an example experimenter model with replications that write to a file, including scenario and replication numbers.

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

Phil BoBo avatar image Phil BoBo ♦♦ commented ·

Here is another answer that explains a way that you can aggregate information from multiple replications into one table on the main FlexSim process.

Here is another similar solution.

1 Like 1 ·
Cindy Azuero avatar image Cindy Azuero commented ·
@Ben Wilson

that works perfect for what I need.

and @phil.bobo thank you very much i've already seen this example but that wasn't exactly what I need. But this one was exactly what I was asking for.

0 Likes 0 ·