block_model
业务层:块段模型创建、估值与储量计算
直接调用 native 层 dimine_python_sdk.lib.native.prospecting,
不经过 _adapter。
职责:Pydantic 参数模型序列化、异常翻译、用户友好的 API
.. note::
DMB 文件的读取/遍历请使用 ``dimine_python_sdk.lib.io.DmbFile``。
BlockDataError
Bases: RuntimeError
块段模型操作异常基类
Source code in dimine_python_sdk\lib\prospecting\block_model.py
48 49 50 | |
BlockModelCreateError
Bases: BlockDataError
创建块段模型失败
Source code in dimine_python_sdk\lib\prospecting\block_model.py
53 54 55 | |
BlockModelEvaluationError
Bases: BlockDataError
块段模型估值失败
Source code in dimine_python_sdk\lib\prospecting\block_model.py
58 59 60 61 62 | |
BlockModelEvaluator
块段模型估值与储量计算器
所有方法接受块段模型文件路径,失败时抛出自定义异常(不返回 tuple):
evaluator = BlockModelEvaluator()
result = evaluator.distance_power_evaluation(
"model.dmb", constraint, idw_params
)
# result -> {"success": True, "message": "..."}
Raises:
| Type | Description |
|---|---|
BlockModelEvaluationError
|
估值失败 |
Source code in dimine_python_sdk\lib\prospecting\block_model.py
174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 | |
distance_power_evaluation(block_model_file, constraint_params, evaluation_params, overwrite_result=True)
staticmethod
距离幂估值计算
Returns:
| Name | Type | Description |
|---|---|---|
DistancePowerEvaluationResult |
DistancePowerEvaluationResult
|
估值结果对象,包含 success / message / elements |
Source code in dimine_python_sdk\lib\prospecting\block_model.py
190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 | |
kriging_evaluation(block_model_file, constraint_params, evaluation_params, overwrite_result=True)
staticmethod
克里格估值计算
克里格算法底层仅支持单元素估值,当 variables 包含多个元素(逗号分隔)时, 自动按元素拆分,依次调用底层接口实现多元素估值效果。
Source code in dimine_python_sdk\lib\prospecting\block_model.py
218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 | |
block_constrain_to_dmc_file(block_model_file, constrain_params, constrain_result_file)
块约束保存到约束结果 dmc 文件
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
block_model_file
|
str
|
块段模型文件路径 |
required |
constrain_params
|
list[BlockModelConstraintItem] | BlockModelConstraintItem
|
约束参数 |
required |
constrain_result_file
|
str
|
约束结果文件路径 |
required |
Returns:
| Type | Description |
|---|---|
bool
|
bool |
Source code in dimine_python_sdk\lib\prospecting\block_model.py
142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 | |
create_block_model(params)
创建空块段模型
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
params
|
CreateBlockModelParams
|
CreateBlockModelParams 参数实例 |
required |
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict
|
创建结果 {"state": "ok", ...} |
Raises:
| Type | Description |
|---|---|
BlockModelCreateError
|
创建失败时抛出 |
Source code in dimine_python_sdk\lib\prospecting\block_model.py
119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 | |