23/01 XML BoM types#

The models documented in this section are Python bindings for the Ansys Granta MI 23/01 XML schema. Not all elements are required to define a valid BoM for analysis, and not all elements have an impact on all types of analysis. For information on the relevant items for each analysis type, see API reference.

Classes on this page are available in the module ansys.grantami.bomanalytics.bom_types.eco2301.

The 23/01 XML schema is supported by MI Restricted Substances and Sustainability Reports 2024 R1 and later.

Tip

This is not the latest version of the Granta MI BoM Schema. The 24/12 XML schema is backwards compatible with the 23/01 XML schema, but supports associating TransportStage and Location information with Part and Process objects. It is supported by MI Restricted Substances and Sustainability Reports 2025 R2 and later.

Note

The following elements are defined in the 23/01 BoM schema but are not supported in this module:

This module does not contain classes that correspond to these types and cannot serialize a BoM that includes these elements. It is still possible to deserialize an XML BoM that uses these elements, but these elements cannot be converted to Python objects. See load_bom_from_file() and load_bom_from_text() for more details.

Changed in version 2.3: The types documented on this page have moved from ansys.grantami.bomanalytics.bom_types to ansys.grantami.bomanalytics.bom_types.eco2301. They may still be imported from the original location for compatibility.

class BillOfMaterials(components, transport_phase=<factory>, use_phase=None, location=None, notes=None, internal_id=None)#

Type representing the root Bill of Materials object.

components: List[Part]#

The parts contained within this BoM.

transport_phase: List[TransportStage]#

The different forms of transport to which the parts are subject.

use_phase: UsePhase | None = None#

The type of use to which this product is subject.

location: Location | None = None#

The location in which the object represented by the BoM is assembled.

notes: BoMDetails | None = None#

Any optional notes about this BoM.

internal_id: str | None = None#

A unique identity for this object in this BoM. This identity is only for internal use, allowing other elements to reference this element.

class Part(part_number, quantity=None, mass_per_unit_of_measure=None, volume_per_unit_of_measure=None, mi_part_reference=None, part_name=None, external_identity=None, components=<factory>, specifications=<factory>, materials=<factory>, substances=<factory>, processes=<factory>, rohs_exemptions=<factory>, end_of_life_fates=<factory>, internal_id=None)#

A single part which may or may not be stored in the MI Database.

part_number: str#

The Part Number associated with this part.

quantity: UnittedValue | None = None#

The quantity of part(s) used in the parent part. For discrete parts, this will be the part count - an integer with a blank unit (or “Each”). For continuous parts, it will be a mass, length, area or volume - a float value with an appropriate units.

mass_per_unit_of_measure: UnittedValue | None = None#

The mass of the part, after processing, relative to the unit that Quantity is given in. If MassPerUom is specified and VolumePerUom is not, then specifying materials within this part is interpreted to be percentage by mass.

volume_per_unit_of_measure: UnittedValue | None = None#

The volume of the part, after processing, relative to the unit that Quantity is given in. If VolumePerUom is specified and MassPerUom is not, then specifying materials within this part is interpreted to be percentage by volume.

mi_part_reference: MIRecordReference | None = None#

A reference identifying a part stored in the MI Database.

part_name: str | None = None#

Display name for the part.

external_identity: str | None = None#

A temporary reference populated and used by applications to refer to the item within the BoM.

components: List[Part]#

List of subcomponents for this part.

specifications: List[Specification]#

List of specifications applying to this part.

materials: List[Material]#

List of constituent materials making up this part.

substances: List[Substance]#

List of substances contained within this part.

processes: List[Process]#

List of processes used in the manufacture of this part.

rohs_exemptions: List[str]#

If the part has a RoHS exemption, provide one or more justifications for the exemptions here. If the part is analyzed as Non-Compliant then the RoHS indicator will return Compliant with Exemptions instead.

end_of_life_fates: List[EndOfLifeFate]#

The fate(s) of the part, at the end-of-life of the product.

internal_id: str | None = None#

A unique identity for this object in this BoM. This identity is only for internal use, allowing other elements to reference this element.

class Material(mi_material_reference, percentage=None, mass=None, recycle_content_percentage=None, processes=<factory>, end_of_life_fates=<factory>, identity=None, name=None, external_identity=None, internal_id=None)#

A Material within a part or semi-finished part. The material is stored in the Database.

mi_material_reference: MIRecordReference#

Reference identifying the material record within the MI Database.

percentage: float | None = None#

The fraction of the part consisting of this material. Provide either this or mass.

