dk.deepthought.sidious.planner
Class PlannerEngine

java.lang.Object
  extended by dk.deepthought.sidious.planner.PlannerEngine
All Implemented Interfaces:
Planner

public final class PlannerEngine
extends java.lang.Object
implements Planner

This class constitutes a Blackboard for the planner. Works as a liaison class between the GraphFactory and Pathfinder.

This class holds three SidiousQueue queues for calculating a plan:

  1. extracting state and generating the graph
  2. for processing the pathfinding
  3. for plan generation

Author:
Deepthought

Field Summary
private  SidiousQueue<Goal> graphFactoryQueue
          Queue to facilitate generation of the graph.
private  java.util.HashMap<SuperLinkID,Pathfinder> idToPathfinder
          Mapping between id and pathfinder
private static Planner INSTANCE
          private singleton instance.
private static org.apache.commons.logging.Log logger
          Logger for this class.
private  SidiousQueue<Graph> pathfinderQueue
          Queue to facilitate the path finding.
private  SidiousQueue<Graph> planGeneratorQueue
          Queue to handle the generation of a plan from a searched graph.
 
Constructor Summary
private PlannerEngine()
          Private constructor, to facilitate singleton.
 
Method Summary
private  void deliverPlan(Plan plan)
          Delivers the finished plan to the blackboard.
static java.util.Collection<Adjustable> getAdjustables(SuperLinkID requester)
          Returns the adjustables of the specified requester.
static Planner getInstance()
          Returns the singleton instance.
 void requestPlan(Goal goal)
          Requests this planner for a plan to the specified goal.
 void stop(SuperLinkID id)
          Stops generating a plan for the given id.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

private static final org.apache.commons.logging.Log logger
Logger for this class.


idToPathfinder

private final java.util.HashMap<SuperLinkID,Pathfinder> idToPathfinder
Mapping between id and pathfinder


INSTANCE

private static final Planner INSTANCE
private singleton instance.


graphFactoryQueue

private SidiousQueue<Goal> graphFactoryQueue
Queue to facilitate generation of the graph.


pathfinderQueue

private SidiousQueue<Graph> pathfinderQueue
Queue to facilitate the path finding.


planGeneratorQueue

private SidiousQueue<Graph> planGeneratorQueue
Queue to handle the generation of a plan from a searched graph.

Constructor Detail

PlannerEngine

private PlannerEngine()
Private constructor, to facilitate singleton.

Method Detail

deliverPlan

private void deliverPlan(Plan plan)
Delivers the finished plan to the blackboard.

Parameters:
plan - the finished plan

getAdjustables

public static java.util.Collection<Adjustable> getAdjustables(SuperLinkID requester)
Returns the adjustables of the specified requester.

Parameters:
requester - the requester
Returns:
the adjustables of the requester

stop

public void stop(SuperLinkID id)
Description copied from interface: Planner
Stops generating a plan for the given id.

Specified by:
stop in interface Planner
Parameters:
id - the id

requestPlan

public void requestPlan(Goal goal)
Description copied from interface: Planner
Requests this planner for a plan to the specified goal.

Specified by:
requestPlan in interface Planner
Parameters:
goal - the goal to search with respect to

getInstance

public static Planner getInstance()
Returns the singleton instance.

Returns:
the singleton instance


Copyright © Deepthought Development - All Rights Reserved.