Jump to content

Using Time-Indexed Tables for row referencing


neto7912
 Share

Recommended Posts

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.

 

Pic1.thumb.jpg.0914a432c277606f83ee61b216b73d85.jpg

 

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.

 

Pic2.thumb.jpg.087a5d3cc7ead27a459890b50b846fa3.jpg

 

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! :D

Link to comment
Share on other sites

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

×
×
  • Create New...