JSHOP2
Class SolverThread

java.lang.Object
  extended by java.lang.Thread
      extended by JSHOP2.SolverThread
All Implemented Interfaces:
java.lang.Runnable

public class SolverThread
extends java.lang.Thread

The thread that invokes JSHOP2 to solve a planning problem. The only reason to have another thread to solve problems rather than using the main thread to do so is that, in some platforms, the command line parameters that are supposed to change the stack size work only for the threads other than the main thread.

Version:
1.0.3
Author:
Okhtay Ilghami, http://www.cs.umd.edu/~okhtay

Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler
 
Field Summary
private  int planNo
          The maximum number of plans allowed.
private  java.util.LinkedList<Plan> plans
          The list of plans to be returned.
private  TaskList tl
          The task list to be achieved.
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
SolverThread(TaskList tlIn, int planNoIn)
          To initialize this thread.
 
Method Summary
 java.util.LinkedList<Plan> getPlans()
          To return the plans found by this thread.
 void run()
          The function that is called when this thread is invoked.
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

planNo

private int planNo
The maximum number of plans allowed.


plans

private java.util.LinkedList<Plan> plans
The list of plans to be returned.


tl

private TaskList tl
The task list to be achieved.

Constructor Detail

SolverThread

public SolverThread(TaskList tlIn,
                    int planNoIn)
To initialize this thread.

Parameters:
tlIn - the task list to be achieved by this thread.
planNoIn - the maximum number of plans allowed.
Method Detail

getPlans

public java.util.LinkedList<Plan> getPlans()
To return the plans found by this thread. This function should be called only after the thread has died.

Returns:
A LinkedList of plans found by this thread.

run

public void run()
The function that is called when this thread is invoked.

Specified by:
run in interface java.lang.Runnable
Overrides:
run in class java.lang.Thread