Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

STEM Installation Guide

Revision as of 18:22, 1 September 2009 by Edlund.almaden.ibm.com (Talk | contribs) (Preparing to Run STEM as a STEM Developer)

STEM Contents Page

STEM Installation Guide

STEM Video on YouTubeTM

The following url contains a full length tutorial on STEM. http://www.youtube.com/watch?v=LfiibQX4IFE We are in the process of creating versions in several different languages.

Installing Java™ JVM

STEM requires at least Java Version 1.5. It also appears to run on Java 1.6. IBMers should obtain the IBM version of Java 1.5. Others can use either IBM's Java 1.5 or the Sun Java 1.5 [[1]].

For MacOS, you should install Java SE 1.6

Installing the Eclipse Environment

If you might contribute to STEM development or if you want to always have the most recent code, then you will need to install Eclipse.

Go to STEM Eclipse Setup

Obtaining the STEM source code

If you want the latest version of the STEM source code, you need to obtain it from the Eclipse CVS repository.

Go to STEM Source Code

Installing/Running the STEM application

You can run STEM in two ways: as a user or as a developer.

As a user, you can run a standalone version of STEM as a modeling and simulation tool. If you run Windows, Linux or Mac and have Java 1.5 installed, you can download the STEM application and use it as a standalone application. To download STEM, use this link STEM downloads We recommend you get the latest version of the code available under "Integration Weekly Builds"

As a developer, you can use any platform supported by Eclipse. You will also need to install Java and download the Eclipse development tools and the STEM source code. Follow the instructions here: Getting the STEM source

Running STEM as a standalone application

If you want to first run STEM as an application, we provide a standalone version of STEM that requires only that you have Java 1.5 or higher installed.

You can get the file by going to this page and downloading the latest integration weekly build for your environment.

Once you have downloaded the zip file (Warning: the download is a very large file and will take awhile to download.), you will have to "unzip" the file into your favorite directory.

This is a self-contained stand-alone version of STEM that is launched by double-clicking on the "STEM.exe" executable file in the root directory of the expanded archive (windows). You'll need to have Java 1.5 installed for it to run, but if you do and it's on the path, you should be greeted by the STEM "splash screen" while it starts up. The Eclipse application at this point shows the STEM Simulation Perspective.
STEM Simulation screen.
Simulation1.jpg

  • The Help->Help Context menubar selection has extensive information on running STEM.
  • The following "views" are shown in the STEM Simulation window.
    • Map
      Canvas that will show the image of the geographic area where the simulation is being run.
    • Simulation Control view
      Panel that both describes the status of the simulation and provides buttons to start and stop the simulation.
    • Scenarios
      The Scenarios window is use to select a prebuilt scenario for a simulation. By selecting leaves in the tree, you can discover an existing scenario for running a simulation. Select the scenario of choice and click the Run or Advance icon on the toolbar.
    • ErrorLog
      This log will contain information about any errors that occur while running the application. If things don't work as you expect, check this view to see if there are any errors or exceptions that have occurred. Note that the ErrorLog on the secondary Eclipse will show errors and exceptions that occur in the application being tested but stdout/stderr will be sent to the Console of the Primary Eclipse. Thus, if an exception is caught by the application and not passed to the built-in log facility, it will only show up on the Primary console. Likewise, if an exception is not caught and sent to stdout/stderr, then it will show up only on the secondary ErrorLog. Confusing!


There are also secondary application that may be selected from the Windows menu.

  • Select windows
    • Select GoogleEarth View
      This is an interface between STEM and the GoogleEarth application.

The basic idea of the GoogleEarth Interface is to allow the information about the geographic spread of diseases to be reflected on the GoogleEarth Web map. Detailed instructions for using the GoogleEarth Interface are included below. [2]

Preparing to Run STEM as a STEM Developer

It is possible to run STEM as an application from the Eclipse Development environment without actually creating the standalone Stem application. Earlier sections described how to set up the environment and checkout the STEM source files. Once you have done that you will want to run the application using the compiled source. A later section will describe how to build the standalone STEM application.

