Skip to content

Commit

Permalink
Merge pull request #445 from CURENT/develop
Browse files Browse the repository at this point in the history
Prepare for new minor version release
  • Loading branch information
cuihantao committed Apr 24, 2023
2 parents 1f619d0 + b199dfe commit 53d5726
Show file tree
Hide file tree
Showing 14 changed files with 64 additions and 39 deletions.
1 change: 0 additions & 1 deletion .azure-pipelines/azure-pipelines-linux.yml
Expand Up @@ -28,7 +28,6 @@ jobs:
pip install pytest pytest-azurepipelines
coverage run -m pytest # Run the tests and check for test coverage.
coverage report -m # Generate test coverage report.
codecov # Upload the report to codecov.
displayName: 'pytest and coverage'
- script: |
Expand Down
39 changes: 19 additions & 20 deletions README.md
@@ -1,6 +1,8 @@
# ANDES
# LTB ANDES

Python Software for Symbolic Power System Modeling and Numerical Analysis.
<img src="docs/source/images/sponsors/CURENT_Logo_NameOnTrans.png" alt="CURENT ERC Logo" width="300" height="auto">

Python software for symbolic power system modeling and numerical analysis, serving as the core simulation engine for the [CURENT Largescale Testbed][LTB Repository].

| | Latest | Stable |
|---------------|-----------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------|
Expand Down Expand Up @@ -53,7 +55,7 @@ Numerical code will be automatically generated for fast simulation.

