physis.core
Class PHYSIS

java.lang.Object
  |
  +--java.lang.Thread
        |
        +--physis.core.PHYSIS
All Implemented Interfaces:
java.lang.Runnable

public final class PHYSIS
extends java.lang.Thread

This is the main starter class. It has the main method as the entry point of the system.
Other alternative to run the system is running this class as a thread. It allows full controll over the processing. The name of the config file should be set very first! (the main method starts a thread as well)
CRC
1. instantiating the system - Configuration, Population, statistics, visualisation
2. do the updates - Population, statistics, visualisation, viewers


Field Summary
private static java.lang.String config_file
          The name of the file containing the configuration parameters (with full path).
static Environment environment
          Mainly for performance reasons this reference can be publicly available this way: PHYSIS.environment
The default environment is EnvironmentImpl is instantiated by PHYSIS.
private  long max_updates
          The maximum number of possible updates is defined in the configuration file.
private static PHYSIS physis
          The instance of the system.
private  Population population
          There's one population in one instance of Physis.
private  Statistics statistics
          The statistics-generator subsystem.
private  Triggers triggers
          The container of predefined events, operations.
private  long updatecount
          Counts the number of updates.
private  Viewer[] viewers
          Several different viewers can be attached to the system.
 
Fields inherited from class java.lang.Thread
contextClassLoader, daemon, eetop, group, inheritableThreadLocals, inheritedAccessControlContext, MAX_PRIORITY, MIN_PRIORITY, name, NORM_PRIORITY, priority, single_step, stillborn, stopThreadPermission, target, threadInitNumber, threadLocals, threadQ
 
Constructor Summary
private PHYSIS(java.lang.String config_file)
           
 
Method Summary
static PHYSIS getInstance()
          This returns an instance of the system if the full path of the configuration file is correctly set.
 Population getPopulation()
          Returns the instance's population.
 long getUpdateCount()
          Returns the number of the current update cycle.
static void main(java.lang.String[] args)
          This is the main entry point.
 void run()
          The thread's run method.
static void setConfigFileName(java.lang.String filename)
          Sets the configuration file.
 void setViewers(Viewer[] viewers)
          The viewers can be set dynamically.
 
Methods inherited from class java.lang.Thread
, activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, exit, getContextClassLoader, getName, getPriority, getThreadGroup, init, interrupt, interrupt0, interrupted, isAlive, isDaemon, isInterrupted, isInterrupted, join, join, join, nextThreadNum, registerNatives, resume, resume0, setContextClassLoader, setDaemon, setName, setPriority, setPriority0, sleep, sleep, start, stop, stop, stop0, suspend, suspend0, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

environment

public static Environment environment
Mainly for performance reasons this reference can be publicly available this way: PHYSIS.environment
The default environment is EnvironmentImpl is instantiated by PHYSIS.

config_file

private static java.lang.String config_file
The name of the file containing the configuration parameters (with full path).

physis

private static PHYSIS physis
The instance of the system.

population

private Population population
There's one population in one instance of Physis.

triggers

private Triggers triggers
The container of predefined events, operations.

statistics

private Statistics statistics
The statistics-generator subsystem.

viewers

private Viewer[] viewers
Several different viewers can be attached to the system. The active viewers are stored in this array.

updatecount

private long updatecount
Counts the number of updates. Starting from 1.

max_updates

private long max_updates
The maximum number of possible updates is defined in the configuration file.
Constructor Detail

PHYSIS

private PHYSIS(java.lang.String config_file)
Method Detail

main

public static void main(java.lang.String[] args)
This is the main entry point.

setConfigFileName

public static void setConfigFileName(java.lang.String filename)
Sets the configuration file. After this the system can be instantiated.

getInstance

public static PHYSIS getInstance()
This returns an instance of the system if the full path of the configuration file is correctly set.

run

public void run()
The thread's run method. It's a cycle in which the system parts are updated.
Overrides:
run in class java.lang.Thread

getPopulation

public Population getPopulation()
Returns the instance's population.

getUpdateCount

public long getUpdateCount()
Returns the number of the current update cycle.

setViewers

public void setViewers(Viewer[] viewers)
The viewers can be set dynamically.