Search found 3808 matches

by tomfid
Fri Jan 10, 2014 11:47 pm
Forum: Vensim
Topic: Problem with reading Data variable
Replies: 6
Views: 4518

Re: Problem with reading Data variable

Absolutely. That's how I learn too - a combination of seeing far by standing on the shoulders of giants, and good judgment = accumulated experience from bad judgment.
by tomfid
Tue Dec 10, 2013 4:10 pm
Forum: Vensim
Topic: How to use Markov Chain Monte Carlo in Vensim?
Replies: 33
Views: 28074

Re: How to use Markov Chain Monte Carlo in Vensim?

I'm traveling, but hope to say a bit more about this soon.
by tomfid
Tue Dec 10, 2013 4:09 pm
Forum: Vensim
Topic: Subscripts and Subranges
Replies: 2
Views: 2187

Re: Subscripts and Subranges

A more elegant solution (helpful if you need speed) is to use mapping. I think there's an example in the help system, but here's the idea: subrange : (x1-x100) previous : (x1-x99) -> next next : (x2-x100) -> previous var a[subrange] = .... sum of var a[x1] = var a[x1] sum of var a[next] = sum of var...
by tomfid
Mon Nov 25, 2013 5:21 pm
Forum: Vensim
Topic: Order of execution of rates
Replies: 5
Views: 3163

Re: Order of execution of rates

Here's the sequence of computation:
http://www.vensim.com/documentation/ind ... quence.htm
by tomfid
Tue Nov 19, 2013 11:19 pm
Forum: Vensim
Topic: Linking Vensim and Mathematica
Replies: 15
Views: 12005

Re: Linking Vensim and Mathematica

Correct. We'll probably change the API when the 64 bit version is finalized (beta release imminent). The limiting factor is that the .vdf format uses floats, so we need to provide a double .vdfx and matching function calls.

Tom
by tomfid
Wed Nov 13, 2013 2:21 am
Forum: Vensim
Topic: Active Initial question, Vector function
Replies: 9
Views: 5760

Re: Active Initial question, Vector function

Even if there's no integration, there's a step at time=initial time, which sets up stock initial values (if there were any). That may produce the warning, because the initialization step produces a different random # from the dynamic step. I'm looking into the RNG in general, so there may be a way t...
by tomfid
Tue Nov 12, 2013 12:30 am
Forum: Vensim
Topic: demand and supply at price
Replies: 29
Views: 12739

Re: demand and supply at price

For a situation in which supply and demand are relatively constant, up to fixed willingness to pay/sell, you probably want a rectangular distribution (ptype=1) with a narrow pwidth (i.e. pwidth is smaller than the variation in prices across suppliers). Another possibility would be to use a linear pr...
by tomfid
Mon Nov 11, 2013 7:32 pm
Forum: Vensim
Topic: Units error with MIN function
Replies: 4
Views: 5148

Re: Units error with MIN function

Great. Here's the intuition (for all watching this thread): First, a physical (conserved) stock always has to have negative feedback that forces the outflow to zero when the stock is zero, as in the reality check "no inventory -> no sales." If you write, outflow = MIN( stock, desired outfl...
by tomfid
Sat Nov 09, 2013 2:59 am
Forum: Vensim
Topic: Units error with MIN function
Replies: 4
Views: 5148

Re: Units error with MIN function

I assume you have: outflow = MIN( water stock {gal} , indicated outflow {gal/yr} ) which is dimensionally inconsistent. What's really going on is that there's some characteristic time that it would take to drain the stock, given a pump or gravity or whatever operating as fast as possible: outflow = ...
by tomfid
Fri Nov 08, 2013 11:48 pm
Forum: Vensim
Topic: Adding a subscript using elements of other subscript
Replies: 6
Views: 3295

Re: Adding a subscript using elements of other subscript

