Search found 3808 matches

by tomfid
Mon Mar 26, 2012 4:34 pm
Forum: Vensim
Topic: Kernel density estimation
Replies: 8
Views: 4117

Re: Kernel density estimation

Here's an example:
kernel density.mdl
(3.7 KiB) Downloaded 219 times
I haven't double checked to be sure that the resulting pdf integrates to 1, but it should be OK.
by tomfid
Mon Mar 26, 2012 3:34 pm
Forum: Vensim
Topic: Kernel density estimation
Replies: 8
Views: 4117

Re: Kernel density estimation

OK - I think this is actually fairly easy. I'll post an example. One more question though: once you have the kernel-smoothed density, what will you do with it? For example, do you want to pick arbitrary points from it, or generate incomes at uniformly-spaced levels, essentially using the pdf as an i...
by tomfid
Mon Mar 26, 2012 1:29 pm
Forum: Vensim
Topic: error messages related to lookups
Replies: 10
Views: 11603

Re: error messages related to lookups

Specifically, see:

http://www.vensim.com/documentation/fn_lookup_area.htm

There's a chapter in the User's Guide on lookups:

http://www.vensim.com/documentation/usr08.htm

For iThink users, the WITH LOOKUP syntax may be more familiar:

http://www.vensim.com/documentation/fn_with_lookup.htm
by tomfid
Sun Mar 25, 2012 6:19 pm
Forum: Vensim
Topic: how to perform a convolution in vensim
Replies: 17
Views: 12775

Re: how to perform a convolution in vensim

It's using the profile and the delay time together to normalize the pdf and establish the mean time. Off the top of my head, I believe that the procedure is (a) integrate x*lookup(x) over the range of the lookup, and divide by the range, to determine the mean arrival time in the lookup (b) rescale t...
by tomfid
Sun Mar 25, 2012 2:18 am
Forum: Vensim
Topic: error messages related to lookups
Replies: 10
Views: 11603

Re: error messages related to lookups

