Added exception for currently unsupported action costs.

This commit is contained in:
Patrick Lühne 2016-05-22 16:03:37 +02:00
parent 1e47173d17
commit d9e5b5826b

View File

@ -22,6 +22,9 @@ TranslatorASP::TranslatorASP(const Description &description)
void TranslatorASP::checkSupport() const
{
if (m_description.usesActionCosts())
throw TranslatorException("Action costs are currently unsupported");
const auto &variables = m_description.variables();
std::for_each(variables.cbegin(), variables.cend(),
@ -44,6 +47,9 @@ void TranslatorASP::checkSupport() const
if (!effect.conditions().empty())
throw TranslatorException("Conditional effects are currently unsupported");
});
if (operator_.costs() != 1)
throw TranslatorException("Action costs are currently unsupported");
});
if (!m_description.axiomRules().empty())