diff --git a/include/plasp/pddl/Problem.h b/include/plasp/pddl/Problem.h index c731853..d21b40f 100644 --- a/include/plasp/pddl/Problem.h +++ b/include/plasp/pddl/Problem.h @@ -45,6 +45,8 @@ class Problem void checkConsistency(); + void normalize(); + private: void parseRequirementSection(); void computeDerivedRequirements(); diff --git a/src/plasp/pddl/Description.cpp b/src/plasp/pddl/Description.cpp index 6d577ff..83672ae 100644 --- a/src/plasp/pddl/Description.cpp +++ b/src/plasp/pddl/Description.cpp @@ -207,6 +207,9 @@ void Description::checkConsistency() void Description::normalize() { m_domain->normalize(); + + if (m_problem) + m_problem->normalize(); } //////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/src/plasp/pddl/Problem.cpp b/src/plasp/pddl/Problem.cpp index 8a2799e..9f38d69 100644 --- a/src/plasp/pddl/Problem.cpp +++ b/src/plasp/pddl/Problem.cpp @@ -395,5 +395,16 @@ void Problem::checkConsistency() //////////////////////////////////////////////////////////////////////////////////////////////////// +void Problem::normalize() +{ + BOOST_ASSERT(m_goal); + + // TODO: normalize objects and initial state + + m_goal->normalize(); +} + +//////////////////////////////////////////////////////////////////////////////////////////////////// + } }