Skip to main content

ConstraintGoalDescription

Enum ConstraintGoalDescription 

Source
pub enum ConstraintGoalDescription {
    And(Vec<ConstraintGoalDescription>),
    Forall(TypedVariables, Box<ConstraintGoalDescription>),
    AtEnd(GoalDescription),
    Always(ConstraintGoalDescriptionInner),
    Sometime(ConstraintGoalDescriptionInner),
    Within(Number, ConstraintGoalDescriptionInner),
    AtMostOnce(ConstraintGoalDescriptionInner),
    SometimeAfter(ConstraintGoalDescriptionInner, ConstraintGoalDescriptionInner),
    SometimeBefore(ConstraintGoalDescriptionInner, ConstraintGoalDescriptionInner),
    AlwaysWithin(Number, ConstraintGoalDescriptionInner, ConstraintGoalDescriptionInner),
    HoldDuring(Number, Number, ConstraintGoalDescriptionInner),
    HoldAfter(Number, ConstraintGoalDescriptionInner),
}
Expand description

A constraint goal description.

Represents temporal constraint goals for problem-level constraints in PDDL 3.1. Supports always, sometime, within, at-most-once, sometime-after, sometime-before, always-within, hold-during, and hold-after.

§BNF

Corresponds to <con-GD> in the PDDL 3.1 specification.

§Usage

Used by PreferenceConstraintGoalDescription and ConstraintGoalDescriptionInner.

Variants§

§

And(Vec<ConstraintGoalDescription>)

A conjunction, (and <con-GD>*).

§

Forall(TypedVariables, Box<ConstraintGoalDescription>)

A universal quantification, (forall (<typed list(variable)>) <con-GD>).

§

AtEnd(GoalDescription)

A goal that must hold in the final state, (at end <GD>).

§

Always(ConstraintGoalDescriptionInner)

A goal that must hold in every state, (always <con2-GD>).

§

Sometime(ConstraintGoalDescriptionInner)

A goal that must hold in at least one state, (sometime <con2-GD>).

§

Within(Number, ConstraintGoalDescriptionInner)

A goal that must become true within the given time, (within <number> <con2-GD>).

§

AtMostOnce(ConstraintGoalDescriptionInner)

A goal that may become true at most once, (at-most-once <con2-GD>).

§

SometimeAfter(ConstraintGoalDescriptionInner, ConstraintGoalDescriptionInner)

Whenever the first goal holds, the second must hold then or later, (sometime-after <con2-GD> <con2-GD>).

§

SometimeBefore(ConstraintGoalDescriptionInner, ConstraintGoalDescriptionInner)

Whenever the first goal holds, the second must have held earlier, (sometime-before <con2-GD> <con2-GD>).

§

AlwaysWithin(Number, ConstraintGoalDescriptionInner, ConstraintGoalDescriptionInner)

Whenever the first goal holds, the second must hold within the given time, (always-within <number> <con2-GD> <con2-GD>).

§

HoldDuring(Number, Number, ConstraintGoalDescriptionInner)

A goal that must hold between the two given times, (hold-during <number> <number> <con2-GD>).

§

HoldAfter(Number, ConstraintGoalDescriptionInner)

A goal that must hold in at least one state after the given time, (hold-after <number> <con2-GD>).

Implementations§

Source§

impl ConstraintGoalDescription

Source

pub fn and<G: IntoIterator<Item = ConstraintGoalDescription>>(goals: G) -> Self

Creates a conjunction (and <con-GD>*).

Source

pub fn new_and<G: IntoIterator<Item = ConstraintGoalDescription>>( goals: G, ) -> Self

Alias for Self::and.

Source

pub fn forall(variables: TypedVariables, gd: ConstraintGoalDescription) -> Self

Creates a universal quantification (forall (<variables>) <con-GD>).

Source

pub fn new_forall( variables: TypedVariables, gd: ConstraintGoalDescription, ) -> Self

Alias for Self::forall.

Source

pub const fn at_end(gd: GoalDescription) -> Self

Creates an (at end <GD>) constraint.

Source

pub fn new_at_end(gd: GoalDescription) -> Self

Alias for Self::at_end.

Source

pub const fn always(gd: ConstraintGoalDescriptionInner) -> Self

Creates an (always <con2-GD>) constraint.

Source

pub fn new_always(gd: ConstraintGoalDescriptionInner) -> Self

Alias for Self::always.

Source

pub const fn sometime(gd: ConstraintGoalDescriptionInner) -> Self

Creates a (sometime <con2-GD>) constraint.

Source

pub fn new_sometime(gd: ConstraintGoalDescriptionInner) -> Self

Alias for Self::sometime.

Source

pub const fn within(number: Number, gd: ConstraintGoalDescriptionInner) -> Self

Creates a (within <number> <con2-GD>) constraint.

Source

pub fn new_within(number: Number, gd: ConstraintGoalDescriptionInner) -> Self

Alias for Self::within.

Source

pub const fn at_most_once(gd: ConstraintGoalDescriptionInner) -> Self

Creates an (at-most-once <con2-GD>) constraint.

Source

pub fn new_at_most_once(gd: ConstraintGoalDescriptionInner) -> Self

