Dear Kenil,
The issue is that the variables are not being saved to the database, so they are only available while the model run is loaded into memory. This is due to a missing context file which would specify which variables to save.
More specifically. When a run is started it’s loaded into memory. All variables are available for the page to display. After a certain amount of idle time (typically 30 minutes, but this is configurable), the run will leave memory and the variables will not be available.
However, if the variables are listed in the context file (*.ctx2) with the save property, then they are saved into the database. Not all variables are saved, just the ones listed. Those variables are available to the user or facilitator even when the run isn’t loaded. The benefit of this is that many runs can be displayed simultaneously in the facilitator page with a set of summary variables without having to load all the runs into memory (which takes time and has limits).
If you build the sim with the interface builder, this context file is created automatically.
Otherwise, you can create your own file. The file must have the same name as Vensim with a different extension. If your Vensim file is “model.vmfx”, name the context file “model.ctx2”.
{
"variables": {
"Step": {
"save": true
},
"Time": {
"save": true
},
"Profit": {
"save": true
},
"Revenue": {
"save": true
}
}
}