Search found 3811 matches

by tomfid
Tue May 19, 2015 5:40 pm
Forum: Vensim
Topic: Problem exporting data with VENSIM_GET_VAL
Replies: 2
Views: 1536

Re: Problem exporting data with VENSIM_GET_VAL

This sounds like a problem in the macro code rather than vensim_get_val - the function returns floating point numbers, so it's not clear what it would even mean to be missing dots.
by tomfid
Mon May 18, 2015 4:42 pm
Forum: Vensim
Topic: Bugs with GET XLS SUBSCRIPT?
Replies: 4
Views: 3950

Re: Bugs with GET XLS SUBSCRIPT?

Right - so I guess your 'Vensim_PYEAR' points to a range, not a single cell?

I think we'll have to look at the code to see what's going on.

Does your Excel procedure use DDE or the DLL?
by tomfid
Mon May 18, 2015 3:52 pm
Forum: Vensim
Topic: Test Input generator
Replies: 1
Views: 1767

Re: Test Input generator

It's just an easy way of generating a lot of possible input behaviors from one structure.

The best way to understand it is to run it in synthesim - vary the parameters, and see what happens.
by tomfid
Mon May 18, 2015 3:51 pm
Forum: Vensim
Topic: Bugs with GET XLS SUBSCRIPT?
Replies: 4
Views: 3950

Re: Bugs with GET XLS SUBSCRIPT?

Note this warning in the help for the function: Lastcell can be left blank '' with GET DIRECT SUBSCRIPTS but this will generally not work with GET XLS SUBSCRIPTS. The empty ' ' entry for the last cell argument might be the problem. Thanks for the good documentation - we'll look into this - I've had ...
by tomfid
Mon May 18, 2015 3:45 pm
Forum: Vensim
Topic: Freezing historical data to speed up simulations
Replies: 3
Views: 2549

Re: Freezing historical data to speed up simulations

https://www.vensim.com/documentation/23320.htm

I've tested some code for caching the data, resulting in a significant speedup, which will make it's way into a future release.
by tomfid
Mon May 18, 2015 3:43 pm
Forum: Vensim
Topic: random seeds and infrequent events
Replies: 16
Views: 12274

Re: random seeds and infrequent events

The seed is really an ID # for a random stream. Internally, Vensim creates a separate generator for each stream. Each time a function is called, it looks up the appropriate generator by ID and returns the next draw. Two RANDOM functions that use the same ID interact, because they're both consuming d...
by tomfid
Sat May 16, 2015 1:38 am
Forum: Vensim
Topic: random seeds and infrequent events
Replies: 16
Views: 12274

Re: random seeds and infrequent events

It's not a bug thankfully, but you've discovered a rather non-intuitive interaction among the random streams. Here's what's happening: Since your .vsc varies the req input mean size, but not the random seeds, I'd normally expect your graph for the uniform draws (and probably the others, though I hav...
by tomfid
Sat May 16, 2015 12:53 am
Forum: Vensim
Topic: random seeds and infrequent events
Replies: 16
Views: 12274

Re: random seeds and infrequent events

That should do it.
by tomfid
Fri May 15, 2015 6:55 pm
Forum: Vensim
Topic: random seeds and infrequent events
Replies: 16
Views: 12274

Re: random seeds and infrequent events

... or not. Looks OK to me.

What's in your .vsc sensitivity control file?
by tomfid
Fri May 15, 2015 6:37 pm
Forum: Vensim
Topic: random seeds and infrequent events
Replies: 16
Views: 12274

Re: random seeds and infrequent events

Ahh ... now I get it.
by tomfid
Fri May 15, 2015 3:09 pm
Forum: Vensim
Topic: random seeds and infrequent events
Replies: 16
Views: 12274

Re: random seeds and infrequent events

Are the "average" results from your word doc from a Monte Carlo sim, with different seeds?
by tomfid
Fri May 15, 2015 2:58 pm
Forum: Vensim
Topic: random seeds and infrequent events
Replies: 16
Views: 12274

Re: random seeds and infrequent events

Got it - I have to hop on a plane shortly but will have a look ASAP.
by tomfid
Fri May 15, 2015 1:27 am
Forum: Vensim
Topic: random seeds and infrequent events
Replies: 16
Views: 12274

Re: random seeds and infrequent events

