Search found 3815 matches

by tomfid
Mon May 31, 2010 4:03 pm
Forum: Vensim
Topic: Model correction please help
Replies: 22
Views: 9561

Here's another version of the model that handles the Poisson arrivals/departures as discrete events. One thing to note is that in the original model, the TIME STEP (0.5) was too short given the service time (0.05) - if a queue or level is modeled explicitly, the time step needs to be shorter than th...
by tomfid
Mon May 31, 2010 3:01 pm
Forum: Vensim
Topic: Model correction please help
Replies: 22
Views: 9561

Actually you want the .vpm version that I posted here, http://models.metasd.com/2010/04/rental ... -dynamics/

You can run it with the free Vensim Model Reader, which handles things that PLE won't (arrays, advanced functions, ...)

Tom
by tomfid
Mon May 31, 2010 2:59 pm
Forum: Vensim
Topic: Model correction please help
Replies: 22
Views: 9561

You might take a look at the handling of the discrete arrivals in the carRental.mdl model in this thread:
http://www.ventanasystems.co.uk/forum/v ... php?t=4076

Tom
by tomfid
Fri May 28, 2010 7:10 pm
Forum: Vensim
Topic: Connect Venapp to the model
Replies: 5
Views: 3377

Not sure exactly what you mean by not showing your variables, but if your graphs are blank the cause may be that you haven't loaded a dataset (MENU>LOAD_RUN or SPECIAL>LOADRUN) or started a synthesim simulation. Can you describe your problem more fully, or post some code?

Tom
by tomfid
Wed May 26, 2010 5:16 pm
Forum: Vensim
Topic: Error: #Initial variable>delay1>LV1#
Replies: 7
Views: 5085

DELAY1 is indeed treated like a macro. Internally, it looks like:

DELAY1=LV/delay time
LV=INTEG(input-DELAY1,input*delay time)

If you switch to DELAY1i and supply an initial value that's outside the simultaneous loop, your structure should work as is.
by tomfid
Wed May 26, 2010 2:45 pm
Forum: Vensim
Topic: Error: #Initial variable>delay1>LV1#
Replies: 7
Views: 5085

Can you post the full message? (Do View>As Text then Model>Check Model).
by tomfid
Mon May 24, 2010 10:40 pm
Forum: Vensim
Topic: Error: #Initial variable>delay1>LV1#
Replies: 7
Views: 5085

Not entirely sure, but generally the #...# notation indicates a variable that's internal to a macro equation. A few of the built in functions are treated like macros, so it's possible that you're encountering one of those. You could try setting Tools>Options>Settings>Macro variables to "show&qu...
by tomfid
Fri May 21, 2010 4:06 pm
Forum: Vensim
Topic: Dimentional Unit in equation
Replies: 9
Views: 5861

Interesting ... I agree that this would be convenient in some cases, especially where the conversion has a fixed definition, as from English to SI units (feet to meters, for example). Conversions involving time often imply a shift from stock (widget) to flow (widget/time) dimensions, in which case t...
by tomfid
Thu May 20, 2010 2:39 pm
Forum: Vensim
Topic: Simulated one by one
Replies: 2
Views: 2235

Here are two examples. The first makes parameter changes directly with SETVAL, and the second loads changes in .cin files. If you have 30 models in separate files, you can load them with repeated calls to LOADMODEL. SPECIAL>LOADMODEL|? SIMULATE>DATA|base.vdf,alldata4.vdf,factproddata.vdf,f8xlsdata.v...
by tomfid
Thu May 20, 2010 2:33 pm
Forum: Vensim
Topic: Dimentional Unit in equation
Replies: 9
Views: 5861

I don't know how it works in Powersim, but in general, I think that building unit conversions into equations is not a good practice. It's too easy to introduce inconsistencies or errors, where a unit conversion is used in multiple places. Also, implicit unit conversions often hide an actual uncertai...
by tomfid
Fri May 14, 2010 10:23 pm
Forum: Vensim
Topic: I need help (venapp)
Replies: 13
Views: 6522

Do you still have the original models folder? If not, you can restore it by reinstalling Vensim (I'm guessing that what you downloaded is one of the installer archives, which won't work by itself). When you reinstall, be sure that the option to reset the .ini settings is unchecked, if you want to sa...
by tomfid
Fri May 14, 2010 8:50 pm
Forum: Vensim
Topic: I need help (venapp)
Replies: 13
Views: 6522

Not sure exactly. Is everything in the same folder? The direct cause of the message is that Vensim is unable to open the model in your specified location.

Tom
by tomfid
Fri May 14, 2010 6:51 pm
Forum: Vensim
Topic: Letters
Replies: 5
Views: 3411

