返回顶部
o

open-construction-estimate" 开放施工估价

Access and utilize open construction pricing databases. Match BIM elements to standardized work items, calculate costs using public unit price databases with 55,000+ work items."

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 2.0.0
安全检测
已通过
1,655
下载量
免费
免费
2
收藏
概述
安装方式
版本历史

open-construction-estimate"

开放式施工估算

概述

该技能利用开放式施工定价数据库进行自动化成本估算。将项目元素匹配到标准化工作项,并使用公开可用的单价计算成本。

数据来源:

  • - OpenConstructionEstimate(55,000+ 个工作项)
  • RSMeans Online(订阅制)
  • 政府定价数据库
  • 区域成本指数

开放式定价数据库包含超过55,000个工作项,使得大多数项目的预算计算能够实现自动化。
— DDC LinkedIn

快速开始

python
import pandas as pd
from sklearn.feature_extraction.text import TfidfVectorizer
from sklearn.metrics.pairwise import cosine_similarity

加载工作项数据库

workitems = pd.readcsv(openconstructionestimate.csv) print(f已加载 {len(work_items)} 个工作项)

简单匹配函数

vectorizer = TfidfVectorizer(ngram_range=(1, 2)) itemvectors = vectorizer.fittransform(work_items[description])

def findmatchingitems(query, top_n=5):
query_vec = vectorizer.transform([query])
similarities = cosinesimilarity(queryvec, item_vectors)[0]
topindices = similarities.argsort()[-topn:][::-1]

return workitems.iloc[topindices][[code, description, unit, unit_price]]

查找匹配项

matches = findmatchingitems(reinforced concrete wall 300mm) print(matches)

开放数据库结构

数据库模式

python

标准工作项数据库结构


WORKITEMSSCHEMA = {
code: 工作项代码(例如 03.31.13.13),
description: 工作完整描述,
short_description: 简略描述,
unit: 计量单位(m³、m²、吨、件),
unit_price: 基础单价,
labor_cost: 每单位人工成本,
material_cost: 每单位材料成本,
equipment_cost: 每单位设备成本,
labor_hours: 每单位工时,
crew_size: 典型班组人数,
productivity: 每日产量,
category_l1: 主类别(CSI分部),
category_l2: 次类别,
category_l3: 详细类别,
region: 地理区域,
year: 价格年份,
source: 数据来源
}

CSI MasterFormat分部

CSI_DIVISIONS = { 03: 混凝土, 04: 砌体, 05: 金属, 06: 木材、塑料、复合材料, 07: 防水与保温, 08: 门窗, 09: 饰面, 10: 专业工程, 21: 消防, 22: 给排水, 23: 暖通空调, 26: 电气, 31: 土方工程, 32: 室外工程, 33: 公用设施 }

工作项匹配引擎

语义匹配系统

python
import pandas as pd
import numpy as np
from sklearn.feature_extraction.text import TfidfVectorizer
from sklearn.metrics.pairwise import cosine_similarity
from sentence_transformers import SentenceTransformer
from typing import List, Dict, Optional, Tuple
import re

class WorkItemMatcher:
将BIM元素匹配到标准化工作项

def init(self, databasepath: str, useembeddings: bool = True):
self.db = pd.readcsv(databasepath)

# TF-IDF用于快速初始筛选
self.tfidf = TfidfVectorizer(
ngram_range=(1, 3),
max_features=10000,
stop_words=english
)
self.tfidfmatrix = self.tfidf.fittransform(self.db[description])

# 句子嵌入用于语义匹配
self.useembeddings = useembeddings
if use_embeddings:
self.embedder = SentenceTransformer(all-MiniLM-L6-v2)
self.embeddings = self.embedder.encode(
self.db[description].tolist(),
showprogressbar=True
)

def match(self, query: str, top_n: int = 5,
category: str = None) -> List[Dict]:
查找与查询匹配的工作项
# 如果指定了类别则进行筛选
if category:
mask = self.db[category_l1].str.contains(category, case=False, na=False)
search_db = self.db[mask]
searchmatrix = self.tfidfmatrix[mask]
else:
search_db = self.db
searchmatrix = self.tfidfmatrix

