Skip to main content

ViolationKind

Enum ViolationKind 

Source
#[non_exhaustive]
pub enum ViolationKind {
Show 23 variants PlanSyntax(PlanError), UnknownAction(String), Arity { expected: usize, found: usize, }, UnknownObject { parameter: String, object: String, }, TypeMismatch { parameter: String, object: String, expected: String, }, PreconditionUnsatisfied(Unmet), GoalUnsatisfied(Unmet), Undefined(Atom), DivisionByZero(String), NonFinite(String), ConflictingUpdates(Atom), MissingTimestamp, MissingDuration, UnexpectedDuration, NonPositiveDuration(f64), InvalidTime(f64), DurationConstraint(Unmet), SelfOverlap { other: usize, }, StartConditionUnsatisfied(Unmet), EndConditionUnsatisfied(Unmet), InvariantViolated { time: f64, unmet: Unmet, }, Interference { event: String, other: String, time: f64, separation: f64, }, EventCascade { time: f64, limit: usize, },
}
Expand description

The kinds of Violation. All names are in ASCII lowercase.

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

PlanSyntax(PlanError)

The plan text cannot be read.

§

UnknownAction(String)

The step names an action the domain does not define.

§

Arity

The step passes the wrong number of arguments.

Fields

§expected: usize

The number of parameters of the action.

§found: usize

The number of arguments of the step.

§

UnknownObject

The step passes an object that neither the domain nor the problem declares.

Fields

§parameter: String

The parameter it is passed for, without ?.

§object: String

The undeclared object.

§

TypeMismatch

The step passes an object of the wrong type.

Fields

§parameter: String

The parameter it is passed for, without ?.

§object: String

The object passed.

§expected: String

The declared type of the parameter, such as truck or (either car truck).

§

PreconditionUnsatisfied(Unmet)

The precondition does not hold in the state before the step.

§

GoalUnsatisfied(Unmet)

The final state does not satisfy the goal.

§

Undefined(Atom)

An effect, or a condition whose truth value depends on it, reads a numeric fluent that has no value.

§

DivisionByZero(String)

The rendered expression divides by zero.

§

NonFinite(String)

The rendered expression has no finite value.

§

ConflictingUpdates(Atom)

The step updates the fluent with assign, scale-up or scale-down together with another update, so the result would depend on their order.

§

MissingTimestamp

A timestamped plan has a step without a timestamp.

§

MissingDuration

A durative action has no [duration].

§

UnexpectedDuration

An instantaneous action has a [duration].

§

NonPositiveDuration(f64)

The duration is not positive (at most 1e-9), not finite, or rounds away when added to a huge start time.

§

InvalidTime(f64)

A start or end time that is negative or not finite.

§

DurationConstraint(Unmet)

The duration violates the action’s :duration constraint; left is the duration.

§

SelfOverlap

The step runs while an earlier step of the same action with the same arguments still runs. Following the formal semantics of PDDL 2.1 the validator is built on (Abdulaziz and Koller, 2022), a ground durative action must not overlap itself: its end could belong to either start.

Fields

§other: usize

The 1-based number of the other step, as StepRef::number.

§

StartConditionUnsatisfied(Unmet)

An at start condition does not hold when the action starts.

§

EndConditionUnsatisfied(Unmet)

An at end condition does not hold when the action ends.

§

InvariantViolated

An over all condition fails at time, strictly between the action’s start and end.

Fields

§time: f64

A time at which the condition fails.

§unmet: Unmet

What fails then.

§

Interference

The event interferes with another one at the same time or less than the separation epsilon apart (PDDL 2.1 mutex): one changes what the other reads or changes.

Fields

§event: String

What this step does then: start, end or apply.

§other: String

The other event, such as end of (drive t1 a b) (step 2) or timed literal (open shop).

§time: f64

The time of this event.

§separation: f64

The time between the two events, smaller than epsilon.

§

EventCascade

PDDL+ events kept triggering each other at time: after limit rounds of firing, one was still enabled, typically an event whose effect leaves its own precondition true.

Fields

§time: f64

When the cascade happened.

§limit: usize

The number of rounds fired.

Trait Implementations§

Source§

impl Clone for ViolationKind

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 ViolationKind

Source§

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

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

impl Display for ViolationKind

Source§

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

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

impl PartialEq for ViolationKind

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 StructuralPartialEq for ViolationKind

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> 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> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. 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.