<?xml version="1.0" encoding="UTF-8"?> 
<java version="1.4.1-rc" class="java.beans.XMLDecoder"> 
 <object class="eclpss.model.ModelSpecification"> 
  <void property="author"> 
   <string>ew</string> 
  </void> 
  <void property="componentsVector"> 
   <void method="add"> 
    <object id="ComponentSpecification0" class="eclpss.component.ComponentSpecification"> 
     <void property="author"> 
      <string>ew</string> 
     </void> 
     <void property="date"> 
      <object class="java.util.Date"> 
       <long>1014958800000</long> 
      </object> 
     </void> 
     <void property="documentation"> 
      <array class="java.lang.String" length="18"> 
       <void index="0"> 
        <string>ew</string> 
       </void> 
       <void index="1"> 
        <string>3/1/02</string> 
       </void> 
       <void index="2"> 
        <string>9/17/03</string> 
       </void> 
       <void index="3"> 
        <string>8/15/02</string> 
       </void> 
       <void index="4"> 
        <string>During pre-simulation, populates grid with randomly generated hot cells.  During
the simulation will determine which cells in the grid become and/or stay hot.</string> 
       </void> 
       <void index="5"> 
        <string></string> 
       </void> 
       <void index="6"> 
        <string>Imported into current Eclpss version.</string> 
       </void> 
       <void index="7"> 
        <string></string> 
       </void> 
       <void index="8"> 
        <string></string> 
       </void> 
       <void index="9"> 
        <string></string> 
       </void> 
       <void index="10"> 
        <string></string> 
       </void> 
       <void index="11"> 
        <string></string> 
       </void> 
       <void index="12"> 
        <string></string> 
       </void> 
       <void index="13"> 
        <string></string> 
       </void> 
       <void index="14"> 
        <string></string> 
       </void> 
       <void index="15"> 
        <string></string> 
       </void> 
       <void index="16"> 
        <string></string> 
       </void> 
       <void index="17"> 
        <string></string> 
       </void> 
      </array> 
     </void> 
     <void property="eclpssVersion"> 
      <string>version 1.2.b0</string> 
     </void> 
     <void property="esvs"> 
      <array class="eclpss.esv.ESVSpecification" length="1"> 
       <void index="0"> 
        <object id="ESVSpecification0" class="eclpss.esv.ESVSpecification"> 
         <void property="attributeConstants"> 
          <void method="add"> 
           <object class="eclpss.esv.Constant"> 
            <void property="index"> 
             <int>0</int> 
            </void> 
            <void property="name"> 
             <string>Value_MIN</string> 
            </void> 
            <void property="type"> 
             <string>double</string> 
            </void> 
            <void property="value"> 
             <string>0.0</string> 
            </void> 
           </object> 
          </void> 
          <void method="add"> 
           <object class="eclpss.esv.Constant"> 
            <void property="index"> 
             <int>0</int> 
            </void> 
            <void property="name"> 
             <string>Value_MAX</string> 
            </void> 
            <void property="type"> 
             <string>double</string> 
            </void> 
            <void property="value"> 
             <string>102400.0</string> 
            </void> 
           </object> 
          </void> 
         </void> 
         <void property="attributes"> 
          <void method="add"> 
           <object class="eclpss.esv.Attribute"> 
            <void property="index"> 
             <int>0</int> 
            </void> 
            <void property="name"> 
             <string>Value</string> 
            </void> 
            <void property="type"> 
             <string>double</string> 
            </void> 
           </object> 
          </void> 
          <void method="add"> 
           <object class="eclpss.esv.Attribute"> 
            <void property="index"> 
             <int>1</int> 
            </void> 
            <void property="name"> 
             <string>StayHot</string> 
            </void> 
            <void property="type"> 
             <string>boolean</string> 
            </void> 
           </object> 
          </void> 
         </void> 
         <void property="author"> 
          <string>re</string> 
         </void> 
         <void property="comments"> 
          <string>static double MIN, the minimum temp of a cell, is cold.
static double MAX, the max temp of a cell, is hot.
boolean StayHot, set a cell to retain it&apos;s hotness on grid.</string> 
         </void> 
         <void property="date"> 
          <object class="java.util.Date"> 
           <long>1014872400000</long> 
          </object> 
         </void> 
         <void property="eclpssVersion"> 
          <string>version 1.2.b0</string> 
         </void> 
         <void property="externalLocation"> 
          <string>/home/strempel/models/Temp.esv</string> 
         </void> 
         <void property="name"> 
          <string>Temp</string> 
         </void> 
         <void property="staticDeclarations"> 
          <string></string> 
         </void> 
         <void property="timeStamp"> 
          <object class="java.util.Date"> 
           <long>1063820002707</long> 
          </object> 
         </void> 
        </object> 
       </void> 
      </array> 
     </void> 
     <void property="externalLocation"> 
      <string>/home/strempel/models/HotCells.cpt</string> 
     </void> 
     <void property="height"> 
      <string></string> 
     </void> 
     <void property="javadoc"> 
      <string>/**
 *&lt;UL&gt;&lt;BR&gt;
 *&lt;LI&gt;&lt;BIG&gt;This is an &lt;font color = &quot;mediumblue&quot;&gt;&lt;i&gt; ECLPSS Component&lt;/i&gt;&lt;/font&gt;&lt;/BIG&gt;&lt;/LI&gt;&lt;BR&gt;
 *&lt;LI&gt;&lt;b&gt;Author: &lt;/b&gt;ew&lt;/LI&gt;&lt;BR&gt;
 *&lt;LI&gt;&lt;b&gt;Date Created: &lt;/b&gt;3/1/02&lt;/LI&gt;&lt;BR&gt;
 *&lt;LI&gt;&lt;b&gt;Date Saved: &lt;/b&gt;9/17/03&lt;/LI&gt;&lt;BR&gt;
 *&lt;LI&gt;&lt;b&gt;Version: &lt;/b&gt;8/15/02&lt;/LI&gt;&lt;BR&gt;&lt;br&gt;
 *&lt;LI&gt;&lt;b&gt;Purpose: &lt;/b&gt;During pre-simulation, populates grid with randomly generated hot cells.  During
the simulation will determine which cells in the grid become and/or stay hot.&lt;/LI&gt;&lt;BR&gt;
 *&lt;LI&gt;&lt;b&gt;Algorithm Citation: &lt;/b&gt;&lt;/LI&gt;&lt;BR&gt;
 *&lt;LI&gt;&lt;b&gt;Modification History: &lt;/b&gt;Imported into current Eclpss version.&lt;/LI&gt;&lt;BR&gt;
 *&lt;LI&gt;&lt;b&gt;Assumptions: &lt;/b&gt;&lt;/LI&gt;&lt;BR&gt;
 *&lt;LI&gt;&lt;b&gt;Limitations: &lt;/b&gt;&lt;/LI&gt;&lt;BR&gt;
 *&lt;LI&gt;&lt;b&gt;Known Problems: &lt;/b&gt;&lt;/LI&gt;&lt;BR&gt;
 *&lt;LI&gt;&lt;b&gt;Suggested Improvements: &lt;/b&gt;&lt;/LI&gt;&lt;BR&gt;
 *&lt;LI&gt;&lt;b&gt;Testing Statistics: &lt;/b&gt;&lt;/LI&gt;&lt;BR&gt;
 *&lt;LI&gt;&lt;b&gt;Models used in: &lt;/b&gt;&lt;/LI&gt;&lt;BR&gt;
 *&lt;LI&gt;&lt;b&gt;General Comments: &lt;/b&gt;&lt;/LI&gt;&lt;BR&gt;
 *&lt;LI&gt;&lt;b&gt;Pre-Sim Comments: &lt;/b&gt;&lt;/LI&gt;&lt;BR&gt;
 *&lt;LI&gt;&lt;b&gt;Sim Comments: &lt;/b&gt;&lt;/LI&gt;&lt;BR&gt;
 *&lt;LI&gt;&lt;b&gt;Post-Sim Comments: &lt;/b&gt;&lt;/LI&gt;&lt;BR&gt;
 *&lt;LI&gt;&lt;b&gt;Local Method Comments: &lt;/b&gt;&lt;/LI&gt;&lt;BR&gt;
*/
</string> 
     </void> 
     <void property="localMethodCode"> 
      <string>public static Point [] hotCells;
   public static Point [] hotCellsPrev;
   public static boolean [] stayHot;
   public int numberKeptHot = 0;
   static int numberCells = 0;
   
/** 
  Fill the grid with random hot cells.
  Number of random hot cells determined by
  static model variable percentHot.
*/


   void initializeHotCells() {
      int xub = grid.getAbsXUB();
      int yub = grid.getAbsYUB();
      int zub = grid.getAbsZUB();
      zub = zub==0? 1 : zub;


// figure out how many cells will be hot

      double cellCount = xub * yub *zub;
      numberCells = (int) (cellCount * model.percentHot);

//make the arrays that large

      hotCells= new Point[numberCells];
      hotCellsPrev = new Point[numberCells];
      stayHot = new boolean[numberCells];

      Random r = new Random();

//Randomly select:  a point
//Randomly decide: should it stay hot or hot

      Point p = null;
      Point q = null;

// System.out.println(&quot;initialize&quot;);
      for (int i = 0; i &lt; numberCells; i++) {
         stayHot[i] = r.nextBoolean();
         if (stayHot[i]) ++numberKeptHot;
         p = new Point((int)(r.nextFloat()*xub),
                       (int)(r.nextFloat()*yub),
                       (int)(r.nextFloat()*zub),
                        NOW);
         q = new Point(p.getX(), p.getY(), p.getZ(), BACK1);
         hotCells[i] = p;
         hotCellsPrev[i] = q;

         System.out.println(&quot;hotCells[&quot;+i+&quot;]= &quot;+hotCells[i] + &quot; &quot; + stayHot[i]);
      }
   }


/** 
  keep the cells that are to remain hot - get rid of the rest.
  This way, only those cells that stay hot are accessed - no
  testing on the array is necessary during sim.
*/
   void finalizeHotCells() {
      Point [] keepHot = new Point [numberKeptHot];
      Point [] keepHotPrev = new Point [numberKeptHot];
      int keepHoti=0;

      System.out.println(&quot;finalize&quot;);

      for (int i=0; i&lt; numberCells; i++) {
         if (stayHot[i]) {
            keepHot[keepHoti] = hotCells[i];
            keepHotPrev[keepHoti] = hotCellsPrev[i];
   System.out.println(&quot;keepHot[&quot;+keepHoti+&quot;]= &quot;+keepHot[keepHoti]);
            ++keepHoti;
         }
      }      
      hotCells = keepHot;
      hotCellsPrev = keepHotPrev;

   }


