Just looking for advice here, but was curious if anyone has ideas on what can cause the model reader to fail to load a model. (Assuming the path, model name and type are all correct)
Long story short, I've built a model for Syndromic Surveillance that uses excel as a dashboard/post processing application. Everything works fine on the development front (I.E., on machines that have VENSIM DSS installed) but I have run into issue distributing this to users who only have the model reader installed.
I've followed the instructions for creating a .VPA of the model that uses a .bat file to call the excel file. (this is necessary because the users want to be able to save their changes in the excel file rather than having the VPA overwrite the excel file every time its used) For the most part this works, but I've encountered intermittent failure to Load model errors, that I can't figure out the cause of.
Here are a couple of examples.
1) Model runs fine the first time, but then any subsequent runs the user gets the Load Model Error. If the user restarts the model reader, reloads the VPA they can then run the model again. But again after the first time they are unable to run it again.
2) Model runs fine on one computer but utilized on another computer (Using the same version of the Model reader) the model reader won't load the model. (Path and model name all correct)
3) This was a really weird one. At one point on a test machine neither a VPA (Like the one I described above), a VPA (With the excel sheet embedded so that it was overwritten each time) or even just a plain VPM would load into the model reader. I eventually shut the machine down and came back to it later, and suddenly everything was working again.
Overall I've been able to help users get the model going, but it's basically through a lot of flaying and blind luck. I would like to have a more structured process for addressing Model Reader load issues or ideally eliminate them altogether. However, given the seemingly infrequency at which they arrive I'm struggling to come up with an approach.
Has anybody experienced similar issues? How did you overcome them or what is the process you use? Is there something that can happen either before, during or after a model run that could cause the Model Reader to no longer accept the loading of a model through the .dll calls? Could an error in the excel file, not directly tied to the .dlls calls to the model, cause the model reader to no longer load a model?
Any help, advice or direction would be greatly appreciated.
Thanks.
-Chip
Model Reader Load Errors
-
- Super Administrator
- Posts: 4841
- Joined: Wed Mar 05, 2003 3:10 am
Re: Model Reader Load Errors
The only thing I can think of that might be an issue is the working directory in Excel. That is not often the same place where the workbook resides on disk (and most functions where I call Vensim, I usually call "ChDir Application.ActiveWorkbook.Path" before doing anything).
Could the model still be in SyntheSim mode when attempting to run a 2nd time?
If you can send me an example of something not working like this, I can take a look.
Could the model still be in SyntheSim mode when attempting to run a 2nd time?
If you can send me an example of something not working like this, I can take a look.
Advice to posters seeking help (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Units are important!
http://www.bbc.co.uk/news/magazine-27509559
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Units are important!
http://www.bbc.co.uk/news/magazine-27509559
Re: Model Reader Load Errors
Here you go.
The attached zip file contains a .vpa and the associated excel file from a previous iteration where I was experiencing one of the problems I mentioned.. For this particular iteration I was able to run the model once and then afterwards the model reader would fail to load the model. If I restart the model reader I can then run the model once again but not multiple times. There is an error in the graph generation, but that has nothing to do with the simulation.
Any insight would be appreciated.
Thanks.
-Chip
The attached zip file contains a .vpa and the associated excel file from a previous iteration where I was experiencing one of the problems I mentioned.. For this particular iteration I was able to run the model once and then afterwards the model reader would fail to load the model. If I restart the model reader I can then run the model once again but not multiple times. There is an error in the graph generation, but that has nothing to do with the simulation.
Any insight would be appreciated.
Thanks.
-Chip
- Attachments
-
- SyndromicSurvey 5-10-14 v1-0.zip
- (452.46 KiB) Downloaded 208 times
-
- Super Administrator
- Posts: 4841
- Joined: Wed Mar 05, 2003 3:10 am
Re: Model Reader Load Errors
I'll need step by step instructions on what to do with the Excel interface (it is not obvious to me what to do).
Advice to posters seeking help (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Units are important!
http://www.bbc.co.uk/news/magazine-27509559
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Units are important!
http://www.bbc.co.uk/news/magazine-27509559
Re: Model Reader Load Errors
My apologies.Administrator wrote:I'll need step by step instructions on what to do with the Excel interface (it is not obvious to me what to do).
1) Go to the Model Dashboard tab.
2) Enter in the path to the model in the Model Location cell (C6)
3) Enter in the name of the model in the Model Name cell (C7)
4) Press the run model button.
<Model Should run fine>
5) Try to run the model again.
<On my test machine it fails to load/find the model>
-
- Super Administrator
- Posts: 4841
- Joined: Wed Mar 05, 2003 3:10 am
Re: Model Reader Load Errors
It fails for me in SetupDashboard, the line "ActiveChart.Legend.Select" (error 1004, This object has no legend).
If I end the macro, I can then run it again without any problems.
If I end the macro, I can then run it again without any problems.
Advice to posters seeking help (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Units are important!
http://www.bbc.co.uk/news/magazine-27509559
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Units are important!
http://www.bbc.co.uk/news/magazine-27509559
Re: Model Reader Load Errors
Thanks for checking.
Unfortunately on my test machine when I end the macro and try to run it again I get a model load error. I'll check again later just to make sure.
Just out of curiosity is the machine you ran it on have other versions of VENSIM installed like the DSS or something? My test machine (Windows 7) only has the model reader on it and nothing else.
Like I said, it's not a consistant error so I'm just trying to narrow things down a bit.
Thanks.
Unfortunately on my test machine when I end the macro and try to run it again I get a model load error. I'll check again later just to make sure.
Just out of curiosity is the machine you ran it on have other versions of VENSIM installed like the DSS or something? My test machine (Windows 7) only has the model reader on it and nothing else.
Like I said, it's not a consistant error so I'm just trying to narrow things down a bit.
Thanks.
-
- Super Administrator
- Posts: 4841
- Joined: Wed Mar 05, 2003 3:10 am
Re: Model Reader Load Errors
The model load error, make sure the code is running in the correct location (call ChDir Application.ActiveWorkbook.Path before you attempt loading the model).
Advice to posters seeking help (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Units are important!
http://www.bbc.co.uk/news/magazine-27509559
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Units are important!
http://www.bbc.co.uk/news/magazine-27509559