If you're using an advanced version, you can do search & replace in text view or an external editor, though it may be cumbersome. The free editor Notepad++ has a nice feature (on the TextFX menu) for converting text case; I think it would work well if you want to make blanket changes to your mod...
by tomfid
Thu May 13, 2010 7:29 pm
Forum: Vensim
Topic: External Function
Replies: 20
Views: 11113

OK, good luck. If you share more details on what you're trying to accomplish, you might get additional comments.

Tom
by tomfid
Thu May 13, 2010 7:28 pm
Forum: Vensim
Topic: Letters
Replies: 5
Views: 3411

Three ways: - right-click on any variable or comment on the model diagram to bring up a settings dialog with font controls - select variables, then use the bottom toolbar buttons (with no variables selected, these change the sketch defaults) - use the Tools>Options... menu to change font defaults Tom
by tomfid
Thu May 13, 2010 3:23 am
Forum: Vensim
Topic: External Function
Replies: 20
Views: 11113

You can write an external function that returns an array. I don't have the documentation in front of me, but I think if you look at the example external function library you'll find an applicable example.

The call from Vensim would probably look like:

val : (v1-v27)
myResult[val] = MYFUNC( ... )
by tomfid
Wed May 12, 2010 8:34 pm
Forum: Vensim
Topic: I need help (venapp)
Replies: 13
Views: 6522

Venapps are in .vcd files, which are just plain text. You can edit them inside Vensim via File>Edit File ... which has the huge advantage of permitting you to switch to sketch view (View>As Sketch) to check/edit the placement of on-screen graphs, buttons, etc. Use the buttons and menu in the bottom ...
by tomfid
Wed May 12, 2010 8:27 pm
Forum: Vensim
Topic: External Function
Replies: 20
Views: 11113

1) Check to be sure that you can't solve your problem with the FIND ZERO function. If you need to go the external function route, consider hooking up some external library to do most of the work. I once connected Vensim to LINDO (an LP solver) for a similar purpose. 2) External functions have to be ...
by tomfid
Tue May 11, 2010 3:51 pm
Forum: Vensim
Topic: Is there a .NET-wrapper of multicontext DLL?
Replies: 3
Views: 3373

Can't the C example be brought into the latest MSVC? (I haven't tried, but suspect that it's straightforward). Incidentally, MIT's Climate Collaboratorium has posted java code for wrapping the multicontext .dll to serve a model. They're running entirely on Linux with the shared library version of th...
by tomfid
Tue May 11, 2010 3:18 pm
Forum: Vensim
Topic: I need help (venapp)
Replies: 13
Views: 6522

Start Vensim, and choose File>Open Model... Change the file type to "Vensim Application Definitions" Navigate to the sample models (normally in the directory where Vensim is installed), e.g. C:\Program Files\Vensim\models\sample Open Intro.vcd, which is a portal to a variety of sample mode...
by tomfid
Mon May 10, 2010 11:45 pm
Forum: Vensim
Topic: I need help (venapp)
Replies: 13
Views: 6522

One good way to start is to try the various venapp interfaces included in the sample models, find one you like, and start modifying it. It's generally easier to proceed incrementally from something that's working. Another possibility, if you're more comfortable with C, Java, Visual Basic, etc., is t...
by tomfid
Mon May 10, 2010 10:07 pm
Forum: Vensim
Topic: Confused
Replies: 3
Views: 2548

Try working through the User's Guide, Chapters 3 & 6 (Hands On Example and Building a Model). These are available in the Help menu.

If you're stuck on something specific, ask a more detailed question?

Tom
by tomfid
Thu May 06, 2010 3:30 am
Forum: Vensim
Topic: Senitivity Output Data
Replies: 4
Views: 3735

Make sure you have a sensitivity graph instance in your toolset (if not, try mine, http://blog.metasd.com/2009/04/setting-up-vensim/ ). Then select the variable you're after (i.e. make it the workbench variable) and use the tool to get results. Sensitivity graphs, stats, and histograms only work on ...
by tomfid
Tue May 04, 2010 4:18 pm
Forum: Vensim
Topic: Delay
Replies: 3
Views: 2612

The problem is that the DELAY functions initialize the internal state of the delay (which is basically a chain of a bunch of levels) to a constant rather than some presumed historical profile of the inflow. One solution would be to create an explicit chain of levels, which you could then initialize ...
by tomfid
Mon May 03, 2010 10:31 pm
Forum: Vensim
Topic: Model Time
Replies: 4
Views: 2858

Ahh, OK. Then your IF THEN ELSE should work. If not, it could be due to roundoff error: if Time isn't exactly equal to 3, the equation will fail, even though 3.0001 might be close enough from your perspective. As an alternative, you can do one of two things: IF THEN ELSE( time > AqTime-TIME STEP/2 :...