genopt.simulation
Class SimulationThread

java.lang.Object
  extended by genopt.simulation.SimulationThread
All Implemented Interfaces:
java.lang.Runnable

public class SimulationThread
extends java.lang.Object
implements java.lang.Runnable

Object for creating a thread that executes a simulation. The method Optimizer.getF(Point[], boolean) makes instances of this class to parallelize the simulations.

This project was carried out at:

and supported by

GenOpt Copyright (c) 1998-2011, The Regents of the University of California, through Lawrence Berkeley National Laboratory (subject to receipt of any required approvals from the U.S. Dept. of Energy). All rights reserved.

Version:
GenOpt(R) 3.1.0 (December 8, 2011)

Author:
Michael Wetter

Field Summary
protected  java.lang.Exception exc
          The Exception exception
protected static java.util.concurrent.atomic.AtomicInteger iExc
          The number of exceptions that have been accumulated
protected  java.lang.IllegalAccessException illAccExc
          The IllegalAccessException exception
protected  java.lang.NoSuchMethodException noSucMetExc
          The NoSuchMethodException exception
protected  Optimizer opt
          The reference to the GenOpt Optimizer instance
protected  OptimizerException optExc
          The OptimizerException exception
protected  SimulationInputException simInpExc
          The SimulationInputException exception
protected  Point x
          The point to be evaluated
 
Constructor Summary
SimulationThread(Optimizer optimizer, Point poi)
          Constructor.
 
Method Summary
 void run()
          Runs the simulation.
 void throwStoredException()
          Throws all exceptions that have been catched when running run.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

x

protected Point x
The point to be evaluated


opt

protected Optimizer opt
The reference to the GenOpt Optimizer instance


iExc

protected static java.util.concurrent.atomic.AtomicInteger iExc
The number of exceptions that have been accumulated


simInpExc

protected SimulationInputException simInpExc
The SimulationInputException exception


optExc

protected OptimizerException optExc
The OptimizerException exception


noSucMetExc

protected java.lang.NoSuchMethodException noSucMetExc
The NoSuchMethodException exception


illAccExc

protected java.lang.IllegalAccessException illAccExc
The IllegalAccessException exception


exc

protected java.lang.Exception exc
The Exception exception

Constructor Detail

SimulationThread

public SimulationThread(Optimizer optimizer,
                        Point poi)
Constructor.

Parameters:
optimizer - reference to the optimizer instance
poi - the point to be evaluated
Method Detail

run

public void run()
Runs the simulation. This method stores all exceptions that may occur during its execution. The exceptions can be retrieved by calling throwStoredException

Specified by:
run in interface java.lang.Runnable

throwStoredException

public void throwStoredException()
                          throws SimulationInputException,
                                 OptimizerException,
                                 java.lang.NoSuchMethodException,
                                 java.lang.IllegalAccessException,
                                 java.lang.Exception
Throws all exceptions that have been catched when running run.

Throws:
SimulationInputException
OptimizerException
java.lang.NoSuchMethodException
java.lang.IllegalAccessException
java.lang.Exception