return _effects;
}
-void Node::execute(bool strict, const Literals& effects){
+void Node::execute(const Literals& effects){
for (Literals::const_iterator effect = effects.begin(); effect != effects.end(); ++effect){
_preconditions.erase(_preconditions.find(*effect));
}
- if ((_preconditions.size() != 0 && strict) || _executed)
+ if ((_preconditions.size() != 0) || _executed)
return;
if (_preconditions.size() != 0){
_effects = _action.effects(value);
for(vector<Node*>::iterator child = _children.begin(); child != _children.end(); ++child){
- (*child)->execute(strict,effects);
+ (*child)->execute(effects);
}
}
virtual ~Node(){}
void addChild(Node* node);
const Action& action() const;
- void execute(bool strict, const Literals& effects);
+ void execute(const Literals& effects);
bool executed() const;
const Literals& effects() const;
void Planner::execute(){
- _start->execute(true,Literals());
+ _start->execute(Literals());
/*for (hash_map<string,Node*>::iterator node = _addedNodes.begin(); node != _addedNodes.end(); ++node){
if (node->second->executed()){
}*/
- _start->execute(false,Literals());
+ _start->execute(Literals());
}