Good afternoon,
I am new to Vensim PLE. Thanks a lot for sharing the software!
In a model I'd like to have a variable changed at a certain simulation time. However, " IF THEN ELSE (Time >15 , 1000 , 0 ) " for a normal auxiliary gets me a syntax error. My model runs from 0.0 to 100.0 months, time step = 1, Euler in Vensim PLE 10.3.1. Is the idea to use the internal time variable wrong, do I have to use a step or pulse function?
Time in function
-
- Junior Member
- Posts: 4
- Joined: Sat May 03, 2025 6:36 pm
- Vensim version: PLE
-
- Super Administrator
- Posts: 4832
- Joined: Wed Mar 05, 2003 3:10 am
Re: Time in function
That looks correct to me.
What is the syntax error?
What is the syntax error?
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
-
- Junior Member
- Posts: 4
- Joined: Sat May 03, 2025 6:36 pm
- Vensim version: PLE
Re: Time in function
Thanks for your quick response.
It says "The equation has a syntax error. Do you want to ignore this and close the editor?" in the Equation Editor.
It says "The equation has a syntax error. Do you want to ignore this and close the editor?" in the Equation Editor.
-
- Super Administrator
- Posts: 4832
- Joined: Wed Mar 05, 2003 3:10 am
Re: Time in function
Try adding time to the sketch using the shadow variable tool <V>. Then draw an arrow from time to your auxiliary. Does that fix things ?
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
-
- Super Administrator
- Posts: 4832
- Joined: Wed Mar 05, 2003 3:10 am
Re: Time in function
Also try the check syntax button in the editor.
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
-
- Junior Member
- Posts: 4
- Joined: Sat May 03, 2025 6:36 pm
- Vensim version: PLE
Re: Time in function
Yes, after adding Time as shadow varaible and re-entering in the equation editor by setting time from the list of available variables it works as I expect it to do.
Thank you very much for your quick help! I hope I can give support here, too, when I am more familar with Vensim.
Thank you very much for your quick help! I hope I can give support here, too, when I am more familar with Vensim.
-
- Junior Member
- Posts: 4
- Joined: Sat May 03, 2025 6:36 pm
- Vensim version: PLE
Re: Time in function
Just one more:
In the model version without time as shadow something is starnge:
- If I use the legacy Eqution Editor and do a "Check Syntax" or "Check Model" no Error is reported.
If I do a "Check Equation" in the new Equation Editor oz says "Syntax apperas OK, but the equation has unused inputs or variables that are not an input"
However, If I want to close the new Equation editor the syntax error message appears.
Whatever causes this behaviour... I just work around by unsing the shadow variable Time and everthing is fine.
In the model version without time as shadow something is starnge:
- If I use the legacy Eqution Editor and do a "Check Syntax" or "Check Model" no Error is reported.
If I do a "Check Equation" in the new Equation Editor oz says "Syntax apperas OK, but the equation has unused inputs or variables that are not an input"
However, If I want to close the new Equation editor the syntax error message appears.
Whatever causes this behaviour... I just work around by unsing the shadow variable Time and everthing is fine.