Search the Community
Showing results for tags 'data table'.
-
Hi there, is there a way to import data from excel into a string list so that i can create a large changeover matrix without having to individually enter each item. Following that, id there a way to populate a change over matrix from excel?
-
- changeover logic
- string list
-
(and 3 more)
Tagged with:
-
How do I access a table column by name using a table property defined for the model? In my model, I have multiple data tables each with the same named columns defined for each. Each table has a different number of rows. For a run or a set of replications, I want to select a table to use. I have defined a model-level table property named _SelectedTable to support this. During simulation runs, I want to access this selected table's data by row and column name. Specifically, I want to use this data to update model entity state variables. I also want to stop creating entities when all of the rows of the table have been accessed. I've tried two partial solutions to this problem (attached), but neither are ideal. 1. Create a large set of decide add-on processes to choose the decide the correct table and explicitly reference it by its name. This requires a lot of redundant steps and maintenance if tables are added or removed. The attached example contains just two tables. Controls OptionId and _SelectedTable must be set to either (Option1 and tableOption1) or (Option2 and tableOption2). The first control selects the Entity Type and the second selects the Table. 2. Using the column index number instead of the column name, I found I can use the table property to access the selected table. This method is prone to error if the table schema changes. It is also unclear which table properties, such as "AvailableRowCount" are accessible via this approach. The attached example contains two tables just as the previous. The control _SelectedTable chooses which table from which data is acccessed. In practice, the data tables will be substantially larger than the ones included in the attachments. Looking forward to constructive guidance, Ryan table_selection_by_name.spfx table_selection_by_column_number.spfx
-
I would like to reference state values associated with objects within a data table. For example, suppose I have a Data Table, call it Tab1, with an Object Reference column called Obj. The first entry in the object reference column is a resource called Res; thus, Tab1[1].Obj points to Res. How do I access the value of Res.CurrentCapacity using the table reference? To make this a little more complex, what if the state were a vector of integers? Thus, what I would like to reference would be something like Res.vector1[1].