It may work with subranges (I don't recall), but I think that's not quite the issue. You have several instances of mixed subscript uses - for example: vector reorder(Desired expansion x hour[HOUR,EXPN2],price order inc[HOUR,TECH]) I think it's checking the size of the TECH family (=PDC) against EXPN...
by tomfid
Fri Nov 08, 2013 7:34 pm
Forum: Vensim
Topic: Adding a subscript using elements of other subscript
Replies: 6
Views: 3295

Re: Adding a subscript using elements of other subscript

A function you've used may be expecting a complete range rather than a subrange, and the addition of the new subscript converts TECH to a subrange. Hard to tell without an example though.
by tomfid
Fri Nov 08, 2013 6:53 pm
Forum: Vensim
Topic: Adding a subscript using elements of other subscript
Replies: 6
Views: 3295

Re: Adding a subscript using elements of other subscript

Are you using a VECTOR REORDER with PDC on the LHS and Tech on the RHS of the equation?

Hard to tell without seeing the equations in question.
by tomfid
Fri Nov 08, 2013 5:06 pm
Forum: Vensim
Topic: Is it possible to define the end point of Spread Sheet data
Replies: 4
Views: 2786

Re: Is it possible to define the end point of Spread Sheet d

You could try playing around with named ranges. There's an example of usage in the help system for the GET XLS functions. I don't remember off the top of my head whether it's possible to use that to limit the data range, but it might work. The downside is that named ranges are invisible in Excel. Th...
by tomfid
Thu Nov 07, 2013 2:32 pm
Forum: Vensim
Topic: Error with LOOKUP
Replies: 5
Views: 2927

Re: Error with LOOKUP

Ahh ... i'd forgotten, but there's a bug in the labeling of the fields in the equation editor, which may have misled you. You have: with lookup.JPG but the WITH LOOKUP on the RHS is not needed, because that's already taken care of by the choice of equation type with the dropdown menus. You need: wit...
by tomfid
Thu Nov 07, 2013 2:00 am
Forum: Vensim
Topic: Active Initial question, Vector function
Replies: 9
Views: 5760

Re: Active Initial question, Vector function

Have you tried checking the initialization step results by using Diff integration?
by tomfid
Thu Nov 07, 2013 12:41 am
Forum: Vensim
Topic: Error with LOOKUP
Replies: 5
Views: 2927

Re: Error with LOOKUP

You probably have an extra parentheses in one of the fields in the equation editor. We can't tell without a copy of the model, or perhaps a screenshot of the equation in the editor, so if you can post one of those we can help.
by tomfid
Mon Nov 04, 2013 4:40 pm
Forum: Vensim
Topic: Population growth 'units' error
Replies: 4
Views: 4117

Re: Population growth 'units' error

It appears that the problem is the dimensions of your lookup: population growth rate lookup --> Year If you change this to 1/year or fraction/year, it should work. Note that the units on a lookup represent the output, rather than the input. It's often good practice to normalize the inputs and output...
by tomfid
Fri Nov 01, 2013 2:31 am
Forum: Vensim
Topic: Allocate by priority with 3 subscripts
Replies: 2
Views: 2190

Re: Allocate by priority with 3 subscripts

I'm not sure this is what you want though, because the alloc will happen across TECH but not HEXP. If you want to allocate over TECH and HEXP at the same time, you'll have to create a single dimension containing all the [TECH,HEXP] combinations.
by tomfid
Fri Nov 01, 2013 2:25 am
Forum: Vensim
Topic: Allocate by priority with 3 subscripts
Replies: 2
Views: 2190

Re: Allocate by priority with 3 subscripts

Allocate by priority 3 subscripts 2.mdl
(6.37 KiB) Downloaded 253 times
The ALLOC functions work across the last subscript, so if you're allocating across producers, you need to reorder Expected supply[HOUR,TECH,HEXP] as Expected supply[HOUR,HEXP,TECH]. See attached.
by tomfid
Thu Oct 31, 2013 3:28 pm
Forum: Vensim
Topic: Model Variable tool and Merge tools missing
Replies: 3
Views: 2333

Re: Model Variable tool and Merge tools missing

This is actually a deliberate design decision in PLE, in order to ensure that the diagram corresponds exactly to the equations, and that each variable has a single, primary home view. Pro/DSS provide more flexibility, including text-only models.
by tomfid
Wed Oct 30, 2013 2:30 am
Forum: Vensim
Topic: about model time step setting and function use
Replies: 5
Views: 4053

Re: about model time step setting and function use

There does appear to be a storage or display issue with the GET XLS variable in gaming mode. However, if you add an auxiliary, b=a, it takes on the correct values, so I think the underlying sim is OK. I'll investigate further.
by tomfid
Wed Oct 30, 2013 2:23 am
Forum: Vensim
Topic: about model time step setting and function use
Replies: 5
Views: 4053

Re: about model time step setting and function use

I think what you're seeing is a consequence of the settings in the Scaling tab of the Control Panel. however, I'm not sure you'll be able to make a choice that's satisfactory at all possible times. Is this a Venapp or a regular model?

I'll take a look at your example.
by tomfid
Tue Oct 29, 2013 2:20 pm
Forum: Vensim
Topic: DATA variable name
Replies: 2
Views: 2224

Re: DATA variable name

It's probably not what you're looking for, but data sources for variables in calibrations are listed in the payoff report (runname.rep).
by tomfid
Tue Oct 29, 2013 1:33 am
Forum: Vensim
Topic: Problems when reordering vectors
Replies: 5
Views: 3111

Re: Problems when reordering vectors

Here's your problem: when i use direction=0, the result is wrong (2,0,1;2,0,1). It is cleat that the correct answer should be 1,2,0;1,2,0 This is true if 1,2,0 represents the positions of each element in the sorted array. So, if the input is 3,2,4, the 0 in the third element would indicate that the ...
by tomfid
Tue Oct 29, 2013 12:38 am
Forum: Vensim
Topic: Problems when reordering vectors
Replies: 5
Views: 3111

Re: Problems when reordering vectors

When I use 0 in the version that I posted, I get

Code: Select all

Array output format	
"sorted price[HOUR,TECH]"  at time 5 Runs:	Current	
sorted price[HOUR,TECH]	P1	P2	P3	
H1	4	3	2	
H2	7	6	5	
... which looks OK. Am I missing something?