What is a Vensim2Java model?
Vensim2Java models are java applets created from Vensim equation files.
In this process, variables can be replaced with slider bars,
allowing for dynamic modification of their values. If you choose not to use a
slider bar, the object retains the default properties specified in Vensim.
I've got a Vensim model, will Vensim2Java handle it?
At present, not all functionality of Vensim has been incorporated into
Vensim2Java. Vensim2Java:
- Handles most mathematical functions
- Handles pulse functions
- Handles lookup tables
- Handles named lookup tables
- Handles nested/singular if-then-else statements
Vensim2Java cannot handle:
- double integration
- arrays
- conveyors
- if statements with boolean arguments
For more of Vensim2Java's known issues, see the
bug page.
If you run into any problems that arent specified here, please send an
e-mail to bblock@shodor.org.
If possible, save your Vensim file as an attachment, and be sure to include the
equations you entered as well as what browser you are using.
I've got a Vensim model, how do I put it on the web?
Vensim2Java runs using a form based creation process.
Copy and paste the equations directly from Vensim into the text field, then click submit.
Afterwards, you'll have the option to adjust your model by answering a few questions.
Once you've decided on what you want to modify, you'll be linked to a download
page. You'll also get to see a "test page" containing your applet with a few preset
options.
The download package will be named v2j#.tar.gz, where # is a random integer.
This file is tarred and gzipped. Depending on your browser settings, this file
may be automatically uncompressed when you download it, or you may have to uncompress
it yourself. On Windows, most Zip style programs (such as WinZip) will uncompress the
file. On Mac, Stuffit Expander can be used to uncompress the file. On UNIX, first gunzip
the file ('gunzip v2j#.tar.gz', followed by 'tar -xvf v2j#.tar'). Uncompressing the file
will create the folder v2j#, which will contain a html file (applet.html) and a number of
class files. Edit the html file to include any information you wish. If you publish your
applet on the web, include both the Vensim2Java copyright information, and a link to the
Shodor Education Foundation.
After the applet is created, what can I modify?
In addition to the form based creation process, after you are done you can tailor your applet by including the appropriate parameter tags in your html page.
<applet code="StoJ" archive="StoJ.jar,helplets.jar" height = 500 width = 500>
You need to have a java enabled browser in order to view this java applet.
<PARAM name="DISPLAY" value="MANY_SLIDERS">
<param name="BGCOLOR" value="9895830">
<param name="LABEL_BGCOLOR" value="#AABBFF">
<param name="TEXT_BGCOLOR" value="13158600">
<param name="TINIT" value="0.0">
<param name="TFINAL" value="10.0">
<param name="TSTEP" value="1.0">
<param name="YMIN" value="-10.0">
<param name="YMAX" value="10.0">
<param name="ADAPTIVE" value="NO">
<param name="INT_METHOD" value="EULER">
</applet>
- DISPLAY: There are three display types, STANDARD, LIMITED, and MANY_SLIDERS.
- BGCOLOR: The main color of the applet, specify as an RGB integer (note, this link has problems with some versions of Netscape), or as a hexadecimal value, preceded with a pound sign.
- TEXT_BGCOLOR: The background color of descriptions, specify as an RGB integer (note, this link has problems with some versions of Netscape), or as a hexadecimal value, preceded with a pound sign.
- LABEL_BGCOLOR: The background color of applet labels, specify as an RGB integer (note, this link has problems with some versions of Netscape), or as a hexadecimal value, preceded with a pound sign.
- TINIT: The initial time programmed into the applet can be changed with this parameter.
- TFINAL: The final time programmed into the applet can be changed with this parameter.
- TSTEP: The default time step programmed into the applet can be changed with this parameter.
- YMIN: The default value of ymin programmed into the applet can be changed with this parameter.
- YMAX: The default value of ymax into the applet can be changed with this parameter.
- ADAPTIVE: The applet normally attempts an adaptive solution. This parameter lets you start with adaptive solutions turned off.
- INT_METHOD: Three different integration methods are available, EULER, IEULER, and RK4. You can change the default solution method with this parameter.
Three examples are presented here:
SIR example
Penicillin example
Rabbit example
|