mass: UnittedValue | None = None#

The mass of this material present within the part. Provide either this or percentage.

recycle_content_percentage: float | None = None#

If the recyclability is not typical for this material, or no typical value is available in the MI Database, this value indicates which percentage of this material can be recycled.

processes: List[Process]#

Any processes associated with the production and preparation of this material.

end_of_life_fates: List[EndOfLifeFate]#

The fates of this material once the product is disposed of.

identity: str | None = None#

A display identity for the object.

name: str | None = None#

A display name for the object.

external_identity: str | None = None#

A temporary reference populated and used by applications to refer to the item within the BoM.

internal_id: str | None = None#

A unique identity for this object in this BoM. This identity is only for internal use, allowing other elements to reference this element.

class Process(mi_process_reference, dimension_type, percentage=None, quantity=None, identity=None, name=None, external_identity=None, internal_id=None)#

A process that is applied to a subassembly, part, semi-finished part or material. The process is stored in the Database.

mi_process_reference: MIRecordReference#

Reference identifying a record in the MI Database containing information about this process.

dimension_type: DimensionType#

Object defining the dimension affected by the process, for example area for coatings, or mass removed for machining operations.

percentage: float | None = None#

Fraction of the object affected by the process, with basis specified by dimension_type. Only supported for dimension types Mass and MassRemoved.

quantity: UnittedValue | None = None#

A quantification of the process according to its dimension type.

identity: str | None = None#

A display identity for the object.

name: str | None = None#

A display name for the object.

external_identity: str | None = None#

A temporary reference populated and used by applications to refer to the item within the BoM.

internal_id: str | None = None#

A unique identity for this object in this BoM. This identity is only for internal use, allowing other elements to reference this element.

class Substance(mi_substance_reference, percentage=None, category=None, identity=None, name=None, external_identity=None, internal_id=None)#

A substance within a part, semi-finished part, material or specification. The substance is stored in the Database.

mi_substance_reference: MIRecordReference#

Reference identifying the record representing the substance in the MI Database.

percentage: float | None = None#

If the parent object consists of more than one substance, this defines the percentage of this substance.

category: Category | None = None#

Represents whether the substance remains present in the material after production.

identity: str | None = None#

A display identity for the object.

name: str | None = None#

A display name for the object.

external_identity: str | None = None#

A temporary reference populated and used by applications to refer to the item within the BoM.

internal_id: str | None = None#

A unique identity for this object in this BoM. This identity is only for internal use, allowing other elements to reference this element.

class Specification(mi_specification_reference, quantity=None, identity=None, name=None, external_identity=None, internal_id=None)#

A specification for a surface treatment, part, process, or material. Refers to a record within the MI Database storing the details of the specification and its impact.

mi_specification_reference: MIRecordReference#

Reference identifying the record representing this specification in the MI Database.

quantity: UnittedValue | None = None#

A quantification of the specification, if applicable.

identity: str | None = None#

A display identity for the object.

name: str | None = None#

A display name for the object.

external_identity: str | None = None#

A temporary reference populated and used by applications to refer to the item within the BoM.

internal_id: str | None = None#

A unique identity for this object in this BoM. This identity is only for internal use, allowing other elements to reference this element.

class TransportStage(name, mi_transport_reference, distance, internal_id=None)#

Defines the transportation applied to an object, in terms of the generic transportation type (stored in the Database) and the amount of that transport used in this instance.

name: str#

Name of this transportation stage, used only to identify the stage within the BoM.

mi_transport_reference: MIRecordReference#

Reference to a record in the MI Database representing the means of transportation for this stage.

distance: UnittedValue#

The distance covered by this transportation stage.

internal_id: str | None = None#

A unique identity for this object in this BoM. This identity is only for internal use, allowing other elements to reference this element.

class BoMDetails(notes=None, picture_url=None, product_name=None)#

Explanatory information about a BoM.

notes: str | None = None#

General notes for the BoM object.

picture_url: str | None = None#

The URL of an image to include at the top of the report. This URL must be accessible from the reporting services server.

product_name: str | None = None#

The product name.

class UsePhase(product_life_span, electricity_mix=None, static_mode=None, mobile_mode=None)#

Provides information about the sustainability of the product whilst in use, including electricity use, emissions due to transport, emissions due to electricity consumption, and the expected life span of the product.

product_life_span: ProductLifeSpan#

Specifies the expected life span of the product.

electricity_mix: ElectricityMix | None = None#

Specifies the proportion of electricity within the destination country that comes from fossil fuels.

