JSHOP2
Class JSHOP2

java.lang.Object
  extended by JSHOP2.JSHOP2

public class JSHOP2
extends java.lang.Object

This class is the implementation of the JSHOP2 algorithm.

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

Field Summary
private static Plan currentPlan
          The plan currently being constructed.
private static Domain domain
          The domain description for the planning problem.
private static int numPlans
          Incremented whenever a plan is found.
private static int planNo
          The maximum number of plans to be returned.
private static java.util.LinkedList<Plan> plans
          The plans are stored in this variable as a list of type Plan.
private static java.util.ArrayList<PlanStepInfo> planStepList
          An ArrayList that represents the steps taken to find every plan.
private static State state
          The current state of the world.
private static TaskList tasks
          The task list to be achieved.
 
Constructor Summary
JSHOP2()
           
 
Method Summary
private static boolean findPlanHelper(TaskList chosenTask)
          This is the helper function that finds a plan.
static java.util.LinkedList<Plan> findPlans(TaskList tasksIn, int planNoIn)
          This function finds plan(s) for a given initial task list.
static Domain getDomain()
          This function returns the planning domain.
static State getState()
          This function returns the current state of the world.
static void initialize(Domain domainIn, State stateIn)
          This function is used to initialize the planning algorithm.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

currentPlan

private static Plan currentPlan
The plan currently being constructed.


domain

private static Domain domain
The domain description for the planning problem.


planNo

private static int planNo
The maximum number of plans to be returned.


plans

private static java.util.LinkedList<Plan> plans
The plans are stored in this variable as a list of type Plan.


state

private static State state
The current state of the world.


tasks

private static TaskList tasks
The task list to be achieved.


planStepList

private static java.util.ArrayList<PlanStepInfo> planStepList
An ArrayList that represents the steps taken to find every plan.


numPlans

private static int numPlans
Incremented whenever a plan is found. Passed to JSHOP2GUI.

Constructor Detail

JSHOP2

public JSHOP2()
Method Detail

findPlans

public static java.util.LinkedList<Plan> findPlans(TaskList tasksIn,
                                                   int planNoIn)
This function finds plan(s) for a given initial task list.

Parameters:
tasksIn - the initial task list to be achieved.
planNoIn - the maximum number of plans to be returned.
Returns:
0 or more plans that achieve the given task list.

findPlanHelper

private static boolean findPlanHelper(TaskList chosenTask)
This is the helper function that finds a plan.

Parameters:
chosenTask - the task list chosen to look for the next task atom to achieve. This variable is usually set to the whole task network unless there is a method that is chosen to decomopose a task, and the decomposition of that task has not gone all the way down to an operator. In that case, this variable will be set to the task decomposed by that method.
Returns:
true if a plan is found, false otherwise.

getDomain

public static Domain getDomain()
This function returns the planning domain.

Returns:
the current planning domain.

getState

public static State getState()
This function returns the current state of the world.

Returns:
the current state of the world.

initialize

public static void initialize(Domain domainIn,
                              State stateIn)
This function is used to initialize the planning algorithm.

Parameters:
domainIn - the planning domain.
stateIn - the initial state of the world.