+Action::Action(std::string name,const Preconditions& preconditions, std::string executable,const EffectsMap& effects){
+ _name = name;
+ _executable = executable;
+ _preconditions = preconditions;
+ _effects = effects;
+}
+
+Action::Action(const Action& action){
+ _name = action._name;
+ _preconditions = action._preconditions;
+ _effects = action._effects;
+ _executable = action._executable;
+}
+
+const Literals& Action::effects(int value) const{
+ EffectsMap::const_iterator effects = _effects.find(value);
+ if (effects != _effects.end())
+ return effects->second;
+ return _empty;
+}
+
+const Preconditions& Action::preconditions() const{
+ return _preconditions;
+}
+
+int Action::execute() const{
+ cout << "Executing: " << _name << endl;
+ return system(_executable.c_str());
+}
+
+const string& Action::name() const{
+ return _name;
+}