Here's one option: http://www.ventanasystems.co.uk/forum/v ... f=2&t=5930
Your pic is ambiguous - if you indicate the desired output as well as input, it would help.
Search found 3815 matches
- Mon May 25, 2015 2:22 pm
- Forum: Vensim
- Topic: Please help! How to repeat a series of data
- Replies: 6
- Views: 2942
- Thu May 21, 2015 8:59 pm
- Forum: Vensim
- Topic: Working with subscript elements
- Replies: 8
- Views: 5346
Re: Working with subscript elements
The general rule at work here is that Vensim has to know how the right side of the equation maps to the left, which usually includes the requirement that the number of elements on each side match: These are all OK: y = x y[range] = x[range] y = x[single element] y = SUM( x[range!] ) y[another range]...
- Thu May 21, 2015 8:49 pm
- Forum: Vensim
- Topic: Working with subscript elements
- Replies: 8
- Views: 5346
Re: Working with subscript elements
When you refer to single elements, you don't need the SUM and !, so you could just write scots and welsh = inhabitants[wales] + inhabitants[scotland] Another possibility would be to define another subrange listing the two regions, and SUM that, like scotland and wales : scotland, wales scots and wel...
- Tue May 19, 2015 5:42 pm
- Forum: Vensim
- Topic: Unable to add subrange
- Replies: 3
- Views: 2566
Re: Unable to add subrange
Also, it's often helpful to work in reverse, starting at the bottom of the hierarchy, like:
countries : (c1-c5)
regions : (r1-r4)
then
places : countries, regions
countries : (c1-c5)
regions : (r1-r4)
then
places : countries, regions
- Tue May 19, 2015 5:40 pm
- Forum: Vensim
- Topic: Problem exporting data with VENSIM_GET_VAL
- Replies: 2
- Views: 1539
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.
- Mon May 18, 2015 4:42 pm
- Forum: Vensim
- Topic: Bugs with GET XLS SUBSCRIPT?
- Replies: 4
- Views: 4137
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?
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?
- Mon May 18, 2015 3:52 pm
- Forum: Vensim
- Topic: Test Input generator
- Replies: 1
- Views: 1773
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.
The best way to understand it is to run it in synthesim - vary the parameters, and see what happens.
- Mon May 18, 2015 3:51 pm
- Forum: Vensim
- Topic: Bugs with GET XLS SUBSCRIPT?
- Replies: 4
- Views: 4137
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 ...
- Mon May 18, 2015 3:45 pm
- Forum: Vensim
- Topic: Freezing historical data to speed up simulations
- Replies: 3
- Views: 2568
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.
I've tested some code for caching the data, resulting in a significant speedup, which will make it's way into a future release.
- Mon May 18, 2015 3:43 pm
- Forum: Vensim
- Topic: random seeds and infrequent events
- Replies: 16
- Views: 12985
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...
- Sat May 16, 2015 1:38 am
- Forum: Vensim
- Topic: random seeds and infrequent events
- Replies: 16
- Views: 12985
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...
- Sat May 16, 2015 12:53 am
- Forum: Vensim
- Topic: random seeds and infrequent events
- Replies: 16
- Views: 12985
Re: random seeds and infrequent events
That should do it.
- Fri May 15, 2015 6:55 pm
- Forum: Vensim
- Topic: random seeds and infrequent events
- Replies: 16
- Views: 12985
Re: random seeds and infrequent events
... or not. Looks OK to me.
What's in your .vsc sensitivity control file?
What's in your .vsc sensitivity control file?
- Fri May 15, 2015 6:37 pm
- Forum: Vensim
- Topic: random seeds and infrequent events
- Replies: 16
- Views: 12985
Re: random seeds and infrequent events
Ahh ... now I get it.
- Fri May 15, 2015 3:09 pm
- Forum: Vensim
- Topic: random seeds and infrequent events
- Replies: 16
- Views: 12985
Re: random seeds and infrequent events
Are the "average" results from your word doc from a Monte Carlo sim, with different seeds?
- Fri May 15, 2015 2:58 pm
- Forum: Vensim
- Topic: random seeds and infrequent events
- Replies: 16
- Views: 12985
Re: random seeds and infrequent events
Got it - I have to hop on a plane shortly but will have a look ASAP.
- Fri May 15, 2015 1:27 am
- Forum: Vensim
- Topic: random seeds and infrequent events
- Replies: 16
- Views: 12985
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...
- Wed May 13, 2015 4:21 am
- Forum: Vensim
- Topic: constraining level to positive numbers
- Replies: 2
- Views: 2382
Re: constraining level to positive numbers
For a few special situations the SINTEG function may be useful - see the Help system.
- Wed May 13, 2015 4:13 am
- Forum: Vensim
- Topic: constraining level to positive numbers
- Replies: 2
- Views: 2382
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...
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 ...
Re: plz help
I think you want something more like this:
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...
- Mon Apr 27, 2015 1:56 pm
- Forum: Vensim
- Topic: Exponential Smoothing for time series with seasonality
- Replies: 8
- Views: 4675
Re: Exponential Smoothing for time series with seasonality
Oops. Duh.
Sorry!- Sun Apr 26, 2015 8:32 pm
- Forum: Vensim
- Topic: Sensitivity Runs Ignoring Vector Settings
- Replies: 2
- Views: 2351
- Fri Apr 24, 2015 2:42 pm
- Forum: Vensim
- Topic: Exponential Smoothing for time series with seasonality
- Replies: 8
- Views: 4675
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.