Search found 2811 matches

by tomfid
Mon Jan 27, 2020 2:32 pm
Forum: Vensim
Topic: Hearne' method
Replies: 5
Views: 324

Re: Hearne' method

It seems impractical in a large model - just too many parameters to explore.
by tomfid
Mon Jan 27, 2020 2:30 pm
Forum: Vensim
Topic: Maximum value
Replies: 26
Views: 1435

Re: Maximum value

I think there may be a missing piece year - should min price be subscripted by year? If not,
min yearly price[EndUse Region]=SUM(min price[EndUse Region]*is year[year!]) = ]=min price[EndUse Region]*SUM(is year[year!])
by tomfid
Mon Jan 27, 2020 2:26 pm
Forum: Vensim
Topic: Data import: Interpolate but not Extrapolate..?
Replies: 4
Views: 7

Re: Data import: Interpolate but not Extrapolate..?

It sounds like you want interpolation in the middle of the series, and :NA: before/after there's any data. You could do that by combining the interpolated data with a logical test for the start end (using GET DATA FIRST TIME etc.). Be sure to wrap those statements in an INITIAL for efficiency (if it...
by tomfid
Sun Jan 26, 2020 4:08 pm
Forum: Vensim
Topic: Maximum value
Replies: 26
Views: 1435

Re: Maximum value

The initial value of the input would have to be 0. It's possible that there's a 0 in the initialization step, even if the dynamic value is nonzero. Hard to say more without seeing equations and data.
by tomfid
Sat Jan 25, 2020 11:14 pm
Forum: Vensim
Topic: Maximum value
Replies: 26
Views: 1435

Re: Maximum value

And you can also sample MAX TIME = SAMPLE IF TRUE ( A > MAX VALUE , Time, Time ) to capture when this occurs.
by tomfid
Thu Jan 23, 2020 3:04 pm
Forum: Vensim
Topic: A question about calculating median
Replies: 6
Views: 55

Re: A question about calculating median

How often do you need to update it? There might be a way to create a function to access it occasionally (e.g., monthly updates), so that the load is lower.

Is there some other robust statistic that would work?
by tomfid
Wed Jan 22, 2020 2:19 pm
Forum: Vensim
Topic: missing sensitivity analysis graph buttons
Replies: 2
Views: 17

Re: missing sensitivity analysis graph buttons

I think you're just short on screen space. You could try changing the toolbar icon sizes. Sometimes changing the display text scaling in the Win10 control panel may also help.
by tomfid
Wed Jan 22, 2020 1:27 pm
Forum: Vensim
Topic: Theil's inequality statistics model
Replies: 4
Views: 25

Re: Theil's inequality statistics model

Not sure what the problem is, but there's a working version here:
https://metasd.com/2011/04/theil-statistics/

The Theil statistics are also part of the standard Payoff Report.
by tomfid
Tue Jan 21, 2020 5:01 pm
Forum: Vensim
Topic: A question about calculating median
Replies: 6
Views: 55

Re: A question about calculating median

If you're running with a 1-hr time step, this will be VERY expensive computationally, because you'll be sorting an array of 8760 values every time step.

If the time step is larger, and the hour dimension is already in an array, it might work.
by tomfid
Tue Jan 21, 2020 3:52 pm
Forum: Vensim
Topic: demand and supply at price
Replies: 29
Views: 2280

Re: demand and supply at price

You've mixed up the subscripting by deleting the "demander" dimension. Therefore FIND MARKET PRICE is iterating over suppliers on one side of the market, and durations on the other side. The solution is to preserve the demander range, with length 1: demander : total Then use that in the demand varia...
by tomfid
Tue Jan 21, 2020 5:41 am
Forum: Vensim
Topic: demand and supply at price
Replies: 29
Views: 2280

Re: demand and supply at price

If you step through the elements of "priority vector" you will find that the first element has [duration,supplier,ptype] and the next has [duration,supplier,pprofile]. That doesn't work because pprofile is the range. If you replace it with the element ppriority it should work.
by tomfid
Mon Jan 20, 2020 5:37 pm
Forum: Vensim
Topic: Vensim optimization / Powell’s “Hill Climbing” algorithm
Replies: 1
Views: 17

Re: Vensim optimization / Powell’s “Hill Climbing” algorithm

It's fairly close to the Numerical Recipes version: http://www.nrbook.com/a/bookcpdf.php Powell's method (and any other hill climber) will find only a single local optimum, unless you do a grid or random variation of the starting point. Then the probability of discovery of additional optima is propo...
by tomfid
Mon Jan 20, 2020 5:19 pm
Forum: Vensim
Topic: demand and supply at price
Replies: 29
Views: 2280

Re: demand and supply at price

It should work as you've described, if the dimensionality of demand is reduced to 1. The demand priority should be greater than the max supply priority, to ensure that demand is always fulfilled. If you want stepwise allocations, the width parameter needs to be narrow.
by tomfid
Mon Jan 20, 2020 4:25 pm
Forum: Vensim
Topic: Scale of Y-axis in standard Vensim graphs
Replies: 4
Views: 12

Re: Scale of Y-axis in standard Vensim graphs

You can do this temporarily by dragging to zoom in on a regular graph. The setting isn't saved though.
by tomfid
Sat Jan 18, 2020 12:15 am
Forum: Vensim
Topic: Use of the TREND and DELAY functions in Vensim
Replies: 5
Views: 31

Re: Use of the TREND and DELAY functions in Vensim

In that case, you don't want the TREND function at all. You want something like a stock of Workforce, with an inflow of hiring or workforce growth or similar, where the inflow (people/month) equals the stock (people) multiplied by a growth rate (fraction per month, e.g. .005).
by tomfid
Fri Jan 17, 2020 6:04 pm
Forum: Vensim
Topic: Use of the TREND and DELAY functions in Vensim
Replies: 5
Views: 31

Re: Use of the TREND and DELAY functions in Vensim

See also:

Sterman, John D. 1987. Expectation Formation in Behavioral Simulation Models. Behavioral Science, 32:190-211.

Sterman, John D. 2000, Business Dynamics, Boston, MA: McGraw-Hill. Chapter 16.

And:

https://metasd.com/2011/04/delay-sandbox/
by tomfid
Fri Jan 17, 2020 3:26 pm
Forum: Vensim
Topic: Use of the TREND and DELAY functions in Vensim
Replies: 5
Views: 31

Re: Use of the TREND and DELAY functions in Vensim

There's a sample model for each, attached to the function's topic in the Help system.
by tomfid
Wed Jan 15, 2020 3:21 pm
Forum: Vensim
Topic: A question about calculating median
Replies: 6
Views: 55

Re: A question about calculating median

You can report the median with the Stats tool.

If you need it dynamically, you store values in an array and use the VECTOR SORT-type functions to find the midpoint.
by tomfid
Tue Jan 14, 2020 2:29 pm
Forum: Vensim
Topic: qualitative analysis (open end survey questionaire)
Replies: 1
Views: 19

Re: qualitative analysis (open end survey questionaire)

You are correct that Vensim is usually quantitative, but you can use it for pure diagramming tasks. Here's a video tutorial: https://vensim.com/vensim-causal-loop-diagramming/ Another option is to use Kumu.io. I find it slower for making CLDs, but it does have some nice network analysis features. Tu...
by tomfid
Mon Jan 13, 2020 2:49 pm
Forum: Vensim
Topic: User-defined file setup in Sensitivity Simulation - for multiple parameters
Replies: 5
Views: 46

Re: User-defined file setup in Sensitivity Simulation - for multiple parameters

I see. In that case, it does seem sensible to do some kind of combinatorial resampling from the individual columns. Unfortunately, the Vensim file sensitivity isn't set up to do this, but I'll take a look - it might be simple to implement.
by tomfid
Mon Jan 13, 2020 1:56 pm
Forum: Vensim
Topic: Does Vensim embed loop intervals?
Replies: 6
Views: 146

Re: Does Vensim embed loop intervals?

Does it make sense to have a small time step in a long-term capacity model? Or if it does, could you then dispense with the array and observe actuals?
by tomfid
Mon Jan 13, 2020 12:28 am
Forum: Vensim
Topic: User-defined file setup in Sensitivity Simulation - for multiple parameters
Replies: 5
Views: 46

Re: User-defined file setup in Sensitivity Simulation - for multiple parameters

Hi - Good question. You are correct, that there isn't a direct way to resample the columns independently in Vensim. You'd have to use R or Python or Excel or something to do that. However.... I think you don't want to resample in that way. If you do, you are in effect sampling each parameter's margi...
by tomfid
Mon Dec 23, 2019 6:53 pm
Forum: Vensim
Topic: Maximum value
Replies: 26
Views: 1435

Re: Maximum value

When I run this model, T2 starts at 341 and reaches 378 at time 2, and remains there after. T2max is the same, because T2 is always nondecreasing. If I override T2 with a Sin wave of period 8, T2max is still OK - it follows the wave to its maximum and then holds that value. If you mean that T2max at...
by tomfid
Mon Dec 23, 2019 5:45 am
Forum: Vensim
Topic: Maximum value
Replies: 26
Views: 1435

Re: Maximum value

This seems to be working fine. T2 and T2max both reach their max values at time 2. What's the problem?
by tomfid
Fri Dec 20, 2019 4:40 pm
Forum: Vensim
Topic: Changing vdf data sources from Excel using dll
Replies: 4
Views: 110

Re: Changing vdf data sources from Excel using dll

Nope - a vdf output from one model can be read directly as input to another model. No conversion needed - you just need to have matching variable names.