question

Justyne K avatar image
0 Likes"
Justyne K asked Joerg Vogel commented

how I can write the output of 10 queues/processors in the end of each scenario

May I know how I can write the output of 10 queues/processors in the end of each scenario(total 80 replications) with 80 different timing to one Global Table? I tried using the End Of Replication trigger under Advanced in experimenter to record the result for all 80 scenarios. however, the results will only appear in one column. Is it possible to have columns representing results of processor 1 to processor 10 and the rows representing the results of each processor?

FlexSim (other)
FlexSim (other - please specify)
global 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

·
Joerg Vogel avatar image
0 Likes"
Joerg Vogel answered Joerg Vogel commented

You have a table. This table has got two dimensions row and column. The row is the replication. The column is the scenario. And now how do you get the next dimensions for the 10 processors to fit into the 2 used dimensions. I can think of creating tables for each replication or each scenario. Or you try to build a table inside the replication/scenario result table cell to place the results there.

You can start with a global table. Then you open the tree.

Model / tools / global tables / your global table > variables / data / Row1 / Col1

"Model to Col1" is the tree path to the node where you can add a table by the command settablesize(table, number of rows, number of columns)

table is the reference to the node of Col1.

Then you can start to set new tables at those column nodes dynamically in the End of replication trigger and test your code if it still works with the picklist option together. But test this with a small set.

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

Joerg Vogel avatar image Joerg Vogel commented ·

You can't see your added table in the global tables. The tables' reference is the column node. You have to use this node as the reference parsed into the commands to set or get values of the table. Or you have to explore the node as a table from the tree window.

0 Likes 0 ·
Joerg Vogel avatar image Joerg Vogel commented ·

An alternative is to multiply the row for the replication by 10 and fill the results of each processor in the gap of this enhanced result table. You find the results of Processor 1 in the row x1, of Processor 2 in the row x2 and so on. "x" stands for the number of the replication.

0 Likes 0 ·
Joerg Vogel avatar image Joerg Vogel commented ·

Here is a test code which does what I describe above. You have to set two standard global tables to see the result.

Table table1 = reftable("GlobalTable1");// 4 Rows 4 Columns filled with 0
Table table2 = reftable("GlobalTable2");// 2 Rows 2 Columns filled with 1 
table2.cloneTo(table1.cell(3,3));
// You find the table2 in the cell 3,3 of table 1

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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