Search found 3811 matches

by tomfid
Fri Jul 12, 2013 1:46 pm
Forum: Vensim
Topic: reading a value from a tabbed array
Replies: 3
Views: 2501

Re: reading a value from a tabbed array

reservoir.mdl Here's an alternate way to arrange things, using an array of lookups and VECTOR SELECT to choose the active series. Rather than a tabbed array, you'd supply an array of lookups (see the subscripted version of the GET...LOOKUPS example model in the help system). There are probably othe...
by tomfid
Wed Jul 10, 2013 9:55 pm
Forum: Vensim
Topic: Value with two decimal marks
Replies: 6
Views: 5219

Re: Value with two decimal marks

I haven't had a chance to check the code, but I suspect what it's doing is essentially using the c %g format convention, which chooses between a direct decimal or scientific notation, whichever is shortest. http://www.cplusplus.com/reference/cstdio/printf/ . Whether you get 0.9973 or 4.621e9 will de...
by tomfid
Wed Jul 10, 2013 2:08 am
Forum: Vensim
Topic: Units errors with Smooth functions
Replies: 3
Views: 3703

Re: Units errors with Smooth functions

Now that I think about it, I'm guessing that you've written, smoothed x = SMOOTH( x, 8 ) where 8 (or whatever) is the smoothing time. The problem is that Vensim doesn't know the units for 8, so it assumes dmnl. Make the 8 a parameter, which also exposes it to sensitivity analysis, and give it units ...
by tomfid
Wed Jul 10, 2013 2:02 am
Forum: Vensim
Topic: Units errors with Smooth functions
Replies: 3
Views: 3703

Re: Units errors with Smooth functions

Can you post an example?
by tomfid
Tue Jul 09, 2013 4:45 am
Forum: Vensim
Topic: how to turn of WARNINGS ?
Replies: 5
Views: 5328

Re: how to turn of WARNINGS ?

You could modify the equation to suppress the error. Two possibilities: 1. Add an extra point to the lookup, at FINAL TIME or beyond. It won't get used, but will prevent running out of bounds. 2. use MIN(Time, 9) rather than Time as the input to the lookup. You probably also want to make the "9...
by tomfid
Tue Jul 09, 2013 4:23 am
Forum: Vensim
Topic: Simultaneous Equation On My Model
Replies: 4
Views: 3393

Re: Simultaneous Equation On My Model

One possibility is to regard price as a stock that adjusts in response to pressures from supply/demand balance.
by tomfid
Tue Jul 09, 2013 4:22 am
Forum: Vensim
Topic: Waiting times in a doctor's surgery
Replies: 21
Views: 11415

Re: Waiting times in a doctor's surgery

I see what you mean. The long tail of the exponential distribution of servicing patients seems weird compared to intuition about the actual process. However, the solution, MIN(max patients seen,patients waiting), fails two other reality checks. First, if TIME STEP <> 1, it doesn't work; for continuo...
by tomfid
Mon Jul 08, 2013 8:23 pm
Forum: Vensim
Topic: Waiting times in a doctor's surgery
Replies: 21
Views: 11415

Re: Waiting times in a doctor's surgery

