PULSE function

Use this forum to post Vensim related questions.
Post Reply
JPersico
Junior Member
Posts: 4
Joined: Thu Oct 09, 2003 3:50 pm

PULSE function

Post by JPersico »

I have been trying to use the PULSE built-in function in order to cause a specific inflow into a "quality" stock. The problem I am having is that I don't have a specific time at which I want this pulse to occur; I want the pulse to happen when another event in the model occurs (a switch turns on), so that the pulse responds to what is happening in another part of the model. I set up the equation like this:

PULSE(TDS Switch = 1, TIME STEP)

What happens is that when the model starts, at t=0 the pulse fires. However, the TDS Switch doesn't turn on (= 1) until t=10. TDS Switch is a STEP function.

What's going wrong? I appreciate any help!

[Edited on 10-10-2003 by Administrator]
Administrator
Super Administrator
Posts: 4589
Joined: Wed Mar 05, 2003 3:10 am

Post by Administrator »

I don't think PULSE is what you need to use. At t=0, "TDS Switch"=0 (which is the start time of the pulse, so it will trigger at t=0).

Try looking at the SAMPLE IF TRUE function, that might do what you want.

Tony.
JPersico
Junior Member
Posts: 4
Joined: Thu Oct 09, 2003 3:50 pm

Post by JPersico »

The SAMPLE IF TRUE function did work out. It doesn't look elegant, but it works. Thanks so much!!
Robert
Junior Member
Posts: 2
Joined: Wed Oct 22, 2003 7:10 pm

lookup vs pulse

Post by Robert »

why don´t you use look up with the system var TIME or TIME STEP

mylookup(TIME)
robert romero flores
Post Reply