Skip to content

Commit

Permalink
Minor fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Alee08 committed Oct 1, 2023
1 parent 213877b commit be235c3
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions unified_planning/io/ma_pddl_writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,25 +80,25 @@ def walk_dot(self, expression, args):
agent = self._problem.agent(expression.agent())
fluent = expression.args[0].fluent()
objects = expression.args[0].args
if self._unfactored:
if fluent not in self._agent.public_fluents:
agent_name = f"_{self.get_mangled_name(agent)}"
else:
agent_name = ""
else:
agent_name = ""
agent_name = ""
if (
self._unfactored
and self._agent is not None
and fluent not in self._agent.public_fluents
):
agent_name = f"_{self.get_mangled_name(agent)}"

return f'(a_{self.get_mangled_name(fluent)}{agent_name} {self.get_mangled_name(agent)} {" ".join([self.convert(obj) for obj in objects])})'

def walk_fluent_exp(self, expression, args):
fluent = expression.fluent()
if self._unfactored:
if fluent not in self._agent.public_fluents:
agent_name = f"_{self._agent.name}"
else:
agent_name = ""
else:
agent_name = ""
agent_name = ""
if (
self._unfactored
and self._agent is not None
and fluent not in self._agent.public_fluents
):
agent_name = f"_{self._agent.name}"

if self._agent is not None and fluent in self._agent.fluents:
return f'(a_{self.get_mangled_name(fluent)}{agent_name} ?{self._agent.name}{" " if len(args) > 0 else ""}{" ".join(args)})'
Expand Down

0 comments on commit be235c3

Please sign in to comment.