static boolean samePoint(Point p, Point q) {

return (p.getX() == q.getX() &amp;&amp; p.getY() == q.getY() &amp;&amp; 
        p.getZ() == q.getZ() &amp;&amp; p.getT() == q.getT());
}</string> 
     </void> 
     <void property="name"> 
      <string>HotCells</string> 
     </void> 
     <void property="numTimeFrames"> 
      <int>2</int> 
     </void> 
     <void property="postRecords"> 
      <object class="java.util.Vector"/> 
     </void> 
     <void property="preRecords"> 
      <object class="java.util.Vector"> 
       <void method="add"> 
        <object class="eclpss.component.ESVReadsAndWritesRecord"> 
         <void property="name"> 
          <string>Temp</string> 
         </void> 
         <void property="written"> 
          <boolean>true</boolean> 
         </void> 
        </object> 
       </void> 
      </object> 
     </void> 
     <void property="preSimCode"> 
      <string>initializeHotCells();

//do initial population of all cells to cold

for (int x=grid.getAbsXLB()-1; x&lt; grid.getAbsXUB(); x++) {
   for (int y=grid.getAbsYLB()-1; y&lt; grid.getAbsYUB(); y++) {
     grid.writeAbsTemp(new Point(x,y,NOW)).add( Temp.Value_MIN, false );
   }
}


//update intial population of for cells
for (int i=0; i&lt; hotCells.length; i++) {
   TempSVItr tItr = grid.writeAbsTemp(hotCells[i]);
   tItr.setValue(Temp.Value_MAX);
   tItr.setStayHot(true);
}


finalizeHotCells();</string> 
     </void> 
     <void property="simCode"> 
      <string>//check the current cell against the hotCells array
// to see if it is a hot cell to be kept hot.
//If it is, make it&apos;s new value value from previous to current.


boolean done = false;
int i=0;
while (!done &amp;&amp; i&lt;hotCells.length) {
   if (samePoint(current,hotCells[i++])) {
      grid.writeAbsTemp(current).add( Temp.Value_MAX, true );
      done = true;
   }
}</string> 
     </void> 
     <void property="simRecords"> 
      <object class="java.util.Vector"> 
       <void method="add"> 
        <object class="eclpss.component.ESVReadsAndWritesRecord"> 
         <void property="name"> 
          <string>Temp</string> 
         </void> 
         <void property="written"> 
          <boolean>true</boolean> 
         </void> 
        </object> 
       </void> 
      </object> 
     </void> 
     <void property="staticDeclarations"> 
      <string></string> 
     </void> 
     <void property="timeStamp"> 
      <object class="java.util.Date"> 
       <long>1063806095834</long> 
      </object> 
     </void> 
     <void property="width"> 
      <string></string> 
     </void> 
    </object> 
   </void> 
   <void method="add"> 
    <object id="ComponentSpecification1" class="eclpss.component.ComponentSpecification"> 
     <void property="author"> 
      <string>ew</string> 
     </void> 
     <void property="date"> 
      <object class="java.util.Date"> 
       <long>1014872400000</long> 
      </object> 
     </void> 
     <void property="documentation"> 
      <array class="java.lang.String" length="18"> 
       <void index="0"> 
        <string>ew</string> 
       </void> 
       <void index="1"> 
        <string>2/28/02</string> 
       </void> 
       <void index="2"> 
        <string>9/17/03</string> 
       </void> 
       <void index="3"> 
        <string>8/15/02</string> 
       </void> 
       <void index="4"> 
        <string>Upgrade grid to reflect current &quot;hotness.&quot;</string> 
       </void> 
       <void index="5"> 
        <string></string> 
       </void> 
       <void index="6"> 
        <string></string> 
       </void> 
       <void index="7"> 
        <string></string> 
       </void> 
       <void index="8"> 
        <string></string> 
       </void> 
       <void index="9"> 
        <string></string> 
       </void> 
       <void index="10"> 
        <string></string> 
       </void> 
       <void index="11"> 
        <string></string> 
       </void> 
       <void index="12"> 
        <string></string> 
       </void> 
       <void index="13"> 
        <string></string> 
       </void> 
       <void index="14"> 
        <string></string> 
       </void> 
       <void index="15"> 
        <string></string> 
       </void> 
       <void index="16"> 
        <string></string> 
       </void> 
       <void index="17"> 
        <string></string> 
       </void> 
      </array> 
     </void> 
     <void property="eclpssVersion"> 
      <string>version 1.2.b0</string> 
     </void> 
     <void property="esvs"> 
      <array class="eclpss.esv.ESVSpecification" length="1"> 
       <void index="0"> 
        <object class="eclpss.esv.ESVSpecification"> 
         <void property="attributeConstants"> 
          <void method="add"> 
           <object class="eclpss.esv.Constant"> 
            <void property="index"> 
             <int>0</int> 
            </void> 
            <void property="name"> 
             <string>Value_MIN</string> 
            </void> 
            <void property="type"> 
             <string>double</string> 
            </void> 
            <void property="value"> 
             <string>0.0</string> 
            </void> 
           </object> 
          </void> 
          <void method="add"> 
           <object class="eclpss.esv.Constant"> 
            <void property="index"> 
             <int>0</int> 
            </void> 
            <void property="name"> 
             <string>Value_MAX</string> 
            </void> 
            <void property="type"> 
             <string>double</string> 
            </void> 
            <void property="value"> 
             <string>102400.0</string> 
            </void> 
           </object> 
          </void> 
         </void> 
         <void property="attributes"> 
          <void method="add"> 
           <object class="eclpss.esv.Attribute"> 
            <void property="index"> 
             <int>0</int> 
            </void> 
            <void property="name"> 
             <string>Value</string> 
            </void> 
            <void property="type"> 
             <string>double</string> 
            </void> 
           </object> 
          </void> 
          <void method="add"> 
           <object class="eclpss.esv.Attribute"> 
            <void property="index"> 
             <int>1</int> 
            </void> 
            <void property="name"> 
             <string>StayHot</string> 
            </void> 
            <void property="type"> 
             <string>boolean</string> 
            </void> 
           </object> 
          </void> 
         </void> 
         <void property="author"> 
          <string>re</string> 
         </void> 
         <void property="comments"> 
          <string></string> 
         </void> 
         <void property="constants"> 
          <void method="add"> 
           <object class="eclpss.esv.Constant"> 
            <void property="index"> 
             <int>0</int> 
            </void> 
            <void property="name"> 
             <string>MULTIPLIER</string> 
            </void> 
            <void property="type"> 
             <string>double</string> 
            </void> 
            <void property="value"> 
             <string>100.0</string> 
            </void> 
           </object> 
          </void> 
         </void> 
         <void property="date"> 
          <object class="java.util.Date"> 
           <long>1014872400000</long> 
          </object> 
         </void> 
         <void property="externalLocation"> 
          <string>/home/tsmart/public_html/classes/eclpssSaves/random3/Temp.esv</string> 
         </void> 
         <void property="name"> 
          <string>Temp</string> 
         </void> 
         <void property="staticDeclarations"> 
          <string></string> 
         </void> 
         <void property="timeStamp"> 
          <object class="java.util.Date"> 
           <long>1029415522131</long> 
          </object> 
         </void> 
        </object> 
       </void> 
      </array> 
     </void> 
     <void property="externalLocation"> 
      <string>/home/strempel/models/CoolDown.cpt</string> 
     </void> 
     <void property="height"> 
      <string></string> 
     </void> 
     <void property="javadoc"> 
      <string>/**
 *&lt;UL&gt;&lt;BR&gt;
 *&lt;LI&gt;&lt;BIG&gt;This is an &lt;font color = &quot;mediumblue&quot;&gt;&lt;i&gt; ECLPSS Component&lt;/i&gt;&lt;/font&gt;&lt;/BIG&gt;&lt;/LI&gt;&lt;BR&gt;
 *&lt;LI&gt;&lt;b&gt;Author: &lt;/b&gt;ew&lt;/LI&gt;&lt;BR&gt;
 *&lt;LI&gt;&lt;b&gt;Date Created: &lt;/b&gt;2/28/02&lt;/LI&gt;&lt;BR&gt;
 *&lt;LI&gt;&lt;b&gt;Date Saved: &lt;/b&gt;9/17/03&lt;/LI&gt;&lt;BR&gt;
 *&lt;LI&gt;&lt;b&gt;Version: &lt;/b&gt;8/15/02&lt;/LI&gt;&lt;BR&gt;&lt;br&gt;
 *&lt;LI&gt;&lt;b&gt;Purpose: &lt;/b&gt;Upgrade grid to reflect current &quot;hotness.&quot;&lt;/LI&gt;&lt;BR&gt;
 *&lt;LI&gt;&lt;b&gt;Algorithm Citation: &lt;/b&gt;&lt;/LI&gt;&lt;BR&gt;
 *&lt;LI&gt;&lt;b&gt;Modification History: &lt;/b&gt;&lt;/LI&gt;&lt;BR&gt;
 *&lt;LI&gt;&lt;b&gt;Assumptions: &lt;/b&gt;&lt;/LI&gt;&lt;BR&gt;
 *&lt;LI&gt;&lt;b&gt;Limitations: &lt;/b&gt;&lt;/LI&gt;&lt;BR&gt;
 *&lt;LI&gt;&lt;b&gt;Known Problems: &lt;/b&gt;&lt;/LI&gt;&lt;BR&gt;
 *&lt;LI&gt;&lt;b&gt;Suggested Improvements: &lt;/b&gt;&lt;/LI&gt;&lt;BR&gt;
 *&lt;LI&gt;&lt;b&gt;Testing Statistics: &lt;/b&gt;&lt;/LI&gt;&lt;BR&gt;
 *&lt;LI&gt;&lt;b&gt;Models used in: &lt;/b&gt;&lt;/LI&gt;&lt;BR&gt;
 *&lt;LI&gt;&lt;b&gt;General Comments: &lt;/b&gt;&lt;/LI&gt;&lt;BR&gt;
 *&lt;LI&gt;&lt;b&gt;Pre-Sim Comments: &lt;/b&gt;&lt;/LI&gt;&lt;BR&gt;
 *&lt;LI&gt;&lt;b&gt;Sim Comments: &lt;/b&gt;&lt;/LI&gt;&lt;BR&gt;
 *&lt;LI&gt;&lt;b&gt;Post-Sim Comments: &lt;/b&gt;&lt;/LI&gt;&lt;BR&gt;
 *&lt;LI&gt;&lt;b&gt;Local Method Comments: &lt;/b&gt;&lt;/LI&gt;&lt;BR&gt;
*/
</string> 
     </void> 
     <void property="localMethodCode"> 
      <string>static int xLeft, xRight, yLeft, yRight;

// ECLPSSgrid is a &quot;generic&quot; grid - the framework replaces
// it with the correct name at model run time.

/** Get the bounds of the grid.
    @param grid - the 2-D grid of the model
    @param current - the current  cell in the model grid
*/
void getBounds(ECLPSSGrid grid, Point current) {
   xLeft = grid.getAbsXLB()-1;
   xRight = grid.getAbsXUB()-1;
   yLeft = grid.getAbsYLB()-1;
   yRight = grid.getAbsYUB()-1;
}

// relative offsets from current
static final Point N = new Point( 0, -1, BACK1 );
static final Point S = new Point( 0, 1, BACK1 );
static final Point E = new Point( 1, 0, BACK1 );
static final Point W = new Point( -1, 0, BACK1 );



/** checks to see if the 2-D grid cell at absolute
    address (x,y) is a corner cell.
    @param x - absolute address of x
    @param y - absolute address of y
    @return true if a corner cell, false otherwise
*/


public boolean isCorner(int x, int y) {
return ( (x==xLeft &amp;&amp; y==yLeft) ||
         (x==xRight &amp;&amp; y==yLeft) ||
         (x==xLeft &amp;&amp; y==yRight) ||
         (x==xRight &amp;&amp; y==yRight) );
}

/** checks to see if the 2-D grid cell at absolute
    address (x,y) is  on a side of the grid.
    @param x - absolute address of x
    @param y - absolute address of y
    @return true if (x,y) the side of grid, false otherwise
*/

public boolean isSide(int x, int y) {
        return (!isCorner(x,y) &amp;&amp; 
                (x==xLeft || x==xRight || y==yLeft || y==yRight)
               );
}</string> 
     </void> 
     <void property="name"> 
      <string>CoolDown</string> 
     </void> 
     <void property="numTimeFrames"> 
      <int>2</int> 
     </void> 
     <void property="postRecords"> 
      <object class="java.util.Vector"/> 
     </void> 
     <void property="preRecords"> 
      <object class="java.util.Vector"/> 
     </void> 
     <void property="simCode"> 
      <string>int x = current.getX();
int y = current.getY();

int it = model.getTimeIteration();

// print the iteration number to the console modulo displayRate
if (x==0 &amp;&amp; y==0 &amp;&amp; ((it-1) % model.displayRate == 0) )
   System.out.println(&quot;Iteration &quot;+it);


// if this is supposed to stay the same temp, make it so and return


TempSVItr prevTempItr = grid.readTemp(current,PREVIOUS);
if (prevTempItr.getStayHot()) {
   grid.writeTemp(current,CURRENT).add( prevTempItr.getValue(), true );
   return;
}

double temp = 0.0;
double north = 0.0;
double south = 0.0;
double east = 0.0;
double west = 0.0;


try { south = grid.readTemp(current,S).getValue(); }
catch (Exception e) {}

try { north = grid.readTemp(current,N).getValue(); }
catch (Exception e) {}

try { east = grid.readTemp(current,E).getValue(); }
catch (Exception e) {}

try { west = grid.readTemp(current,W).getValue(); }
catch (Exception e) {}


getBounds(grid, current);




// since all points are either correct (within the grid boundaries)
// or 0.0 (all points are initialized to 0, and any out-of-bound gets 
// are caught)
//we can add them all up, and then just divide by the appropriate amount.
//I&apos;m multiplying (where there is no roundoff error) since it is faster than divide

   if (isCorner(x,y)) {
      grid.writeTemp(current,CURRENT).add( (north+south+east+west)*0.5, false );
   }
   else if (isSide(x,y)) {
      grid.writeTemp(current,CURRENT).add( (north+south+east+west)/3.0, false );
   }
   else {
      grid.writeTemp(current,CURRENT).add( (north+south+east+west)*0.25, false );
   }
</string> 
     </void> 
     <void property="simRecords"> 
      <object class="java.util.Vector"> 
       <void method="add"> 
        <object class="eclpss.component.ESVReadsAndWritesRecord"> 
         <void property="name"> 
          <string>Temp</string> 
         </void> 
         <void property="read"> 
          <boolean>true</boolean> 
         </void> 
         <void property="written"> 
          <boolean>true</boolean> 
         </void> 
        </object> 
       </void> 
      </object> 
     </void> 
     <void property="staticDeclarations"> 
      <string></string> 
     </void> 
     <void property="timeStamp"> 
      <object class="java.util.Date"> 
       <long>1063806895335</long> 
      </object> 
     </void> 
     <void property="width"> 
      <string></string> 
     </void> 
    </object> 
   </void> 
   <void method="add"> 
    <object class="eclpss.component.GraphicalComponentSpecification"> 
     <void property="attribute"> 
      <object id="Attribute0" class="eclpss.esv.Attribute"> 
       <void property="index"> 
        <int>0</int> 
       </void> 
       <void property="name"> 
        <string>Value</string> 
       </void> 
       <void property="type"> 
        <string>double</string> 
       </void> 
      </object> 
     </void> 
     <void property="author"> 
      <string>Generated Graphical Component</string> 
     </void> 
     <void property="date"> 
      <object class="java.util.Date"> 
       <long>1063654825691</long> 
      </object> 
     </void> 
     <void property="documentation"> 
      <array class="java.lang.String" length="18"> 
       <void index="0"> 
        <string>Generated Graphical Component</string> 
       </void> 
       <void index="1"> 
        <string>9/15/03</string> 
       </void> 
      </array> 
     </void> 
     <void property="esvs"> 
      <array class="eclpss.esv.ESVSpecification" length="1"> 
       <void index="0"> 
        <object idref="ESVSpecification0"/> 
       </void> 
      </array> 
     </void> 
     <void property="frameTitle"> 
      <string>DisplayCells</string> 
     </void> 
     <void property="graphical"> 
      <boolean>true</boolean> 
     </void> 
     <void property="localMethodCode"> 
      <string>public void paint(Graphics g) {
  g.drawImage(image,15,30,Color.blue,this);

  float[] slope = new float[3];
  float[] startHSB = new float[3];
  Color.RGBtoHSB(0, 0, 255, startHSB);
  float[] endHSB = new float[3];
  Color.RGBtoHSB(255, 0, 0, endHSB);

  slope[0] = (endHSB[0] - startHSB[0])/frameWidth;
  slope[1] = (endHSB[1] - startHSB[1])/frameWidth;
  slope[2] = (endHSB[2] - startHSB[2])/frameWidth;

  for(int i = 0; i &lt; frameWidth; i++){
    g.setColor(Color.getHSBColor(startHSB[0] + (slope[0]*i),
      startHSB[1] + (slope[1]*i),
      startHSB[2] + (slope[2]*i)));
    g.drawLine(i+15, frameHeight+35, i+15, frameHeight+55);
  }

  g.setColor(Color.black);
  g.drawString(&quot;0.0&quot;, 15, frameHeight+70);
  g.drawString(&quot;102400.0&quot;,frameWidth-10,frameHeight+70);
}

Graphics2D offScreen = null;
int frameWidth = 500 - 80;
int frameHeight = 500 - 80;
java.awt.image.BufferedImage image = new java.awt.image.BufferedImage(frameWidth, frameHeight, java.awt.image.BufferedImage.TYPE_INT_RGB);
</string> 
     </void> 
     <void property="maxValue"> 
      <string>102400</string> 
     </void> 
     <void property="minValue"> 
      <string>0</string> 
     </void> 
     <void property="name"> 
      <string>DisplayCells</string> 
     </void> 
     <void property="postRecords"> 
      <object class="java.util.Vector"> 
       <void method="add"> 
        <object class="eclpss.component.ESVReadsAndWritesRecord"> 
         <void property="name"> 
          <string>Temp</string> 
         </void> 
         <void property="read"> 
          <boolean>true</boolean> 
         </void> 
        </object> 
       </void> 
      </object> 
     </void> 
     <void property="postSimCode"> 
      <string>boolean threeDimensions = !(grid.getZBoundryType()==ComputationalGrid.NO_Z); if(offScreen == null) {
  offScreen = image.createGraphics();
}
int xLB = grid.getXLB();
int yLB = grid.getYLB();
int zLB = grid.getZLB();
int xUB = grid.getXUB();
int yUB = grid.getYUB();
int zUB = grid.getZUB();

int blockWidth = 0;
int blockHeight = 0;
if(threeDimensions){
  if((2*xUB + 2*zUB) &gt; (2*yUB+2*zUB)){
    blockWidth = frameWidth / ((2*xUB)+(2*zUB));
    blockHeight = blockWidth;
  }
  else{
    blockWidth = frameHeight / ((2*yUB)+(2*zUB));
    blockHeight = blockWidth;
  }
}//end if(threeDimensions){
else{
  blockWidth = frameWidth / xUB;
  blockHeight = frameHeight/ yUB;
}
float value = (float)0;


float[] hsbStartColors = new float[3];
Color.RGBtoHSB(0, 0, 255, hsbStartColors);
float[] hsbEndColors = new float[3];
Color.RGBtoHSB(255, 0, 0, hsbEndColors);