Vensim differs from iThink in that a lookup can be used in more than one place, so the lookup table is separate from the input and expressions that use the input. In that respect it is more like DYNAMO. In DYNAMO you might write: FCAOR = TABHL( FCAORT, NRFR, 0, 1, .1 ) FCAORT = 1/.9/.7/.5 ... (borro...
by tomfid
Sat Mar 24, 2012 5:26 pm
Forum: Vensim
Topic: how to perform a convolution in vensim
Replies: 17
Views: 12775

Re: how to perform a convolution in vensim

Incidentally, if there's some other software you use that does things differently/better, we're always interested to hear about it.
by tomfid
Sat Mar 24, 2012 5:25 pm
Forum: Vensim
Topic: how to perform a convolution in vensim
Replies: 17
Views: 12775

Re: how to perform a convolution in vensim

I'll take a look. If you don't need 'init' and 'init grow' you can set them to 0. The profile and delay time parameters work together. The profile gives the shape of the distribution. It's then scaled so that (a) the area under the curve is 1 and (b) the mean arrival time is equal to the delay time ...
by tomfid
Sat Mar 24, 2012 4:28 pm
Forum: Vensim
Topic: Kernel density estimation
Replies: 8
Views: 4117

Re: Kernel density estimation

Are you trying to smooth across time, or income values, or both?

If this is all you're doing, you'd be better off using a stats package. But if this is part of a dynamic model, we can probably come up with a strategy that works.

Tom
by tomfid
Sat Mar 24, 2012 4:24 pm
Forum: Vensim
Topic: error messages related to lookups
Replies: 10
Views: 11603

Re: error messages related to lookups

You need to pass an argument to your lookups, as in y = lookup(x)

You might take a look at the "LOOKUP functions.mdl" example in the help system, Reference Manual, Chapter 4, particularly the 'price with normal LOOKUP usage' variable.
by tomfid
Thu Mar 22, 2012 8:19 pm
Forum: Vensim
Topic: Problem with PULSE TRAIN
Replies: 2
Views: 2106

Re: Problem with PULSE TRAIN

Set your width parameter to TIME STEP/2 rather than 0, and this should work.
by tomfid
Thu Mar 22, 2012 8:10 pm
Forum: Vensim
Topic: C Compiled vensim programs
Replies: 2
Views: 2194

Re: C Compiled vensim programs

If you're running compiled simulations, Vensim creates a .dll in the same directory as your model.

See also http://blog.metasd.com/2011/06/setting- ... n-windows/
by tomfid
Thu Mar 22, 2012 3:38 pm
Forum: Vensim
Topic: how to perform a convolution in vensim
Replies: 17
Views: 12775

Re: how to perform a convolution in vensim

OK, here's an example, based on the one in the help system: DELAY PROFILE+.mdl I created an arbitrary Weibull-ish profile in the lookup. If you set the 'pulse install rate' and 'historic install rate' to 0, and the 'constant install rate' to some value, you can see that you get the expected Little's...
by tomfid
Thu Mar 22, 2012 2:58 pm
Forum: Vensim
Topic: how to perform a convolution in vensim
Replies: 17
Views: 12775

Re: how to perform a convolution in vensim

The initial growth rate parameter specifies the trajectory of your appliance installation rate f(t) prior to the start of the model (INITIAL TIME).

I'll see if I can cook up an example.
by tomfid
Wed Mar 21, 2012 9:12 pm
Forum: Vensim
Topic: how to perform a convolution in vensim
Replies: 17
Views: 12775

Re: how to perform a convolution in vensim

Got it. The simple way to do this is with DELAY PROFILE (see the example in Ch. 4 of the Reference Guide). The lookup argument to DELAY PROFILE is the distribution of the wait or residence time of the material (scaled by the delay time parameter). Unfortunately there isn't any easy way to parametric...
by tomfid
Wed Mar 21, 2012 3:59 am
Forum: Vensim
Topic: how to perform a convolution in vensim
Replies: 17
Views: 12775

Re: how to perform a convolution in vensim

A general convolution is acausal, i.e. values at a point in time may use information from the future. We don't generally support acausal modeling, though there are technical tricks for accomplishing it in some cases.

If you say more about your problem we might have a solution.
by tomfid
Wed Mar 21, 2012 3:57 am
Forum: Vensim
Topic: Kernel density estimation
Replies: 8
Views: 4117

Re: Kernel density estimation

The short answer is yes.

However, there aren't any tools for this specific purpose, so it's up to you to develop and equation structure and optimization control file that will get the job done.

If you say a bit more about what you're trying to do, we may be able to be more helpful.
by tomfid
Wed Mar 21, 2012 3:55 am
Forum: Vensim
Topic: Vensim Query (Stocks and Flows)
Replies: 1
Views: 1480

Re: Vensim Query (Stocks and Flows)

Multiple flows in/out of a stock are fine. You may find that you'll need multiple stocks as well - for example, a separate stock and associated flows for high and low value customers. There's quite a bit of tutorial material in the User Guide and Model Guide in the help system. We're working on gett...
by tomfid
Tue Mar 13, 2012 11:26 pm
Forum: Vensim
Topic: Vensim and Digest
Replies: 6
Views: 6162

Re: Vensim and Digest

I'd just run through the text and look for unusual functions, though it could be something as simple as an IF THEN ELSE. Any discrete behavior will wreak havoc on the linearlization of the model, I'd guess. Also look for any variable names that incorporate special characters and therefore require &q...
by tomfid
Tue Mar 13, 2012 1:39 am
Forum: Vensim
Topic: WARNING:delay requiring more than 5000 levels
Replies: 1
Views: 1567

Re: WARNING:delay requiring more than 5000 levels

Your delay implies 52/.0078125 = 6656 discrete levels, hence the warning. It's possible that this is necessary, but 6656th order delays aren't exactly common. We'd have to know more about your model to know whether this is sensible or not.
by tomfid
Sun Mar 11, 2012 3:25 pm
Forum: Vensim
Topic: ODBC Problems (Connecting Vensim to MS Access)
Replies: 8
Views: 7569

Re: ODBC Problems (Connecting Vensim to MS Access)

Hmm ... that should be fine then. I'll do some testing to be sure everything is working right.

Tom
by tomfid
Thu Mar 08, 2012 2:42 pm
Forum: Vensim
Topic: ODBC Problems (Connecting Vensim to MS Access)
Replies: 8
Views: 7569

Re: ODBC Problems (Connecting Vensim to MS Access)

Glad you worked it out. I'm guessing that your copy of Vensim is not the latest; .vdi files should work in the pre-processing step, but there was a bug in the dialog processing that prevented that, fixed fairly recently (5.11). Putting the .vdi in the Changes field as you did is a valid solution tho...
by tomfid
Mon Mar 05, 2012 5:41 pm
Forum: Vensim
Topic: Vensim's confidence interval estimation (likelihood ratios)
Replies: 10
Views: 8511

Re: Vensim's confidence interval estimation (likelihood rati

I just checked some old correspondence, and the issue is not what I was thinking of. Gokhan is correct that there is a difference; the origin is reporting conventions rather than a technical error. Here's an attempt at an explanation. Suppose you have a model with parameters a that you're fitting to...
by tomfid
Mon Mar 05, 2012 3:38 pm
Forum: Vensim
Topic: Vensim's confidence interval estimation (likelihood ratios)
Replies: 10
Views: 8511

Re: Vensim's confidence interval estimation (likelihood rati

I was just looking at that paper the other day, and I'm not convinced that it's right. I have done a variety of estimation tests on simple problems (e.g. finding the mean and confidence bounds on a normal distribution) and everything was fine. I'll take another look at the paper and report back.
by tomfid
Fri Mar 02, 2012 2:36 pm
Forum: Vensim
Topic: Linking Vensim and Mathematica
Replies: 15
Views: 12006

Re: Linking Vensim and Mathematica

Thanks for the nice summary.

The 32bit issue crops up elsewhere as well - for example in Java you need to be sure to run in a 32bit virtual machine, because 64bit VMs won't link to 32bit dlls.
by tomfid
Thu Mar 01, 2012 8:29 pm
Forum: Vensim
Topic: Help for MARKT MATCH function or alternative
Replies: 4
Views: 3863

Re: Help for MARKT MATCH function or alternative

MARKET MATCH has not been released. I don't think it would solve your problem though; it handles cases where the quantity to be allocated is not heterogeneous (e.g., demanders have different preferences for each supplier), so that there is not a single clearing price for the commodity. You can build...