Simio
  • row number

  • General Simio discussions. THIS IS *NOT* A GOOD PLACE FOR SUPPORT QUESTIONS.
    To limit spam this and all Public Forums have very limited ability to attach files. We recommend that support issues and more technical topics be initiated inside one of the Simio Insider (SI) forums below where you can attach your model and see example solutions. See above Welcome forum to join Simio Insiders.
General Simio discussions. THIS IS *NOT* A GOOD PLACE FOR SUPPORT QUESTIONS.
To limit spam this and all Public Forums have very limited ability to attach files. We recommend that support issues and more technical topics be initiated inside one of the Simio Insider (SI) forums below where you can attach your model and see example solutions. See above Welcome forum to join Simio Insiders.
 #7778  by msalemip
 Mon Sep 19, 2016 4:02 pm
Assume an entity is assigned to a table. So there is a row number associated to each entity from the table.
Using a process for the entity, how I can get reference to the row number of that entity in a table. I will create a new entity later and I want to assign the same row number to the new entity. I know I can do the later one with "setRow" step. But I do not know how to find the row number on the fist place.
 #7779  by ptkolodziejczyk
 Tue Sep 20, 2016 3:25 am
I am afraid you need to go around and create a state variable within the entity to hold the row number when you set the table row. Then, for a new entity you need just to use it for the SetRow step.
 #7783  by dsturrock
 Tue Sep 20, 2016 10:42 am
We are considering adding this feature, but full relational tables add some complexity to it.

One possibility is that when you copy an entity (for example using a Separator), by default it copies its states, including its table references, to the new entity.

Another possible work-around is to add an integer column to the table, perhaps called something like MyRow. When you populate the table, put a monotonically increasing number in each cell (e.g. row 1 gets a 1, row 2 gets a 2, ...).

Then at anytime you can reference MyTable.MyRow to get its current row number.
 #7791  by msalemip
 Wed Sep 21, 2016 4:07 pm
thanks. I defined a state variable and it worked.