blob: 28892fcac967fe6b5c486c87a8da5495576938b6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
|
// -*- C++ -*-
// $Id$
//=============================================================================
/**
* @file SA_PlanHeuristics.h
*
* This file contains the definitions of concrete classes,
* which implement plan heuristic strategies.
*
* @author John S. Kinnebrew <john.s.kinnebrew@vanderbilt.edu>
*/
//=============================================================================
#ifndef SA_POP_SA_PLAN_HEURISTICS_H_
#define SA_POP_SA_PLAN_HEURISTICS_H_
#include "SA_POP_Types.h"
#include "PlanHeuristics.h"
namespace SA_POP {
/**
* @class SA_CondStrategy
*
* @brief CondStrategy concrete class for a PlanHeuristic that
* chooses an open condition in the plan to satisfy next.
*/
class SA_CondStrategy : public CondStrategy {
public:
/// Constructor.
/**
* @param planner Planner object to use.
*/
SA_CondStrategy (SA_POP::Planner *planner);
/// Destructor.
virtual ~SA_CondStrategy (void);
/// Choose the next open condition to satisfy.
/**
* @param open_conds Open conditions in the plan.
*
* @return Next open condition to satisfy.
*/
virtual Condition choose_cond (const OpenCondMap &open_conds);
virtual Condition choose_cond_suspension (const OpenCondMap &open_conds);
virtual Condition choose_cond_suspension_most_constrained (const OpenCondMap &open_conds);
};
/**
* @class SA_TaskStrategy
*
* @brief TaskStrategy concrete class for a PlanHeuristic that
* chooses an ordering of tasks for the choice to satisfy an
* open condition.
*/
class SA_TaskStrategy : public TaskStrategy {
public:
/// Constructor.
/**
* @param planner Planner object to use.
*/
SA_TaskStrategy (SA_POP::Planner *planner);
/// Destructor.
virtual ~SA_TaskStrategy (void);
/// Choose the (ordering of) task(s) to satisfy an open condition.
/**
* @param open_cond Open condition to satisfy.
*
* @return Sorted list of tasks that satisfy given condition.
*/
virtual TaskChoiceList choose_task (Condition open_cond);
/// Choose the (ordering of) task(s) to satisfy an open condition. The cool way
/**
* @param open_cond Open condition to satisfy.
*
* @return Sorted list of tasks that satisfy given condition.
*/
virtual TaskChoiceList choose_task_fair (Condition open_cond);
virtual TaskChoiceList choose_task_once(Condition open_cond);
};
/**
* @class SA_ImplStrategy
*
* @brief ImplStrategy concrete class for a PlanHeuristic that
* chooses an ordering of implementations to try for a given
* task instance.
*/
class SA_ImplStrategy : public ImplStrategy {
public:
/// Constructor.
/**
* @param planner Planner object to use.
*/
SA_ImplStrategy (SA_POP::Planner *planner);
/// Destructor.
virtual ~SA_ImplStrategy (void);
/// Choose the (ordering of) task implementation(s) for a task instance.
/**
* @param task_inst Task instance for which to choose implementations.
*
* @return Ordered list of implementations for the given task instance.
*/
virtual TaskImplList choose_impl (TaskInstID task_inst);
};
}; /* SA_POP namespace */
#endif /* SA_POP_SA_PLAN_HEURISTICS_H_ */
|