I'm trying to model a behavior that is sort of like a DO WHILE statement: I keep adjusting the size of a pile until it meets a condition, at which point the model moves on.
So, for example, I reduce the total pollution of a system (the criterion) by cutting back output of one technology. In order to satisfy demand, I replace this output with that from another less polluting technology. So total pollution goes down, but not (yet) to desired levels. I then reduce the first technology even further and replace it with output from a less (but still nonzero) polluting technology. This continues until the total pollution meets a critical level, and all the while output demand is satisfied.
I can't see how to do a "simple" transform for this algorith, unless there's some very clever way to use ALLOC. I think I could do this in a SD way if Vensim let me loop through the level lots of times before moving on, but I think that any subdivision of a single time step would require that all time steps in the model be so subdivided.
Anybody know of way to do this, perhaps an independent module? Thanks in advance.
something like a DOWHILE?
-
- Junior Member
- Posts: 13
- Joined: Tue Jun 28, 2005 6:27 pm
something like a DOWHILE?
Steven J. Taff
Department of Applied Economics
University of Minnesota
Department of Applied Economics
University of Minnesota
-
- Super Administrator
- Posts: 4838
- Joined: Wed Mar 05, 2003 3:10 am
Take a look at the FIND ZERO function (I have used this in the past in a similar way).
http://www.vensim.com/documentation/html/22430.htm
Alternatively you could use the optimizer.
Hope this helps.
Tony.
http://www.vensim.com/documentation/html/22430.htm
Alternatively you could use the optimizer.
Hope this helps.
Tony.
-
- Senior Member
- Posts: 1107
- Joined: Wed Mar 12, 2003 2:46 pm
-
- Junior Member
- Posts: 13
- Joined: Tue Jun 28, 2005 6:27 pm
-
- Junior Member
- Posts: 13
- Joined: Tue Jun 28, 2005 6:27 pm