def translate_strips_axiom(axiom, dictionary, ranges): condition = translate_strips_conditions(axiom.condition, dictionary, ranges) if condition is None: return None if axiom.effect.negated: [(var, _)] = dictionary[axiom.effect.positive()] effect = (var, ranges[var] - 1) else: [effect] = dictionary[axiom.effect] return sas_tasks.SASAxiom(condition.items(), effect)
def translate_strips_axiom(axiom, dictionary, ranges, mutex_dict, mutex_ranges): conditions = translate_strips_conditions(axiom.condition, dictionary, ranges, mutex_dict, mutex_ranges) if conditions is None: return [] if axiom.effect.negated: [(var, _)] = dictionary[axiom.effect.positive()] effect = (var, ranges[var] - 1) else: [effect] = dictionary[axiom.effect] axioms = [] for condition in conditions: axioms.append(sas_tasks.SASAxiom(condition.items(), effect)) return axioms
def translate_strips_axiom(axiom, dictionary, ranges, comp_axioms): # returns a list of axioms as condition might give a disjunction conditions = translate_strips_conditions(axiom.condition, dictionary, ranges, comp_axioms) if conditions is None: return [] if axiom.effect.negated: [(var, _)] = dictionary[axiom.effect.positive()] effect = (var, ranges[var] - 1) else: [effect] = dictionary[axiom.effect] axioms = [] for condition in conditions: axioms.append(sas_tasks.SASAxiom(condition.items(), effect)) return axioms