8000 GitHub - yuanxiaoming8899/WOMBAT-cn: 风电场运营和维护成本效益分析工具
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

yuanxiaoming8899/WOMBAT-cn

 
 

Repository files navigation

WOMBAT:风电场运营和维护成本效益分析工具

DOI 10.2172/1894867 PyPI版本 阿帕奇2.0 活页夹 Jupyter 书

预提交 黑色的 伊索特

该库提供了一个工具,使用离散事件模拟框架来模拟分布式、陆基和海上风电场的运行和维护阶段 (O&M)。

WOMBAT 是围绕SimPy离散事件模拟框架编写的。此外,还使用灵活且模块化的面向对象的代码库来支持这一点,该代码库可以对任意大型(或小型)风电场进行建模,并可编码任意数量的故障和维护任务。

请注意,该功能仍处于开发阶段,因此您可能会发现某些功能目前尚不完整,但请放心,该功能正在扩展。话虽如此,如果您能提交问题或 PR 来进行任何改进,从修复拼写错误(肯定会有一些)到功能再到测试,我们将不胜感激。

如果您使用此库,请引用我们的 NREL 技术报告:

   @techreport{hammond2022wombat,
      title = {Windfarm Operations and Maintenance cost-Benefit Analysis Tool (WOMBAT)},
      author = {Hammond, Rob and Cooperman, Aubryn},
      abstractNote = {This report provides technical documentation and background on the newly-developed Wind Operations and Maintenance cost-Benefit Analysis Tool (WOMBAT) software. WOMBAT is an open-source model that can be used to obtain cost estimates for operations and maintenance of land-based or offshore wind power plants. The software was designed to be flexible and modular to allow for implementation of new strategies and technological innovations for wind plant maintenance. WOMBAT uses a process-based simulation approach to model day-to-day operations, repairs, and weather conditions. High-level outputs from WOMBAT, including time-based availability and annual operating costs, are found to agree with published results from other models.},
      doi = {10.2172/1894867},
      url = {https://www.osti.gov/biblio/1894867},
      place = {United States},
      year = {2022},
      month = {10},
      institution = {National Renewable Energy Lab. (NREL)},
   }

袋熊在行动

有一些 Jupyter 笔记本可以让用户在examples/ 文件夹中启动并运行 WOMBAT,但这里有一些亮点:

注意 在 v0.6 中,由于后端的大量模型升级以及新的/更新的功能以更好地指定如何管理修复,因此在某些建模条件下,结果将与过去的版本显着不同。

  • 丁伍迪等人。的复制wombat可以在 _ 中找到 examples folder <https://github.com/WISDEM/WOMBAT/blob/main/examples/dinwoodie_validation.ipynb>
  • IEA 任务 26 validation exercise <https://github.com/WISDEM/WOMBAT/blob/main/examples/iea_26_validation.ipynb>_。
  • 演示文稿:slides <https://github.com/WISDEM/WOMBAT/blob/main/presentation_material/>_。

设置

要求

  • Python 3.8 到 3.10

注意 对于寻求安装更多基本依赖项的 Python 3.10 用户,我们注意到 pip 可能需要很长时间才能解决所有包要求,因此建议使用以下工作流程:

# Enter the source code directory
cd wombat/

First install the base package requirements

pip install -e .

Then install whichever additional dependencies are required/desired

pip install -e '.[dev]' # '.[docs]' or '.[all]'

First install the base package requirements

pip install -e .

Then install whichever additional dependencies are required/desired

pip install -e '.[dev]' # '.[docs]' or '.[all]'" tabindex="0" role="button">

环境设置

下载适用于适当操作系统的最新版本的Miniconda 。 对于适当的操作系统版本,请执行其余 步骤。

使用conda,创建一个新的虚拟环境:

conda create -n <environment_name> python=3.8 --no-default-packages
conda activate <environment_name>
conda install -c anaconda pip

activate the environment

conda activate <environment_name>

to deactivate

conda deactivate

activate the environment

conda activate <environment_name>

to deactivate

conda deactivate" tabindex="0" role="button"> height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-copy js-clipboard-copy-icon"> <path

安装

pip install wombat
  <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-copy js-clipboard-copy-icon">
<path d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 0 1 0 1.5h-1.5a.25.25 0 0 0-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 0 0 .25-.25v-1.5a.75.75 0 0 1 1.5 0v1.5A1.75 1.75 0 0 1 9.25 16h-7.5A1.75 1.75 0 0 1 0 14.25Z"></path><path d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0 1 14.25 11h-7.5A1.75 1.75 0 0 1 5 9.25Zm1.75-.25a.25.25 0 0 0-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 0 0 .25-.25v-7.5a.25.25 0 0 0-.25-.25Z"></path>

从源头

直接将其安装到激活的虚拟环境中:

git clone https://github.com/WISDEM/WOMBAT.git
cd wombat
python setup.py install

Alternatively:

pip install .

python setup.py install

Alternatively:

pip install ." tabindex="0" role="button">

用法

安装完成后,可以导入包:

python
import wombat
wombat.__version__
  <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-copy js-clipboard-copy-icon">
<path d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 0 1 0 1.5h-1.5a.25.25 0 0 0-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 0 0 .25-.25v-1.5a.75.75 0 0 1 1.5 0v1.5A1.75 1.75 0 0 1 9.25 16h-7.5A1.75 1.75 0 0 1 0 14.25Z"></path><path d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0 1 14.25 11h-7.5A1.75 1.75 0 0 1 5 9.25Zm1.75-.25a.25.25 0 0 0-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 0 0 .25-.25v-7.5a.25.25 0 0 0-.25-.25Z"></path>

如需进一步使用,请参阅文档站点https://wisdem.github.io/WOMBAT

为 WOMBAT 做出贡献的要求

代码贡献

代码贡献者应该注意,有一个额外的依赖套件用于运行测试并启用预提交工作流程以自动标准化核心代码格式化原则。

git clone https://github.com/WISDEM/WOMBAT.git
cd wombat

Install the additional dependencies for running the tests and automatic code formatting

pip install -e '.[dev]'

Enable the pre-commit workflow for automatic code formatting

pre-commit install

... contributions and commits ...

Run the tests and ensure they all pass

pytest tests

Install the additional dependencies for running the tests and automatic code formatting

pip install -e '.[dev]'

Enable the pre-commit workflow for automatic code formatting

pre-commit install

... contributions and commits ...

Run the tests and ensure they all pass

pytest tests" tabindex="0" role="button">

用户可能遇到的基本预提交问题及其补救措施:

  • 对于任何失败的运行,更改可能已自动应用或需要贡献者进行进一步编辑。无论哪种情况,做出更改后,贡献者都必须重新运行git add <the changed files>git commit -m <the commit message>重新启动应用更改的预提交工作流程。一旦所有检查通过,提交就可以安全地推送。
  • isortblack或简单文件检查失败,但进行了更改
    • 根据需要重新运行addcommit进程,直到更改满足检查要求
  • pylintflake8失败:
    • 解决错误并重新运行addcommit进程
  • mypy有看起来不正确的类型错误
    • 仔细检查输入实际上是否正确,并重新运行 addcommit进程
    • 如果mypy只是与看似正确的类型混淆,可以在错误上方添加以下语句mypyassert isinstance(<variable of concern>, <the type you think mypy should be registering>)
    • 如果这仍然不起作用,但您确信类型是正确的,只需# type ignore在行末尾添加注释即可。有时mypy会遇到复杂的场景,或者特别是某些attrs约定。

文档贡献

git clone https://github.com/WISDEM/WOMBAT.git
cd wombat
pip install -e '.[docs]'

pip install -e '.[docs]'" tabindex="0" role="button">

建立网站

注意 您可能需要将文件中的“execute_notebooks”参数更改docs/_config.yaml 为“off”,除非您要更新编码示例,否则它们将在您每次构建站点时运行。

jupyter-book build docs

查看结果:docs/_build/html/index.html

代码和文档贡献

git clone https://github.com/WISDEM/WOMBAT.git
cd wombat
pip install -e '.[all]'

About

风电场运营和维护成本效益分析工具

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Langua 305A ges

  • Python 99.8%
  • TeX 0.2%
0