| Controller Model and Equation | ANDES Code |
| ----------------------------- | ---------- |
| Diagram: <br> ![](https://raw.githubusercontent.com/cuihantao/andes/master/docs/source/modeling/example-tgov1/tgov1.png) <br><br> Write into DAEs: <br> ![](https://raw.githubusercontent.com/cuihantao/andes/master/docs/source/modeling/example-tgov1/tgov1_eqns.png) | ![](https://raw.githubusercontent.com/cuihantao/andes/master/docs/source/modeling/example-tgov1/tgov1_class.png) |
| Diagram: <br> ![](https://raw.githubusercontent.com/cuihantao/andes/master/docs/source/modeling/example-tgov1/tgov1.png) <br> Write into DAEs: <br> ![](https://raw.githubusercontent.com/cuihantao/andes/master/docs/source/modeling/example-tgov1/tgov1_eqns.png) | ![](https://raw.githubusercontent.com/cuihantao/andes/master/docs/source/modeling/example-tgov1/tgov1_class.png) |

In ANDES, what you simulate is what you document.
ANDES automatically generates model documentation, and the docs always stay up to date.
Expand Down Expand Up @@ -100,17 +102,13 @@ H. Cui, F. Li and K. Tomsovic, "Hybrid Symbolic-Numeric Framework for Power Syst
Please let us know if you are using ANDES for research or projects.
We kindly request you to cite our [paper][arxiv paper] if you find ANDES useful.

![Natinoal Science Foundation](https://raw.githubusercontent.com/cuihantao/andes/master/docs/source/images/sponsors/nsf.jpg)
![US Department of Energy](https://raw.githubusercontent.com/cuihantao/andes/master/docs/source/images/sponsors/doe.png)
![CURENT ERC](https://raw.githubusercontent.com/cuihantao/andes/master/docs/source/images/sponsors/curent.jpg)
![Lawrence Livermore National Laboratory](https://raw.githubusercontent.com/cuihantao/andes/master/docs/source/images/sponsors/llnl.jpg)
![Idaho National Laboratory](https://raw.githubusercontent.com/cuihantao/andes/master/docs/source/images/sponsors/inl.jpg)
![Natinoal Science Foundation](https://raw.githubusercontent.com/CURENT/andes/master/docs/source/images/sponsors/nsf.jpg)
![US Department of Energy](https://raw.githubusercontent.com/CURENT/andes/master/docs/source/images/sponsors/doe.png)
![CURENT ERC](https://raw.githubusercontent.com/CURENT/andes/master/docs/source/images/sponsors/curent.jpg)
![Lawrence Livermore National Laboratory](https://raw.githubusercontent.com/CURENT/andes/master/docs/source/images/sponsors/llnl.jpg)
![Idaho National Laboratory](https://raw.githubusercontent.com/CURENT/andes/master/docs/source/images/sponsors/inl.jpg)

# Sponsors and Contributors
ANDES is the core simulation engine for the CURENT Largescale Testbed (LTB).
More information about CURENT LTB can be found at the
[LTB Repository](https://github.com/CURENT/ltb2).

This work was supported in part by the Engineering Research Center
Program of the National Science Foundation and the Department of Energy
under NSF Award Number EEC-1041877 and the CURENT Industry Partnership
Expand All @@ -127,16 +125,17 @@ ANDES is licensed under the [GPL v3 License](./LICENSE).

* * *

[GitHub releases]: https://github.com/cuihantao/andes/releases
[GitHub issues]: https://github.com/cuihantao/andes/issues
[Github Discussions]: https://github.com/cuihantao/andes/discussions
[GitHub insights]: https://github.com/cuihantao/andes/pulse
[GitHub pull requests]: https://github.com/cuihantao/andes/pulls
[GitHub contributors]: https://github.com/cuihantao/andes/graphs/contributors
[GitHub releases]: https://github.com/CURENT/andes/releases
[GitHub issues]: https://github.com/CURENT/andes/issues
[Github Discussions]: https://github.com/CURENT/andes/discussions
[GitHub insights]: https://github.com/CURENT/andes/pulse
[GitHub pull requests]: https://github.com/CURENT/andes/pulls
[GitHub contributors]: https://github.com/CURENT/andes/graphs/contributors
[readthedocs]: https://andes.readthedocs.io
[release notes]: https://andes.readthedocs.io/en/latest/release-notes.html
[arxiv paper]: https://arxiv.org/abs/2002.09455
[tutorial]: https://andes.readthedocs.io/en/latest/tutorial.html#interactive-usage
[examples]: https://github.com/cuihantao/andes/tree/master/examples
[verification]: https://github.com/cuihantao/andes/tree/master/examples/verification
[examples]: https://github.com/CURENT/andes/tree/master/examples
[verification]: https://github.com/CURENT/andes/tree/master/examples/verification
[Binder]: https://mybinder.org/v2/gh/cuihantao/andes/master
[LTB Repository]: https://github.com/CURENT
2 changes: 1 addition & 1 deletion andes/core/var.py
Expand Up @@ -92,7 +92,7 @@ def __init__(self,
self.v_iter = v_iter # the implicit equation (0 = v_iter) for iterative initialization
self.e_str = e_str # residual equation string

self.discrete = discrete
self.discrete = discrete # discrete component on which this variable depends
self.v_setter = v_setter # True if this variable sets the variable value
self.e_setter = e_setter # True if this var sets the equation value
self.v_str_add = v_str_add
Expand Down
2 changes: 1 addition & 1 deletion andes/io/matpower.py
Expand Up @@ -307,7 +307,7 @@ def _get_bus_id_caller(bus):
"""

if np.array(bus.idx.v).dtype == np.object:
if np.array(bus.idx.v).dtype == object:
return lambda x: bus.idx2uid(x) + 1
else:
return lambda x: x
Expand Down
4 changes: 3 additions & 1 deletion andes/models/dynload/fload.py
Expand Up @@ -56,7 +56,9 @@ def __init__(self, system, config):
self.group = 'DynLoad'
self.flags.tds = True

self.bus = ExtParam(model='PQ', src='bus', indexer=self.pq)
self.bus = ExtParam(model='PQ', src='bus', indexer=self.pq,
export=False,
)

self.p0 = ExtService(model='PQ', src='Ppf', indexer=self.pq,
tex_name='P_0',
Expand Down
8 changes: 6 additions & 2 deletions andes/models/static/pq.py
Expand Up @@ -67,9 +67,13 @@ class PQ(PQData, Model):
.. code-block :: python
ss.PQ.config.p2p = 1.0 ss.PQ.config.p2i = 0 ss.PQ.config.p2z = 0
ss.PQ.config.p2p = 1.0
ss.PQ.config.p2i = 0
ss.PQ.config.p2z = 0
ss.PQ.config.q2q = 1.0 ss.PQ.config.q2i = 0 ss.PQ.config.q2z = 0
ss.PQ.config.q2q = 1.0
ss.PQ.config.q2i = 0
ss.PQ.config.q2z = 0
Then, the constant power portion can be altered by changing the ``Ppf`` and
``Qpf`` constants for active power and reactive power.
Expand Down
11 changes: 11 additions & 0 deletions andes/models/timer.py
Expand Up @@ -108,6 +108,17 @@ class Fault(ModelData, Model):
Non-convergence can occur in the proximity of a fault due to various reasons,
including network power transfer capability limitation and parameter issues
of controllers.
When a fault gets cleared, algebraic variables change drastically. E.g.,
voltages can go from nearly zero back to 1.0. As we are using Newton's
method for solving the DAE, the initial values are crucial for the immediate
step after fault clearance.
This Fault model restores the pre-fault values for algebraic variables
``Fault.config.scale`` is the scaling factor to be multiplied to the
pre-fault values for adjusting the initial values. Some trial and error are
expected for severe disturbances, combined with increasing the fault
reactance ``xf``.
"""

def __init__(self, system, config):
Expand Down
9 changes: 9 additions & 0 deletions andes/routines/pflow.py
Expand Up @@ -270,10 +270,19 @@ def run(self, **kwargs):
def report(self):
"""
Write power flow report to a plain-text file.
Returns
-------
bool
True if report was written, False otherwise.
"""

if self.system.files.no_output is False:
r = Report(self.system)
r.write()
return True

return False

def _set_xy(self, xy):
"""
Expand Down
2 changes: 1 addition & 1 deletion docs/source/conf.py
Expand Up @@ -213,7 +213,7 @@
'numpy': ('https://docs.scipy.org/doc/numpy/', None),
'scipy': ('https://docs.scipy.org/doc/scipy/reference/', None),
'pandas': ('https://pandas.pydata.org/pandas-docs/stable', None),
'matplotlib': ('https://matplotlib.org', None),
# 'matplotlib': ('https://matplotlib.org', None),
}

# Favorite icon
Expand Down
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 13 additions & 10 deletions docs/source/index.rst
Expand Up @@ -15,27 +15,30 @@ ANDES documentation


**Useful Links**: `Binary Installer`_ | `Source Repository`_ | `Report Issues`_
| `Q&A`_ | `Try in Jupyter Notebooks`_
| `Q&A`_ | `Try in Jupyter Notebooks`_ | `LTB Repository`_
.. _`Source Repository`: https://github.com/cuihantao/andes
.. _`Report Issues`: https://github.com/cuihantao/andes/issues
.. _`Q&A`: https://github.com/cuihantao/andes/discussions
.. _`Source Repository`: https://github.com/CURENT/andes
.. _`Report Issues`: https://github.com/CURENT/andes/issues
.. _`Q&A`: https://github.com/CURENT/andes/discussions
.. _`Binary Installer`: https://pypi.org/project/andes/
.. _`Try in Jupyter Notebooks`: https://mybinder.org/v2/gh/cuihantao/andes/master
.. _`LTB Repository`: https://github.com/CURENT/ltb2
.. _`LTB Repository`: https://github.com/CURENT/

ANDES is an open-source Python library for power system modeling, computation,
analysis, and control. It supports power flows calculation, transient stability
.. image:: /images/sponsors/CURENT_Logo_NameOnTrans.png
:alt: CURENT Logo
:width: 300px
:height: 74.2px

LTB ANDES is an open-source Python library for power system modeling, computation,
analysis, and control, serving as the core simulation engine for the CURENT Large scale
Testbed (LTB). It supports power flows calculation, transient stability
simulation, and small-signal stability analysis for transmission systems. ANDES
implements a symbolic-numeric framework for rapid prototyping of
differential-algebraic equation-based models. In this framework, a comprehensive
:ref:`library of models <modelref>` is developed, including the full
second-generation renewable models. Models in ANDES have been :ref:`verified
<verification>` with commercial software.

ANDES is the core simulation engine for the CURENT Largescale Testbed (LTB).
More information about CURENT LTB can be found at the `LTB Repository`_.

.. panels::
:card: + intro-card text-center
:column: col-lg-6 col-md-6 col-sm-6 col-xs-12 d-flex
Expand Down
2 changes: 0 additions & 2 deletions requirements-extra.txt
Expand Up @@ -7,7 +7,6 @@
#
# Only one `#` is allowed per line. Lines starting with `#` are ignored.

codecov # dev
coverage # dev
pytest==7.0.1 # dev
flake8 # dev
Expand All @@ -24,7 +23,6 @@ pre-commit # dev
numba # dev, perf

pandapower # interop
GridCal # interop

# below work around a bug with tqdm bar with ipywidgets 8.0.1
ipywidgets==7.7 # web

0 comments on commit 53d5726

Please sign in to comment.