This section will describe how to run and test the STEM application from the source projects. It assumes that you have downloaded the following projects from SVN and the build was error free.

  • STEM projects (required)
    • org.eclipse.stem.analysis
    • org.eclipse.stem.core
    • org.eclipse.stem.data.population.human
    • org.eclipse.stem.data.diseasemodels.models
    • org.eclipse.stem.data.diseasemodels.scenarios
    • org.eclipse.stem.data.geography
    • org.eclipse.stem.data.geography.infrastructure.transportation
    • org.eclipse.stem.data.geography.models
    • org.eclipse.stem.data.geography.population.human
    • org.eclipse.stem.data.geography.population.human.models
    • org.eclipse.stem.definitions
    • org.eclipse.stem.diseasemodels
    • org.eclipse.stem.doc
    • org.eclipse.stem.diseases
    • org.eclipse.stem.feature
    • org.eclipse.stem.feature.core
    • org.eclipse.stem.feature.prereq
    • org.eclipse.stem.diseases
    • org.eclipse.stem.geography
    • org.eclipse.stem.internal.data
    • org.eclipse.stem.internal.data.geography
    • org.eclipse.stem.internal.data.geography.infrastructure.transportation
    • org.eclipse.stem.internal.data.geography.models
    • org.eclipse.stem.internal.data.geography.population
    • org.eclipse.stem.internal.data.geography.population.human
    • org.eclipse.stem.internal.data.geography.population.human.models
    • org.eclipse.stem.internal.data.population.human
    • org.eclipse.stem.internal.diseasemodels.models
    • org.eclipse.stem.internal.diseasemodels.scenarios
    • org.eclipse.stem.jobs
    • org.eclipse.stem.populationmodels
    • org.eclipse.stem.sequencers
    • org.eclipse.stem.solvers.fd
    • org.eclipse.stem.solvers.rk
    • org.eclipse.stem.ui
    • org.eclipse.stem.ui.diseasemodels
    • org.eclipse.stem.ui.populationmodels
    • org.eclipse.stem.ui.reports
    • org.eclipse.stem.ui.solvers.fd
    • org.eclipse.stem.ui.solvers.rk
    • org.eclipse.stem.util.analysis
    • org.eclipse.stem.util.loggers


  • STEM projects (optional)
    • org.eclipse.stem.jobs.nl1
    • org.eclipse.stem.releng
    • org.eclipse.stem.sample
    • org.eclipse.stem.tests.core
    • org.eclipse.stem.tests.definitions
    • org.eclipse.stem.tests.diseasemodels
    • org.eclipse.stem.tests.jobs
    • org.eclipse.stem.tests.sequencers
    • org.eclipse.stem.tests.ui
    • org.eclipse.stem.ui.nl1
    • org.eclipse.stem.utility
    • org.eclipse.stem.diseasemodels.example
    • org.eclipse.stem.diseasemodels.experimental
    • org.eclipse.stem.diseasemodels.externaldatasource
    • org.eclipse.stem.diseasemodels.forcing
    • org.eclipse.stem.diseasemodels.globalinfluenzamodel
    • org.eclipse.stem.ui.diseasemodels.example
    • org.eclipse.stem.ui.diseasemodels.externaldatasource
    • org.eclipse.stem.ui.diseasemodels.forcing
    • org.eclipse.stem.ui.diseasemodels.globalinfluenzamodel

Building the Internal STEM Data as Eclipse Plugins

Data may be added to STEM by creating and editing human readable properties files. From these files, users generate the data as Eclipse plugins by running an ANT script that automatically detects the properties files. The plugins provide users with new nodes and edges that may be added to a scenario using drag and drop editors. STEM comes with a large number of properties files that include location data for the world, nearest neighbor relationships between locations, road network data for North America, etc.

The first step is to generating the data plugins is to run a utility that will create the plugins and compose some of them to automatically build some example scenarios that you can later use to run the STEM application. You will also learn (later) how to compose your own scenarios.

You only need to do the following steps once on initial install or again whenever new properties files are added or edited.

  • Select the org.eclipse.stem.internal.data project
    • Select the update.xml file from the project
    • RightClick and select run As: ant build... (click on the second 'ant build...' option that includes the '...')
    • On the 'Edit Configuration and Launch screen:
      • select the TAB labeled JRE
        • Specify Separate JRE (should show some version of JDK 1.5 or later)
        • For VM arguments make sure that enough memory is allocated: Specify -Xms800M -Xmx800M You may need to pull the dialog window larger to see the VM arguments text field.
      • select Properties
      • verify that eclipse.contrib and eclipse.home2 are both defined and point to your eclipse install directory. If not, refer to [3]
      • Select Run

It will churn away for awhile (maybe 10 minutes or more), displaying a lot of console output ending with: If you get error messages about eclipse.home2 then refer to [4]

 BUILD SUCCESSFUL
 Total time: n minutes n seconds


Start STEM product

Once the scenario is built, you need to startup STEM and run the simulation.

  • Go to the Package Explorer view
  • Select the org.eclipse.stem.ui project
    • Right click feature.product
  • From the popup context menu, select Run As -> Open Run Dialog..
  • From the Arguments Tab
    • Specify Program arguments "-consoleLog"
    • Specify VM arguments "-Xmx600M"
  • Select the RUN button at the bottom of the screen


It should build a new image of STEM and launch it.

The system will grind away and start a new instance of Eclipse with support just for STEM. If you have not done this before, you should be aware that this new instance is being controlled by your primary Eclipse instance and console output from your application will be sent back to your primary Eclipse. Also you can use the debugger and the debugging controls for the application will be on the primary Eclipse window as the application runs in the secondary Eclipse.

You are now running the STEM application. See the instructions for running the Standalone version of STEM [5]

Also, use the Help->Help Context from the menubar to get extensive Help information.

Generate JavaDoc for STEM

You can easily generate JavaDoc for STEM with the following process.

  • Select the org.eclipse.stem.doc project
    • Select the javadoc.xml file from the project
    • RightClick and select run As: ant build

This will generate javadoc in org.eclipse.stem.doc/javadoc and it can be displayed by selecting the index.html member.

Back to the top