-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathplanners.cc
103 lines (74 loc) · 2.21 KB
/
planners.cc
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
#include "global.h"
#include "hash.h"
#include "planners.h"
#include "states.h"
#include <assert.h>
/*******************************************************************************
*
* planner LR2TDP
*
******************************************************************************/
plannerLR2TDP_t::plannerLR2TDP_t(const problem_t &problem, heuristic_t &heur)
: planner_t(problem,heur)
{
hash_table_FH_ = new hash_FH_t( problem, gpt::initial_hash_size, heur_, problem.horizon() );
algorithm_ = new lr2tdp_t( problem, *hash_table_FH_ );
}
plannerLR2TDP_t::~plannerLR2TDP_t()
{
delete algorithm_;
delete hash_table_FH_;
}
void
plannerLR2TDP_t::statistics( std::ostream &os, int level ) const
{
if( level >= 300 )
hash_table_FH_->print( os, problem_ );
}
/*******************************************************************************
*
* planner GLUTTON
*
******************************************************************************/
plannerGLUTTON_t::plannerGLUTTON_t(const problem_t &problem, heuristic_t &heur)
: planner_t(problem,heur)
{
hash_table_FH_ = new hash_FH_t( problem, gpt::initial_hash_size, heur_,
problem.horizon() );
algorithm_ = new glutton_t( problem, *hash_table_FH_ );
}
plannerGLUTTON_t::~plannerGLUTTON_t()
{
delete algorithm_;
delete hash_table_FH_;
}
void
plannerGLUTTON_t::statistics( std::ostream &os, int level ) const
{
if( level >= 300 )
hash_table_FH_->print( os, problem_ );
}
/*******************************************************************************
*
* planner GOURMAND
*
******************************************************************************/
plannerGOURMAND_t::plannerGOURMAND_t(const problem_t &problem,
heuristic_t &heur)
: planner_t(problem,heur)
{
hash_table_FH_ = new hash_FH_t( problem, gpt::initial_hash_size, heur_,
problem.horizon() );
algorithm_ = new gourmand_t( problem, *hash_table_FH_ );
}
plannerGOURMAND_t::~plannerGOURMAND_t()
{
delete algorithm_;
delete hash_table_FH_;
}
void
plannerGOURMAND_t::statistics( std::ostream &os, int level ) const
{
if( level >= 300 )
hash_table_FH_->print( os, problem_ );
}