The uniform random results look particularly wrong, in that they should all have the same ranges, means & variances, unless the parameters (other than the seed) differ. I've tested sequences of 2 billion uniform random draws with the NIST test suite, and they were OK. I think I understand what y...
by tomfid
Wed May 13, 2015 4:21 am
Forum: Vensim
Topic: constraining level to positive numbers
Replies: 2
Views: 2375

Re: constraining level to positive numbers

For a few special situations the SINTEG function may be useful - see the Help system.
by tomfid
Wed May 13, 2015 4:13 am
Forum: Vensim
Topic: constraining level to positive numbers
Replies: 2
Views: 2375

Re: constraining level to positive numbers

There's a lengthy discussion of this here http://www.ventanasystems.co.uk/forum/viewtopic.php?f=26&t=1128 The basic point is that you need to express why the stock can't go negative, i.e. how the "physics" of the situation limits its outflows when the stock nears 0. The most common sit...
by tomfid
Fri May 08, 2015 2:19 pm
Forum: Vensim
Topic: plz help
Replies: 14
Views: 7402

Re: plz help

Without the corresponding model, I'm not really sure what I'm seeing here. If you're running the model with a 1-day time step, it's likely that the issue is that the integration through a stock imposes a 1-day lag (at minimum). You might be able to resolve this by changing the integration method to ...
by tomfid
Thu May 07, 2015 7:11 pm
Forum: Vensim
Topic: plz help
Replies: 14
Views: 7402

Re: plz help

I think you want something more like this:
patientsWaiting1.mdl
(4.21 KiB) Downloaded 227 times
by tomfid
Thu May 07, 2015 2:57 pm
Forum: Vensim
Topic: plz help
Replies: 14
Views: 7402

Re: plz help

I'm sure there's a way to do what you're after, but it's hard to tell without some more information. - var1 and var2 need real names - what do they represent? - all variables should have units of measure - it's unconventional to have causal arrows directly influencing levels; arrival-discharge+8+ va...
by tomfid
Mon Apr 27, 2015 1:56 pm
Forum: Vensim
Topic: Exponential Smoothing for time series with seasonality
Replies: 8
Views: 4570

Re: Exponential Smoothing for time series with seasonality

Oops. Duh.
seasonal smoothing.mdl
(9.48 KiB) Downloaded 295 times
Sorry!
by tomfid
Fri Apr 24, 2015 2:42 pm
Forum: Vensim
Topic: Exponential Smoothing for time series with seasonality
Replies: 8
Views: 4570

Re: Exponential Smoothing for time series with seasonality

I should add that this requires arrays for the seasonal bins. If you're only smoothing, or forecasting at integer multiples of the seasonal period, you could get by with a DELAY FIXED instead of the array, which would permit making this into a macro.
by tomfid
Fri Apr 24, 2015 2:39 pm
Forum: Vensim
Topic: Exponential Smoothing for time series with seasonality
Replies: 8
Views: 4570

Re: Exponential Smoothing for time series with seasonality

Here it is. I couldn't find my original, so I had to reconstruct it. This is similar to https://www.otexts.org/fpp/7/5 , but that's discrete time and dimensionally inconsistent unless you add a bunch of implicit time constants. I think my approach is mathematically very similar, if not identical, wh...
by tomfid
Wed Apr 22, 2015 9:09 pm
Forum: Vensim
Topic: Help plz! leakage from a conveyor
Replies: 6
Views: 3330

Re: Help plz! leakage from a conveyor

I'm not sure I follow the question. In this structure, people are conserved, so there's no double counting. If the issue is preventing a person who has become addicted and then recovered from becoming addicted again, that actually sounds like a very realistic situation. However, you could model that...
by tomfid
Wed Apr 22, 2015 3:20 pm
Forum: Vensim
Topic: Help plz! leakage from a conveyor
Replies: 6
Views: 3330

Re: Help plz! leakage from a conveyor

I presume that the exact calendar age of people in the model is not the feature of greatest interest, so I would use explicit stocks and flows, with a fairly large interval of a number of years (maybe ten or twenty, though I don't know what your model time horizon is). It's much easier to add elemen...
by tomfid
Wed Apr 22, 2015 1:15 pm
Forum: Vensim
Topic: Help plz! leakage from a conveyor
Replies: 6
Views: 3330

Re: Help plz! leakage from a conveyor

You can't do it with the DELAY CONVEYOR function, but you can do it with standard stocks and flows. The difference (possibly) is that the infinite-order delay functions have an internal number of stocks equal to TIME STEP*DelayDuration, which could be a lot in some cases (hard to draw). If you expla...