Bratmobile
Classes | Functions
planner.h File Reference
#include "task.h"
#include "graphTools.h"
#include <algorithm>
Include dependency graph for planner.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  Frontier
 Contains the frontier (first) and the connecting vertices. More...
 
struct  ComparePhi
 Predicate which compares evaluation functions in State-Frontier pairs. More...
 
class  ExecutionInfo
 Information about what the configurator is doing (current Task, current vertex), what it wants to do (overarching goal), and whether it has done it before (been, goal vertex) More...
 
class  Planner
 Searches the transition system and extracts a plan. More...
 
class  HorizonStarPlanner
 Performs iterative deepening search over one unit of modular expansion (see below), i.e. search over one branch stops when it reaches a DEFAULT task. Each DEFAULT Task represents the frontier. The planner expands the search from the frontier with the lowest cost phi (A*-style search), which are logged into a priority queue. More...
 
class  NoPlanner
 Does not extract a plan. More...
 

Functions

std::vector< FrontierfrontierVertices (vertexDescriptor v, TransitionSystem &g, ExecutionInfo &info)
 Performs iterative deepening search to find the frontier. More...
 
float evaluationFunction (EndedResult er, const vertexDescriptor &v, std::vector< vertexDescriptor > &p)
 calculates cumulative cost phi, add discount factor if in plan More...
 
EndedResult estimateCost (const State &state, b2Transform start, Direction d, Task &_goal)
 Provides a breakdown of the cost function into its components: past cost (gamma): the position relative to an obstacle, if present future cost heuristic (chi): the position relative to a goal, if present, and whether the Task. More...
 

Function Documentation

◆ estimateCost()

EndedResult estimateCost ( const State state,
b2Transform  start,
Direction  d,
Task _goal 
)

Provides a breakdown of the cost function into its components: past cost (gamma): the position relative to an obstacle, if present future cost heuristic (chi): the position relative to a goal, if present, and whether the Task.

Parameters
_goalhas ended
statethe current state
startwhere the task started from
dtask direction
_goalthe overaraching goal
Returns
EndedResult

◆ evaluationFunction()

float evaluationFunction ( EndedResult  er,
const vertexDescriptor &  v,
std::vector< vertexDescriptor > &  p 
)

calculates cumulative cost phi, add discount factor if in plan

Parameters
ercontains information on whether a Task has ended and with that cumulative cost (phi)
vthe vertex that the Task corresponds to
pthe plan
Returns
float

◆ frontierVertices()

std::vector<Frontier> frontierVertices ( vertexDescriptor  v,
TransitionSystem &  g,
ExecutionInfo info 
)

Performs iterative deepening search to find the frontier.

Parameters
vsource vertex: we find the frontier from here
gthe transitionSystem
d
info
Returns
std::vector <Frontier>