HEAVISIDE

Use this forum to post Vensim related questions.
Post Reply
Hoorsana
Junior Member
Posts: 3
Joined: Sun Jul 03, 2016 8:18 pm
Vensim version: PLE

HEAVISIDE

Post by Hoorsana »

Hi, I just started using vensim ple and I need to model a kind of behaviour that changes over time, but this change is not gradual and is exactly similiar to changes in heaviside function, how ever all the vensim functions I tried to use like step, pulse or if then else, give a gradual change with a slope not equal to infinity, is there a function exactly like heaviside that jumps to a new amount without slowly changing into it?
tomfid
Administrator
Posts: 3811
Joined: Wed May 24, 2006 4:54 am

Re: HEAVISIDE

Post by tomfid »

STEP, PULSE etc. do create discrete responses. You may be getting the impression of a slope from plots that show a change happening over a TIME STEP, which is finite. The connecting line in these cases is a little misleading, because nothing is really defined between time steps.

What are you seeing that doesn't seem right?
Hoorsana
Junior Member
Posts: 3
Joined: Sun Jul 03, 2016 8:18 pm
Vensim version: PLE

Re: HEAVISIDE

Post by Hoorsana »

Thank you so much for answering, Ive attached one the graphs im getting from using if then else function, As you can see the graph seems to indicate that the output is "1" between months 0 to 2 and 4 to 6 and so on, but it isnt exactly "2" between months 2 to 4, I want the counter to exactly show me 2 numbers, either 1 or 2 and nothing in between, Am I doing something wrong in writing my equations? Or there is no way vensim gives a graph that looks like heaviside
Attachments
image.jpeg
image.jpeg (38.96 KiB) Viewed 2706 times
Hoorsana
Junior Member
Posts: 3
Joined: Sun Jul 03, 2016 8:18 pm
Vensim version: PLE

Re: HEAVISIDE

Post by Hoorsana »

This is the euqation I wrote, but trying STEP and pulse and etc didnt change the result of the graph either
Attachments
image.jpeg
image.jpeg (974.77 KiB) Viewed 2706 times
Administrator
Super Administrator
Posts: 4590
Joined: Wed Mar 05, 2003 3:10 am

Re: HEAVISIDE

Post by Administrator »

Can you upload the model? It's difficult to advise you based on screenshots.
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
tomfid
Administrator
Posts: 3811
Joined: Wed May 24, 2006 4:54 am

Re: HEAVISIDE

Post by tomfid »

It's hard to read your graph, but I think you should take a look at the output with the Table tool. I think you'll find that 1 and 2 are the only values, and the sloped lines are just an illusion from the linear interpolation on the graph.
Post Reply