neto7912 Posted April 3, 2015 Share Posted April 3, 2015 Hello, I'm using a time-indexed table in a model I'm working on, but it's not working as intended. I created a testing model to test the time-indexed referencing and it's not working either. In the testing model, I have a simple SOURCE-SERVER-SINK model to test the Time-Indexed referencing. The way I was going to do that was by giving the capacity of the server values of 1 and 0 depending on the simulation time. This way I could see that every 1 minute periods, the server would allow passing (when capacity is 1) and disallow passing (when capacity is 0). Below, in Pic1 you can see 3 things: 1) property I created on the "Initial Capacity" cell of the server, 2) simulation time starting on 4/6/2015 at 12 am, and 3) status label "Table2.TimeIndexedRow" which should return the right row it's gonna be using depending on the simulation time. Now, on Pic2, I attached a picture of my Table2, which is Time-Indexed. In this one, you can see two things: 1) Table set to time-indexed with a starting date of 4/6/2015 at 12 am (which matches the start of the simulation run) and an interval size of 1 minutes (which means that every 1 minute the table would look at the next row), and 2) Values for the property column "capacity", changing from 1 to 0 as explained before. Now, when I run this model, if the model was working correctly, the server's capacity should be 1 from 12:00 to 12:01, and changed its capacity to 0 (disallowing passing) from 12:01 to 12:02 [and then continue doing so based on the values for the column "Capacity"]. However, what happens is that the capacity is just using the 1st row value (value of 1) and using it indefinitely - even though the status label I mentioned before for Table2.TimeIndexedRow is updating to 1,2,3,4... as intended. I would really appreciate the help to solve this and answer any questions about the way I constructed this. Thanks! Link to comment Share on other sites More sharing options...
dsturrock Posted April 5, 2015 Share Posted April 5, 2015 The property that you are attempting to change is Initial Capacity. For ANY property starting with the word Initial, that means the property is looked at exactly once - when the model is initialized. So what ever value you put in there, it will only be used to initialize the server capacity. The best way to do what you want is to use a schedule for the capacity changes, not a time-indexed table. But if you do want to use a Time-indexed table, then you will probably want to take advantage of the On Interval Process option to specify a process when you will Assign the value of Server1.CurrentCapacity each time the active table row is changed. Link to comment Share on other sites More sharing options...
Recommended Posts