eaLib API Docs
Last Modified : January 7 2002

mss.ea.al
Class ThreadController

java.lang.Object
  |
  +--mss.ea.al.ThreadController

Deprecated. superceded by new thread communication model

public abstract class ThreadController
extends java.lang.Object

Abstract base class for a multithreaded evolutionary algorithm.

Since:
0.1
Version:
$Revision: 1.7 $ $Date: 2001/11/12 17:23:46 $
Author:
Andreas Rummler

Field Summary
protected  java.lang.Thread mainThread
          Deprecated.  
protected  jargs.gnu.CmdLineParser parser
          Deprecated.  
protected  ThreadSynchronization sync
          Deprecated.  
protected  Timer timer
          Deprecated. Timer for measuring the run time of the algorithm.
 
Constructor Summary
ThreadController()
          Deprecated. Constructor.
 
Method Summary
protected  void connect(ThreadOperator from, int output, ThreadOperator to)
          Deprecated. Connects two operators.
protected  void connect(ThreadOperator from, int output, ThreadOperator to, int input)
          Deprecated. Connects two operators.
protected  void connect(ThreadOperator from, ThreadOperator to)
          Deprecated. Connects two thread oprators.
protected  void connect(ThreadOperator from, ThreadOperator to, int input)
          Deprecated. Connects two operators.
protected  void evolve()
          Deprecated. Performs the evolution.
protected  void evolveStatic()
          Deprecated. Evolves in mode INVOKE_STATIC.
 java.lang.Thread getThread()
          Deprecated.  
protected  void info()
          Deprecated. Prints information about the controller object.
protected  boolean isConsistent()
          Deprecated. Checks the consistency of all internal instance variables.
protected  void printUsage()
          Deprecated.  
protected  void result()
          Deprecated. Prints the results of the algorithm.
protected abstract  void setup()
          Deprecated. Method to perform the setup stage of the algorithm.
 void start(java.lang.String[] args)
          Deprecated. Main method.
 void toGraph()
          Deprecated. Converts the algorithm structure into a graph.
 void toXML()
          Deprecated. Converts the algorithm structure into an XML document.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mainThread

protected java.lang.Thread mainThread
Deprecated. 

sync

protected ThreadSynchronization sync
Deprecated. 

parser

protected jargs.gnu.CmdLineParser parser
Deprecated. 

timer

protected Timer timer
Deprecated. 
Timer for measuring the run time of the algorithm.
Constructor Detail

ThreadController

public ThreadController()
Deprecated. 
Constructor.
Method Detail

isConsistent

protected boolean isConsistent()
Deprecated. 
Checks the consistency of all internal instance variables. This should be used to insure that the algorithm can be run. Instance checks for missing operators can be done in this method. The method in this base class only checks the sink, source and gate for null references and the termQueue for emptiness. The method should be called from the subclasses.
Returns:
result of the check

connect

protected void connect(ThreadOperator from,
                       ThreadOperator to)
Deprecated. 
Connects two thread oprators.
Parameters:
from - first operator
to - second operator

connect

protected void connect(ThreadOperator from,
                       ThreadOperator to,
                       int input)
Deprecated. 
Connects two operators.
Parameters:
from - first operator
to - second operator
input - slot of second operator

connect

protected void connect(ThreadOperator from,
                       int output,
                       ThreadOperator to)
Deprecated. 
Connects two operators.
Parameters:
from - from operator
output - slot of first operator
to - second operator

connect

protected void connect(ThreadOperator from,
                       int output,
                       ThreadOperator to,
                       int input)
Deprecated. 
Connects two operators. The operators are always connect "from -> to" so the first operator is the predecessor of the second. Furthermore an appropriate input/ouput slot can be given.
Parameters:
from - first operator
output - output slot of the first operator
to - second operator
input - input slot of the second operator

getThread

public java.lang.Thread getThread()
Deprecated. 

evolve

protected void evolve()
               throws EAException
Deprecated. 
Performs the evolution.
Throws:
EAException - thrown if any of the used operators fails

evolveStatic

protected void evolveStatic()
                     throws EAException
Deprecated. 
Evolves in mode INVOKE_STATIC.
Throws:
EAException - thrown in case one of the operators fails

setup

protected abstract void setup()
Deprecated. 
Method to perform the setup stage of the algorithm. This should be called before running the algorithm. All initializations should be done in this method.

result

protected void result()
Deprecated. 
Prints the results of the algorithm. The default behaviour is printing the contents of the best individual to System.out.

info

protected void info()
Deprecated. 
Prints information about the controller object.

toGraph

public void toGraph()
Deprecated. 
Converts the algorithm structure into a graph. Not implemented yet.

toXML

public void toXML()
Deprecated. 
Converts the algorithm structure into an XML document. Not implemented yet.

start

public void start(java.lang.String[] args)
Deprecated. 
Main method. This starts the algorithm.
Parameters:
args - command line options

printUsage

protected void printUsage()
Deprecated. 

eaLib API Docs
Last Modified : January 7 2002

Copyright © 2000-2001 Technical University of Ilmenau, Department ESS