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.
At present, not all functionality of Vensim has been incorporated into Vensim2Java. Vensim2Java:
Vensim2Java cannot handle:
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.
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.
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.class,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>
Three examples are presented here: