Class Simulation

java.lang.Object
  extended bySimulation

public class Simulation
extends java.lang.Object

Simulation holds all Assembly information and actually runs the queue-based discrete-assembly algorightm


Constructor Summary
Simulation(Solution s, java.util.Vector initial_Assemblies, double ct, java.util.HashMap bondTimes, java.util.HashMap confTimes, java.util.HashMap bindingPartner)
          Creates a Simulation with specified Solution s, Vector of Assemblies a, double current time, and HashMap of bonding times (detailed in private variable definitions), and HashMap of conformation changing times (detailed in private variable definitions)
 
Method Summary
 java.util.Vector getAssemblies()
          todo future never used Returns a Vector of all the Assemblies in this Simulation
 double getRand()
          Returns a random double within [0 , 1)
 int numberOfSize(int size)
          gets the number of assemblies in the simulation of a certain size
 void printQ()
           
 void run()
          Runs this simulation by calling step() repeatedly until a certain number of events have been processed.
 SimulatorGraphic startGraphic()
          Creates a SimulatorGraphic based on this Simulation and returns it.
 void step()
           
 java.lang.String toString()
          Returns a String version of this Simulation
 void updateMonomerCount()
          Updates the JLabel showing the number of monomers
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Simulation

public Simulation(Solution s,
                  java.util.Vector initial_Assemblies,
                  double ct,
                  java.util.HashMap bondTimes,
                  java.util.HashMap confTimes,
                  java.util.HashMap bindingPartner)
Creates a Simulation with specified Solution s, Vector of Assemblies a, double current time, and HashMap of bonding times (detailed in private variable definitions), and HashMap of conformation changing times (detailed in private variable definitions)

Parameters:
s - Solution the properities of environment in which the simulation occurs
initial_Assemblies - Vector of Assemblies to be assembled
ct - double current time
bondTimes - HashMap of HashMaps String bstNames | | | | | | | | | |-> double times[3]. (times[0]-->bindingTime, | | times[1]-->breakingTime, | | times[2]-->intraAssemblyBindingTime) | | | | |__| (Another HashMap, keys are also String bstNames)
confTimes - HashMap of HashMaps String confNames | | | | | | | | | |-> double times[1]. (times[0]-->confChangeTime) | | | | | | | | |__| (Another HashMap, keys are also String confNames)
bindingPartner - HashMap of BindingSite type and corresponding compatable BindingSite types
Method Detail

run

public void run()
Runs this simulation by calling step() repeatedly until a certain number of events have been processed. User can hardcode his number here and print the intermediate result to files


step

public void step()

getRand

public double getRand()
Returns a random double within [0 , 1)

Returns:
double

toString

public java.lang.String toString()
Returns a String version of this Simulation

Returns:
String

getAssemblies

public java.util.Vector getAssemblies()
todo future never used Returns a Vector of all the Assemblies in this Simulation

Returns:
Vector of Assemblies

startGraphic

public SimulatorGraphic startGraphic()
Creates a SimulatorGraphic based on this Simulation and returns it.

Returns:
SimulatorGraphic

printQ

public void printQ()

numberOfSize

public int numberOfSize(int size)
gets the number of assemblies in the simulation of a certain size

Parameters:
size - - int
Returns:
num - int

updateMonomerCount

public void updateMonomerCount()
Updates the JLabel showing the number of monomers