"Not able to analyze model" in status bar: can't switch model views

Use this forum to post Vensim related questions.
Post Reply
pbreach
Member
Posts: 29
Joined: Mon Oct 26, 2015 5:23 pm
Vensim version: DSS

"Not able to analyze model" in status bar: can't switch model views

Post by pbreach »

I'm trying to open a model (created in 2011 if that helps) and the first thing that comes up is the text inside the mdl. So I go to View->As Sketch and then I get a dialog that pops up with "Syntax Error." which points to this statement:
vensimOutput=
WRITE(Tau1,Tau2,Tau3,b1 0,b2,b3,Pfz1,Pfz2,Pfz3,PR1,PR2,PR3,Rz1,Rz2, Rz3, alpha, beta 0\
, gamma, rho 0, theta,
At,OMt,L,a4,a5,b4
,mu1,mu2,kappa3, eta el,eta h,om,Ael,Ah,K 0,k1 0,k2 0,k3 0,k4 0,k5,writetime)
~
~ |
I removed the statement (wasn't sure what was wrong with the syntax) then tried "View->As Sketch" again, which now works and I can see the stock and flow diagram. There are multiple views to the model, but in the status bar where I go to switch the views all it says is "Not able to analyze model". I checked View->Reorder and it shows that there are other model views there.

Where should I start to resolve the "Not able to analyze model" error? Could it be because of the section I removed from the .mdl file? What was wrong with the syntax in the quoted section?
tomfid
Administrator
Posts: 3994
Joined: Wed May 24, 2006 4:54 am

Re: "Not able to analyze model" in status bar: can't switch model views

Post by tomfid »

It looks like you're using an external function - check that you have the proper library specified in Tools>Options>Startup.
pbreach
Member
Posts: 29
Joined: Mon Oct 26, 2015 5:23 pm
Vensim version: DSS

Re: "Not able to analyze model" in status bar: can't switch model views

Post by pbreach »

Good catch. I didn't realize the model was using external functions until now. I think the DLL containing the external functions was put together with files from an older version of Vensim. Does that mean it will need to be recompiled?

Thanks for the prompt reply.
tomfid
Administrator
Posts: 3994
Joined: Wed May 24, 2006 4:54 am

Re: "Not able to analyze model" in status bar: can't switch model views

Post by tomfid »

Normally, no - the headers rarely change. However, there have been a few changes, so if your library is old enough, it would need recompiling. You should get a warning about it at startup.
pbreach
Member
Posts: 29
Joined: Mon Oct 26, 2015 5:23 pm
Vensim version: DSS

Re: "Not able to analyze model" in status bar: can't switch model views

Post by pbreach »

So it turns out the external function library is using some other proprietary libraries that I can't get my hands on. Even if I did want to try and re-compile it is not an option. All I want to do is be able to see the model sketch! I'm planning on re-implementing the part that is used in the external library anyways as it can actually be done entirely in Vensim.

Is there any other way I can see the model sketch without loading the external library??
pbreach
Member
Posts: 29
Joined: Mon Oct 26, 2015 5:23 pm
Vensim version: DSS

Re: "Not able to analyze model" in status bar: can't switch model views

Post by pbreach »

I forget to mention that it does seem it would need to be re-compiled. I tried specifying dll in Tools->Options->Startup->External function library but it says "The external functions in ... cannot be loaded. Do you want to try again next time?". Clicked "Yes", Vensim restarts and then when I go to View->As Sketch I still get "Syntax Error".

Did this in both single and double precision versions just in case and got the same result.
Administrator
Super Administrator
Posts: 4838
Joined: Wed Mar 05, 2003 3:10 am

Re: "Not able to analyze model" in status bar: can't switch model views

Post by Administrator »

Change
vensimOutput=
WRITE(Tau1,Tau2,Tau3,b1 0,b2,b3,Pfz1,Pfz2,Pfz3,PR1,PR2,PR3,Rz1,Rz2, Rz3, alpha, beta 0\
, gamma, rho 0, theta,
At,OMt,L,a4,a5,b4
,mu1,mu2,kappa3, eta el,eta h,om,Ael,Ah,K 0,k1 0,k2 0,k3 0,k4 0,k5,writetime)

to
vensimOutput=0
or
Tau1+Tau2+Tau3+b1 0+... +k5+writetime

Then click view->As sketch.

The first option is easier and quicker, but you will loose the connections from Tau1, tau2 etc into "vensimoutput". The 2nd way will preserve these links, but obviously the result will not be correct. "WRITE" suggests it's writing to a file, so option 1 might be ok.
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
pbreach
Member
Posts: 29
Joined: Mon Oct 26, 2015 5:23 pm
Vensim version: DSS

Re: "Not able to analyze model" in status bar: can't switch model views

Post by pbreach »

I tried both option 1 and 2 and have the same error as in the original post, "Not able to analyze model" in the status bar. Is there any other alternative?
pbreach
Member
Posts: 29
Joined: Mon Oct 26, 2015 5:23 pm
Vensim version: DSS

Re: "Not able to analyze model" in status bar: can't switch model views

Post by pbreach »

Actually, somehow it's working now! I think I just had to restart Vensim another time manually. Thanks for all the help!
Post Reply