Is it possible to have a table inside the token, so that I can assign the responsiblities inside the token itself
Thanks in Advance
Yes, you can assign a Table as a label to the token. There are actually mutliple ways of how a table can stored in FlexSim.
Ba default a global table stores each cell value as an invididual node in the tree. The rows are subnodes of the 'table node' and the columns are subnodes of the rows and hold the values.
After you have created a label on the token, you can cast the label node as a table and start to add columns and rows to it. To access the label node, rather than the value stored in it use this syntax:
Table table = token.labels["labelName"]; //Example code table.addCol(); table.setSize(3,3); table[1][3] = 5;
A table can also be stored as the value of a single node, as a Bundle. After creating a label, you set its data type to bundle. Then you can cast it as a table and add/read values as above.
There are also special commands to edit/access bundle nodes. (Type 'bundle' into the command helper search and you will see them). Accessing the bundle is faster than the node table in general and using those commands again provides a significant increase in speed. If you access the table very often, using a bundle would be advisable.
The third way to represent a table is as a 2-dimensional Array. (A classic table would be 2-dimensional (rows and columsn) though if it's useful to you there is nothing stopping you from using higher dimensions as well.)
The attached model contains an example for all three types. The data written to the table is taken from GlobalTable1 in all cases.
You might also want to consider a Map type which is similar to an array but keyed off something you choose: a string, object, number, array etc.. The upsides are simplicity, power and speed - the downside is they are not as easy to visualize/depict in a view.
14 People are following this question.
FlexSim can help you understand and improve any system or process. Transform your existing data into accurate predictions.
FlexSim is a fully 3D simulation software environment. FlexSim can be used to simulate any process in any industry.
FlexSim®, FlexSim Healthcare™, Problem Solved.®, the FlexSim logo, the FlexSim X-mark, and the FlexSim Healthcare logo with stylized Caduceus mark are trademarks of FlexSim Software Products, Inc. All rights reserved.
Privacy | Do not sell or share my personal information | Cookie preferences | Report noncompliance | Terms of use | Legal | © Autodesk Inc. All rights reserved