Generate non-structural component quantity files using the FEMA P-58 Normative Quantity Estimation Tool
Project description
NormQtyPact
通过调用 FEMA P-58 附带的非结构构件标准数量 Excel 文件,根据建筑各层的平面面积输出非结构构件数量文件。生成的文件可以直接导入 PACT 或 Pelicun 中使用。
注意: 本包依赖 Windows COM 接口调用 Excel,仅支持 Windows 平台且需要安装 Microsoft Excel。
输出文件
PactComponentDirectory.csv:可直接导入 PACT 的非结构构件数量文件。PelucunComponentDirectory.csv/PelucunComponentDirectory.json:可作为 Pelicun 的非结构构件数量输入文件。
安装
从 PyPI 安装(发布后)
pip install normqtypact
依赖
使用
命令行
安装后可直接使用 normqtypact 命令:
normqtypact --NumOfStories 3 --FloorAreaList "1,1,1" --Occupancy1Type "APARTMENT,APARTMENT,APARTMENT" --Occupancy2Type "none,none,none" --Occupancy3Type "none,none,none" --Occupancy1Area "1,1,1" --Occupancy2Area "0,0,0" --Occupancy3Area "0,0,0"
参数说明:
| 参数 | 类型 | 说明 | 示例 |
|---|---|---|---|
--NumOfStories |
int | 楼层数 | 3 |
--FloorAreaList |
str | 各层楼面面积(平方英尺),逗号分隔 | "1000,1000,1000" |
--Occupancy1Type |
str | 各层主要使用类型,逗号分隔 | "APARTMENT,APARTMENT,APARTMENT" |
--Occupancy2Type |
str | 各层次要使用类型,逗号分隔 | "none,none,none" |
--Occupancy3Type |
str | 各层第三使用类型,逗号分隔 | "none,none,none" |
--Occupancy1Area |
str | 主要使用类型面积占比,逗号分隔 | "1,1,1" |
--Occupancy2Area |
str | 次要使用类型面积占比,逗号分隔 | "0,0,0" |
--Occupancy3Area |
str | 第三使用类型面积占比,逗号分隔 | "0,0,0" |
Python API
from normqtypact import NormQtyPact
obj = NormQtyPact(
NumOfStories=3,
FloorAreaList=[1000, 1000, 1000],
Occupancy1Type=["APARTMENT", "APARTMENT", "APARTMENT"],
Occupancy2Type=["none", "none", "none"],
Occupancy3Type=["none", "none", "none"],
Occupancy1Area=[1, 1, 1],
Occupancy2Area=[0, 0, 0],
Occupancy3Area=[0, 0, 0],
)
# 生成 PACT 格式输出
obj.Output_PactComponentDirectory("PactComponentDirectory.csv")
# 生成 Pelicun 格式输出
obj.Output_PelicunComponentDirectory(
json_path="PelucunComponentDirectory.json",
csv_path="PelucunComponentDirectory.csv",
)
示例
examples/ 目录包含可直接运行的示例脚本:
| 文件 | 说明 |
|---|---|
basic_usage.py |
3 层公寓建筑(单一使用类型) |
mixed_occupancy.py |
5 层混合使用建筑(零售 + 办公) |
PactComponentDirectory.csv |
PACT 格式示例输出 |
PelucunComponentDirectory.csv |
Pelicun CSV 格式示例输出 |
PelucunComponentDirectory.json |
Pelicun JSON 格式示例输出 |
运行示例:
cd examples
python basic_usage.py
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file normqtypact-0.1.1.tar.gz.
File metadata
- Download URL: normqtypact-0.1.1.tar.gz
- Upload date:
- Size: 868.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e3c82ab9f24fc9de7faae632e6f0b8ec2a727370f2277ca5d75cc57d5bcc8954
|
|
| MD5 |
16802c5203657d5ca1c4aee2eced6531
|
|
| BLAKE2b-256 |
84d782028bd9df3026d5486896bd9d9152e82f2a6f6c128db0253a732928c7e9
|
File details
Details for the file normqtypact-0.1.1-py3-none-any.whl.
File metadata
- Download URL: normqtypact-0.1.1-py3-none-any.whl
- Upload date:
- Size: 867.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
51960ce2adc60656c34e12036c1b311f3008d8c71bc591a9f553119008aa901c
|
|
| MD5 |
36490d24fd971e7d4818bcbc760dee9d
|
|
| BLAKE2b-256 |
28b794a197f20fcf44e3af1b7e7ed82d313be93249a0c6ab6cf905902df3f5c2
|