Model

Struct Model 

Source
pub struct Model<I, O, C>
where I: Default, O: Default + Debug, C: Clone,
{ /* private fields */ }

Implementations§

Source§

impl<I, O, C> Model<I, O, C>
where I: Default, O: Default + Debug, C: Clone,

Source

pub fn id(&self) -> u64

Source

pub fn author(&self) -> &str

Source

pub fn description(&self) -> &str

Source

pub fn assumptions(&self) -> Option<&Arc<Vec<Assumption>>>

Source

pub fn causaloid(&self) -> &Arc<Causaloid<I, O, (), Arc<RwLock<C>>>>

Returns a reference to the root Causaloid of the model.

The Causaloid encapsulates the core causal logic of the model.

Source

pub fn context(&self) -> Option<&Arc<RwLock<C>>>

Source§

impl<I, O, C> Model<I, O, C>
where I: Default, O: Default + Debug, C: Clone,

Source

pub fn new( id: u64, author: &str, description: &str, assumptions: Option<Arc<Vec<Assumption>>>, causaloid: Arc<Causaloid<I, O, (), Arc<RwLock<C>>>>, context: Option<Arc<RwLock<C>>>, ) -> Self

Source§

impl<I, O, D, S, T, ST, SYM, VS, VT> Model<I, O, Context<D, S, T, ST, SYM, VS, VT>>
where I: Default + Clone, O: Default + Debug + Clone, D: Datable + Copy + Clone + PartialEq + Debug, S: Spatial<VS> + Clone + Debug, T: Temporal<VT> + Clone + Debug, ST: SpaceTemporal<VS, VT> + Clone + Debug, SYM: Symbolic + Clone + Debug, VS: Clone + Debug, VT: Clone + Debug,

Source

pub fn evolve( &self, op_tree: &OpTree<I, O, Context<D, S, T, ST, SYM, VS, VT>, Contextoid<D, S, T, ST, SYM, VS, VT>>, ) -> Result<(Self, ModificationLog), ModelValidationError>

Evolves the model by applying a sequence of operations defined in an OpTree.

This method uses the HKT-based Interpreter to execute the operations and returns a new Model instance reflecting the changes, along with a log of modifications.

Trait Implementations§

Source§

impl<I, O, C> Debug for Model<I, O, C>
where I: Default + Debug, O: Default + Debug + Debug, C: Clone + Debug,

Source§

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

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

impl<I, O, C> Identifiable for Model<I, O, C>
where I: Default, O: Default + Debug, C: Clone,

Source§

fn id(&self) -> u64

Source§

impl<I, O, C> Transferable for Model<I, O, C>
where I: Default, O: Default + Debug, C: Clone,

Source§

fn get_assumptions(&self) -> &Option<Arc<Vec<Assumption>>>

Source§

fn verify_assumptions( &self, effect: &[PropagatingEffect<f64>], ) -> Result<(), AssumptionError>

Verifies the model’s assumptions against a given PropagatingEffect. Read more

Auto Trait Implementations§

§

impl<I, O, C> Freeze for Model<I, O, C>

§

impl<I, O, C> RefUnwindSafe for Model<I, O, C>

§

impl<I, O, C> Send for Model<I, O, C>
where C: Send + Sync, I: Sync + Send, O: Sync + Send,

§

impl<I, O, C> Sync for Model<I, O, C>
where C: Send + Sync, I: Sync + Send, O: Sync + Send,

§

impl<I, O, C> Unpin for Model<I, O, C>

§

impl<I, O, C> UnwindSafe for Model<I, O, C>

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> 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, 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.
Source§

impl<T> Satisfies<NoConstraint> for T