Luu Khanh Minh Posted November 19, 2018 Share Posted November 19, 2018 I would like to refer to the BicycleAssembly Simio Simbit as I'm using it as a reference to set up my own model. As I set the Initialization step of my model, I read the Orders table row by row, using a global variable called CurrentRowNumber. However, when an order entity is created, I would like to keep track of the row in the Orders table that entity is created from with a model-entity level state variable. However, I'm not sure how to do. I cannot just assign the value of this ModelEntity.State = GlobalCurrentRowNumber as the GlobalCurrentRowNumber continuously changes as the simulation runs. May I have some suggestion as to how to do so? Thank you Link to comment Share on other sites More sharing options...
CWatson Posted November 19, 2018 Share Posted November 19, 2018 If the entity is created (similar to the Bicycle Assembly example in Simio) using an arrival table where the arrival time is specified in the table, the entity will automatically be assigned the associated row in that table. To assign a row reference to an entity without such logic, you would have to have the entity enter an add-on process when it is created and then use the SetRow step to assign the entity an associated row in a given table. The GlobalCurrentRowNumber you mention above could be used as the RowNumber assigned for the entity within the SetRow step, provided there were no conflicts with relational tables. 1 Link to comment Share on other sites More sharing options...
Luu Khanh Minh Posted November 22, 2018 Author Share Posted November 22, 2018 On 11/19/2018 at 9:41 PM, CWatson said: If the entity is created (similar to the Bicycle Assembly example in Simio) using an arrival table where the arrival time is specified in the table, the entity will automatically be assigned the associated row in that table. To assign a row reference to an entity without such logic, you would have to have the entity enter an add-on process when it is created and then use the SetRow step to assign the entity an associated row in a given table. The GlobalCurrentRowNumber you mention above could be used as the RowNumber assigned for the entity within the SetRow step, provided there were no conflicts with relational tables. Hi Watsons Thank you very much for your explanation. Mine is the case where I have to use the process SetRow to assign an entity to an associated row in a given table. However, I'm a bit confused about how to refer to the values of this associated row. For example, I assign an entity to row 1 in TableA, in which there are 3 columns. What I want to do is to get the value of col1,row1 in TableA from the model entity itself: so I'm looking for something like ModelEntity.col1 which gives the value of col1, row1 in tableA. Can such a thing be done in Simio? Thank you Link to comment Share on other sites More sharing options...
CWatson Posted January 22, 2019 Share Posted January 22, 2019 If the entity has a SetRow assigning the row to 1 in TableA, then toget to column1 (you already have a pointer to row1 via the SetRow assignment) - you would simply say TableA.ColumnName. Simio will know that it should use row1. Link to comment Share on other sites More sharing options...
Recommended Posts