| name | interoperability-analyzer |
| description | Analyze data interoperability issues in construction projects. Identify format incompatibilities and data loss points. |
| homepage | https://datadrivenconstruction.io |
| metadata | {"openclaw":{"emoji":"🔀","os":["win32"],"homepage":"https://datadrivenconstruction.io","requires":{"bins":"[Truncated]"}}} |
Interoperability Analyzer
Business Case
Problem Statement
Data interoperability challenges:
- Multiple proprietary formats
- Data loss in conversions
- Incompatible systems
- Missing standard adoption
Solution
Analyze data exchange patterns, identify interoperability issues, and recommend solutions for seamless data flow.
Technical Implementation
import pandas as pd
from typing import Dict, Any, List, Optional
from dataclasses import dataclass, field
from enum import Enum
class ():
IFC =
RVT =
DWG =
NWC =
SKP =
EXCEL =
CSV =
JSON =
XML =
BCF =
COBIE =
():
NATIVE =
LOSSLESS =
PARTIAL =
DEGRADED =
INCOMPATIBLE =
:
: DataFormat
supports_geometry:
supports_properties:
supports_relationships:
supports_scheduling:
supports_costs:
open_standard:
:
source_format: DataFormat
target_format: DataFormat
interoperability_level: InteroperabilityLevel
data_preserved: []
data_lost: []
recommendations: []
:
():
.capabilities = ._define_capabilities()
.exchange_matrix = ._define_exchange_matrix()
() -> [DataFormat, FormatCapability]:
{
DataFormat.IFC: FormatCapability(
DataFormat.IFC, , , , , ,
),
DataFormat.RVT: FormatCapability(
DataFormat.RVT, , , , , ,
),
DataFormat.DWG: FormatCapability(
DataFormat.DWG, , , , , ,
),
DataFormat.NWC: FormatCapability(
DataFormat.NWC, , , , , ,
),
DataFormat.EXCEL: FormatCapability(
DataFormat.EXCEL, , , , , ,
),
DataFormat.CSV: FormatCapability(
DataFormat.CSV, , , , , ,
),
DataFormat.JSON: FormatCapability(
DataFormat.JSON, , , , , ,
),
DataFormat.COBIE: FormatCapability(
DataFormat.COBIE, , , , , ,
),
DataFormat.BCF: FormatCapability(
DataFormat.BCF, , , , , ,
)
}
() -> [, InteroperabilityLevel]:
{
(DataFormat.RVT, DataFormat.IFC): InteroperabilityLevel.PARTIAL,
(DataFormat.IFC, DataFormat.RVT): InteroperabilityLevel.PARTIAL,
(DataFormat.RVT, DataFormat.DWG): InteroperabilityLevel.DEGRADED,
(DataFormat.DWG, DataFormat.RVT): InteroperabilityLevel.DEGRADED,
(DataFormat.RVT, DataFormat.NWC): InteroperabilityLevel.LOSSLESS,
(DataFormat.IFC, DataFormat.NWC): InteroperabilityLevel.PARTIAL,
(DataFormat.EXCEL, DataFormat.CSV): InteroperabilityLevel.LOSSLESS,
(DataFormat.CSV, DataFormat.EXCEL): InteroperabilityLevel.LOSSLESS,
(DataFormat.JSON, DataFormat.EXCEL): InteroperabilityLevel.PARTIAL,
(DataFormat.RVT, DataFormat.COBIE): InteroperabilityLevel.PARTIAL,
(DataFormat.IFC, DataFormat.COBIE): InteroperabilityLevel.PARTIAL,
}
() -> ExchangeAnalysis:
level = .exchange_matrix.get(
(source, target),
InteroperabilityLevel.INCOMPATIBLE source != target InteroperabilityLevel.NATIVE
)
source_cap = .capabilities.get(source)
target_cap = .capabilities.get(target)
preserved = []
lost = []
source_cap target_cap:
source_cap.supports_geometry target_cap.supports_geometry:
preserved.append()
source_cap.supports_geometry:
lost.append()
source_cap.supports_properties target_cap.supports_properties:
preserved.append()
source_cap.supports_properties:
lost.append()
source_cap.supports_relationships target_cap.supports_relationships:
preserved.append()
source_cap.supports_relationships:
lost.append()
source_cap.supports_scheduling target_cap.supports_scheduling:
preserved.append()
source_cap.supports_scheduling:
lost.append()
source_cap.supports_costs target_cap.supports_costs:
preserved.append()
source_cap.supports_costs:
lost.append()
recommendations = ._get_recommendations(source, target, level)
ExchangeAnalysis(
source_format=source,
target_format=target,
interoperability_level=level,
data_preserved=preserved,
data_lost=lost,
recommendations=recommendations
)
() -> []:
recommendations = []
level == InteroperabilityLevel.INCOMPATIBLE:
recommendations.append()
recommendations.append()
level == InteroperabilityLevel.DEGRADED:
recommendations.append()
recommendations.append()
level == InteroperabilityLevel.PARTIAL:
recommendations.append()
recommendations.append()
source == DataFormat.RVT target == DataFormat.IFC:
recommendations.append()
recommendations.append()
target == DataFormat.COBIE:
recommendations.append()
recommendations.append()
recommendations
() -> [, ]:
(formats) < :
{: }
exchanges = []
cumulative_lost = ()
i ((formats) - ):
analysis = .analyze_exchange(formats[i], formats[i+])
exchanges.append({
: i + ,
: formats[i].value,
: formats[i+].value,
: analysis.interoperability_level.value,
: analysis.data_lost
})
cumulative_lost.update(analysis.data_lost)
levels = [e[] e exchanges]
levels:
overall =
levels:
overall =
levels:
overall =
:
overall =
{
: .join(f.value f formats),
: (exchanges),
: exchanges,
: overall,
: (cumulative_lost),
: ._get_workflow_recommendations(formats, overall)
}
() -> []:
recommendations = []
overall [, ]:
recommendations.append()
recommendations.append()
(formats) > :
recommendations.append()
DataFormat.DWG formats DataFormat.RVT formats:
recommendations.append()
recommendations
() -> pd.DataFrame:
formats = (DataFormat)
matrix = []
source formats:
row = {: source.value}
target formats:
source == target:
row[target.value] =
:
level = .exchange_matrix.get((source, target), InteroperabilityLevel.INCOMPATIBLE)
row[target.value] = level.value
matrix.append(row)
pd.DataFrame(matrix)
() -> :
pd.ExcelWriter(output_path, engine=) writer:
matrix = .generate_compatibility_matrix()
matrix.to_excel(writer, sheet_name=, index=)
caps_data = [{
: cap..value,
: cap.supports_geometry,
: cap.supports_properties,
: cap.supports_relationships,
: cap.supports_scheduling,
: cap.supports_costs,
: cap.open_standard
} cap .capabilities.values()]
caps_df = pd.DataFrame(caps_data)
caps_df.to_excel(writer, sheet_name=, index=)
output_path