-
Notifications
You must be signed in to change notification settings - Fork 1
/
scipp.cpp
28 lines (23 loc) · 1.13 KB
/
scipp.cpp
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
#include "scipp.h"
template<typename NodeType>
SCIPP<NodeType>::~SCIPP() {}
template<typename NodeType>
void SCIPP<NodeType>::splitBySoftConflicts(std::vector<std::pair<int, int>> &softConflictIntervals,
const NodeType & node, const NodeType & prevNode, std::pair<int, int> interval,
const ConflictAvoidanceTable &CAT) {
CAT.getSoftConflictIntervals(softConflictIntervals, node, prevNode, interval.first, interval.second, false);
}
template<typename NodeType>
void SCIPP<NodeType>::addStartNode(NodeType &node, const Map &map, const ConflictAvoidanceTable &CAT) {
this->updateEndTimeBySoftConflicts(node, CAT);
this->open.insert(map, node, ISearch<NodeType>::withTime);
}
template<typename NodeType>
void SCIPP<NodeType>::setHC(NodeType &neigh, const NodeType &cur,
const ConflictAvoidanceTable &CAT, bool isGoal) {
neigh.hc = cur.hc + cur.conflictsCount * (neigh.g - cur.g - 1) + neigh.conflictsCount;
if (isGoal) {
this->addFutureConflicts(neigh, CAT);
}
}
template class SCIPP<SCIPPNode>;