static_mode: StaticMode | None = None#

Provides information about the expected static use of the product.

mobile_mode: MobileMode | None = None#

Provides information about the expected mobile use of the product.

class ProductLifeSpan(duration_years, number_of_functional_units=None, functional_unit_description=None, utility=None)#

Specifies the average life span for the product represented by the BoM.

duration_years: float#

The product lifespan in years.

number_of_functional_units: float | None = None#

The number of functional units delivered in the lifespan of the product represented by the BoM.

functional_unit_description: str | None = None#

A short (ideally one-word) description of a single functional unit.

utility: UtilitySpecification | None = None#

Indicates how much use can be obtained from the product represented by the BoM, compared to an industry-average example.

class UtilitySpecification(industry_average_duration_years=None, industry_average_number_of_functional_units=None, utility=None)#

Specifies how much use can be obtained from the product represented by this BoM in comparison to a representative industry average.

industry_average_duration_years: float | None = None#

The average lifespan of all examples, throughout the industry, of the kind of product described herein.

industry_average_number_of_functional_units: float | None = None#

The average number of functional units delivered, in their lifespan, by all examples, throughout the industry, of the kind of product represented by this object.

utility: float | None = None#

Directly specifies the utility.

class StaticMode(mi_energy_conversion_reference, power_rating, days_used_per_year, hours_used_per_day)#

Specifies the primary energy conversion that occurs during the product’s use.

mi_energy_conversion_reference: MIRecordReference#

Reference to a record in the MI database representing the primary energy conversion taking place when the product is in use.

power_rating: UnittedValue#

The power rating of the product whilst in use.

days_used_per_year: float#

The number of days per year that the product will be used.

hours_used_per_day: float#

The number of hours per day of use that the product will be used.

class MobileMode(mi_transport_reference, days_used_per_year, distance_travelled_per_day)#

If the product is transported as part of its use then this type contains details about the way in which it is transported.

mi_transport_reference: MIRecordReference#

Reference to a record in the MI database representing the means of transport for this product during use.

days_used_per_year: float#

The number of days in a year the product will be transported during use.

distance_travelled_per_day: UnittedValue#

The distance the product will be transported each day as part of its use.

class ElectricityMix(mi_region_reference=None, percentage_fossil_fuels=None)#

If the product consumes electrical power, then the amount of CO2 produced to generate depends upon the mix of fossil fuel burning power stations in the region of use. This type lets you specify the electrical generation mix by either specifying the region or country of use or by specifying the percentage of power that comes from fossil fuel sources.

mi_region_reference: MIRecordReference | None = None#

Reference to a record in the MI database representing the electricity mix for the destination country.

percentage_fossil_fuels: float | None = None#

The percentage of electrical power production within the destination country that comes from fossil fuels.

class Location(mi_location_reference=None, identity=None, name=None, external_identity=None, internal_id=None)#

Defines the manufacturing location for the BoM for use in process calculations.

mi_location_reference: MIRecordReference | None = None#

Reference to a record in the MI database representing the manufacturing location.

identity: str | None = None#

A display identity for the object.

name: str | None = None#

A display name for the object.

external_identity: str | None = None#

A temporary reference populated and used by applications to refer to the item within the BoM.

internal_id: str | None = None#

A unique identity for this object in this BoM. This identity is only for internal use, allowing other elements to reference this element.

class UnittedValue(value, unit=None)#

A physical quantity with a unit. If provided in an input then the unit must exist within the MI database, otherwise an error will be raised.

value: float#

The value of the quantity in specified units.

unit: str | None = None#

If provided, specifies the unit symbol applying to the quantity. If absent the quantity will be treated as dimensionless.

class EndOfLifeFate(mi_end_of_life_reference, fraction)#

The fate of a material at the end-of-life of the product. For example if a material can be recycled, and what fraction of the total mass or volume can be recycled.

mi_end_of_life_reference: MIRecordReference#

Reference identifying the applicable fate within the MI Database.

fraction: float#

Fraction of the total mass or volume of material to which this fate applies.

class Category(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)#

Valid values for Category.

classmethod from_string(value)#

Convert string representation of this object into an instance of this object.

Parameters:
value: str

String representation of this object.

to_string()#

Convert this Enum object to its string representation.

Returns:
str

String representation of this object.

class DimensionType(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)#

Valid values for DimensionType.

classmethod from_string(value)#

Convert string representation of this object into an instance of this object.

Parameters:
value: str

String representation of this object.

to_string()#

Convert this Enum object to its string representation.

Returns:
str

String representation of this object.