ChangeablePoint p = new ChangeablePoint(xLB,yLB,zLB,-1);
for(int xx=0; xx&lt;xUB; xx++){
  p.setX(xx);
  for(int yy=0; yy&lt;yUB; yy++){
    p.setY(yy);
    if(threeDimensions){
      for(int zz=0;zz&lt;zUB;zz++){
        p.setZ(zz);
        try{
          value = (float)grid.readAbsTemp(current,p).getValue();
        }catch(Exception e){}

        float hue = 0f;
        if(hsbStartColors[0] == hsbEndColors[0]){
          hue = hsbStartColors[0];
        }
        else if(hsbStartColors[0]&gt;hsbEndColors[0]){
          hue = ((float)102400-value)*((hsbStartColors[0]-hsbEndColors[0])/((float)102400-(float)0))+hsbEndColors[0];
        }
        else{
          hue = (value-(float)0)*((hsbEndColors[0]-hsbStartColors[0])/((float)102400-(float)0))+hsbStartColors[0];
        }

        float sat = 0f;
        if(hsbStartColors[1] == hsbEndColors[1]){
          sat = hsbStartColors[1];
        }
        else if(hsbStartColors[1] &gt; hsbEndColors[1]){
          sat = ((float)102400-value)*((hsbStartColors[1]-hsbEndColors[1])/((float)102400-(float)0))+hsbEndColors[1];
        }
        else{
          sat = (value-(float)0)*((hsbEndColors[1]-hsbStartColors[1])/((float)102400-(float)0))+hsbStartColors[1];
        }

        float bri = 0f;
        if(hsbStartColors[2] == hsbEndColors[2]){
          bri = hsbStartColors[2];
        }
        else if(hsbStartColors[2] &gt; hsbEndColors[2]){
          bri = ((float)102400-value)*((hsbStartColors[2]-hsbEndColors[2])/((float)102400-(float)0))+hsbEndColors[2];
        }
        else{
          bri = (value-(float)0)*((hsbEndColors[2]-hsbStartColors[2])/((float)102400-(float)0))+hsbStartColors[2];
        }

        Color hsbColor = Color.getHSBColor((float)hue,(float)sat,(float)bri);

        if(value &gt; 102400){
          hsbColor = new Color(255,255,255);
        }
        else if(value &lt; 0){
          hsbColor = new Color(0,0,0);
        }

        offScreen.setColor(hsbColor);

        if(zz == zUB-1){
          offScreen.fill3DRect((xUB-xx-1)*blockWidth,(zUB+yy)*blockHeight, blockWidth, blockHeight, true);
        }
        if(xx==0){
          offScreen.fill3DRect((zUB-zz+xUB-1)*blockWidth, (zUB+yy)*blockHeight, blockWidth, blockHeight, true);
        }
        if(zz==0){
          offScreen.fill3DRect((xUB+zUB+xx)*blockWidth, (zUB+yy)*blockHeight, blockWidth, blockHeight, true);
        }
        if(xx == xUB-1){
          offScreen.fill3DRect((xUB+xUB+zUB+zz)*blockWidth, (zUB+yy)*blockHeight, blockWidth, blockHeight, true);
        }
        if(yy == 0){
          offScreen.fill3DRect((xUB+zUB+xx)*blockWidth, (zUB-zz-1)*blockHeight, blockWidth, blockHeight, true);
        }
        if(yy==yUB-1){
          offScreen.fill3DRect((xUB+zUB+xx)*blockWidth, (zUB+yUB+zz)*blockHeight, blockWidth, blockHeight, true);
        }
      }//end z loop
    }//end if(threeDimensions)
    else{
      try{
        value = (float)grid.readAbsTemp(current,p).getValue();
      }catch(Exception e){}

      float hue = 0f;
      if(hsbStartColors[0] == hsbEndColors[0]){
        hue = hsbStartColors[0];
      }
      else if(hsbStartColors[0]&gt;hsbEndColors[0]){
        hue = ((float)102400-value)*((hsbStartColors[0]-hsbEndColors[0])/((float)102400-(float)0))+hsbEndColors[0];
      }
    else{
      hue = (value-(float)0)*((hsbEndColors[0]-hsbStartColors[0])/((float)102400-(float)0))+hsbStartColors[0];
    }

    float sat = 0f;
      if(hsbStartColors[1] == hsbEndColors[1]){
        sat = hsbStartColors[1];
      }
      else if(hsbStartColors[1] &gt; hsbEndColors[1]){
        sat = ((float)102400-value)*((hsbStartColors[1]-hsbEndColors[1])/((float)102400-(float)0))+hsbEndColors[1];
      }
      else{
        sat = (value-(float)0)*((hsbEndColors[1]-hsbStartColors[1])/((float)102400-(float)0))+hsbStartColors[1];
      }

      float bri = 0f;
      if(hsbStartColors[2] == hsbEndColors[2]){
        bri = hsbStartColors[2];
      }
      else if(hsbStartColors[2] &gt; hsbEndColors[2]){
        bri = ((float)102400-value)*((hsbStartColors[2]-hsbEndColors[2])/((float)102400-(float)0))+hsbEndColors[2];
      }
      else{
        bri = (value-(float)0)*((hsbEndColors[2]-hsbStartColors[2])/((float)102400-(float)0))+hsbStartColors[2];
      }

      Color hsbColor = Color.getHSBColor((float)hue,(float)sat,(float)bri);

      if(value &gt; 102400){
        hsbColor = new Color(255,255,255);
      }
      else if(value &lt; 0){
        hsbColor = new Color(0,0,0);
      }

      offScreen.setColor(hsbColor);

      offScreen.fill3DRect(xx*blockWidth,yy*blockHeight, blockWidth, blockHeight, true);
    }//end else
  }//end y loop
}// end x loop
repaint();
</string> 
     </void> 
     <void property="preRecords"> 
      <object class="java.util.Vector"> 
       <void method="add"> 
        <object class="eclpss.component.ESVReadsAndWritesRecord"> 
         <void property="name"> 
          <string>Temp</string> 
         </void> 
         <void property="read"> 
          <boolean>true</boolean> 
         </void> 
        </object> 
       </void> 
      </object> 
     </void> 
     <void property="preSimCode"> 
      <string>    if(offScreen == null) {
      offScreen = image.createGraphics();
    }
int xLB = grid.getXLB();
int yLB = grid.getYLB();
int zLB = grid.getZLB();
int xUB = grid.getXUB();
int yUB = grid.getYUB();
int zUB = grid.getZUB();

    int blockWidth = 0;
    int blockHeight = 0;
    if((2*xUB + 2*zUB) &gt; (2*yUB+2*zUB)){
      blockWidth = frameWidth / ((2*xUB)+(2*zUB));
      blockHeight = blockWidth;
    }
    else{
      blockWidth = frameHeight / ((2*yUB)+(2*zUB));
      blockHeight = blockWidth;
    }
    float temp = (float)0;


    float[] hsbStartColors = new float[3];
    Color.RGBtoHSB(0, 0, 255, hsbStartColors);
    float[] hsbEndColors = new float[3];
    Color.RGBtoHSB(255, 0, 0, hsbEndColors);


    ChangeablePoint p = new ChangeablePoint(xLB,yLB,zLB,0);
    for(int xx=0; xx&lt;xUB; xx++){
      p.setX(xx);
      for(int yy=0; yy&lt;yUB; yy++){
        p.setY(yy);
        for(int zz=0;zz&lt;zUB;zz++){
          p.setZ(zz);
          try{
            temp = (float)grid.readAbsTemp(current,p).getValue();
          }catch(Exception e){}

          float hue = 0f;
          if(hsbStartColors[0] == hsbEndColors[0]){
            hue = hsbStartColors[0];
          }
          else if(hsbStartColors[0]&gt;hsbEndColors[0]){
            hue = ((float)102400-temp)*((hsbStartColors[0]-hsbEndColors[0])/((float)102400-(float)0))+hsbEndColors[0];
          }
         else{
            hue = (temp-(float)0)*((hsbEndColors[0]-hsbStartColors[0])/((float)102400-(float)0))+hsbStartColors[0];
          }

          float sat = 0f;
          if(hsbStartColors[1] == hsbEndColors[1]){
            sat = hsbStartColors[1];
          }
          else if(hsbStartColors[1] &gt; hsbEndColors[1]){
            sat = ((float)102400-temp)*((hsbStartColors[1]-hsbEndColors[1])/((float)102400-(float)0))+hsbEndColors[1];
          }
          else{
            sat = (temp-(float)0)*((hsbEndColors[1]-hsbStartColors[1])/((float)102400-(float)0))+hsbStartColors[1];
          }

          float bri = 0f;
          if(hsbStartColors[2] == hsbEndColors[2]){
            bri = hsbStartColors[2];
          }
          else if(hsbStartColors[2] &gt; hsbEndColors[2]){
            bri = ((float)102400-temp)*((hsbStartColors[2]-hsbEndColors[2])/((float)102400-(float)0))+hsbEndColors[2];
          }
          else{
            bri = (temp-(float)0)*((hsbEndColors[2]-hsbStartColors[2])/((float)102400-(float)0))+hsbStartColors[2];
          }

          Color hsbColor = Color.getHSBColor((float)hue,(float)sat,(float)bri);

          if(temp &gt; 102400){            hsbColor = new Color(255,255,255);          }          else if(temp &lt; 0){            hsbColor = new Color(0,0,0);          }
          offScreen.setColor(hsbColor);

          if(zz == zUB-1){
            offScreen.fill3DRect((xUB-xx-1)*blockWidth,(zUB+yy)*blockHeight, blockWidth, blockHeight, true);
          }
          if(xx==0){
            offScreen.fill3DRect((zUB-zz+xUB-1)*blockWidth, (zUB+yy)*blockHeight, blockWidth, blockHeight, true);
          }
          if(zz==0){
            offScreen.fill3DRect((xUB+zUB+xx)*blockWidth, (zUB+yy)*blockHeight, blockWidth, blockHeight, true);
          }
          if(xx == xUB-1){
            offScreen.fill3DRect((xUB+xUB+zUB+zz)*blockWidth, (zUB+yy)*blockHeight, blockWidth, blockHeight, true);
          }
          if(yy == 0){
            offScreen.fill3DRect((xUB+zUB+xx)*blockWidth, (zUB-zz-1)*blockHeight, blockWidth, blockHeight, true);
          }
          if(yy==yUB-1){
            offScreen.fill3DRect((xUB+zUB+xx)*blockWidth, (zUB+yUB+zz)*blockHeight, blockWidth, blockHeight, true);
          }
        }//end z loop
      }//end y loop
    }// end x loop
    repaint();
</string> 
     </void> 
     <void property="simCode"> 
      <string>int modulo = 1;
