Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 04/29/2020 in all areas

  1. I have attached a simple example of one approach. 1) I edited the ModelEntity object and added a state array of type MatrixFromTable. This type of array is automatically initialized from a table. Ideally I might have also added a table to the entity, but Simio doesn't work that way. Instead, I added a RepeatGroup named InitializationValues consisting of a Real property. I used this repeat group as a way to essentially add a "table" into the object, since internal to Simio there is almost no difference between a table and a repeat group. 2) Back in the model I added a table and then imported data into that table from Excel. I used 10 rows, but I could have imported 350 rows with no change to anything else. 3) Now when you place the ModelEntity object into a model, you can pass a table into the InitializationValues repeat group. Again, intead of just typing a bunch of values into the repeat group, I just say go get the whole repeat group from a specified table. This has the result of sizing that state array inside the model entity to match the current size of the table, and then initializing the state values to whatever is in the table. 4) If you run the model, you can open the Watch window on any entity and view the values of its states. I expect this won't solve all your problems, but maybe it will give you a fresh approach to consider. ImportStateValues.spfx ImportStateValues.xlsx
    1 point
×
×
  • Create New...