Added exception for currently unsupported action costs.
This commit is contained in:
parent
1e47173d17
commit
d9e5b5826b
@ -22,6 +22,9 @@ TranslatorASP::TranslatorASP(const Description &description)
|
|||||||
|
|
||||||
void TranslatorASP::checkSupport() const
|
void TranslatorASP::checkSupport() const
|
||||||
{
|
{
|
||||||
|
if (m_description.usesActionCosts())
|
||||||
|
throw TranslatorException("Action costs are currently unsupported");
|
||||||
|
|
||||||
const auto &variables = m_description.variables();
|
const auto &variables = m_description.variables();
|
||||||
|
|
||||||
std::for_each(variables.cbegin(), variables.cend(),
|
std::for_each(variables.cbegin(), variables.cend(),
|
||||||
@ -44,6 +47,9 @@ void TranslatorASP::checkSupport() const
|
|||||||
if (!effect.conditions().empty())
|
if (!effect.conditions().empty())
|
||||||
throw TranslatorException("Conditional effects are currently unsupported");
|
throw TranslatorException("Conditional effects are currently unsupported");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (operator_.costs() != 1)
|
||||||
|
throw TranslatorException("Action costs are currently unsupported");
|
||||||
});
|
});
|
||||||
|
|
||||||
if (!m_description.axiomRules().empty())
|
if (!m_description.axiomRules().empty())
|
||||||
|
Reference in New Issue
Block a user