boolean threeDimensions = !(grid.getZBoundryType()==ComputationalGrid.NO_Z); 
if( ((model.getTimeIteration()-1) % modulo) == 0 ){int xLB = grid.getXLB();
int yLB = grid.getYLB();
int zLB = grid.getZLB();
int xUB = grid.getXUB();
int yUB = grid.getYUB();
int zUB = grid.getZUB();
    if(offScreen == null) {
      offScreen = image.createGraphics();
    }

    int blockWidth = 0;
    int blockHeight = 0;
    if(threeDimensions){
      if((2*xUB + 2*zUB) &gt; (2*yUB+2*zUB)){
        blockWidth = frameWidth / ((2*xUB)+(2*zUB));
        blockHeight = blockWidth;
      }
      else{
        blockWidth = frameHeight / ((2*yUB)+(2*zUB));
        blockHeight = blockWidth;
      }
    }//end if(threeDimensions){
    else{
      blockWidth = frameWidth / xUB;
      blockHeight = frameHeight/ yUB;
    }
    float value = (float)0;


    float[] hsbStartColors = new float[3];
    Color.RGBtoHSB(0, 0, 255, hsbStartColors);
    float[] hsbEndColors = new float[3];
    Color.RGBtoHSB(255, 0, 0, hsbEndColors);


    ChangeablePoint p = new ChangeablePoint(xLB,yLB,zLB,-1);
    for(int xx=xLB-1; xx&lt;xUB; xx++){
      p.setX(xx);
      for(int yy=yLB-1; yy&lt;yUB; yy++){
        p.setY(yy);
        if(threeDimensions){
          for(int zz=zLB-1;zz&lt;zUB;zz++){
            p.setZ(zz);
            try{
              value = (float)grid.readAbsTemp(current,p).getValue();
            }catch(Exception e){}

            float hue = 0f;
            if(hsbStartColors[0] == hsbEndColors[0]){
              hue = hsbStartColors[0];
            }
            else if(hsbStartColors[0]&gt;hsbEndColors[0]){
              hue = ((float)102400-value)*((hsbStartColors[0]-hsbEndColors[0])/((float)102400-(float)0))+hsbEndColors[0];
            }
           else{
              hue = (value-(float)0)*((hsbEndColors[0]-hsbStartColors[0])/((float)102400-(float)0))+hsbStartColors[0];
            }

            float sat = 0f;
            if(hsbStartColors[1] == hsbEndColors[1]){
              sat = hsbStartColors[1];
            }
            else if(hsbStartColors[1] &gt; hsbEndColors[1]){
              sat = ((float)102400-value)*((hsbStartColors[1]-hsbEndColors[1])/((float)102400-(float)0))+hsbEndColors[1];
            }
            else{
              sat = (value-(float)0)*((hsbEndColors[1]-hsbStartColors[1])/((float)102400-(float)0))+hsbStartColors[1];
            }

            float bri = 0f;
            if(hsbStartColors[2] == hsbEndColors[2]){
              bri = hsbStartColors[2];
            }
            else if(hsbStartColors[2] &gt; hsbEndColors[2]){
              bri = ((float)102400-value)*((hsbStartColors[2]-hsbEndColors[2])/((float)102400-(float)0))+hsbEndColors[2];
            }
            else{
              bri = (value-(float)0)*((hsbEndColors[2]-hsbStartColors[2])/((float)102400-(float)0))+hsbStartColors[2];
            }

            Color hsbColor = Color.getHSBColor((float)hue,(float)sat,(float)bri);

            if(value &gt; 102400){
              hsbColor = new Color(255,255,255);
            }
            else if(value &lt; 0){
              hsbColor = new Color(0,0,0);
            }

            offScreen.setColor(hsbColor);

            if(zz == zUB-1){
              offScreen.fill3DRect((xUB-xx-1)*blockWidth,(zUB+yy)*blockHeight, blockWidth, blockHeight, true);
            }
            if(xx==0){
              offScreen.fill3DRect((zUB-zz+xUB-1)*blockWidth, (zUB+yy)*blockHeight, blockWidth, blockHeight, true);
            }
            if(zz==0){
              offScreen.fill3DRect((xUB+zUB+xx)*blockWidth, (zUB+yy)*blockHeight, blockWidth, blockHeight, true);
            }
            if(xx == xUB-1){
              offScreen.fill3DRect((xUB+xUB+zUB+zz)*blockWidth, (zUB+yy)*blockHeight, blockWidth, blockHeight, true);
            }
            if(yy == 0){
              offScreen.fill3DRect((xUB+zUB+xx)*blockWidth, (zUB-zz-1)*blockHeight, blockWidth, blockHeight, true);
            }
            if(yy==yUB-1){
              offScreen.fill3DRect((xUB+zUB+xx)*blockWidth, (zUB+yUB+zz)*blockHeight, blockWidth, blockHeight, true);
            }
          }//end z loop
        }//end if(threeDimensions)
        else{
          try{
            value = (float)grid.readAbsTemp(current,p).getValue();
          }catch(Exception e){}

          float hue = 0f;
          if(hsbStartColors[0] == hsbEndColors[0]){
            hue = hsbStartColors[0];
          }
          else if(hsbStartColors[0]&gt;hsbEndColors[0]){
            hue = ((float)102400-value)*((hsbStartColors[0]-hsbEndColors[0])/((float)102400-(float)0))+hsbEndColors[0];
          }
         else{
            hue = (value-(float)0)*((hsbEndColors[0]-hsbStartColors[0])/((float)102400-(float)0))+hsbStartColors[0];
          }

          float sat = 0f;
          if(hsbStartColors[1] == hsbEndColors[1]){
            sat = hsbStartColors[1];
          }
          else if(hsbStartColors[1] &gt; hsbEndColors[1]){
            sat = ((float)102400-value)*((hsbStartColors[1]-hsbEndColors[1])/((float)102400-(float)0))+hsbEndColors[1];
          }
          else{
            sat = (value-(float)0)*((hsbEndColors[1]-hsbStartColors[1])/((float)102400-(float)0))+hsbStartColors[1];
          }

          float bri = 0f;
          if(hsbStartColors[2] == hsbEndColors[2]){
            bri = hsbStartColors[2];
          }
          else if(hsbStartColors[2] &gt; hsbEndColors[2]){
            bri = ((float)102400-value)*((hsbStartColors[2]-hsbEndColors[2])/((float)102400-(float)0))+hsbEndColors[2];
          }
          else{
            bri = (value-(float)0)*((hsbEndColors[2]-hsbStartColors[2])/((float)102400-(float)0))+hsbStartColors[2];
          }

          Color hsbColor = Color.getHSBColor((float)hue,(float)sat,(float)bri);

          if(value &gt; 102400){
            hsbColor = new Color(255,255,255);
          }
          else if(value &lt; 0){
            hsbColor = new Color(0,0,0);
          }

          offScreen.setColor(hsbColor);

          offScreen.fill3DRect(xx*blockWidth,yy*blockHeight, blockWidth, blockHeight, true);
        }//end else
      }//end y loop
    }// end x loop
  }
repaint();
</string> 
     </void> 
     <void property="simRecords"> 
      <object class="java.util.Vector"> 
       <void method="add"> 
        <object class="eclpss.component.ESVReadsAndWritesRecord"> 
         <void property="name"> 
          <string>Temp</string> 
         </void> 
         <void property="read"> 
          <boolean>true</boolean> 
         </void> 
        </object> 
       </void> 
      </object> 
     </void> 
     <void property="stateVariable"> 
      <object idref="ESVSpecification0"/> 
     </void> 
    </object> 
   </void> 
  </void> 
  <void property="date"> 
   <object class="java.util.Date"> 
    <long>1063339200000</long> 
   </object> 
  </void> 
  <void property="documentation"> 
   <array class="java.lang.String" length="9"> 
    <void index="0"> 
     <string>ew</string> 
    </void> 
    <void index="1"> 
     <string>9/12/03</string> 
    </void> 
    <void index="2"> 
     <string>9/17/03</string> 
    </void> 
    <void index="3"> 
     <string>3.0</string> 
    </void> 
    <void index="4"> 
     <string>Cool a 2-dimensional space.
This space has randomly-generated hot cells.
The percentage of the cells that are hot are defined in
   model.percentHot (as a fractional number).
The hot cells are randomly allowed to cool or to stay hot.</string> 
    </void> 
    <void index="5"> 
     <string>2-D grid 70x50</string> 
    </void> 
    <void index="6"> 
     <string>2 time steps</string> 
    </void> 
    <void index="7"> 
     <string></string> 
    </void> 
    <void index="8"> 
     <string>The Temp state variable has two attributes:  one for the
