Expand description
Rust library for working with models in BMA format.
Modules§
- update_
function - Structures and utilities for parsing/evaluating update functions.
Structs§
- BmaLayout
- A layout describing positions and types of variables and containers. Most fields are optional, as the layout contains mostly complementary information.
- BmaLayout
Container - Layout information about a container.
- BmaLayout
Variable - Additional layout information regarding a
crate::BmaVariable. - BmaModel
- Main structure with all the important parts of a BMA model. We distinguish between three parts tracked in the BMA format:
- BmaNetwork
- Named model with several
BmaVariableobjects that are connected through variousBmaRelationshipobjects. The model name can be blank. - BmaRelationship
- A relationship of a given
RelationshipTypebetween twoBmaVariableobjects. - BmaVariable
- A discrete variable identified by an integer
id. EachBmaVariableconsists of aname(can be blank), its valuerange(inclusive), and anBmaUpdateFunctionfunction formula (optional) which describes its evolution in time. - Reporter
Wrapper - A simple
ErrorReporterimplementation that defers to an internalErrorReporterby performing type conversion fromE1intoE2usingInto. - VecReporter
- A simple
ErrorReporterimplementation that collects all errors into a vector.
Enums§
- BmaLayout
Container Error - BmaLayout
Error - Possible validation errors for
BmaLayout. - BmaLayout
Variable Error - Possible validation errors for
BmaLayoutVariable. - BmaModel
Error - BmaNetwork
Error - Possible validation errors for
BmaNetwork. - BmaRelationship
Error - Possible validation errors for
BmaRelationship. - BmaVariable
Error - Possible validation errors for
BmaVariable. - Relationship
Type - The type of
BmaRelationshipbetween two variables in aBmaNetwork. - Variable
Type
Traits§
- Contextual
Validation - Contextual validation trait is implemented by objects that can only be validated against a certain context. Usually, this happens when a certain type needs extra information to infer that all of its invariants are satisfied.
- Error
Reporter - Error reporter is any object that can be used to collect errors during validation by
ValidationorContextualValidationtraits. - Validation
- Validation trait is implemented by objects that can be validated.