Can't view model as sketch
Can't view model as sketch
Strangly, when I open my model it goes straight to the equation viewer. When I try to view->as sketch, it says 'syntax error.' When I try running the model it also says 'syntax error,' but won't let me correct the error. I'm not sure what is wrong with my model. It was functioning without error when last I saved it.
- Attachments
-
- working_model_nov18_PC.mdl
- (667.24 KiB) Downloaded 1136 times
-
- Super Administrator
- Posts: 4827
- Joined: Wed Mar 05, 2003 3:10 am
Re: Can't view model as sketch
Will the attached open ok?
- Attachments
-
- working_model_nov18_PC MODIFIED.mdl
- (667.88 KiB) Downloaded 939 times
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: Can't view model as sketch
Yes, I it works now. Thank you
Re: Can't view model as sketch
In the text editor, Vensim actually puts the cursor at the location of the error, which is:
Notice that the MAX expression starts right after the ~~|, without specifying a variable on the left hand side.
Code: Select all
"23 to ENV 133 0"=A FUNCTION OF("23 to ENV 133 0","214 Major 640 Excess","214 to BRID 1"\
,"214 to BRID2","214 to McGregor Out",Time) ~~|
MAX(0,MIN("214 Major 640 Excess",MIN(McGregor Available+Outsim div 426(Time)+BRID Irrig Dem\
-MAX("23 to Irrig336&338"+"23 to irrig 339"
,BRID flow 2),MIN(MAX(0,ENV 133 dem(Time)-(BRID flow 2-BRID Flow 1)),max div 420(Time\
)-"214 to BRID 1"-"214 to BRID2"-"214 to McGregor Out"
))))
~
~ |
/*
Advice to posters (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Blog: http://blog.metasd.com
Model library: http://models.metasd.com
Bookmarks: http://delicious.com/tomfid/SystemDynamics
*/
Advice to posters (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Blog: http://blog.metasd.com
Model library: http://models.metasd.com
Bookmarks: http://delicious.com/tomfid/SystemDynamics
*/
Re: Can't view model as sketch
I am experiencing the same problem. My model is qualitative, so I have no equations. Any way to deal with this?
- Attachments
-
- Ethiopia Hiruy 2015_06_08 simplified 1.mdl
- (175.76 KiB) Downloaded 1068 times
-
- Super Administrator
- Posts: 4827
- Joined: Wed Mar 05, 2003 3:10 am
Re: Can't view model as sketch
In text view, replace
with
And then click View->As Sketch.
Code: Select all
Ability to protect farming land=
~
~ FH01-095; FH01-097; FH01-099; FH01-105 (Ability to protect harvest); \
FH01-030 (Ability to protect farming land)
|
Code: Select all
Ability to protect farming land=A FUNCTION OF()~~|
Ability to protect farming land=
~
~ FH01-095; FH01-097; FH01-099; FH01-105 (Ability to protect harvest); \
FH01-030 (Ability to protect farming land)
|
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: Can't view model as sketch
Thanks a lot! it works perfectly now!
Re: Can't view model as sketch
Hi Aurora
Just a question. What do you expect from this model?
The model is so complex that if you select le level fariming land and click on the loops tool Vensim is not able to find the number of loops and apparently crashes.
Regards.
JJ
Just a question. What do you expect from this model?
The model is so complex that if you select le level fariming land and click on the loops tool Vensim is not able to find the number of loops and apparently crashes.
Regards.
JJ
Re: Can't view model as sketch
Hello,
I have the same problem. When I click 'view as sketch' nothing happen, the model stays in text mode.
It first openned the file in this mode, I didn't go to text mode by myself, don't know if it helps.
I have the same problem. When I click 'view as sketch' nothing happen, the model stays in text mode.
It first openned the file in this mode, I didn't go to text mode by myself, don't know if it helps.
Re: Can't view model as sketch
This means there are syntax errors in the equations. Use Check Model <ctl><T> to see the error window.
/*
Advice to posters (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Blog: http://blog.metasd.com
Model library: http://models.metasd.com
Bookmarks: http://delicious.com/tomfid/SystemDynamics
*/
Advice to posters (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Blog: http://blog.metasd.com
Model library: http://models.metasd.com
Bookmarks: http://delicious.com/tomfid/SystemDynamics
*/
Re: Can't view model as sketch
The error window gives a syntax error (missing equation) for the last line:
initial pmr[Country] = A FUNCTION OF( ) ~~|
initial pmr[Country]=
~
~ |
Even if I give a value after the = sign the problem persists.
I didn't modify anything in the code by myself, it just openned this way.
initial pmr[Country] = A FUNCTION OF( ) ~~|
initial pmr[Country]=
~
~ |
Even if I give a value after the = sign the problem persists.
I didn't modify anything in the code by myself, it just openned this way.
-
- Super Administrator
- Posts: 4827
- Joined: Wed Mar 05, 2003 3:10 am
Re: Can't view model as sketch
Try changing this to the following and see if it now opens.
Code: Select all
initial pmr[Country]=0
~
~ |
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: Can't view model as sketch
Yes I solved the problem by removing the right hand side of the equation each time. Any idea of what happenned ?
Thank you
Thank you
Re: Can't view model as sketch
Hello,
I have a similar problem, yesterday I worked on my model saved it and closed the applications. Today when I try to open it only opens as text and I can't switch to the sketch view. I checked the model with model check and it seems to be ok. Do you have any Ideas on how to fix this issue? I can attach the model if needed.
Kind Regards
Ole
I have a similar problem, yesterday I worked on my model saved it and closed the applications. Today when I try to open it only opens as text and I can't switch to the sketch view. I checked the model with model check and it seems to be ok. Do you have any Ideas on how to fix this issue? I can attach the model if needed.
Kind Regards
Ole