Search found 3811 matches
- Tue Feb 24, 2015 5:53 pm
- Forum: Vensim
- Topic: Grad student in need of assistance
- Replies: 2
- Views: 1769
Re: Grad student in need of assistance
You can also use the PULSE TRAIN function as a trigger.
- Tue Feb 24, 2015 2:40 pm
- Forum: Vensim
- Topic: Calibration - Random Number Linear vs Mersenne
- Replies: 3
- Views: 1995
Re: Calibration - Random Number Linear vs Mersenne
What kind of calibration? Do you have some sample output?
- Fri Jan 23, 2015 3:44 am
- Forum: Vensim
- Topic: Display scaling on model open
- Replies: 3
- Views: 3754
Re: Display scaling on model open
Another strategy is to standardize how the dialog gets answered. If everyone always says "no" to the scaling request, there's no problem. If everyone always says yes, that also works, except that items may drift by a pixel here and there due to roundoff in the scaling process. Mixing is bad.
- Mon Jan 05, 2015 5:50 pm
- Forum: Vensim
- Topic: Modelling diffusion with subscripts
- Replies: 6
- Views: 3646
Re: Modelling diffusion with subscripts
You're welcome. I know I have another one somewhere that does the cone of depression around a groundwater well, but I can't find the bugger. I'll post it if I can. I think there's also a heat transfer model in the help system somewhere.
- Mon Dec 29, 2014 7:56 pm
- Forum: Vensim
- Topic: Modelling diffusion with subscripts
- Replies: 6
- Views: 3646
Re: Modelling diffusion with subscripts
Here's an ocean CO2 diffusion model.
- Fri Dec 19, 2014 5:54 pm
- Forum: Vensim
- Topic: Maximum characters in the Equation Editor
- Replies: 13
- Views: 5822
Re: Maximum characters in the Equation Editor
You just need to generalize the +1, +2 etc. to a subscripted variable. For example: ...=SUM ( IF THEN ELSE(Periode Lager=-Wiederbeschaffungszeit+Offset[Periode Lager!], X[Periode Lager!], 0 ) )~~| Offset[Periode Lager]=INITIAL(Periode Lager)~~| I don't fully understand what we're trying to do here, ...
- Thu Dec 18, 2014 9:42 pm
- Forum: Vensim
- Topic: Maximum characters in the Equation Editor
- Replies: 13
- Views: 5822
Re: Maximum characters in the Equation Editor
Also, you might consider whether this problem can be solved with VECTOR LOOKUP, VECTOR SELECT, or VECTOR ELM MAP. A deeply-nested IF THEN ELSE statement is not likely to perform well.
- Thu Dec 18, 2014 7:01 pm
- Forum: Vensim
- Topic: Start Monte Carlo at time other than INITIAL TIME
- Replies: 6
- Views: 3286
Re: Start Monte Carlo at time other than INITIAL TIME
You could probably use the Simulate>Based and Resume @ time options to do a run for your 160 years of history, then do the MC for a future run starting from that point. This would save a lot of computation time too.
Re: Quantiles
It seems like there's too much integration going on here. Check the use of level vs. auxiliary variables. Adding units to this model would help verification. Also, embedded constants should generally be pulled out as separate, named variables, both for clarity and units checking. I can concoct an ex...
- Fri Dec 12, 2014 1:47 pm
- Forum: Vensim
- Topic: Globally edit variable names
- Replies: 10
- Views: 5709
Re: Globally edit variable names
Also, how is Python going to use this? If you're using the .dll, it doesn't need underbars, because you're passing variable names as strings. If you're parsing the code, I think just Tools>Options>Settings>Show_Underbar and save as .mdl will do it (works for me anyway).
- Fri Dec 12, 2014 1:41 pm
- Forum: Vensim
- Topic: Globally edit variable names
- Replies: 10
- Views: 5709
Re: Globally edit variable names
Replace String is only visible on the Edit menu when you're in the built-in text editor, not sketch view.
Did you set Tools>Options>Settings>Show Underbar?
Did you set Tools>Options>Settings>Show Underbar?
Re: Quantiles
Quantiles across an array dimension are fairly easy (using VECTOR RANK and similar). If you need time series quantiles, you can use an array dimension to store the time values, and get the quantiles from that.
- Thu Dec 11, 2014 3:42 pm
- Forum: Vensim
- Topic: Globally edit variable names
- Replies: 10
- Views: 5709
Re: Globally edit variable names
You're on the right track, I think. With the underscore option on, save the model in .mdl format, which is text. Then open the file with Notepad++ or some other text editor and do a search/replace on the underscore. The Vensim text editor should actually work, but you have to use "Replace Strin...
- Thu Dec 11, 2014 1:42 pm
- Forum: Vensim
- Topic: longevity of adults in prey predator system
- Replies: 5
- Views: 5131
Re: longevity of adults in prey predator system
Since "adults" has first-order negative feedback control, I do not believe the MIN function to be required. Correct - assuming that longevity >= TIME STEP, which should definitely be the case. Some possible examples: http://models.metasd.com/lotka-volterra/ the classic LV model http://mod...
- Thu Dec 11, 2014 3:12 am
- Forum: Vensim
- Topic: command to extract all model factors and underlying values a
- Replies: 5
- Views: 3226
Re: command to extract all model factors and underlying valu
Also, this is a great tool:
http://tools.systemdynamics.org/sdm-doc/
http://tools.systemdynamics.org/sdm-doc/
- Wed Dec 03, 2014 3:34 pm
- Forum: Vensim
- Topic: problems with small numbers
- Replies: 6
- Views: 6863
Re: problems with small numbers
The problem here is that e^a overflows in single precision for a > 30 or 40, as I recall. A simple solution, not requiring double precision, is to normalize your utilities to more tractable values. For example, you might subtract the mean or max utility from each of the individual values. For exampl...
- Wed Dec 03, 2014 3:26 pm
- Forum: Vensim
- Topic: problems with small numbers
- Replies: 6
- Views: 6863
Re: problems with small numbers
You can install both versions, and use them interchangeably as needed.
- Mon Nov 24, 2014 7:51 pm
- Forum: Vensim
- Topic: Unusual change in a level
- Replies: 6
- Views: 3661
Re: Unusual change in a level
My goof - I was actually referring to Lake Mead. Lowering the intakes seems like a pretty sad failure to grapple with the system problems. http://blog.metasd.com/2010/02/dry-lake-mead/ http://blog.metasd.com/2010/08/waiting-for-a-miracle-at-lake-mead/ http://blog.metasd.com/2010/09/dry-lake-mead-2/
- Mon Nov 24, 2014 7:40 pm
- Forum: Vensim
- Topic: Can't view model as sketch
- Replies: 13
- Views: 15017
Re: Can't view model as sketch
In the text editor, Vensim actually puts the cursor at the location of the error, which is: "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(...
- Wed Nov 19, 2014 6:19 pm
- Forum: Vensim
- Topic: basic vensim computation issue 2
- Replies: 15
- Views: 26352
Re: basic vensim computation issue 2
I'm glad to have people looking at these kinds of issues. I run a set of numerical tests for each release, and we try not to touch the core simulation engine, but there are probably more ways for an error to creep in than there are tests. Having many eyes on the problem helps.
- Tue Nov 18, 2014 12:43 am
- Forum: Vensim
- Topic: Unusual change in a level
- Replies: 6
- Views: 3661
Re: Unusual change in a level
Lake Powell by any chance? It seems a little awkward to change effective capacity as a parameter - seems like it would be easy to fail to conserve water if, for example, the intake is lowered when the reservoir is full. I would be explicit about the depth/capacity relationship - something like the a...
- Thu Nov 13, 2014 6:55 pm
- Forum: Vensim
- Topic: basic vensim computation issue 2
- Replies: 15
- Views: 26352
Re: basic vensim computation issue 2
Certainly I was flippant to call mathematica weird when it surely is different, and as the product of a lot of person years of smart mathematicians and computer scientists, my default assumption would be that it's generally very smart. However, error propagation is not free, so the question is wheth...
- Wed Nov 12, 2014 10:22 pm
- Forum: Vensim
- Topic: basic vensim computation issue
- Replies: 3
- Views: 3130
Re: basic vensim computation issue
I think the short answer is that 1/100 isn't precisely .01 in binary - it's 0.01000000000000000020816681711722. If you multiply 100*(1/100) the error is reversible, but if you sum 1/100 a hundred times, the error accumulates.
- Wed Nov 12, 2014 10:09 pm
- Forum: Vensim
- Topic: basic vensim computation issue 2
- Replies: 15
- Views: 26352
Re: basic vensim computation issue 2
To look deeper, I think we'd need the first few values from the mathematica version at full precision. It may be mathematica that's weird. For example, in python at skulpt.org: stock = 0.0 dt = 0.0625 while (stock < 1.0): stock = stock + dt*(1.0/100.0) print("%8f %.16f" % (dt,stock) ) yiel...
- Wed Nov 12, 2014 9:36 pm
- Forum: Vensim
- Topic: basic vensim computation issue 2
- Replies: 15
- Views: 26352
Re: basic vensim computation issue 2
In the first model, I would not expect sawtooth behavior, except by luck. The issue is not the time step, it's that the inflow of 1/100 does not have a precise binary representation. Therefore the equality test against 1 will usually fail, because the sum of 100 values of 1/100 is not 1. I changed t...