Skip to main content

Model

Struct Model 

Source
pub struct Model<'a>(pub &'a Object);
Expand description

A Model is a collection of data describing instances, objects or entities, real or computed. In the context of CIM the semantics of the data is defined by profiles. Hence a model can contain equipment data, power flow initial values, power flow results etc. The Model class describes the header content that is the same for the FullModel and the DifferenceModel. A Model is identified by an rdf:about attribute. The rdf:about attribute uniquely describe the model data and not the CIMXML document. A new rdf:about identification is generated for created documents only when the model data has changed. A repeated creation of documents from unchanged model data shall have the same rdf:about identification as previous document generated from the same model data.

Tuple Fields§

§0: &'a Object

Implementations§

Source§

impl<'a> Model<'a>

Source

pub fn mrid(&self) -> &'a Mrid

The object’s master resource identifier.

Source

pub fn dependent_on( &self, ) -> impl Iterator<Item = TypedRef<Model<'static>>> + use<'a>

A reference to the model documents that the model described by this document depends on. In general there can be 0 or many Model.DependentOn depending on the profile and the content of the instance file. For instance: – A load flow solution depends on the topology model it was computed from – A topology model computed by a topology processor depends on the network model it was computed from. The referenced models are identified by the FullModel rdf:about attribute for full model documents and by DifferenceModel rdf:about attribute for difference model documents. The references are maintained by the producer of the CIMXML document and the references are valid for the model with version and identifier for which the document was created.

Source

pub fn dependent_on_in<'d>( &self, dataset: &'d Dataset, ) -> impl Iterator<Item = Model<'d>> + use<'a, 'd>

Resolve every DependentOn through dataset, skipping unresolved references.

Source

pub fn depending( &self, ) -> impl Iterator<Item = TypedRef<Model<'static>>> + use<'a>

All documents depending on the model described by this document. This role is not intended to be included in any document exchanging instance data.

Source

pub fn depending_in<'d>( &self, dataset: &'d Dataset, ) -> impl Iterator<Item = Model<'d>> + use<'a, 'd>

Resolve every Depending through dataset, skipping unresolved references.

Source

pub fn superseded_by( &self, ) -> impl Iterator<Item = TypedRef<Model<'static>>> + use<'a>

All models superseding this model. This role is not intended to be included in any document exchanging instance data.

Source

pub fn superseded_by_in<'d>( &self, dataset: &'d Dataset, ) -> impl Iterator<Item = Model<'d>> + use<'a, 'd>

Resolve every SupersededBy through dataset, skipping unresolved references.

Source

pub fn supersedes( &self, ) -> impl Iterator<Item = TypedRef<Model<'static>>> + use<'a>

When a model is updated the resulting model supersedes the models that were used as basis for the update. Hence this is a reference to the CIMXML documents which are superseded by this model. A model (or instance file) can supersede 1 or more models, e.g. a difference model or a full model supersede multiple models (difference or full). In this case more than one Model.Supersedes are included in the header. The referenced document(s) is (are) identified by the URN/MRID/UUID in the FullModel rdf:about attribute when full model(s) is (are) referenced and by the URN/MRID/UUID in the DifferenceModel rdf:about attribute when difference model(s) is (are) referenced.

Source

pub fn supersedes_in<'d>( &self, dataset: &'d Dataset, ) -> impl Iterator<Item = Model<'d>> + use<'a, 'd>

Resolve every Supersedes through dataset, skipping unresolved references.

Source

pub fn created(&self) -> Option<&'a str>

The date and time when the model was created. It is the time of the serialization. The format is an extended format according to the ISO 8601-2005. European exchanges shall refer to UTC, e.g. <md:Model.created>2014-05-15T17:48:31.474Z</md:Model.created>.

Source

pub fn description(&self) -> Option<&'a str>

A description of the model, e.g. the name of person that created the model and for what purpose. The number of UTF-8 characters is limited to 2000.

Source

pub fn modeling_authority_set(&self) -> Option<&'a str>

A URN/URI referring to the organisation role / model authority set reference. The organization role is the source of the model. It is the same for all profiles part of a model exchange.

Source

pub fn profile(&self) -> impl Iterator<Item = &'a str> + use<'a>

URN/URI describing the profiles that governs this model. It uniquely identifies the profiles and its version, e.g. http://iec.ch/TC57/61970-456/SteadyStateHypothesis/2/0.

Source

pub fn scenario_time(&self) -> Option<&'a str>

The date and time that this model represents, i.e. for which the model is valid. The format is an extended format according to the ISO 8601-2005. European exchanges shall refer to UTC, e.g. <md:Model.scenarioTime>2030-01-15T17:00:00.000Z</md:Model.scenarioTime>.

Source

pub fn version(&self) -> Option<i64>

The version of the model. If the instance file is imported and exported with no change the version number is the kept same. The version changes only if the content of the file changes. It is the same logic as for the header id. The version is the human readable id.

Trait Implementations§

Source§

impl<'a> Clone for Model<'a>

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<'a> Copy for Model<'a>

Source§

impl<'a> Debug for Model<'a>

Source§

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

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

impl<'a> TypedView<'a> for Model<'a>

Source§

const CLASS: ClassId = classes::Model

The class this view represents.
Source§

fn from_object(o: &'a Object) -> Self

Wrap an object without checking its class.
Source§

fn object(&self) -> &'a Object

The underlying object.
Source§

fn try_from_object(schema: &Schema, object: &'a Object) -> Option<Self>

Wrap an object only if its class matches, including subclasses.
Source§

fn mrid(&self) -> &'a Mrid

The object’s master resource identifier.

Auto Trait Implementations§

§

impl<'a> Forget for Model<'a>

§

impl<'a> Freeze for Model<'a>

§

impl<'a> Move for Model<'a>

§

impl<'a> RefUnwindSafe for Model<'a>

§

impl<'a> Send for Model<'a>

§

impl<'a> Sync for Model<'a>

§

impl<'a> Unpin for Model<'a>

§

impl<'a> UnsafeUnpin for Model<'a>

§

impl<'a> UnwindSafe for Model<'a>

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