Alias for Self::at_most_once.

Source

pub const fn sometime_after( first: ConstraintGoalDescriptionInner, then: ConstraintGoalDescriptionInner, ) -> Self

Creates a (sometime-after <first> <then>) constraint: whenever first holds, then must hold at that point or later.

Source

pub fn new_sometime_after( first: ConstraintGoalDescriptionInner, then: ConstraintGoalDescriptionInner, ) -> Self

Source

pub const fn sometime_before( later: ConstraintGoalDescriptionInner, earlier: ConstraintGoalDescriptionInner, ) -> Self

Creates a (sometime-before <later> <earlier>) constraint: whenever later holds, earlier must have held before.

Source

pub fn new_sometime_before( later: ConstraintGoalDescriptionInner, earlier: ConstraintGoalDescriptionInner, ) -> Self

Source

pub const fn always_within( number: Number, first: ConstraintGoalDescriptionInner, second: ConstraintGoalDescriptionInner, ) -> Self

Creates an (always-within <number> <first> <second>) constraint: whenever first holds, second must hold within number time units.

Source

pub fn new_always_within( number: Number, first: ConstraintGoalDescriptionInner, second: ConstraintGoalDescriptionInner, ) -> Self

Source

pub const fn hold_during( begin: Number, end: Number, gd: ConstraintGoalDescriptionInner, ) -> Self

Creates a (hold-during <begin> <end> <con2-GD>) constraint.

Source

pub fn new_hold_during( begin: Number, end: Number, gd: ConstraintGoalDescriptionInner, ) -> Self

Alias for Self::hold_during.

Source

pub const fn hold_after( number: Number, gd: ConstraintGoalDescriptionInner, ) -> Self

Creates a (hold-after <number> <con2-GD>) constraint: the goal must hold in at least one state after number.

Source

pub fn new_hold_after( number: Number, gd: ConstraintGoalDescriptionInner, ) -> Self

Alias for Self::hold_after.

Source

pub fn is_empty(&self) -> bool

Returns true if this constraint contains no goals, e.g. (and).

Trait Implementations§

Source§

impl Clone for ConstraintGoalDescription

Source§

fn clone(&self) -> Self

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 ConstraintGoalDescription

Source§

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

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

impl Default for ConstraintGoalDescription

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for ConstraintGoalDescription

Available on crate feature serde only.
Source§

fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>

Deserialize this value from the given Serde deserializer. Read more
Source§

impl From<ConstraintGoalDescription> for ConstraintGoalDescriptionInner

Source§

fn from(value: ConstraintGoalDescription) -> Self

Converts to this type from the input type.
Source§

impl From<ConstraintGoalDescription> for PreferenceConstraintGoalDescriptions

Source§

fn from(value: ConstraintGoalDescription) -> Self

Converts to this type from the input type.
Source§

impl From<ConstraintGoalDescription> for DomainConstraintsDef

Source§

fn from(value: ConstraintGoalDescription) -> Self

Converts to this type from the input type.
Source§

impl From<DomainConstraintsDef> for ConstraintGoalDescription

Source§

fn from(val: DomainConstraintsDef) -> Self

Converts to this type from the input type.
Source§

impl Parser for ConstraintGoalDescription

Available on crate feature parser only.
Source§

type Item = ConstraintGoalDescription

The parsed value; Self except for DurationConstraint, which may be empty.
Source§

fn from_str(input: &str) -> Result<Self::Item, ParseError>

Parses the entire input into the specified Item type. Read more
Source§

impl PartialEq for ConstraintGoalDescription

Source§

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

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

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

Inequality operator !=. Read more
Source§

impl PartialEq<ConstraintGoalDescription> for DomainConstraintsDef

Source§

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

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

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

Inequality operator !=. Read more
Source§

impl Serialize for ConstraintGoalDescription

Available on crate feature serde only.
Source§

fn serialize<S: Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error>

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

impl StructuralPartialEq for ConstraintGoalDescription

Source§

impl Visitor<ConstraintGoalDescription, RcDoc<'static>> for PrettyRenderer

Available on crate feature pretty only.
Source§

fn visit(&self, value: &ConstraintGoalDescription) -> RcDoc<'static>

Visits value and returns the result.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<V, T, O> Accept<V, T, O> for T
where V: Visitor<T, O>,

Source§

fn accept(&self, v: &V) -> O

Lets the visitor v visit self.
Source§

impl<V, T, O> AcceptMut<V, T, O> for T
where V: VisitorMut<T, O>,

Source§

fn accept_mut(&self, v: &mut V) -> O

Lets the mutable visitor v visit self.
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> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

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> Pretty for T
where T: PrettyVisit,

Source§

fn pretty(&self, width: usize) -> PrettyPrinted<'_, T>

Available on crate feature pretty only.
Wrap self together with a target line width. The returned value implements Display.
Source§

impl<T> PrettyVisit for T
where T: Sealed, PrettyRenderer: Visitor<T, RcDoc<'static>>,

Source§

fn to_doc(&self, r: &PrettyRenderer) -> RcDoc<'static>

Available on crate feature pretty only.
Builds the document for self with the renderer r.
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 = !

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

fn try_from(value: U) -> Result<T, !>

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.