Search found 3804 matches

by tomfid
Tue Aug 13, 2013 8:57 pm
Forum: Vensim
Topic: Optimisation Crash
Replies: 6
Views: 3347

Re: Optimisation Crash

Actually I see that you're using XP so I tried that and I can replicate the crash. It works fine on Win7 and Mac. Your model generates floating point errors in its base run. Resolving those (try a much smaller time step for one thing), plus adding parameter bounds, will solve the problem, though it ...
by tomfid
Tue Aug 13, 2013 4:17 pm
Forum: Vensim
Topic: Is it possible to display equation comments on grahps?
Replies: 2
Views: 1860

Re: Is it possible to display equation comments on grahps?

I assume that you mean a Custom Graph, in which case I believe that the answer is no.

If you mean the model diagram, the comment and units appear when you hover over a variable with the cursor.
by tomfid
Tue Aug 13, 2013 4:11 pm
Forum: Vensim
Topic: Optimisation Crash
Replies: 6
Views: 3347

Re: Optimisation Crash

This works fine for me on Win7 6.1c - I assume you're on a Mac though? I'll move it over and give that a try. One thing that would help quite a bit here is to put upper and lower bounds on all your variables. Even if you can't determine narrow limits a priori, searching from 0 to 1 billion is a lot ...
by tomfid
Tue Aug 13, 2013 4:05 pm
Forum: Vensim
Topic: Vensim DSS compilation error
Replies: 9
Views: 6002

Re: Vensim DSS compilation error

This may be a matter of 32 vs 64 bit system file locations. You probably need to check the paths for the calls to the compiler & includes in your mdl.bat.

An upgrade to the current version of Vensim would almost surely solve your problem. 5.7 is six years old and predates Win7.
by tomfid
Mon Aug 12, 2013 3:27 pm
Forum: Vensim
Topic: Optimisation Crash
Replies: 6
Views: 3347

Re: Optimisation Crash

We need to know a little more - can you post the model and your control files? Upgrading to 6.1 could help, though I don't recall any optimization specific bug fixes.
by tomfid
Sun Aug 11, 2013 2:53 pm
Forum: Vensim
Topic: model check - variable not defined
Replies: 4
Views: 4189

Re: model check - variable not defined

If you write out the integral, it's stock = { flow*dt + initial stock So the flow has to have the same units as the stock, with a time unit in the denominator. Then the flow's time cancels with dt (TIME STEP). Lookups can have units, though typical practice is to make things dimensionless, which sup...
by tomfid
Fri Aug 09, 2013 5:51 pm
Forum: Vensim
Topic: How to display subscript control panel in JAVA UI?
Replies: 6
Views: 3842

Re: How to display subscript control panel in JAVA UI?

I think we need to know a little more about what graphs you're displaying, and how, to answer this.
by tomfid
Fri Aug 09, 2013 5:49 pm
Forum: Vensim
Topic: QUEUE FIFO with ALLOCATE BY PRIORITY
Replies: 3
Views: 3076

Re: QUEUE FIFO with ALLOCATE BY PRIORITY

5.0a is indeed ancient.

The LP_SOLVE functionality is in an external function library (see http://vensim.com/workbench/ ) so it could potentially be adapted to 5.0, but I doubt it makes sense to do that.
by tomfid
Fri Aug 09, 2013 5:44 pm
Forum: Vensim
Topic: model check - variable not defined
Replies: 4
Views: 4189

Re: model check - variable not defined

First of all, I applaud your efforts to replicate a model from the lit. I do this quite a bit myself, and find that I learn a lot more about a model by hand coding it. If you look closely at the error message, it indicates that "change in cust.orient." is undefined - you have two instances...
by tomfid
Mon Aug 05, 2013 6:34 pm
Forum: Vensim
Topic: Appropriate formula
Replies: 1
Views: 2665

Re: Appropriate formula

There are some drawbacks to using real data - it can be a lot of work, and it can add features to your model that distract from a simple understanding of its behavior. However, the benefits often outweigh the drawbacks. Using real data may help you to discover problems in the model or the data, and ...
by tomfid
Mon Aug 05, 2013 6:29 pm
Forum: Vensim
Topic: How to determine appropriate number of iterations
Replies: 2
Views: 2145

Re: How to determine appropriate number of iterations

As the admin said, there's no real rule. Payoff sensitivity is useful for testing whether you've found the max/min, and how broad it is, but not for determining the iterations to get there. Whether you care to continue optimizing depends on your purpose. If you're doing policy optimization for a fir...
by tomfid
Mon Jul 29, 2013 3:39 pm
Forum: Vensim
Topic: Global scope constants (or variables)
Replies: 5
Views: 3204

Re: Global scope constants (or variables)

Two other notes: In DSS, rather than creating a constant and hiding it, you could create a :MACRO: to contain the constant. In this particular case, feps isn't really needed - you could use the ZIDZ function in place of the (x+feps) construction. If you want some behavior other than ZIDZ, you could ...
by tomfid
Fri Jul 19, 2013 2:20 pm
Forum: Vensim
Topic: Waiting times in a doctor's surgery
Replies: 21
Views: 11240

Re: Waiting times in a doctor's surgery

I don't have it in front of me (traveling) but I think you're correct - my mistake.
by tomfid
Fri Jul 19, 2013 2:17 pm
Forum: Vensim
Topic: time deley
Replies: 12
Views: 7827

Re: time deley

A time step lag in state updates is a pretty fundamental property of ODE systems, not to mention real physical systems. What are you trying to model that requires cascading instantaneous updates?
by tomfid
Fri Jul 19, 2013 2:10 pm
Forum: Vensim
Topic: QUEUE FIFO with ALLOCATE BY PRIORITY
Replies: 3
Views: 3076

Re: QUEUE FIFO with ALLOCATE BY PRIORITY

Not 100% sure I understand the question, but I think it's not practical to manipulate queue contents at the item or even time step slat level. Also, any input to an ALLOC has to be an array - the function can't look inside a queue, unless you first somehow select the queue elements into an array. Ev...
by tomfid
Fri Jul 12, 2013 9:50 pm
Forum: Vensim
Topic: Waiting times in a doctor's surgery
Replies: 21
Views: 11240

Re: Waiting times in a doctor's surgery

More options:
patients2.mdl
(10.41 KiB) Downloaded 282 times
Unfortunately, with the runup to the SD conference, I'm super busy so it's tough to keep up, but I'll try to respond to comments.
by tomfid
Fri Jul 12, 2013 9:05 pm
Forum: Vensim
Topic: Waiting times in a doctor's surgery
Replies: 21
Views: 11240

Re: Waiting times in a doctor's surgery

I'm not familiar with WITNESS, but if it's a discrete event simulator it might be more suitable for some problems. Generally, the dividing line is between tactical/operational control problems, where you really care about distributions and individual elements, and more strategic problems that blend ...
by tomfid
Fri Jul 12, 2013 1:46 pm
Forum: Vensim
Topic: reading a value from a tabbed array
Replies: 3
Views: 2490

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: 5192

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: 3390

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: 3390

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: 5276

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: 3374

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: 11240

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...