Package: wombat
WOMBAT: Windfarm Operations & Maintenance cost-Benefit Analysis ToolThis library provides a tool to simulate the operation and maintenance phase (O&M) of
distributed, land-based, and offshore windfarms using a discrete event simultaion
framework.WOMBAT is written around theSimPydiscrete
event simulation framework. Additionally, this is supported using a flexible and modular
object-oriented code base, which enables the modeling of arbitrarily large (or small)
windfarms with as many or as few failure and maintenance tasks that can be encoded.Please note that this is still heavily under development, so you may find some functionality
to be incomplete at the current moment, but rest assured the functionality is expanding.
With that said, it would be greatly appreciated for issues or PRs to be submitted for
any improvements at all, from fixing typos (guaranteed to be a few) to features to
testing.If you use this library please cite our NREL Technical Report:@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)},}WOMBAT in ActionThere a few Jupyter notebooks to get users up and running with WOMBAT in theexamples/folder, but here are a few highlights:NoteIn v0.6 the results will diverge significantly under certain modeling conditions from
past versions due to substantial model upgrades on the backend and new/updated
features to better specify how repairs are managed.Dinwoodie, et al. replication forwombatcan be found in theexamples folder <https://github.com/WISDEM/WOMBAT/blob/main/examples/dinwoodie_validation.ipynb>_.IEA Task 26validation exercise  <https://github.com/WISDEM/WOMBAT/blob/main/examples/iea_26_validation.ipynb>_.Presentations:slides  <https://github.com/WISDEM/WOMBAT/blob/main/presentation_material/>_.SetupRequirementsPython 3.8 through 3.10NoteFor Python 3.10 users that seek to install more than the base dependencies, it has
been noted that pip may take a long time to resolve all of the package requirements,
so it is recommended to use the following workflow:#Enterthesourcecodedirectorycd wombat/#Firstinstallthebasepackagerequirementspip install -e .#Theninstallwhicheveradditionaldependenciesarerequired/desiredpip install -e '.[dev]'  # '.[docs]' or '.[all]'Environment SetupDownload the latest version ofMinicondafor the appropriate OS. Follow the remainingstepsfor the appropriate OS version.Using conda, create a new virtual environment:conda create -n <environment_name> python=3.8 --no-default-packagesconda activate <environment_name>conda install -c anaconda pip#activatetheenvironmentconda activate <environment_name>#todeactivateconda deactivateInstallationPippip install wombatFrom SourceInstall it directly into an activated virtual environment:git clone https://github.com/WISDEM/WOMBAT.gitcd wombatpython setup.py install#Alternatively:pip install .UsageAfter installation, the package can imported:pythonimport wombatwombat.__version__For further usage, please see the documentation site athttps://wisdem.github.io/WOMBAT.Requirements for Contributing to WOMBATCode ContributionsCode contributors should note that there is both an additional dependency suite for
running the tests and enabling the pre-commit workflow to automically standardize the
core code formatting principles.git clone https://github.com/WISDEM/WOMBAT.gitcd wombat#Installtheadditionaldependenciesforrunningthetestsandautomaticcodeformattingpip install -e '.[dev]'#Enablethepre-commitworkflowforautomaticcodeformattingpre-commit install#...contributionsandcommits...#Runthetestsandensuretheyallpasspytest testsBasic pre-commit issues that users might encounter and their remedies:For any failed run, changes may have been either automatically applied or require
further edits from the contributor. In either case, after changes have been made,
contributors will have to rerungit add <the changed files>andgit commit -m <the commit message>to restart the pre-commit workflow with the
applied changes. Once all checks pass, the commit is safe to be pushed.isort,black, or simple file checks failed, but made changesrerun theaddandcommitprocesses as needed until the changes satisfy the checkspylintorflake8failed:Address the errors and rerun theaddandcommitprocessesmypyhas type errors that seem incorrectDouble check the typing is in fact as correct as it seems it should be and rerun theaddandcommitprocessesIfmypysimply seems confused with seemingly correct types, the following statement
can be added above themypyerror:assert isinstance(<variable of concern>, <the type you think mypy should be registering>)If that's still not working, but you are definitely sure the types are correct,
simply add a# type ignorecomment at the end of the line. Sometimesmypystruggles
with complex scenarios, or especially with certainattrsconventions.Documentation Contributionsgit clone https://github.com/WISDEM/WOMBAT.gitcd wombatpip install -e '.[docs]'Build the siteNoteYou may want to change the "execute_notebooks" parameter in thedocs/_config.yamlfile to "off" unless you're updating the coded examples or they will be run every time
you build the site.jupyter-book build docsView the results:docs/_build/html/index.htmlCode and Documentation Contributionsgit clone https://github.com/WISDEM/WOMBAT.gitcd wombatpip install -e '.[all]'