Skip to main content

Condition

Enum Condition 

Source
pub enum Condition {
Show 22 variants And(Vec<Condition>), Or(Vec<Condition>), Not(Box<Condition>), Imply(Box<Condition>, Box<Condition>), Forall { variables: TypedList<Variable>, condition: Box<Condition>, }, Exists { variables: TypedList<Variable>, condition: Box<Condition>, }, Predicate(AtomicFormula), Equals(Term, Term), NumericComparison { op: CompareOp, left: NumericExpr, right: NumericExpr, }, Preference { name: Option<Name>, condition: Box<Condition>, }, AtStart(Box<Condition>), AtEnd(Box<Condition>), OverAll(Box<Condition>), Always(Box<Condition>), Sometime(Box<Condition>), AtMostOnce(Box<Condition>), Within(f64, Box<Condition>), SometimeBefore(Box<Condition>, Box<Condition>), SometimeAfter(Box<Condition>, Box<Condition>), AlwaysWithin(f64, Box<Condition>, Box<Condition>), HoldDuring(f64, f64, Box<Condition>), HoldAfter(f64, Box<Condition>),
}
Expand description

A condition (goal description) in PDDL.

This is the central recursive type for preconditions, goals, and constraint bodies. It covers logical connectives, first-order quantifiers, predicate tests, numeric comparisons, temporal wrappers (durative actions), PDDL3 trajectory constraints, and preferences.

Variants§

§

And(Vec<Condition>)

Conjunction: (and c1 c2 ...).

§

Or(Vec<Condition>)

Disjunction: (or c1 c2 ...).

§

Not(Box<Condition>)

Negation: (not c).

§

Imply(Box<Condition>, Box<Condition>)

Implication: (imply c1 c2).

§

Forall

Universal quantification: (forall (?x - type) c).

Fields

§variables: TypedList<Variable>
§condition: Box<Condition>
§

Exists

Existential quantification: (exists (?x - type) c).

Fields

§variables: TypedList<Variable>
§condition: Box<Condition>
§

Predicate(AtomicFormula)

A positive predicate test: (at ?x ?y).

§

Equals(Term, Term)

Object equality: (= ?x ?y).

§

NumericComparison

Numeric comparison: (<op> <expr> <expr>).

§

Preference

PDDL3 named preference: (preference <name> <cond>).

Fields

§name: Option<Name>
§condition: Box<Condition>
§

AtStart(Box<Condition>)

(at start <cond>) – holds at the action’s start.

§

AtEnd(Box<Condition>)

(at end <cond>) – holds at the action’s end.

§

OverAll(Box<Condition>)

(over all <cond>) – holds throughout the action.

§

Always(Box<Condition>)

(always <cond>).

§

Sometime(Box<Condition>)

(sometime <cond>).

§

AtMostOnce(Box<Condition>)

(at-most-once <cond>).

§

Within(f64, Box<Condition>)

(within <deadline> <cond>).

§

SometimeBefore(Box<Condition>, Box<Condition>)

(sometime-before <cond1> <cond2>).

§

SometimeAfter(Box<Condition>, Box<Condition>)

(sometime-after <cond1> <cond2>).

§

AlwaysWithin(f64, Box<Condition>, Box<Condition>)

(always-within <window> <cond1> <cond2>).

§

HoldDuring(f64, f64, Box<Condition>)

(hold-during <t1> <t2> <cond>).

§

HoldAfter(f64, Box<Condition>)

(hold-after <t> <cond>).

Trait Implementations§

Source§

impl Clone for Condition

Source§

fn clone(&self) -> Condition

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Condition

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl PartialEq for Condition

Source§

fn eq(&self, other: &Condition) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for Condition

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for Condition

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.