Value, and the other a boolean which says whether or not the
cell is to remain hot.</string> 
    </void> 
   </array> 
  </void> 
  <void property="eclpssVersion"> 
   <string>version 1.2.b0</string> 
  </void> 
  <void property="endTime"> 
   <int>200</int> 
  </void> 
  <void property="esvs"> 
   <array class="eclpss.esv.ESVSpecification" length="1"> 
    <void index="0"> 
     <object idref="ESVSpecification0"/> 
    </void> 
   </array> 
  </void> 
  <void property="externalLocation"> 
   <string>/home/strempel/models/Random3.mdl</string> 
  </void> 
  <void property="grid"> 
   <object class="eclpss.grid.GridSpecification"> 
    <void property="author"> 
     <string>ew</string> 
    </void> 
    <void property="comments"> 
     <string>2-D grid with randomly generated hot cells</string> 
    </void> 
    <void property="date"> 
     <object class="java.util.Date"> 
      <long>1063339200000</long> 
     </object> 
    </void> 
    <void property="eclpssVersion"> 
     <string>version 1.2.b0</string> 
    </void> 
    <void property="externalLocation"> 
     <string>/home/strempel/models/SimGrid.grd</string> 
    </void> 
    <void property="name"> 
     <string>SimGrid</string> 
    </void> 
    <void property="nrDimensions"> 
     <int>2</int> 
    </void> 
    <void property="nrTimeFrames"> 
     <int>2</int> 
    </void> 
    <void property="staticDeclarations"> 
     <string></string> 
    </void> 
    <void property="timeStamp"> 
     <object class="java.util.Date"> 
      <long>1063654024798</long> 
     </object> 
    </void> 
    <void property="x"> 
     <object class="eclpss.grid.GridDimension"> 
      <void property="boundryType"> 
       <int>4</int> 
      </void> 
      <void property="cellWidth"> 
       <double>1.0</double> 
      </void> 
      <void property="numberOfCells"> 
       <int>70</int> 
      </void> 
      <void property="unit"> 
       <string>Dimensionless_ONE</string> 
      </void> 
     </object> 
    </void> 
    <void property="y"> 
     <object class="eclpss.grid.GridDimension"> 
      <void property="boundryType"> 
       <int>4</int> 
      </void> 
      <void property="cellWidth"> 
       <double>1.0</double> 
      </void> 
      <void property="numberOfCells"> 
       <int>50</int> 
      </void> 
      <void property="unit"> 
       <string>Dimensionless_ONE</string> 
      </void> 
     </object> 
    </void> 
   </object> 
  </void> 
  <void property="intBased"> 
   <boolean>true</boolean> 
  </void> 
  <void property="intStep"> 
   <int>1</int> 
  </void> 
  <void property="javadoc"> 
   <string>/**
 *&lt;UL&gt;&lt;BR&gt;
 *&lt;LI&gt;&lt;b&gt;Author: &lt;/b&gt;ew&lt;/LI&gt;&lt;BR&gt;
 *&lt;LI&gt;&lt;b&gt;Date Created: &lt;/b&gt;9/12/03&lt;/LI&gt;&lt;BR&gt;
 *&lt;LI&gt;&lt;b&gt;Date Saved: &lt;/b&gt;9/17/03&lt;/LI&gt;&lt;BR&gt;&lt;br&gt;
 *&lt;LI&gt;&lt;b&gt;Version: &lt;/b&gt;3.0&lt;/LI&gt;&lt;BR&gt;
 *&lt;LI&gt;&lt;b&gt;Purpose: &lt;/b&gt;Cool a 2-dimensional space.
This space has randomly-generated hot cells.
The percentage of the cells that are hot are defined in
   model.percentHot (as a fractional number).
The hot cells are randomly allowed to cool or to stay hot.&lt;/LI&gt;&lt;BR&gt;
 *&lt;LI&gt;&lt;b&gt;Type of Grid: &lt;/b&gt;2-D grid 70x50&lt;/LI&gt;&lt;BR&gt;
 *&lt;LI&gt;&lt;b&gt;Time step, time scale: &lt;/b&gt;2 time steps&lt;/LI&gt;&lt;BR&gt;
 *&lt;LI&gt;&lt;b&gt;Usage Notes: &lt;/b&gt;&lt;/LI&gt;&lt;BR&gt;
 *&lt;LI&gt;&lt;b&gt;Miscellaneous Notes: &lt;/b&gt;The Temp state variable has two attributes:  one for the
Value, and the other a boolean which says whether or not the
cell is to remain hot.&lt;/LI&gt;&lt;BR&gt;
*/
</string> 
  </void> 
  <void property="name"> 
   <string>Random3</string> 
  </void> 
  <void property="numberOfExecutions"> 
   <int>199</int> 
  </void> 
  <void property="preExecutionGroups"> 
   <void method="add"> 
    <object class="eclpss.component.ExecutionGroup"> 
     <void property="name"> 
      <string>Initialize Grid</string> 
     </void> 
     <void property="nonspacial"> 
      <boolean>true</boolean> 
     </void> 
     <void property="sim"> 
      <boolean>false</boolean> 
     </void> 
     <void property="specNames"> 
      <void method="add"> 
       <string>HotCells</string> 
      </void> 
     </void> 
     <void property="specs"> 
      <void method="add"> 
       <object idref="ComponentSpecification0"/> 
      </void> 
     </void> 
    </object> 
   </void> 
  </void> 
  <void property="simExecutionGroups"> 
   <void method="add"> 
    <object class="eclpss.component.ExecutionGroup"> 
     <void property="name"> 
      <string>Make hot cells</string> 
     </void> 
     <void property="specNames"> 
      <void method="add"> 
       <string>HotCells</string> 
      </void> 
     </void> 
     <void property="specs"> 
      <void method="add"> 
       <object idref="ComponentSpecification0"/> 
      </void> 
     </void> 
    </object> 
   </void> 
   <void method="add"> 
    <object class="eclpss.component.ExecutionGroup"> 
     <void property="name"> 
      <string>Write hot cells</string> 
     </void> 
     <void property="specNames"> 
      <void method="add"> 
       <string>CoolDown</string> 
      </void> 
     </void> 
     <void property="specs"> 
      <void method="add"> 
       <object idref="ComponentSpecification1"/> 
      </void> 
     </void> 
    </object> 
   </void> 
   <void method="add"> 
    <object class="eclpss.component.ExecutionGroup"> 
     <void property="name"> 
      <string>Display Cells</string> 
     </void> 
     <void property="nonspacial"> 
      <boolean>true</boolean> 
     </void> 
     <void property="specNames"> 
      <void method="add"> 
       <string>DisplayCells</string> 
      </void> 
     </void> 
     <void property="specs"> 
      <void method="add"> 
       <object class="eclpss.component.GraphicalComponentSpecification"> 
        <void property="attribute"> 
         <object idref="Attribute0"/> 
        </void> 
        <void property="author"> 
         <string>Generated Graphical Component</string> 
        </void> 
        <void property="date"> 
         <object class="java.util.Date"> 
          <long>1063339200000</long> 
         </object> 
        </void> 
        <void property="documentation"> 
         <array class="java.lang.String" length="18"> 
          <void index="0"> 
           <string>Generated Graphical Component</string> 
          </void> 
          <void index="1"> 
           <string>9/12/03</string> 
          </void> 
          <void index="2"> 
           <string>9/15/03</string> 
          </void> 
          <void index="3"> 
           <string></string> 
          </void> 
          <void index="4"> 
           <string>Display the grid graphically.</string> 
          </void> 
          <void index="5"> 
           <string></string> 
          </void> 
          <void index="6"> 
           <string></string> 
          </void> 
          <void index="7"> 
           <string></string> 
          </void> 
          <void index="8"> 
           <string></string> 
          </void> 
          <void index="9"> 
           <string></string> 
          </void> 
          <void index="10"> 
           <string></string> 
          </void> 
          <void index="11"> 
           <string></string> 
          </void> 
          <void index="12"> 
           <string></string> 
          </void> 
          <void index="13"> 
           <string></string> 
          </void> 
          <void index="14"> 
           <string></string> 
          </void> 
          <void index="15"> 
           <string></string> 
          </void> 
          <void index="16"> 
           <string></string> 
          </void> 
          <void index="17"> 
           <string></string> 
          </void> 
         </array> 
        </void> 
        <void property="eclpssVersion"> 
         <string>version 1.2.b0</string> 
        </void> 
        <void property="esvs"> 
         <array class="eclpss.esv.ESVSpecification" length="1"> 
          <void index="0"> 
           <object idref="ESVSpecification0"/> 
          </void> 
         </array> 
        </void> 
        <void property="externalLocation"> 
         <string>/home/strempel/models/DisplayCells.cpt</string> 
        </void> 
        <void property="frameTitle"> 
         <string>DisplayCells</string> 
        </void> 
        <void property="graphical"> 
         <boolean>true</boolean> 
        </void> 
        <void property="javadoc"> 
         <string>/**
 *&lt;UL&gt;&lt;BR&gt;
 *&lt;LI&gt;&lt;BIG&gt;This is an &lt;font color = &quot;mediumblue&quot;&gt;&lt;i&gt; ECLPSS Component&lt;/i&gt;&lt;/font&gt;&lt;/BIG&gt;&lt;/LI&gt;&lt;BR&gt;
 *&lt;LI&gt;&lt;b&gt;Author: &lt;/b&gt;Generated Graphical Component&lt;/LI&gt;&lt;BR&gt;
 *&lt;LI&gt;&lt;b&gt;Date Created: &lt;/b&gt;9/12/03&lt;/LI&gt;&lt;BR&gt;
 *&lt;LI&gt;&lt;b&gt;Date Saved: &lt;/b&gt;9/15/03&lt;/LI&gt;&lt;BR&gt;
 *&lt;LI&gt;&lt;b&gt;Version: &lt;/b&gt;&lt;/LI&gt;&lt;BR&gt;&lt;br&gt;
 *&lt;LI&gt;&lt;b&gt;Purpose: &lt;/b&gt;Display the grid graphically.&lt;/LI&gt;&lt;BR&gt;
 *&lt;LI&gt;&lt;b&gt;Algorithm Citation: &lt;/b&gt;&lt;/LI&gt;&lt;BR&gt;
 *&lt;LI&gt;&lt;b&gt;Modification History: &lt;/b&gt;&lt;/LI&gt;&lt;BR&gt;
 *&lt;LI&gt;&lt;b&gt;Assumptions: &lt;/b&gt;&lt;/LI&gt;&lt;BR&gt;
 *&lt;LI&gt;&lt;b&gt;Limitations: &lt;/b&gt;&lt;/LI&gt;&lt;BR&gt;
 *&lt;LI&gt;&lt;b&gt;Known Problems: &lt;/b&gt;&lt;/LI&gt;&lt;BR&gt;
 *&lt;LI&gt;&lt;b&gt;Suggested Improvements: &lt;/b&gt;&lt;/LI&gt;&lt;BR&gt;
 *&lt;LI&gt;&lt;b&gt;Testing Statistics: &lt;/b&gt;&lt;/LI&gt;&lt;BR&gt;
 *&lt;LI&gt;&lt;b&gt;Models used in: &lt;/b&gt;&lt;/LI&gt;&lt;BR&gt;
 *&lt;LI&gt;&lt;b&gt;General Comments: &lt;/b&gt;&lt;/LI&gt;&lt;BR&gt;
 *&lt;LI&gt;&lt;b&gt;Pre-Sim Comments: &lt;/b&gt;&lt;/LI&gt;&lt;BR&gt;
 *&lt;LI&gt;&lt;b&gt;Sim Comments: &lt;/b&gt;&lt;/LI&gt;&lt;BR&gt;
 *&lt;LI&gt;&lt;b&gt;Post-Sim Comments: &lt;/b&gt;&lt;/LI&gt;&lt;BR&gt;
 *&lt;LI&gt;&lt;b&gt;Local Method Comments: &lt;/b&gt;&lt;/LI&gt;&lt;BR&gt;
*/
</string> 
        </void> 
        <void property="localMethodCode"> 
         <string>public void paint(Graphics g) {
  g.drawImage(image,15,30,Color.blue,this);

  float[] slope = new float[3];
  float[] startHSB = new float[3];
  Color.RGBtoHSB(0, 0, 255, startHSB);
  float[] endHSB = new float[3];
  Color.RGBtoHSB(255, 0, 0, endHSB);

  slope[0] = (endHSB[0] - startHSB[0])/frameWidth;
  slope[1] = (endHSB[1] - startHSB[1])/frameWidth;
  slope[2] = (endHSB[2] - startHSB[2])/frameWidth;

  for(int i = 0; i &lt; frameWidth; i++){
    g.setColor(Color.getHSBColor(startHSB[0] + (slope[0]*i),
      startHSB[1] + (slope[1]*i),
      startHSB[2] + (slope[2]*i)));
    g.drawLine(i+15, frameHeight+35, i+15, frameHeight+55);
  }

  g.setColor(Color.black);
  g.drawString(&quot;0.0&quot;, 15, frameHeight+70);
  g.drawString(&quot;102400.0&quot;,frameWidth-10,frameHeight+70);
}

Graphics2D offScreen = null;
int frameWidth = 500 - 80;
int frameHeight = 500 - 80;
java.awt.image.BufferedImage image = new java.awt.image.BufferedImage(frameWidth, frameHeight, java.awt.image.BufferedImage.TYPE_INT_RGB);
</string> 
        </void> 
        <void property="maxValue"> 
         <string>102400</string> 
        </void> 
        <void property="minValue"> 
         <string>0</string> 
        </void> 
        <void property="name"> 
         <string>DisplayCells</string> 
        </void> 
        <void property="postRecords"> 
         <object class="java.util.Vector"> 
          <void method="add"> 
           <object class="eclpss.component.ESVReadsAndWritesRecord"> 
            <void property="name"> 
             <string>Temp</string> 
            </void> 
            <void property="read"> 
             <boolean>true</boolean> 
            </void> 
           </object> 
          </void> 
         </object> 
        </void> 
        <void property="postSimCode"> 
         <string>boolean threeDimensions = !(grid.getZBoundryType()==ComputationalGrid.NO_Z); if(offScreen == null) {
  offScreen = image.createGraphics();
}
int xLB = grid.getXLB();
int yLB = grid.getYLB();
int zLB = grid.getZLB();
int xUB = grid.getXUB();
int yUB = grid.getYUB();
int zUB = grid.getZUB();

