pddl-validate 0.1.0

Independent PDDL plan validator: classical, numeric and temporal plans with precise diagnostics
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
//! The world state a plan runs through.

use alloc::collections::{BTreeMap, BTreeSet};

use crate::atom::Atom;

/// A world state under the closed-world assumption: every atom not listed is false.
#[derive(Debug, Clone, PartialEq, Default)]
pub struct State {
    /// The true atoms of basic (non-derived) predicates.
    pub facts: BTreeSet<Atom>,
    /// The true atoms of derived predicates, computed from `facts` by
    /// [`derived::close`](crate::derived::close) after every change.
    pub derived: BTreeSet<Atom>,
    /// The values of the numeric fluents that have one. A fluent not listed is undefined.
    pub fluents: BTreeMap<Atom, f64>,
}