eWaterCycle / eWaterCycle/remotebmi

Add update+get_value functions

未关闭
#11 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
Julia
星标
0
派生
1
PR 合并指标
30 天内没有已合并 PR

描述

A very common way to call the BMI methods is

```python
while m.get_current_time() < m.get_end_time():
m.update()
for v in variables:
output[m.get_current_time()][v] = m.get_value(v)
```

Lots of requests are needed to get a value after each update, this could be slow.

To speed up running a model it would be nice to have additional run functions like

1. `update_until_and_get_value_of_variables(time, variables): Mapping>`
1. `update_until_and_get_value(time, variables): list>`
1. `update_until_and_get_value_at_indices(time, variable, indices): list`
1. `update_until_and_get_value_of_variables_at_indices(time, variables, indices): Mapping>`

We should benchmark to see if this how slow it is, if slow we should implement those functions.
The responses can get quite big, the client and server should support this.
Could those functions be a BMI extension, see https://github.com/csdms/bmi/discussions/138 ?

Similar to https://github.com/eWaterCycle/grpc4bmi/issues/152

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。