int blockWidth = 0;
int blockHeight = 0;
if(threeDimensions){
  if((2*xUB + 2*zUB) &gt; (2*yUB+2*zUB)){
    blockWidth = frameWidth / ((2*xUB)+(2*zUB));
    blockHeight = blockWidth;
  }
  else{
    blockWidth = frameHeight / ((2*yUB)+(2*zUB));
    blockHeight = blockWidth;
  }
}//end if(threeDimensions){
else{
  blockWidth = frameWidth / xUB;
  blockHeight = frameHeight/ yUB;
}
float value = (float)0;


float[] hsbStartColors = new float[3];
Color.RGBtoHSB(0, 0, 255, hsbStartColors);
float[] hsbEndColors = new float[3];
Color.RGBtoHSB(255, 0, 0, hsbEndColors);


ChangeablePoint p = new ChangeablePoint(xLB,yLB,zLB,-1);
for(int xx=0; xx&lt;xUB; xx++){
  p.setX(xx);
  for(int yy=0; yy&lt;yUB; yy++){
    p.setY(yy);
    if(threeDimensions){
      for(int zz=0;zz&lt;zUB;zz++){
        p.setZ(zz);
        try{
          value = (float)grid.readAbsTemp(current,p).getValue();
        }catch(Exception e){}

        float hue = 0f;
        if(hsbStartColors[0] == hsbEndColors[0]){
          hue = hsbStartColors[0];
        }
        else if(hsbStartColors[0]&gt;hsbEndColors[0]){
          hue = ((float)102400-value)*((hsbStartColors[0]-hsbEndColors[0])/((float)102400-(float)0))+hsbEndColors[0];
        }
        else{
          hue = (value-(float)0)*((hsbEndColors[0]-hsbStartColors[0])/((float)102400-(float)0))+hsbStartColors[0];
        }

        float sat = 0f;
        if(hsbStartColors[1] == hsbEndColors[1]){
          sat = hsbStartColors[1];
        }
        else if(hsbStartColors[1] &gt; hsbEndColors[1]){
          sat = ((float)102400-value)*((hsbStartColors[1]-hsbEndColors[1])/((float)102400-(float)0))+hsbEndColors[1];
        }
        else{
          sat = (value-(float)0)*((hsbEndColors[1]-hsbStartColors[1])/((float)102400-(float)0))+hsbStartColors[1];
        }

        float bri = 0f;
        if(hsbStartColors[2] == hsbEndColors[2]){
          bri = hsbStartColors[2];
        }
        else if(hsbStartColors[2] &gt; hsbEndColors[2]){
          bri = ((float)102400-value)*((hsbStartColors[2]-hsbEndColors[2])/((float)102400-(float)0))+hsbEndColors[2];
        }
        else{
          bri = (value-(float)0)*((hsbEndColors[2]-hsbStartColors[2])/((float)102400-(float)0))+hsbStartColors[2];
        }

        Color hsbColor = Color.getHSBColor((float)hue,(float)sat,(float)bri);

        if(value &gt; 102400){
          hsbColor = new Color(255,255,255);
        }
        else if(value &lt; 0){
          hsbColor = new Color(0,0,0);
        }

        offScreen.setColor(hsbColor);

        if(zz == zUB-1){
          offScreen.fill3DRect((xUB-xx-1)*blockWidth,(zUB+yy)*blockHeight, blockWidth, blockHeight, true);
        }
        if(xx==0){
          offScreen.fill3DRect((zUB-zz+xUB-1)*blockWidth, (zUB+yy)*blockHeight, blockWidth, blockHeight, true);
        }
        if(zz==0){
          offScreen.fill3DRect((xUB+zUB+xx)*blockWidth, (zUB+yy)*blockHeight, blockWidth, blockHeight, true);
        }
        if(xx == xUB-1){
          offScreen.fill3DRect((xUB+xUB+zUB+zz)*blockWidth, (zUB+yy)*blockHeight, blockWidth, blockHeight, true);
        }
        if(yy == 0){
          offScreen.fill3DRect((xUB+zUB+xx)*blockWidth, (zUB-zz-1)*blockHeight, blockWidth, blockHeight, true);
        }
        if(yy==yUB-1){
          offScreen.fill3DRect((xUB+zUB+xx)*blockWidth, (zUB+yUB+zz)*blockHeight, blockWidth, blockHeight, true);
        }
      }//end z loop
    }//end if(threeDimensions)
    else{
      try{
        value = (float)grid.readAbsTemp(current,p).getValue();
      }catch(Exception e){}

      float hue = 0f;
      if(hsbStartColors[0] == hsbEndColors[0]){
        hue = hsbStartColors[0];
      }
      else if(hsbStartColors[0]&gt;hsbEndColors[0]){
        hue = ((float)102400-value)*((hsbStartColors[0]-hsbEndColors[0])/((float)102400-(float)0))+hsbEndColors[0];
      }
    else{
      hue = (value-(float)0)*((hsbEndColors[0]-hsbStartColors[0])/((float)102400-(float)0))+hsbStartColors[0];
    }

    float sat = 0f;
      if(hsbStartColors[1] == hsbEndColors[1]){
        sat = hsbStartColors[1];
      }
      else if(hsbStartColors[1] &gt; hsbEndColors[1]){
        sat = ((float)102400-value)*((hsbStartColors[1]-hsbEndColors[1])/((float)102400-(float)0))+hsbEndColors[1];
      }
      else{
        sat = (value-(float)0)*((hsbEndColors[1]-hsbStartColors[1])/((float)102400-(float)0))+hsbStartColors[1];
      }

      float bri = 0f;
      if(hsbStartColors[2] == hsbEndColors[2]){
        bri = hsbStartColors[2];
      }
      else if(hsbStartColors[2] &gt; hsbEndColors[2]){
        bri = ((float)102400-value)*((hsbStartColors[2]-hsbEndColors[2])/((float)102400-(float)0))+hsbEndColors[2];
      }
      else{
        bri = (value-(float)0)*((hsbEndColors[2]-hsbStartColors[2])/((float)102400-(float)0))+hsbStartColors[2];
      }

      Color hsbColor = Color.getHSBColor((float)hue,(float)sat,(float)bri);

      if(value &gt; 102400){
        hsbColor = new Color(255,255,255);
      }
      else if(value &lt; 0){
        hsbColor = new Color(0,0,0);
      }

      offScreen.setColor(hsbColor);

      offScreen.fill3DRect(xx*blockWidth,yy*blockHeight, blockWidth, blockHeight, true);
    }//end else
  }//end y loop
}// end x loop
repaint();
</string> 
        </void> 
        <void property="preRecords"> 
         <object class="java.util.Vector"> 
          <void method="add"> 
           <object class="eclpss.component.ESVReadsAndWritesRecord"> 
            <void property="name"> 
             <string>Temp</string> 
            </void> 
            <void property="read"> 
             <boolean>true</boolean> 
            </void> 
           </object> 
          </void> 
         </object> 
        </void> 
        <void property="preSimCode"> 
         <string>    if(offScreen == null) {
      offScreen = image.createGraphics();
    }
int xLB = grid.getXLB();
int yLB = grid.getYLB();
int zLB = grid.getZLB();
int xUB = grid.getXUB();
int yUB = grid.getYUB();
int zUB = grid.getZUB();

    int blockWidth = 0;
    int blockHeight = 0;
    if((2*xUB + 2*zUB) &gt; (2*yUB+2*zUB)){
      blockWidth = frameWidth / ((2*xUB)+(2*zUB));
      blockHeight = blockWidth;
    }
    else{
      blockWidth = frameHeight / ((2*yUB)+(2*zUB));
      blockHeight = blockWidth;
    }
    float temp = (float)0;


    float[] hsbStartColors = new float[3];
    Color.RGBtoHSB(0, 0, 255, hsbStartColors);
    float[] hsbEndColors = new float[3];
    Color.RGBtoHSB(255, 0, 0, hsbEndColors);


    ChangeablePoint p = new ChangeablePoint(xLB,yLB,zLB,0);
    for(int xx=0; xx&lt;xUB; xx++){
      p.setX(xx);
      for(int yy=0; yy&lt;yUB; yy++){
        p.setY(yy);
        for(int zz=0;zz&lt;zUB;zz++){
          p.setZ(zz);
          try{
            temp = (float)grid.readAbsTemp(current,p).getValue();
          }catch(Exception e){}

          float hue = 0f;
          if(hsbStartColors[0] == hsbEndColors[0]){
            hue = hsbStartColors[0];
          }
          else if(hsbStartColors[0]&gt;hsbEndColors[0]){
            hue = ((float)102400-temp)*((hsbStartColors[0]-hsbEndColors[0])/((float)102400-(float)0))+hsbEndColors[0];
          }
         else{
            hue = (temp-(float)0)*((hsbEndColors[0]-hsbStartColors[0])/((float)102400-(float)0))+hsbStartColors[0];
          }

          float sat = 0f;
          if(hsbStartColors[1] == hsbEndColors[1]){
            sat = hsbStartColors[1];
          }
          else if(hsbStartColors[1] &gt; hsbEndColors[1]){
            sat = ((float)102400-temp)*((hsbStartColors[1]-hsbEndColors[1])/((float)102400-(float)0))+hsbEndColors[1];
          }
          else{
            sat = (temp-(float)0)*((hsbEndColors[1]-hsbStartColors[1])/((float)102400-(float)0))+hsbStartColors[1];
          }

          float bri = 0f;
          if(hsbStartColors[2] == hsbEndColors[2]){
            bri = hsbStartColors[2];
          }
          else if(hsbStartColors[2] &gt; hsbEndColors[2]){
            bri = ((float)102400-temp)*((hsbStartColors[2]-hsbEndColors[2])/((float)102400-(float)0))+hsbEndColors[2];
          }
          else{
            bri = (temp-(float)0)*((hsbEndColors[2]-hsbStartColors[2])/((float)102400-(float)0))+hsbStartColors[2];
          }

          Color hsbColor = Color.getHSBColor((float)hue,(float)sat,(float)bri);

          if(temp &gt; 102400){            hsbColor = new Color(255,255,255);          }          else if(temp &lt; 0){            hsbColor = new Color(0,0,0);          }
          offScreen.setColor(hsbColor);

          if(zz == zUB-1){
            offScreen.fill3DRect((xUB-xx-1)*blockWidth,(zUB+yy)*blockHeight, blockWidth, blockHeight, true);
          }
          if(xx==0){
            offScreen.fill3DRect((zUB-zz+xUB-1)*blockWidth, (zUB+yy)*blockHeight, blockWidth, blockHeight, true);
          }
          if(zz==0){
            offScreen.fill3DRect((xUB+zUB+xx)*blockWidth, (zUB+yy)*blockHeight, blockWidth, blockHeight, true);
          }
          if(xx == xUB-1){
            offScreen.fill3DRect((xUB+xUB+zUB+zz)*blockWidth, (zUB+yy)*blockHeight, blockWidth, blockHeight, true);
          }
          if(yy == 0){
            offScreen.fill3DRect((xUB+zUB+xx)*blockWidth, (zUB-zz-1)*blockHeight, blockWidth, blockHeight, true);
          }
          if(yy==yUB-1){
            offScreen.fill3DRect((xUB+zUB+xx)*blockWidth, (zUB+yUB+zz)*blockHeight, blockWidth, blockHeight, true);
          }
        }//end z loop
      }//end y loop
    }// end x loop
    repaint();