if self.use_embeddings:
return self.semanticmatch(query, searchdb, topn)
else:
return self.tfidfmatch(query, searchdb, searchmatrix, top_n)

def tfidfmatch(self, query: str, db: pd.DataFrame,
matrix, top_n: int) -> List[Dict]:
基于TF-IDF的匹配
query_vec = self.tfidf.transform([query])
similarities = cosinesimilarity(queryvec, matrix)[0]

topindices = similarities.argsort()[-topn:][::-1]

results = []
for idx in top_indices:
row = db.iloc[idx]
results.append({
code: row[code],
description: row[description],
unit: row[unit],
unitprice: row[unitprice],
similarity: float(similarities[idx]),
category: row.get(category_l1, )
})

return results

def semanticmatch(self, query: str, db: pd.DataFrame,
top_n: int) -> List[Dict]:
基于语义嵌入的匹配
query_embedding = self.embedder.encode([query])

# 获取筛选后数据库的索引
indices = db.index.tolist()
filtered_embeddings = self.embeddings[indices]

similarities = cosinesimilarity(queryembedding, filtered_embeddings)[0]
topindices = similarities.argsort()[-topn:][::-1]

results = []
for i, idx in enumerate(top_indices):
row = db.iloc[idx]
results.append({
code: row[code],
description: row[description],
unit: row[unit],
unitprice: row[unitprice],
similarity: float(similarities[idx]),
category: row.get(category_l1, )
})

return results

def matchbimelement(self, element: Dict) -> List[Dict]:
将BIM元素匹配到工作项
# 从元素属性构建查询
query_parts = []

if element.get(material):
query_parts.append(element[material])
if element.get(category):
query_parts.append(element[category])
if element.get(description):
query_parts.append(element[description])

# 如果有尺寸信息则添加
if element.get(thickness):
query_parts.append(f{element[thickness]}mm厚)
if element.get(height):
query_parts.append(f{element[height]}m高)

query = .join(query_parts)

# 根据元素类型确定类别
category = self.getcategoryfromelement(element)

return self.match(query, top_n=3, category=category)

def getcategoryfromelement(self, element: Dict) -> Optional[str]:
将BIM元素类型映射到CSI类别
element_mapping = {
IfcWall: 混凝土|砌体,
IfcSlab: 混凝土,
IfcColumn: 混凝土|金属,
IfcBeam: 混凝土|金属,
IfcDoor: 门窗,
IfcWindow: 门窗,
IfcRoof: 防水保温,
IfcStair: 混凝土,
IfcPipeSegment: 给排水,
IfcDuctSegment: 暖通空调
}

elemtype = element.get(ifctype, )
return elementmapping.get(elemtype)

成本估算引擎

自动估算器

python
class OpenConstructionEstimator:
使用开放数据库生成成本估算

def init(self, matcher: WorkItemMatcher, region: str = default):
self.matcher = matcher
self.region = region
self.regionalfactors = self.loadregionalfactors()
self.estimates = []

def loadregional_factors(self) -> Dict[str, float]:
加载区域成本调整系数
return {
default: 1.0,

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 open-construction-estimate-1776344197 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 open-construction-estimate-1776344197 技能

通过命令行安装

skillhub install open-construction-estimate-1776344197

下载

⬇ 下载 open-construction-estimate" v2.0.0(免费)

文件大小: 6.92 KB | 发布时间: 2026-4-17 15:25

v2.0.0 最新 2026-4-17 15:25
**Major update with advanced work item matching features and expanded database integration.**

- Added semantic matching engine using TF-IDF and sentence embeddings for accurate BIM-to-cost item mapping.
- Supports filtering and searching across 55,000+ open construction work items from multiple public pricing databases.
- Flexible API for matching BIM elements to standardized cost items, including CSI MasterFormat categorization.
- Detailed documentation, code examples, and database schema included for quick integration.

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部