stella2java home page


Home
Form Based Submission
Bugs

Flu example
Penicillin example
Predator Prey example

Color test page

What is a stella2java model?

Stella2java models are java applets created from Stella equation files. In this process, initial conditions and converters of your choice can be replaced with slider bars, and your choice of stocks and converters can be shown in a graph, allowing for a more direct visualization of the result of dynamic models. Converters can be set by either a slider bar, or left as what they are in Stella. Initial conditions can be set by either a slider bar, or left at the Stella value.

I've got a Stella model, will stella2java handle it?

At present, not all functionality of Stella has been incorporated into stella2java. stella2java:

  • Handles most mathematical functions
  • Handles pulse functions
  • Handles graphs
  • Handles if then else statements
  • Assumes that all flows are bi-flow, and that variables allow negative numbers.

stella2java cannot handle:

  • arrays
  • conveyors
  • if statements with boolean arguments

stella2java's known issues:

See the bug page.

stella2java's unknown issues:

  • As you discover them, please e-mail Dave Joiner (djoiner@shodor.org). If possible, save your stella file as an attachment, and be sure to tell me what version of Stella you are using, what OS you are using, and what browser you are using.

I've got a Stella model, how do I put it on the web?

Stella2Java now runs using a form based creation process. Copy and paste your equations from Stella into the first form, answer a few questions, and download your applet.

The download package will be named s2j#.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 s2j#.tar.gz', followed by 'tar -xvf s2j#.tar'). Uncompressing the file will create the folder s2j#, 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 Stella2Java 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.class" archive="StoJ.jar" height = 40
   width = 600>
You need to have a java enabled browser like
Netscape Navigator 4 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:

  • Flu model
  • Penicillin model
  • Predator Prey model

  • Copyright 2000, David Joiner and the Shodor Education Foundation, Inc.