</string> 
        </void> 
        <void property="simCode"> 
         <string>int modulo = 1;
boolean threeDimensions = !(grid.getZBoundryType()==ComputationalGrid.NO_Z); 
if( ((model.getTimeIteration()-1) % modulo) == 0 ){int xLB = grid.getXLB();
int yLB = grid.getYLB();
int zLB = grid.getZLB();
int xUB = grid.getXUB();
int yUB = grid.getYUB();
int zUB = grid.getZUB();
    if(offScreen == null) {
      offScreen = image.createGraphics();
    }

    int blockWidth = 0;
    int blockHeight = 0;
    if(threeDimensions){
      if((2*xUB + 2*zUB) &gt; (2*yUB+2*zUB)){
        blockWidth = frameWidth / ((2*xUB)+(2*zUB));
        blockHeight = blockWidth;
      }
      else{
        blockWidth = frameHeight / ((2*yUB)+(2*zUB));
        blockHeight = blockWidth;
      }
    }//end if(threeDimensions){
    else{
      blockWidth = frameWidth / xUB;
      blockHeight = frameHeight/ yUB;
    }
    float value = (float)0;


    float[] hsbStartColors = new float[3];
    Color.RGBtoHSB(0, 0, 255, hsbStartColors);
    float[] hsbEndColors = new float[3];
    Color.RGBtoHSB(255, 0, 0, hsbEndColors);


    ChangeablePoint p = new ChangeablePoint(xLB,yLB,zLB,-1);
    for(int xx=xLB-1; xx&lt;xUB; xx++){
      p.setX(xx);
      for(int yy=yLB-1; yy&lt;yUB; yy++){
        p.setY(yy);
        if(threeDimensions){
          for(int zz=zLB-1;zz&lt;zUB;zz++){
            p.setZ(zz);
            try{
              value = (float)grid.readAbsTemp(current,p).getValue();
            }catch(Exception e){}

            float hue = 0f;
            if(hsbStartColors[0] == hsbEndColors[0]){
              hue = hsbStartColors[0];
            }
            else if(hsbStartColors[0]&gt;hsbEndColors[0]){
              hue = ((float)102400-value)*((hsbStartColors[0]-hsbEndColors[0])/((float)102400-(float)0))+hsbEndColors[0];
            }
           else{
              hue = (value-(float)0)*((hsbEndColors[0]-hsbStartColors[0])/((float)102400-(float)0))+hsbStartColors[0];
            }

            float sat = 0f;
            if(hsbStartColors[1] == hsbEndColors[1]){
              sat = hsbStartColors[1];
            }
            else if(hsbStartColors[1] &gt; hsbEndColors[1]){
              sat = ((float)102400-value)*((hsbStartColors[1]-hsbEndColors[1])/((float)102400-(float)0))+hsbEndColors[1];
            }
            else{
              sat = (value-(float)0)*((hsbEndColors[1]-hsbStartColors[1])/((float)102400-(float)0))+hsbStartColors[1];
            }

            float bri = 0f;
            if(hsbStartColors[2] == hsbEndColors[2]){
              bri = hsbStartColors[2];
            }
            else if(hsbStartColors[2] &gt; hsbEndColors[2]){
              bri = ((float)102400-value)*((hsbStartColors[2]-hsbEndColors[2])/((float)102400-(float)0))+hsbEndColors[2];
            }
            else{
              bri = (value-(float)0)*((hsbEndColors[2]-hsbStartColors[2])/((float)102400-(float)0))+hsbStartColors[2];
            }

            Color hsbColor = Color.getHSBColor((float)hue,(float)sat,(float)bri);

            if(value &gt; 102400){
              hsbColor = new Color(255,255,255);
            }
            else if(value &lt; 0){
              hsbColor = new Color(0,0,0);
            }

            offScreen.setColor(hsbColor);

            if(zz == zUB-1){
              offScreen.fill3DRect((xUB-xx-1)*blockWidth,(zUB+yy)*blockHeight, blockWidth, blockHeight, true);
            }
            if(xx==0){
              offScreen.fill3DRect((zUB-zz+xUB-1)*blockWidth, (zUB+yy)*blockHeight, blockWidth, blockHeight, true);
            }
            if(zz==0){
              offScreen.fill3DRect((xUB+zUB+xx)*blockWidth, (zUB+yy)*blockHeight, blockWidth, blockHeight, true);
            }
            if(xx == xUB-1){
              offScreen.fill3DRect((xUB+xUB+zUB+zz)*blockWidth, (zUB+yy)*blockHeight, blockWidth, blockHeight, true);
            }
            if(yy == 0){
              offScreen.fill3DRect((xUB+zUB+xx)*blockWidth, (zUB-zz-1)*blockHeight, blockWidth, blockHeight, true);
            }
            if(yy==yUB-1){
              offScreen.fill3DRect((xUB+zUB+xx)*blockWidth, (zUB+yUB+zz)*blockHeight, blockWidth, blockHeight, true);
            }
          }//end z loop
        }//end if(threeDimensions)
        else{
          try{
            value = (float)grid.readAbsTemp(current,p).getValue();
          }catch(Exception e){}

          float hue = 0f;
          if(hsbStartColors[0] == hsbEndColors[0]){
            hue = hsbStartColors[0];
          }
          else if(hsbStartColors[0]&gt;hsbEndColors[0]){
            hue = ((float)102400-value)*((hsbStartColors[0]-hsbEndColors[0])/((float)102400-(float)0))+hsbEndColors[0];
          }
         else{
            hue = (value-(float)0)*((hsbEndColors[0]-hsbStartColors[0])/((float)102400-(float)0))+hsbStartColors[0];
          }

          float sat = 0f;
          if(hsbStartColors[1] == hsbEndColors[1]){
            sat = hsbStartColors[1];
          }
          else if(hsbStartColors[1] &gt; hsbEndColors[1]){
            sat = ((float)102400-value)*((hsbStartColors[1]-hsbEndColors[1])/((float)102400-(float)0))+hsbEndColors[1];
          }
          else{
            sat = (value-(float)0)*((hsbEndColors[1]-hsbStartColors[1])/((float)102400-(float)0))+hsbStartColors[1];
          }

          float bri = 0f;
          if(hsbStartColors[2] == hsbEndColors[2]){
            bri = hsbStartColors[2];
          }
          else if(hsbStartColors[2] &gt; hsbEndColors[2]){
            bri = ((float)102400-value)*((hsbStartColors[2]-hsbEndColors[2])/((float)102400-(float)0))+hsbEndColors[2];
          }
          else{
            bri = (value-(float)0)*((hsbEndColors[2]-hsbStartColors[2])/((float)102400-(float)0))+hsbStartColors[2];
          }

          Color hsbColor = Color.getHSBColor((float)hue,(float)sat,(float)bri);

          if(value &gt; 102400){
            hsbColor = new Color(255,255,255);
          }
          else if(value &lt; 0){
            hsbColor = new Color(0,0,0);
          }

          offScreen.setColor(hsbColor);

          offScreen.fill3DRect(xx*blockWidth,yy*blockHeight, blockWidth, blockHeight, true);
        }//end else
      }//end y loop
    }// end x loop
  }
repaint();
</string> 
        </void> 
        <void property="simRecords"> 
         <object class="java.util.Vector"> 
          <void method="add"> 
           <object class="eclpss.component.ESVReadsAndWritesRecord"> 
            <void property="name"> 
             <string>Temp</string> 
            </void> 
            <void property="read"> 
             <boolean>true</boolean> 
            </void> 
           </object> 
          </void> 
         </object> 
        </void> 
        <void property="stateVariable"> 
         <object idref="ESVSpecification0"/> 
        </void> 
        <void property="staticDeclarations"> 
         <string></string> 
        </void> 
        <void property="timeStamp"> 
         <object class="java.util.Date"> 
          <long>1063646624529</long> 
         </object> 
        </void> 
       </object> 
      </void> 
     </void> 
    </object> 
   </void> 
  </void> 
  <void property="startTime"> 
   <int>1</int> 
  </void> 
  <void property="statics"> 
   <void method="add"> 
    <object class="eclpss.model.StaticVariable"> 
     <void property="comments"> 
      <string>Percentage of cells on grid created hot.</string> 
     </void> 
     <void property="name"> 
      <string>percentHot</string> 
     </void> 
     <void property="string"> 
      <string>
/**
* Percentage of cells on grid created hot.
*/
public static double percentHot = 0.05;</string> 
     </void> 
     <void property="type"> 
      <string>double</string> 
     </void> 
     <void property="value"> 
      <string>0.05</string> 
     </void> 
    </object> 
   </void> 
   <void method="add"> 
    <object class="eclpss.model.StaticVariable"> 
     <void property="comments"> 
      <string>Display grid rate.</string> 
     </void> 
     <void property="name"> 
      <string>displayRate</string> 
     </void> 
     <void property="string"> 
      <string>
/**
* Display grid rate.
*/
public static int displayRate = 1;</string> 
     </void> 
     <void property="type"> 
      <string>int</string> 
     </void> 
     <void property="value"> 
      <string>1</string> 
     </void> 
    </object> 
   </void> 
  </void> 
  <void property="timeStamp"> 
   <object class="java.util.Date"> 
    <long>1063820209738</long> 
   </object> 
  </void> 
 </object> 
</java> 