Other ways to look at this: 1. dimensional consistency equating patients seen = MIN(max patients seen,patients waiting) mixes items with units of people and people/minute. 2. implicit time constants patients seen = MIN(max patients seen,patients waiting) and patients seen = MIN(max patients seen,pat...
by tomfid
Mon Jul 08, 2013 7:05 pm
Forum: Vensim
Topic: Condition of forming rate and level variable
Replies: 4
Views: 4712

Re: Condition of forming rate and level variable

However, eggs are not an outflow from the stock of chickens (though of course, in a literal sense, eggs do flow out from chickens). This is because laying of eggs does not reduce the stock of chickens (at least if chickens are measured numerically). Normally, you'd have a stock of parent chickens, w...
by tomfid
Mon Jul 08, 2013 6:57 pm
Forum: Vensim
Topic: Condition of forming rate and level variable
Replies: 4
Views: 4712

Re: Condition of forming rate and level variable

Looking at parent chickens, you might write: parent chickens = INTEG( maturing - age culling - disease death rate - productivity culling, initial chickens) where maturing, age culling, etc. are inflows and outflows. This would appear on the diagram as a separate flow pipe for each process. If that g...
by tomfid
Wed Jul 03, 2013 2:43 pm
Forum: Vensim
Topic: Waiting times in a doctor's surgery
Replies: 21
Views: 11415

Re: Waiting times in a doctor's surgery

Here's an alternate implementation, with units:
patients.mdl
(3.46 KiB) Downloaded 330 times
by tomfid
Thu Jun 27, 2013 8:38 pm
Forum: Vensim
Topic: Custom tables: operation with variables
Replies: 5
Views: 3479

Re: Custom tables: operation with variables

Generally, if you use the : DATASET key with a wildcard like *2 (for the second run), nothing will be shown if only one run is loaded, so you don't need to know in advance what is available.
by tomfid
Tue Jun 25, 2013 1:08 am
Forum: Vensim
Topic: decimal places
Replies: 4
Views: 3274

Re: decimal places

If you mean the crosshatch delay mark on arrows, right-click the arrow and check the "delay" box.
by tomfid
Wed Jun 19, 2013 1:39 pm
Forum: Vensim
Topic: Custom tables: operation with variables
Replies: 5
Views: 3479

Re: Custom tables: operation with variables

I don't think it's possible to perform mathematical operations on the two runs. An alternative, if these represent something like a "base" and "policy" scenario, is to subscript the entire model with a scenario dimension, e.g. scenario : base, policy, so that both runs happen at ...
by tomfid
Tue Jun 18, 2013 6:16 pm
Forum: Vensim
Topic: What does "Max Sims:" do? (Optimization)
Replies: 2
Views: 1809

Re: What does "Max Sims:" do? (Optimization)

It sets an absolute limit on the number of simulations in an optimization.
by tomfid
Tue Jun 18, 2013 5:25 pm
Forum: Vensim
Topic: There still seem to be rounding issues in Vensim DSS DP
Replies: 3
Views: 2943

Re: There still seem to be rounding issues in Vensim DSS DP

I suspect that what's happening is as follows: During simulation, there's slight imprecision that causes the double representation of the variable to be less than 0, but with an absolute value smaller than the smallest float. When the values are stored to the vdf, which is single precision, rounding...
by tomfid
Mon Jun 17, 2013 12:42 pm
Forum: Vensim
Topic: [ASK] IF then else multiple condition
Replies: 7
Views: 5922

Re: [ASK] IF then else multiple condition

You might also take a look at the PULSE, STEP and PULSE TRAIN functions for alternatives to the test input with IF THEN ELSE>
by tomfid
Fri Jun 14, 2013 7:01 pm
Forum: Vensim
Topic: Export confidence band data from sensitivity graph
Replies: 2
Views: 1810

Re: Export confidence band data from sensitivity graph

Not that I know of, but you can use the percentile() function in Excel to calculate intervals.
by tomfid
Mon Jun 10, 2013 6:36 pm
Forum: Vensim
Topic: Problems with an aging chain using conveyors
Replies: 36
Views: 27179

Re: Problems with an aging chain using conveyors

I think there's a 5th option, which is using the QUEUE ATTRIB functions, where (one of) the attributes is the time of entry into the chain. That only works if the process is really FIFO, which isn't the case for conveyor leakage unfortunately. Otherwise, I tend to favor the SHIFT IF TRUE approach - ...
by tomfid
Mon Jun 10, 2013 3:06 pm
Forum: Vensim
Topic: Define data at a given point of time
Replies: 2
Views: 1840

Re: Define data at a given point of time

See also the last answer in this thread: http://www.ventanasystems.co.uk/forum/v ... f=2&t=5283
by tomfid
Sat Jun 08, 2013 1:25 am
Forum: Vensim
Topic: Fish Stocking Model
Replies: 7
Views: 5098

Re: Fish Stocking Model

Right - rather than using

carp growth lookup(time)

just use

carp growth lookup( MODULO( time, months per year ) )

with months per year = 12.
by tomfid
Sat Jun 08, 2013 1:21 am
Forum: Vensim
Topic: Problems with an aging chain using conveyors
Replies: 36
Views: 27179

Re: Problems with an aging chain using conveyors

OK - now I understand the problem - I'll have to ponder a bit. We have a nice solution for this in future Vensim, but it won't be available for a while.
by tomfid
Fri Jun 07, 2013 9:04 pm
Forum: Vensim
Topic: What improvements would you like to see in Vensim?
Replies: 150
Views: 14699234

Re: What improvements would you like to see in Vensim?

Differential time steps would be much harder to implement than it sounds ... why do you need it?
by tomfid
Fri Jun 07, 2013 5:29 pm
Forum: Vensim
Topic: Problems with an aging chain using conveyors
Replies: 36
Views: 27179

Re: Problems with an aging chain using conveyors

What parameters are you using in the model (including TIME STEP)? For me, the linked SimpleConveyorModelCorrTF1.mdl works fine with FractionEventuallyLeaking = 1. Extremely high leak rates do beg the question, why bother with a stock or conveyor, but I agree that the tool should be robust to such ex...
by tomfid
Thu Jun 06, 2013 2:18 am
Forum: Vensim
Topic: Problem with Vensim Loading
Replies: 9
Views: 9142

Re: Problem with Vensim Loading

Generally, that shouldn't matter. You could try renaming them (e.g., vensim.inix) temporarily - Vensim will start with default settings if the .ini is missing. But the effect of that should be the same as a reinstall that resets the .ini, so that's probably not the problem. Tony's test - whether you...