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
impl ConstraintGoalDescription
Sourcepub fn and<G: IntoIterator<Item = ConstraintGoalDescription>>(goals: G) -> Self
pub fn and<G: IntoIterator<Item = ConstraintGoalDescription>>(goals: G) -> Self
Creates a conjunction (and <con-GD>*).
Sourcepub fn new_and<G: IntoIterator<Item = ConstraintGoalDescription>>(
goals: G,
) -> Self
pub fn new_and<G: IntoIterator<Item = ConstraintGoalDescription>>( goals: G, ) -> Self
Alias for Self::and.
Sourcepub fn forall(variables: TypedVariables, gd: ConstraintGoalDescription) -> Self
pub fn forall(variables: TypedVariables, gd: ConstraintGoalDescription) -> Self
Creates a universal quantification (forall (<variables>) <con-GD>).
Sourcepub fn new_forall(
variables: TypedVariables,
gd: ConstraintGoalDescription,
) -> Self
pub fn new_forall( variables: TypedVariables, gd: ConstraintGoalDescription, ) -> Self
Alias for Self::forall.
Sourcepub const fn at_end(gd: GoalDescription) -> Self
pub const fn at_end(gd: GoalDescription) -> Self
Creates an (at end <GD>) constraint.
Sourcepub fn new_at_end(gd: GoalDescription) -> Self
pub fn new_at_end(gd: GoalDescription) -> Self
Alias for Self::at_end.
Sourcepub const fn always(gd: ConstraintGoalDescriptionInner) -> Self
pub const fn always(gd: ConstraintGoalDescriptionInner) -> Self
Creates an (always <con2-GD>) constraint.
Sourcepub fn new_always(gd: ConstraintGoalDescriptionInner) -> Self
pub fn new_always(gd: ConstraintGoalDescriptionInner) -> Self
Alias for Self::always.
Sourcepub const fn sometime(gd: ConstraintGoalDescriptionInner) -> Self
pub const fn sometime(gd: ConstraintGoalDescriptionInner) -> Self
Creates a (sometime <con2-GD>) constraint.
Sourcepub fn new_sometime(gd: ConstraintGoalDescriptionInner) -> Self
pub fn new_sometime(gd: ConstraintGoalDescriptionInner) -> Self
Alias for Self::sometime.
Sourcepub const fn within(number: Number, gd: ConstraintGoalDescriptionInner) -> Self
pub const fn within(number: Number, gd: ConstraintGoalDescriptionInner) -> Self
Creates a (within <number> <con2-GD>) constraint.
Sourcepub fn new_within(number: Number, gd: ConstraintGoalDescriptionInner) -> Self
pub fn new_within(number: Number, gd: ConstraintGoalDescriptionInner) -> Self
Alias for Self::within.
Sourcepub const fn at_most_once(gd: ConstraintGoalDescriptionInner) -> Self
pub const fn at_most_once(gd: ConstraintGoalDescriptionInner) -> Self
Creates an (at-most-once <con2-GD>) constraint.
Sourcepub fn new_at_most_once(gd: ConstraintGoalDescriptionInner) -> Self
pub fn new_at_most_once(gd: ConstraintGoalDescriptionInner) -> Self
Alias for Self::at_most_once.
Sourcepub const fn sometime_after(
first: ConstraintGoalDescriptionInner,
then: ConstraintGoalDescriptionInner,
) -> Self
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.
Sourcepub fn new_sometime_after(
first: ConstraintGoalDescriptionInner,
then: ConstraintGoalDescriptionInner,
) -> Self
pub fn new_sometime_after( first: ConstraintGoalDescriptionInner, then: ConstraintGoalDescriptionInner, ) -> Self
Alias for Self::sometime_after.
Sourcepub const fn sometime_before(
later: ConstraintGoalDescriptionInner,
earlier: ConstraintGoalDescriptionInner,
) -> Self
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.
Sourcepub fn new_sometime_before(
later: ConstraintGoalDescriptionInner,
earlier: ConstraintGoalDescriptionInner,
) -> Self
pub fn new_sometime_before( later: ConstraintGoalDescriptionInner, earlier: ConstraintGoalDescriptionInner, ) -> Self
Alias for Self::sometime_before.
Sourcepub const fn always_within(
number: Number,
first: ConstraintGoalDescriptionInner,
second: ConstraintGoalDescriptionInner,
) -> Self
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.
Sourcepub fn new_always_within(
number: Number,
first: ConstraintGoalDescriptionInner,
second: ConstraintGoalDescriptionInner,
) -> Self
pub fn new_always_within( number: Number, first: ConstraintGoalDescriptionInner, second: ConstraintGoalDescriptionInner, ) -> Self
Alias for Self::always_within.
Sourcepub const fn hold_during(
begin: Number,
end: Number,
gd: ConstraintGoalDescriptionInner,
) -> Self
pub const fn hold_during( begin: Number, end: Number, gd: ConstraintGoalDescriptionInner, ) -> Self
Creates a (hold-during <begin> <end> <con2-GD>) constraint.
Sourcepub fn new_hold_during(
begin: Number,
end: Number,
gd: ConstraintGoalDescriptionInner,
) -> Self
pub fn new_hold_during( begin: Number, end: Number, gd: ConstraintGoalDescriptionInner, ) -> Self
Alias for Self::hold_during.
Sourcepub const fn hold_after(
number: Number,
gd: ConstraintGoalDescriptionInner,
) -> Self
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.
Sourcepub fn new_hold_after(
number: Number,
gd: ConstraintGoalDescriptionInner,
) -> Self
pub fn new_hold_after( number: Number, gd: ConstraintGoalDescriptionInner, ) -> Self
Alias for Self::hold_after.
Trait Implementations§
Source§impl Clone for ConstraintGoalDescription
impl Clone for ConstraintGoalDescription
Source§impl Debug for ConstraintGoalDescription
impl Debug for ConstraintGoalDescription
Source§impl Default for ConstraintGoalDescription
impl Default for ConstraintGoalDescription
Source§impl<'de> Deserialize<'de> for ConstraintGoalDescription
Available on crate feature serde only.
impl<'de> Deserialize<'de> for ConstraintGoalDescription
serde only.Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Source§impl From<ConstraintGoalDescription> for ConstraintGoalDescriptionInner
impl From<ConstraintGoalDescription> for ConstraintGoalDescriptionInner
Source§fn from(value: ConstraintGoalDescription) -> Self
fn from(value: ConstraintGoalDescription) -> Self
Source§impl From<ConstraintGoalDescription> for PreferenceConstraintGoalDescriptions
impl From<ConstraintGoalDescription> for PreferenceConstraintGoalDescriptions
Source§fn from(value: ConstraintGoalDescription) -> Self
fn from(value: ConstraintGoalDescription) -> Self
Source§impl From<ConstraintGoalDescription> for DomainConstraintsDef
impl From<ConstraintGoalDescription> for DomainConstraintsDef
Source§fn from(value: ConstraintGoalDescription) -> Self
fn from(value: ConstraintGoalDescription) -> Self
Source§impl From<DomainConstraintsDef> for ConstraintGoalDescription
impl From<DomainConstraintsDef> for ConstraintGoalDescription
Source§fn from(val: DomainConstraintsDef) -> Self
fn from(val: DomainConstraintsDef) -> Self
Source§impl Parser for ConstraintGoalDescription
Available on crate feature parser only.
impl Parser for ConstraintGoalDescription
parser only.Source§type Item = ConstraintGoalDescription
type Item = ConstraintGoalDescription
Self except for
DurationConstraint, which may be empty.Source§impl Serialize for ConstraintGoalDescription
Available on crate feature serde only.
impl Serialize for ConstraintGoalDescription
serde only.impl StructuralPartialEq for ConstraintGoalDescription
Source§impl Visitor<ConstraintGoalDescription, RcDoc<'static>> for PrettyRenderer
Available on crate feature pretty only.
impl Visitor<ConstraintGoalDescription, RcDoc<'static>> for PrettyRenderer
pretty only.Source§fn visit(&self, value: &ConstraintGoalDescription) -> RcDoc<'static>
fn visit(&self, value: &ConstraintGoalDescription) -> RcDoc<'static>
value and returns the result.Auto Trait Implementations§
impl Forget for ConstraintGoalDescription
impl Freeze for ConstraintGoalDescription
impl Move for ConstraintGoalDescription
impl RefUnwindSafe for ConstraintGoalDescription
impl Send for ConstraintGoalDescription
impl Sync for ConstraintGoalDescription
impl Unpin for ConstraintGoalDescription
impl UnsafeUnpin for ConstraintGoalDescription
impl UnwindSafe for ConstraintGoalDescription
Blanket Implementations§
Source§impl<V, T, O> AcceptMut<V, T, O> for Twhere
V: VisitorMut<T, O>,
impl<V, T, O> AcceptMut<V, T, O> for Twhere
V: VisitorMut<T, O>,
Source§fn accept_mut(&self, v: &mut V) -> O
fn accept_mut(&self, v: &mut V) -> O
v visit self.Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Pretty for Twhere
T: PrettyVisit,
impl<T> Pretty for Twhere
T: PrettyVisit,
Source§impl<T> PrettyVisit for T
impl<T> PrettyVisit for T
Source§fn to_doc(&self, r: &PrettyRenderer) -> RcDoc<'static>
fn to_doc(&self, r: &PrettyRenderer) -> RcDoc<'static>
pretty only.self with the renderer r.