Part II -- Animating the Rapide Model
Michael Chen
August 27, 1996
Rewritten: H. Hildreth, 9-18-96.
Revised: H. Hildreth, 9-30-96
PART II: Animating the Rapide Model
Objective: Create an input file for Raptor,
ail.arch, that will enable
animation of the AIL architecture model developed in Part 1. Note that
the files ail.rpd and ail.log are unchanged from Part I.
Rapide concepts introduced: the animation tool, raptor; raptor input files
describing graphical layout of architectures, components and communication
paths.
Procedure: The Raptor tutorial, "Animating Rapide Simulation with Raptor:
Life on the Farm" (Santoro, Vera), is an excellent instructional manual to
assist in animation of Rapide models. Please also refer to the "raptor"
man page.
The steps below will lead you through the creation of
ail.arch, which is the animation layout file associated with ail.rpd.
The first step is to define the dimensions (in inches) of the box representing
the highest-level (or all-encompassing) component, in this case "ail."
architecture ail:1
dim 4 6
The "1" after the colon is an index. If we had an array of ail components,
they would be identified as ail:1, ail:2, ail:3, etc.
The second step is to plan the graphical layout of boxes representing "modules"
(or subcomponents). x,y coordinates are given for the upper left and lower
right corners of each box. The origin for these coordinates is the upper
left corner of the enclosing box, defined by an "architecture" statement.
(It is helpful to use a sheet of graph paper.) The following statement draws
a 2" x 1" box for the module identified as ClientArch:1.
mod ClientArch:1 "Client PC" rectangle {1.0 1.0} {3.0 2.0} -fill "thistle"
"Client PC" is a label, "thistle" is a color, and the coordinate origin is
the upper left corner of the 4" x 6" ail:1 box. To view the layout of the
client and server, type the following command:
raptor -a ail.arch
Exit raptor by selecting "Exit" under the "File" menu.
The third step is to plan the graphical layout of paths. Path coordinates
indicate the beginning and end of the path (and possibly of intermediate
turning points). For example, the path between the client and server
"modules" is defined as follows. "twoway" indicates twoway communication
(i.e., events travel in both directions, and "both" indicates a double-headed
arrow.
path ClientArch:1 ServerArch:1 {2.0 2.0} {2.0 4.0} -twoway both -width 2
The ail architecture contains only the two components, client and server.
By defining a raptor architecture for each of these components, we are able to
bring up a separate window (by double-clicking on the client or server box)
that displays client or server subcomponents. The layout of client/server
subcomponents is done in the same fashion as above; i.e., the position of
subcomponent boxes is defined with respect to the upper left corner of the
encompassing (client or server) box, and then paths between boxes are defined.
Note that "modules" and "paths" (representing subcomponents and
their connections) are defined between the "architecture..." and "end"
statements (for the encompassing higher-level component).
Try running raptor again. This time double click (this may take multiple
attempts) on the client and server boxes. Windows can be dragged into better
viewing positions.
raptor -a ail.arch
To animate the model, choose the "Load Log File" option of the "File" menu,
and select ail.log. Alternatively, exit raptor and rerun using the following
command:
raptor -a ail.arch ail.log
Exit raptor by selecting "Exit" under the "File" menu.
[
Back to the Index |
Next |
Prev]