# 参数

参数是在模型的每个时间步返回一个值的函数。这些值可以是基于时间（例如，当天或月份）的常数，基于时间步长的储层储量计算以及许多其他计算。自定义参数也可以用 Python 编写。

本页介绍了（大多数）Pywr 支持的参数类型。可以找到 Pywr 中的参数概述 [这里](https://pywr.github.io/pywr-docs/master/json.html#parameters)。已找到内置 Pywr 参数的完整列表 [这里](https://pywr.github.io/pywr-docs/master/api/pywr.parameters.html)。

## 1。创建参数

在网络中，单击 “参数” 选项卡：

<figure><img src="/files/SU495vfPTZgyzwXLj9gx" alt=""><figcaption><p>点击 “参数” 选项卡</p></figcaption></figure>

在 “参数类型类别” 部分旁边，单击 “+” 按钮并选择 “PYWR\ \_PARAMETER”。

<figure><img src="/files/U9ytBurNjKFlwwimc0jd" alt=""><figcaption><p>点击 pywr_parameter</p></figcaption></figure>

将出现文本输入。输入您的参数的名称：\\

<figure><img src="/files/KPOyy3RCyiKRZUbWhGBK" alt=""><figcaption><p>输入参数名称</p></figcaption></figure>

在提供的 JSON 编辑器中根据需要修改参数：

<figure><img src="/files/E2MwTRlp8fuhtAVoeKCk" alt=""><figcaption></figcaption></figure>

{% embed url="<https://www.youtube.com/watch?v=u-3hotZj_44>" %}
演示如何为多个节点使用参数的视频
{% endembed %}

## 2。WaterStrategy 中的参数编辑器

为了简化参数修改，WaterStrategy 为常用参数提供了编辑器，例如带有预填默认值的月度配置文件参数，并提供了图形编辑器以简化数据输入。

#### 参数编辑器示例

在 “参数” 选项卡中，添加新参数时，选择 'PYWR\_参数\_每月\ \_PROFILE' 如图所示：\\

<figure><img src="/files/AorROFKPKANDjfOMYJea" alt=""><figcaption><p>选择 PYWR_参数_月度档案</p></figcaption></figure>

请注意，出现的编辑器将显示 JSON 选项卡，但也会显示 “绘图和表格” 选项卡。修改表中的数据将自动更新 JSON 中的数据，如下所示：\\

<figure><img src="/files/MXeHZ1dvqmJZE1lzgrwq" alt=""><figcaption><p>请注意，这些值已在电子表格编辑器中编辑</p></figcaption></figure>

这些更改会自动更新 JSON：

<figure><img src="/files/RMI9TphYnSCIXs8KCyJE" alt=""><figcaption><p>JSON 部分中的数据会自动更新</p></figcaption></figure>

##


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://water-strategy.gitbook.io/waterstrategy/zhong-guo-ren/jian-mo-ji-chu-zhi-shi/parameters.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
