resqpy.olio.consolidation.Consolidation

class resqpy.olio.consolidation.Consolidation(resident_model)[source]

Bases: object

Class supporting equivalence mapping of high level RESQML parts between models.

Methods:

__init__(resident_model)

Initialise a new Consolidation object prior to merging parts from another model.

equivalent_uuid_for_part(part[, ...])

Returns uuid of an equivalent part in resident model, or None if no equivalent found.

equivalent_uuid_int_for_part(part[, ...])

Returns uuid.int of an equivalent part in resident model, or None if no equivalent found.

force_uuid_equivalence(immigrant_uuid, ...)

Forces immigrant object to be treated as equivalent to (same as) resident object, identified by uuids.

force_uuid_int_equivalence(...)

Forces immigrant object to be treated as equivalent to (same as) resident object, identified by uuid ints.

force_part_equivalence(immigrant_part, ...)

Forces immigrant part to be treated as equivalent to resident part.

check_map_integrity()

Raises assertion failure if map contains any potentially circular references.


__init__(resident_model)[source]

Initialise a new Consolidation object prior to merging parts from another model.

Parameters:

resident_model (model.Model) – the model into which potentially equivalent parts will be merged

Returns:

the new Consolidation object

equivalent_uuid_for_part(part, immigrant_model=None, ignore_identical_part=False)[source]

Returns uuid of an equivalent part in resident model, or None if no equivalent found.

equivalent_uuid_int_for_part(part, immigrant_model=None, ignore_identical_part=False)[source]

Returns uuid.int of an equivalent part in resident model, or None if no equivalent found.

force_uuid_equivalence(immigrant_uuid, resident_uuid)[source]

Forces immigrant object to be treated as equivalent to (same as) resident object, identified by uuids.

force_uuid_int_equivalence(immigrant_uuid_int, resident_uuid_int)[source]

Forces immigrant object to be treated as equivalent to (same as) resident object, identified by uuid ints.

force_part_equivalence(immigrant_part, resident_part)[source]

Forces immigrant part to be treated as equivalent to resident part.

check_map_integrity()[source]

Raises assertion failure if map contains any potentially circular references.