Fixed determination of default requirement (STRIPS).

This commit is contained in:
Patrick Lühne 2016-06-04 17:28:52 +02:00
parent 21af7e9983
commit f2a1528ea9

View File

@ -167,8 +167,9 @@ void Domain::parseRequirementSection()
m_context.parser.skipWhiteSpace();
}
// If no requirements are specified, assume STRIPS
if (m_requirements.empty())
throw utils::ParserException(m_context.parser, "Requirements section does not contain any requirements");
m_requirements.emplace_back(Requirement::Type::STRIPS);
m_context.parser.expect<std::string>(")");
}
@ -199,10 +200,6 @@ void Domain::computeDerivedRequirements()
m_requirements.push_back(Requirement(requirement));
};
// If no requirements are specified, assume STRIPS
if (m_requirements.empty())
addRequirementUnique(Requirement::Type::STRIPS);
if (hasRequirement(Requirement::Type::ADL))
{
addRequirementUnique(Requirement::Type::STRIPS);