-
-.. _getting-started:
-
-===============
-Getting started
-===============
-
-.. toctree::
- :maxdepth: 3
- :hidden:
diff --git a/doc/source/index.rst b/doc/source/index.rst
deleted file mode 100644
index 988ae05..0000000
--- a/doc/source/index.rst
+++ /dev/null
@@ -1,33 +0,0 @@
-.. AMS documentation master file, created by
- sphinx-quickstart on Thu Jan 26 15:32:32 2023.
- You can adapt this file completely to your liking, but it should at least
- contain the root `toctree` directive.
-
-==================
-AMS documentation
-==================
-**Useful Links**: `Source Repository`_ | `Report Issues`_ | `Q&A`_
-
-.. _`Source Repository`: https://github.com/jinningwang/ams
-.. _`Report Issues`: https://github.com/jinningwang/ams/issues
-.. _`Q&A`: https://github.com/jinningwang/ams/discussions
-.. _`LTB Repository`: https://github.com/CURENT/ltb2
-
-AMS is still under DEVELOPMENT, stay tuned!
-
-AMS is an open-source packages for dispatch modeling and co-simulation with dynanic.
-
-AMS is the dispatch simulation engine for the CURENT Largescale Testbed (LTB).
-More information about CURENT LTB can be found at the `LTB Repository`_.
-
-
-.. toctree::
- :maxdepth: 3
- :caption: AMS Manual
- :hidden:
-
- getting_started/index
- examples/index
- modeling/index
- release-notes
- api
diff --git a/doc/source/modeling/index.rst b/doc/source/modeling/index.rst
deleted file mode 100644
index 7cf3934..0000000
--- a/doc/source/modeling/index.rst
+++ /dev/null
@@ -1,7 +0,0 @@
-.. _development:
-
-===========
-Development
-===========
-
-Modeling guide for AMS.
\ No newline at end of file
diff --git a/doc/source/release-notes.rst b/doc/source/release-notes.rst
deleted file mode 100644
index 12a4e54..0000000
--- a/doc/source/release-notes.rst
+++ /dev/null
@@ -1,21 +0,0 @@
-.. _ReleaseNotes:
-
-=============
-Release notes
-=============
-
-The APIs before v3.0.0 are in beta and may change without prior notice.
-
-Pre-v1.0.0
-==========
-
-v0.5 (2023-02-17)
--------------------
-
-- Base System setup
-- Development preparation
-
-v0.4 (2023-01)
--------------------
-
-This release outlines the package.
\ No newline at end of file
diff --git a/doc/Makefile b/docs/Makefile
similarity index 72%
rename from doc/Makefile
rename to docs/Makefile
index d0c3cbf..b4a5893 100644
--- a/doc/Makefile
+++ b/docs/Makefile
@@ -1,10 +1,10 @@
# Minimal makefile for Sphinx documentation
#
-# You can set these variables from the command line, and also
-# from the environment for the first two.
-SPHINXOPTS ?=
-SPHINXBUILD ?= sphinx-build
+# You can set these variables from the command line.
+SPHINXOPTS = "-W" # This flag turns warnings into errors.
+SPHINXBUILD = sphinx-build
+SPHINXPROJ = PackagingScientificPython
SOURCEDIR = source
BUILDDIR = build
diff --git a/doc/make.bat b/docs/make.bat
similarity index 76%
rename from doc/make.bat
rename to docs/make.bat
index 061f32f..2be8306 100644
--- a/doc/make.bat
+++ b/docs/make.bat
@@ -9,6 +9,7 @@ if "%SPHINXBUILD%" == "" (
)
set SOURCEDIR=source
set BUILDDIR=build
+set SPHINXPROJ=PackagingScientificPython
if "%1" == "" goto help
@@ -21,15 +22,15 @@ if errorlevel 9009 (
echo.may add the Sphinx directory to PATH.
echo.
echo.If you don't have Sphinx installed, grab it from
- echo.https://www.sphinx-doc.org/
+ echo.http://sphinx-doc.org/
exit /b 1
)
-%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
+%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS%
goto end
:help
-%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
+%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS%
:end
popd
diff --git a/docs/requirements-rtd.txt b/docs/requirements-rtd.txt
new file mode 100644
index 0000000..84bbd06
--- /dev/null
+++ b/docs/requirements-rtd.txt
@@ -0,0 +1,17 @@
+cvxopt
+numpy
+scipy
+sympy
+pandas
+matplotlib
+openpyxl
+xlsxwriter
+dill
+pathos
+tqdm
+pyyaml
+coloredlogs
+ipython
+numpydoc
+sphinx-copybutton
+sphinx_rtd_theme
diff --git a/docs/source/_static/.placeholder b/docs/source/_static/.placeholder
new file mode 100644
index 0000000..e69de29
diff --git a/docs/source/andes.rst b/docs/source/andes.rst
new file mode 100644
index 0000000..39c6d43
--- /dev/null
+++ b/docs/source/andes.rst
@@ -0,0 +1,54 @@
+Subpackages
+===========
+
+.. toctree::
+
+ moduledoc/andes.core
+ moduledoc/andes.io
+ moduledoc/andes.models
+ moduledoc/andes.routines
+ moduledoc/andes.utils
+ moduledoc/andes.variables
+
+Submodules
+==========
+
+andes.cli module
+----------------
+
+.. automodule:: andes.cli
+ :members:
+ :undoc-members:
+ :show-inheritance:
+
+andes.main module
+-----------------
+
+.. automodule:: andes.main
+ :members:
+ :undoc-members:
+ :show-inheritance:
+
+andes.plot module
+-----------------
+
+.. automodule:: andes.plot
+ :members:
+ :undoc-members:
+ :show-inheritance:
+
+andes.shared module
+-------------------
+
+.. automodule:: andes.shared
+ :members:
+ :undoc-members:
+ :show-inheritance:
+
+andes.system module
+-------------------
+
+.. automodule:: andes.system
+ :members:
+ :undoc-members:
+ :show-inheritance:
diff --git a/docs/source/cases.rst b/docs/source/cases.rst
new file mode 100644
index 0000000..1dda6e4
--- /dev/null
+++ b/docs/source/cases.rst
@@ -0,0 +1,405 @@
+.. _cases:
+
+***********************
+Test Cases and Parsers
+***********************
+
+Directory
+=========
+
+ANDES comes with several test cases in the ``andes/cases/`` folder.
+Currently, the Kundur's 2-area system, IEEE 14-bus system,
+NPCC 140-bus system, and the WECC 179-bus system has been verified
+against DSATools TSAT.
+
+The test case library will continue to build as more models get implemented.
+
+A tree view of the test directory is as follows. ::
+
+ cases/
+ ├── 5bus/
+ │ └── pjm5bus.xlsx
+ ├── GBnetwork/
+ │ ├── GBnetwork.m
+ │ ├── GBnetwork.xlsx
+ │ └── README.md
+ ├── ieee14/
+ │ ├── ieee14.dyr
+ │ └── ieee14.raw
+ ├── kundur/
+ │ ├── kundur.raw
+ │ ├── kundur_aw.xlsx
+ │ ├── kundur_coi.xlsx
+ │ ├── kundur_coi_empty.xlsx
+ │ ├── kundur_esdc2a.xlsx
+ │ ├── kundur_esst3a.xlsx
+ │ ├── kundur_exdc2_zero_tb.xlsx
+ │ ├── kundur_exst1.xlsx
+ │ ├── kundur_freq.xlsx
+ │ ├── kundur_full.dyr
+ │ ├── kundur_full.xlsx
+ │ ├── kundur_gentrip.xlsx
+ │ ├── kundur_ieeeg1.xlsx
+ │ ├── kundur_ieeest.xlsx
+ │ ├── kundur_sexs.xlsx
+ │ └── kundur_st2cut.xlsx
+ ├── matpower/
+ │ ├── case118.m
+ │ ├── case14.m
+ │ ├── case300.m
+ │ └── case5.m
+ ├── nordic44/
+ │ ├── N44_BC.dyr
+ │ ├── N44_BC.raw
+ │ └── README.md
+ ├── npcc/
+ │ ├── npcc.raw
+ │ └── npcc_full.dyr
+ ├── wecc/
+ │ ├── wecc.raw
+ │ ├── wecc.xlsx
+ │ ├── wecc_full.dyr
+ │ ├── wecc_gencls.dyr
+ └── wscc9/
+ ├── wscc9.raw
+ └── wscc9.xlsx
+
+MATPOWER Cases
+==============================
+
+MATPOWER cases has been tested in ANDES for power flow calculation.
+All following cases are calculated with the provided initial values
+using the full Newton-Raphson iterative approach.
+
+The numerical library used for sparse matrix factorization is KLU.
+In addition, Jacobians are updated in place ``spmatrix.ipadd``.
+Computations are performed on macOS 10.15.4 with i9-9980H, 16 GB
+2400 MHz DDR4, running ANDES 0.9.1, CVXOPT 1.2.4 and NumPy 1.18.1.
+
+The statistics of convergence, number of iterations, and solution time
+(including equation evaluation, Jacobian, and factorization time) are
+reported in the following table.
+The computation time may vary depending on operating system and hardware.
+
++--------------------------+------------+-----------------+----------+
+| File Name | Converged? | # of Iterations | Time [s] |
++==========================+============+=================+==========+
+| case30.m | 1 | 3 | 0.012 |
++--------------------------+------------+-----------------+----------+
+| case_ACTIVSg500.m | 1 | 3 | 0.019 |
++--------------------------+------------+-----------------+----------+
+| case13659pegase.m | 1 | 5 | 0.531 |
++--------------------------+------------+-----------------+----------+
+| case9Q.m | 1 | 3 | 0.011 |
++--------------------------+------------+-----------------+----------+
+| case_ACTIVSg200.m | 1 | 2 | 0.013 |
++--------------------------+------------+-----------------+----------+
+| case24_ieee_rts.m | 1 | 4 | 0.014 |
++--------------------------+------------+-----------------+----------+
+| case300.m | 1 | 5 | 0.026 |
++--------------------------+------------+-----------------+----------+
+| case6495rte.m | 1 | 5 | 0.204 |
++--------------------------+------------+-----------------+----------+
+| case39.m | 1 | 1 | 0.009 |
++--------------------------+------------+-----------------+----------+
+| case18.m | 1 | 4 | 0.013 |
++--------------------------+------------+-----------------+----------+
+| case_RTS_GMLC.m | 1 | 3 | 0.014 |
++--------------------------+------------+-----------------+----------+
+| case1951rte.m | 1 | 3 | 0.047 |
++--------------------------+------------+-----------------+----------+
+| case6ww.m | 1 | 3 | 0.010 |
++--------------------------+------------+-----------------+----------+
+| case5.m | 1 | 3 | 0.010 |
++--------------------------+------------+-----------------+----------+
+| case69.m | 1 | 3 | 0.014 |
++--------------------------+------------+-----------------+----------+
+| case6515rte.m | 1 | 4 | 0.168 |
++--------------------------+------------+-----------------+----------+
+| case2383wp.m | 1 | 6 | 0.084 |
++--------------------------+------------+-----------------+----------+
+| case30Q.m | 1 | 3 | 0.011 |
++--------------------------+------------+-----------------+----------+
+| case2868rte.m | 1 | 4 | 0.074 |
++--------------------------+------------+-----------------+----------+
+| case1354pegase.m | 1 | 4 | 0.047 |
++--------------------------+------------+-----------------+----------+
+| case2848rte.m | 1 | 3 | 0.063 |
++--------------------------+------------+-----------------+----------+
+| case4_dist.m | 1 | 3 | 0.010 |
++--------------------------+------------+-----------------+----------+
+| case6470rte.m | 1 | 4 | 0.175 |
++--------------------------+------------+-----------------+----------+
+| case2746wp.m | 1 | 4 | 0.074 |
++--------------------------+------------+-----------------+----------+
+| case_SyntheticUSA.m | 1 | 21 | 11.120 |
++--------------------------+------------+-----------------+----------+
+| case118.m | 1 | 3 | 0.014 |
++--------------------------+------------+-----------------+----------+
+| case30pwl.m | 1 | 3 | 0.021 |
++--------------------------+------------+-----------------+----------+
+| case57.m | 1 | 3 | 0.017 |
++--------------------------+------------+-----------------+----------+
+| case89pegase.m | 1 | 5 | 0.024 |
++--------------------------+------------+-----------------+----------+
+| case6468rte.m | 1 | 6 | 0.232 |
++--------------------------+------------+-----------------+----------+
+| case2746wop.m | 1 | 4 | 0.075 |
++--------------------------+------------+-----------------+----------+
+| case85.m | 1 | 3 | 0.011 |
++--------------------------+------------+-----------------+----------+
+| case22.m | 1 | 2 | 0.008 |
++--------------------------+------------+-----------------+----------+
+| case4gs.m | 1 | 3 | 0.012 |
++--------------------------+------------+-----------------+----------+
+| case14.m | 1 | 2 | 0.010 |
++--------------------------+------------+-----------------+----------+
+| case_ACTIVSg10k.m | 1 | 4 | 0.251 |
++--------------------------+------------+-----------------+----------+
+| case2869pegase.m | 1 | 6 | 0.136 |
++--------------------------+------------+-----------------+----------+
+| case_ieee30.m | 1 | 2 | 0.010 |
++--------------------------+------------+-----------------+----------+
+| case2737sop.m | 1 | 5 | 0.087 |
++--------------------------+------------+-----------------+----------+
+| case9target.m | 1 | 5 | 0.013 |
++--------------------------+------------+-----------------+----------+
+| case1888rte.m | 1 | 2 | 0.037 |
++--------------------------+------------+-----------------+----------+
+| case145.m | 1 | 3 | 0.018 |
++--------------------------+------------+-----------------+----------+
+| case_ACTIVSg2000.m | 1 | 3 | 0.059 |
++--------------------------+------------+-----------------+----------+
+| case_ACTIVSg70k.m | 1 | 15 | 7.043 |
++--------------------------+------------+-----------------+----------+
+| case9241pegase.m | 1 | 6 | 0.497 |
++--------------------------+------------+-----------------+----------+
+| case9.m | 1 | 3 | 0.010 |
++--------------------------+------------+-----------------+----------+
+| case141.m | 1 | 3 | 0.012 |
++--------------------------+------------+-----------------+----------+
+| case_ACTIVSg25k.m | 1 | 7 | 1.040 |
++--------------------------+------------+-----------------+----------+
+| case118.m | 1 | 3 | 0.015 |
++--------------------------+------------+-----------------+----------+
+| case1354pegase.m | 1 | 4 | 0.048 |
++--------------------------+------------+-----------------+----------+
+| case13659pegase.m | 1 | 5 | 0.523 |
++--------------------------+------------+-----------------+----------+
+| case14.m | 1 | 2 | 0.011 |
++--------------------------+------------+-----------------+----------+
+| case141.m | 1 | 3 | 0.013 |
++--------------------------+------------+-----------------+----------+
+| case145.m | 1 | 3 | 0.017 |
++--------------------------+------------+-----------------+----------+
+| case18.m | 1 | 4 | 0.012 |
++--------------------------+------------+-----------------+----------+
+| case1888rte.m | 1 | 2 | 0.037 |
++--------------------------+------------+-----------------+----------+
+| case1951rte.m | 1 | 3 | 0.052 |
++--------------------------+------------+-----------------+----------+
+| case22.m | 1 | 2 | 0.011 |
++--------------------------+------------+-----------------+----------+
+| case2383wp.m | 1 | 6 | 0.086 |
++--------------------------+------------+-----------------+----------+
+| case24_ieee_rts.m | 1 | 4 | 0.015 |
++--------------------------+------------+-----------------+----------+
+| case2736sp.m | 1 | 4 | 0.074 |
++--------------------------+------------+-----------------+----------+
+| case2737sop.m | 1 | 5 | 0.108 |
++--------------------------+------------+-----------------+----------+
+| case2746wop.m | 1 | 4 | 0.093 |
++--------------------------+------------+-----------------+----------+
+| case2746wp.m | 1 | 4 | 0.089 |
++--------------------------+------------+-----------------+----------+
+| case2848rte.m | 1 | 3 | 0.065 |
++--------------------------+------------+-----------------+----------+
+| case2868rte.m | 1 | 4 | 0.079 |
++--------------------------+------------+-----------------+----------+
+| case2869pegase.m | 1 | 6 | 0.137 |
++--------------------------+------------+-----------------+----------+
+| case30.m | 1 | 3 | 0.033 |
++--------------------------+------------+-----------------+----------+
+| case300.m | 1 | 5 | 0.102 |
++--------------------------+------------+-----------------+----------+
+| case30Q.m | 1 | 3 | 0.013 |
++--------------------------+------------+-----------------+----------+
+| case30pwl.m | 1 | 3 | 0.013 |
++--------------------------+------------+-----------------+----------+
+| case39.m | 1 | 1 | 0.008 |
++--------------------------+------------+-----------------+----------+
+| case4_dist.m | 1 | 3 | 0.010 |
++--------------------------+------------+-----------------+----------+
+| case4gs.m | 1 | 3 | 0.010 |
++--------------------------+------------+-----------------+----------+
+| case5.m | 1 | 3 | 0.011 |
++--------------------------+------------+-----------------+----------+
+| case57.m | 1 | 3 | 0.015 |
++--------------------------+------------+-----------------+----------+
+| case6468rte.m | 1 | 6 | 0.229 |
++--------------------------+------------+-----------------+----------+
+| case6470rte.m | 1 | 4 | 0.170 |
++--------------------------+------------+-----------------+----------+
+| case6495rte.m | 1 | 5 | 0.198 |
++--------------------------+------------+-----------------+----------+
+| case6515rte.m | 1 | 4 | 0.169 |
++--------------------------+------------+-----------------+----------+
+| case69.m | 1 | 3 | 0.012 |
++--------------------------+------------+-----------------+----------+
+| case6ww.m | 1 | 3 | 0.011 |
++--------------------------+------------+-----------------+----------+
+| case85.m | 1 | 3 | 0.013 |
++--------------------------+------------+-----------------+----------+
+| case89pegase.m | 1 | 5 | 0.020 |
++--------------------------+------------+-----------------+----------+
+| case9.m | 1 | 3 | 0.010 |
++--------------------------+------------+-----------------+----------+
+| case9241pegase.m | 1 | 6 | 0.487 |
++--------------------------+------------+-----------------+----------+
+| case9Q.m | 1 | 3 | 0.013 |
++--------------------------+------------+-----------------+----------+
+| case9target.m | 1 | 5 | 0.015 |
++--------------------------+------------+-----------------+----------+
+| case_ACTIVSg10k.m | 1 | 4 | 0.257 |
++--------------------------+------------+-----------------+----------+
+| case_ACTIVSg200.m | 1 | 2 | 0.014 |
++--------------------------+------------+-----------------+----------+
+| case_ACTIVSg2000.m | 1 | 3 | 0.058 |
++--------------------------+------------+-----------------+----------+
+| case_ACTIVSg25k.m | 1 | 7 | 1.118 |
++--------------------------+------------+-----------------+----------+
+| case_ACTIVSg500.m | 1 | 3 | 0.027 |
++--------------------------+------------+-----------------+----------+
+| case_ACTIVSg70k.m | 1 | 15 | 6.931 |
++--------------------------+------------+-----------------+----------+
+| case_RTS_GMLC.m | 1 | 3 | 0.014 |
++--------------------------+------------+-----------------+----------+
+| case_SyntheticUSA.m | 1 | 21 | 11.103 |
++--------------------------+------------+-----------------+----------+
+| case_ieee30.m | 1 | 2 | 0.010 |
++--------------------------+------------+-----------------+----------+
+| case3375wp.m | 0 | - | 0.061 |
++--------------------------+------------+-----------------+----------+
+| case33bw.m | 0 | - | 0.007 |
++--------------------------+------------+-----------------+----------+
+| case3120sp.m | 0 | - | 0.037 |
++--------------------------+------------+-----------------+----------+
+| case3012wp.m | 0 | - | 0.082 |
++--------------------------+------------+-----------------+----------+
+| case3120sp.m | 0 | - | 0.039 |
++--------------------------+------------+-----------------+----------+
+| case3375wp.m | 0 | - | 0.059 |
++--------------------------+------------+-----------------+----------+
+| case33bw.m | 0 | - | 0.007 |
++--------------------------+------------+-----------------+----------+
+
+PSS/E Dyr Parser
+================
+ANDES supporting parsing PSS/E dynamic files in the format of ``.dyr``.
+Support new dynamic models can be added by editing the input and output
+conversion definition file in ``andes/io/psse-dyr.yaml``,
+which is in the standard YAML format.
+To add support for a new dynamic model, it is recommended to start with
+an existing model of similar functionality.
+
+Consider a ``GENCLS`` entry in a dyr file. The entry looks like ::
+
+ 1 'GENCLS' 1 13.0000 0.000000 /
+
+where the fields are in the order of bus index, model name,
+generator index on the bus, inertia (H) and damping coefficient (D).
+
+The input-output conversion definition for GENCLS is as follows ::
+
+ GENCLS:
+ destination: GENCLS
+ inputs:
+ - BUS
+ - ID
+ - H
+ - D
+ find:
+ gen:
+ StaticGen:
+ bus: BUS
+ subidx: ID
+ get:
+ u:
+ StaticGen:
+ src: u
+ idx: gen
+ Sn:
+ StaticGen:
+ src: Sn
+ idx: gen
+ Vn:
+ Bus:
+ src: Vn
+ idx: BUS
+ ra:
+ StaticGen:
+ src: ra
+ idx: gen
+ xs:
+ StaticGen:
+ src: xs
+ idx: gen
+ outputs:
+ u: u
+ bus: BUS
+ gen: gen
+ Sn: Sn
+ Vn: Vn
+ D: D
+ M: "GENCLS.H; lambda x: 2 * x"
+ ra: ra
+ xd1: xs
+
+It begins with a base-level definition of the model name to be parsed from the
+dyr file, namely, ``GENCLS``. Five directives can be defined for each model:
+``destination``, ``inputs``, ``outputs``, ``find`` and ``get``.
+Note that ``find`` and ``get`` are optional, but the other three are mandatory.
+
+- ``destination`` is ANDES model to which the original PSS/E model will be
+ converted. In this case, the ANDES model have the same name ``GENCLS``.
+- ``inputs`` is a list of the parameter names for the PSS/E data.
+ Arbitrary names can be used, but it is recommended to use the same notation
+ following the PSS/E manual.
+- ``outputs`` is a dictionary where the keys are the ANDES model parameter and
+ the values are the input parameter or lambda functions that processes the inputs
+ (see notes below).
+- ``find`` is a dictionary with the keys being the temporary parameter name to store
+ the ``idx`` of
+ external devices and the values being the criteria to locate the devices.
+ In the example above, ``GENCLS`` will try to find the ``idx`` of ``StaticGen``
+ with ``bus == BUS`` and the ``subidx == ID``, where ``BUS`` and ``ID`` are from
+ the dyr file.
+- ``get`` is a dictionary with each key being a temporary parameter name for storing
+ an external parameter and each value being the criteria to find the external parameter.
+ In the example above, a temporary parameter ``u`` is the ``u`` parameter of ``StaticGen``
+ whose ``idx == gen``. Note that ``gen`` is the ``idx`` of ``StaticGen`` retrieved
+ in the above ``find`` section.
+
+For the ``inputs`` section, one will need to skip the model name
+because for any model, the second field is always the model name.
+That is why for ``GENCLS`` below, we only list four input parameters. ::
+
+ 1 'GENCLS' 1 13.0000 0.000000 /
+
+For the ``outputs`` section, the order can be arbitrary, but it is recommended
+to follow the input order as much as possible for maintainability.
+In particular, the right-hand-side of the outputs can be either an input parameter name
+or an anonymous expression that processes the input parameters.
+For the example of GENCLS, since ANDES internally uses the parameter of ``M = 2H``,
+the input ``H`` needs to be multiplied by 2.
+It is done by the following ::
+
+ M: "GENCLS.H; lambda x: 2 * x"
+
+where the left-hand-side is the output parameter name (destination ANDES model parameter name),
+and the right-hand-side is arguments and the lambda function separated by semi-colon, all in a
+pair of double quotation marks.
+Multiple arguments are accepted and should be separated by comma.
+Arguments can come from the same model or another model.
+In the case of the same model, the model name can be neglected, namely, by writing
+``M: "H; lambda x: 2 * x"``.
diff --git a/docs/source/conf.py b/docs/source/conf.py
new file mode 100644
index 0000000..cd74f6f
--- /dev/null
+++ b/docs/source/conf.py
@@ -0,0 +1,210 @@
+#!/usr/bin/env python3
+# -*- coding: utf-8 -*-
+#
+# ANDES documentation build configuration file, created by
+# sphinx-quickstart on Thu Jun 28 12:35:56 2018.
+#
+# This file is execfile()d with the current directory set to its
+# containing dir.
+#
+# Note that not all possible configuration values are present in this
+# autogenerated file.
+#
+# All configuration values have a default; values that are commented out
+# serve to show the default.
+
+# If extensions (or modules to document with autodoc) are in another directory,
+# add these directories to sys.path here. If the directory is relative to the
+# documentation root, use os.path.abspath to make it absolute, like shown here.
+#
+# import os
+# import sys
+# sys.path.insert(0, os.path.abspath('.'))
+
+# -- General configuration ------------------------------------------------
+
+# If your documentation needs a minimal Sphinx version, state it here.
+#
+# needs_sphinx = '1.0'
+
+# Add any Sphinx extension module names here, as strings. They can be
+# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
+# ones.
+extensions = [
+ 'sphinx.ext.autodoc',
+ 'sphinx.ext.autosummary',
+ 'sphinx.ext.githubpages',
+ 'sphinx.ext.intersphinx',
+ 'sphinx.ext.mathjax',
+ 'sphinx.ext.viewcode',
+ 'IPython.sphinxext.ipython_directive',
+ 'IPython.sphinxext.ipython_console_highlighting',
+ 'matplotlib.sphinxext.plot_directive',
+ 'numpydoc',
+ 'sphinx_copybutton',
+]
+
+# Configuration options for plot_directive. See:
+# https://github.com/matplotlib/matplotlib/blob/f3ed922d935751e08494e5fb5311d3050a3b637b/lib/matplotlib/sphinxext/plot_directive.py#L81
+plot_html_show_source_link = False
+plot_html_show_formats = False
+
+# Generate the API documentation when building
+autosummary_generate = True
+numpydoc_show_class_members = False
+
+# Add any paths that contain templates here, relative to this directory.
+templates_path = ['_templates']
+
+# The suffix(es) of source filenames.
+# You can specify multiple suffix as a list of string:
+#
+# source_suffix = ['.rst', '.md']
+source_suffix = '.rst'
+
+# The master toctree document.
+master_doc = 'index'
+
+# General information about the project.
+project = 'ANDES'
+copyright = '2021, Hantao Cui'
+author = 'Hantao Cui'
+
+# The version info for the project you're documenting, acts as replacement for
+# |version| and |release|, also used in various other places throughout the
+# built documents.
+
+import andes
+# The short X.Y version.
+version = andes.__version__
+# The full version, including alpha/beta/rc tags.
+release = andes.__version__
+
+# The language for content autogenerated by Sphinx. Refer to documentation
+# for a list of supported languages.
+#
+# This is also used if you do content translation via gettext catalogs.
+# Usually you set "language" from the command line for these cases.
+language = None
+
+# List of patterns, relative to source directory, that match files and
+# directories to ignore when looking for source files.
+# This patterns also effect to html_static_path and html_extra_path
+exclude_patterns = []
+
+# The name of the Pygments (syntax highlighting) style to use.
+pygments_style = 'sphinx'
+
+# If true, `todo` and `todoList` produce output, else they produce nothing.
+todo_include_todos = False
+
+
+# -- Options for HTML output ----------------------------------------------
+
+# The theme to use for HTML and HTML Help pages. See the documentation for
+# a list of builtin themes.
+#
+html_theme = 'sphinx_rtd_theme'
+import sphinx_rtd_theme
+html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
+
+# Theme options are theme-specific and customize the look and feel of a theme
+# further. For a list of options available for each theme, see the
+# documentation.
+#
+# html_theme_options = {}
+
+# Add any paths that contain custom static files (such as style sheets) here,
+# relative to this directory. They are copied after the builtin static files,
+# so a file named "default.css" will overwrite the builtin "default.css".
+html_static_path = ['_static']
+
+# Custom sidebar templates, must be a dictionary that maps document names
+# to template names.
+#
+# This is required for the alabaster theme
+# refs: http://alabaster.readthedocs.io/en/latest/installation.html#sidebars
+html_sidebars = {
+ '**': [
+ 'relations.html', # needs 'show_related': True theme option to display
+ 'searchbox.html',
+ ]
+}
+
+
+# -- Options for HTMLHelp output ------------------------------------------
+
+# Output file base name for HTML help builder.
+htmlhelp_basename = 'andes'
+
+
+# -- Options for LaTeX output ---------------------------------------------
+
+latex_elements = {
+ # The paper size ('letterpaper' or 'a4paper').
+ #
+ 'preamble': r'\DeclareUnicodeCharacter{2588}{-}',
+ 'papersize': 'letterpaper',
+
+ # The font size ('10pt', '11pt' or '12pt').
+ #
+ 'pointsize': '11pt',
+
+ # Additional stuff for the LaTeX preamble.
+ #
+ # 'preamble': '',
+
+ # Latex figure (float) alignment
+ #
+ # 'figure_align': 'htbp',
+}
+
+# Grouping the document tree into LaTeX files. List of tuples
+# (source start file, target name, title,
+# author, documentclass [howto, manual, or own class]).
+latex_documents = [
+ (master_doc, 'andes.tex', 'ANDES Manual',
+ 'Hantao Cui', 'manual'),
+]
+
+
+# -- Options for manual page output ---------------------------------------
+
+# One entry per manual page. List of tuples
+# (source start file, name, description, authors, manual section).
+man_pages = [
+ (master_doc, 'andes', 'ANDES Manual',
+ [author], 1)
+]
+
+
+# -- Options for Texinfo output -------------------------------------------
+
+# Grouping the document tree into Texinfo files. List of tuples
+# (source start file, target name, title, author,
+# dir menu entry, description, category)
+texinfo_documents = [
+ (master_doc, 'andes', 'ANDES Manual',
+ author, 'andes', 'Python Software for Symbolic Power System Modeling and Numerical Analysis',
+ 'Miscellaneous'),
+]
+
+
+# Example configuration for intersphinx: refer to the Python standard library.
+intersphinx_mapping = {
+ 'python': ('https://docs.python.org/3/', None),
+ '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),
+}
+
+# Favorite icon
+html_favicon = 'images/curent.ico'
+
+
+# Disable smartquotes to display double dashes correctly
+smartquotes = False
+
+# import and execute model reference generation script
+exec(open("modelref.py").read())
diff --git a/docs/source/copyright.rst b/docs/source/copyright.rst
new file mode 100644
index 0000000..0f56c15
--- /dev/null
+++ b/docs/source/copyright.rst
@@ -0,0 +1,23 @@
+.. role:: raw-html(raw)
+ :format: html
+
+*******
+License
+*******
+
+GNU Public License v3
+*********************
+| Copyright :raw-html:`©` 2015-2020 Hantao Cui.
+
+ANDES is free software; you can redistribute it and/or modify it under
+the terms of the
+`GNU General Public License