JaimeSotomayor94 Posted April 2, 2019 Posted April 2, 2019 In the attached model, I want to transfer entities to stations depending on some criteria defined in a table. I have 2 types of entities, "A" and "B", defined in a table as primary keys. Also I have 2 states, "Good" or "Bad", also in a table as primary key. Finally I have 3 stations. I have a table that has 3 columns, “Entity_Type”, “Quality_Type” and “Station”. For example a row could be "A"; "Good"; "Station 1". It is possible for entity "A" with "Good" quality to end up in either "Station 1" or "Station 2", and in that case I want to randomly select one. The problem is that I cannot use a RandomRow based in more than one criteria. Either I use RandomRow for the rows of the table that are type "A" or quality "Good", but I am not finding a way to do more than one combination. This model is a simplification of the real model which is more complex and has hundreds of combinations. Model_RandomRow_FilteredTable.spfx
dsturrock Posted April 5, 2019 Posted April 5, 2019 To start with, Destinations in Simio are always nodes. So the table should have a column of type Object Reference Property > Node. Although its not on the pull-down list, when you specify a entity destination as Select From List, you can also specify a table column of type node list and it will automatically respect the table rows associated with that entity. Model_RandomRow_FilteredTable.spfx
JaimeSotomayor94 Posted April 5, 2019 Author Posted April 5, 2019 (edited) Thanks for the response. I will use nodes instead of stations. But your solution doesn´t cover my problem completely. That list where you are picking nodes randomly is only filtering for types of entity A or B. I want also to take into account other columns, like the quality one. The problem is when you know that your entity is of type A and good, then is when I would like to select randomly only one of the possible destinations. Edited April 5, 2019 by JaimeSotomayor94
JaimeSotomayor94 Posted April 9, 2019 Author Posted April 9, 2019 And also, not only do I want to select one randomly, but taking into account one column that would have the weight. For example, 80% of "Type A" that are "Good" goes to "Server_1" and 20% to Server_2. Basically use RandomRow to a table filtering for more than 1 foreign key 1
Alberto Lacort Posted February 28, 2022 Posted February 28, 2022 @JaimeSotomayor94 did you solve your problem? I will be interested how did you finally model it. Thank you in advance
SampsDB Posted February 23 Posted February 23 Did you ever find a solution on using .randomrow to pick a location from weight?
Recommended Posts