SME Java Interface

If the SME is configured and installed with java enabled ( requires JDK 1.2 ), then the user has the option of running the SME with a java interface attached. The java interface can be used in two modalities, offering different levels of functionality: the full interface, and the standalone ViewServer.

12.1 Using the standalone ViewServer

The standalone ViewServer allows the user to display simulation output using a set of java viewers, but control and execution of the simulation is handled through the SME command-line interface. The ViewServer is started using the startup_viewserver script. The ViewServer can remain up for many simulation runs. If the ViewServer is started on a host that is different from the host on which the simulation is running, then the simulation must be run with the command "SME -VShost <hostName> run <modelName>". If the ViewServer default port is busy, then the ViewServer will use an alternate port. In this case, the user may have to run with the SME arguments "-VSport <port_number>".

The user can specify that the data of any Variable in the simulation be piped to the ViewServer at each timestep using the "DD()" config-cmd ( see section 7.1.8 ). Also, at any time in the simulation the "dv" sim-cmd can be used from the SME> prompt to display the data of the current Variable ( chosen using the "l" and "c" sim-cmds ). The ViewServer provides a palette of viewers for visualizing any simulation data that is piped to it.

12.1 Using the full java interface

The full java interface allows the user to configure, execute, control, and visualize a simulation through the interface. The ViewServer described above runs as one component of the full interface. To start up the SME using the full interface, with the interface and the simulation running on the same host, execute "SME -java local run SME". To run the simulation and interface on different hosts, start up the SME with the command "SME -java <interface_host_name> run <modelname>". The SME will then start up and pause while listening for connections, giving the port number that it is using. Next, start up the interface on the interface host using the command "startup_client -p <SME_port> -h <SME_host> xxx". The interface will then start up and connect to the SME driver.

The first panel that comes up in the interface is the Configuration panel, which displays the configuration information read from the SME configuration files and allows the user to reconfigure the model. When the user is ready to run the model they should choose the Control Panel, where they can set up and execute simulation runs, pipe data to the ViewServer, browse through the Variable dependency tree, view the equation for any Variable, and bring up a snapshot of the simulation data for any Variable in the model. The Messages panel is the screen output of the running SME Driver, arranged in pages, and the View panel is the ViewServer described above.