Release notes#

The APIs before v3.0.0 are in beta and may change without prior notice.

v2.0 Notes#

v2.0.0 (2026-03-11)#

Modeling framework changes:

  • Add universal ue (effective online status) field to the base Model class. Models should use ue instead of u in equations so that parent-offline status automatically disables children.

  • Add status_parent=True flag to IdxParam for declaring parent-child status relationships (e.g., Exciter->SynGen, PSS->Exciter).

  • Add System.set_status() / get_status() API for setting device status with recursive propagation of ue = u * parent.ue to downstream controllers via BackRef.

  • Add propagate_init_status() for init-time status propagation, replacing the old per-model ug/uee ExtParam mechanism.

  • Add DAE compaction to remove replaced static generators' algebraic variables from the Newton-Raphson system during TDS, reducing system size for dynamics-heavy cases.

  • Add Observable variable type for substitution-based recording without adding variables to the DAE system.

  • Add two-pass initialization with block-to-Observable conversions and discrete dependency tracking.

  • Add pre-evaluation of discrete flags before the initialization pass.

  • Add nonmonotone backtracking line search to the Newton-Raphson solver in both PFlow and TDS for improved convergence robustness.

  • Separate j_numeric into two hooks: j_setup (one-time sparsity pattern and constant Jacobian registration, called by store_sparse_pattern) and j_numeric (per-iteration numerical Jacobian update, called by j_update, parallel to g_numeric/f_numeric). Add flags.j_setup for the former; flags.j_num now controls the per-iteration hook.

Model changes:

  • Add SHAFT5 5-mass torsional shaft model (HP-IP-LP-Rotor-EX) for sub-synchronous resonance studies on synchronous generators. Includes DynShaft group and IEEE 14-bus test case (ieee14_shaft5.json).

  • Add REECB1 renewable energy control model with test cases.

  • Remove ug ExtParam and custom ue ConstService from ExcBase and TGBase; now inherited from the base Model class.

  • Remove uee ExtService and custom ue ConstService from PSSBase.

  • Rename DGPrct ue Algeb (lock flag) to lock to avoid collision with the new base ue.

  • Fix EXDC2 Se0 formula to use ue instead of removed ug.

  • Enable AntiWindup init limit adjustment and fix REEC models.

  • Fix zero_out bypass in LeadLag and LeadLag2ndOrd blocks.

  • Add FreqDiv frequency divider model (Milano & Ortega 2017) for algebraic bus frequency estimation from generator rotor speeds and network susceptance. Uses constant Jacobians via j_setup for zero per-iteration overhead.

Eigenvalue analysis:

  • Replace permutation-based reorder with a fold/eliminate/reduce pipeline in eigenvalue analysis for improved numerical robustness.

State estimation:

  • Add LAV (Least Absolute Value) estimator via iteratively reweighted least squares (IRLS), robust to gross measurement errors. Pass algorithm=lav to SE.run().

  • Vectorize weight handling in both WLS and LAV to avoid dense diagonal matrix construction.

  • Add chi-squared test guard that rejects with a warning for non-WLS algorithms.

  • Raise default max_iter from 20 to 100 for IRLS convergence.

Time-domain simulation:

  • Add QNDF variable-order (1–5) quasi-constant-step NDF integration method (Shampine & Reichelt 1997, equivalent to MATLAB ode15s / Julia QNDF()). Select with ss.TDS.config.method = 'qndf'. Features error-based adaptive step control with abstol/reltol tolerances, automatic order selection, D-table rescaling, and event-aware cache reset.

  • Add trap_adapt adaptive trapezoidal integration method with step-doubling Richardson extrapolation for local truncation error (LTE) estimation. Select with ss.TDS.config.method = 'trap_adapt'. Features abstol/reltol error control, no-LTE recovery mode near events, and automatic fixt=0 override.

  • Add dtmax TDS config parameter to explicitly cap the maximum step size for variable-step methods (0 = auto from frequency and time span).

  • Refactor step-size control into polymorphic calc_h() on each integration method class, replacing the monolithic if/elif/else chain in TDS.calc_h. Extract shared niter-based heuristic into ImplicitIter.niter_next_h() and shared adaptive bust-check into check_adaptive_bust().

  • Add requires_variable_step class attribute to integration methods, replacing the removed adaptive flag.

  • Add TDS.reinit() for fast idempotent reset to the post-init state, enabling RL training loops with ~1ms per reset instead of full reload. Restores DAE state (x, y), device status (u, ue), ConstService values, and NumParam values, then re-derives discrete flags and residuals via fg_update(init=True). Internally, Model.snapshot_init() / Model.restore_init() save and restore model-level mutable state; NumParam and ConstService each store a _v_t0 snapshot.

Reinforcement learning:

  • Add andes.rl module with AndesEnv, a Gymnasium-compatible environment for reinforcement learning on power system dynamics. Supports configurable observations (with optional device idx selection), group-level and model-level action setpoints, custom reward and disturbance functions, and fast reset via TDS.reinit(). Install with pip install andes[rl].

  • Add tutorial notebook (Tutorial 15: Reinforcement Learning) covering environment construction, observation and action specification, reward function design, disturbance injection, policy comparison, and integration with Stable-Baselines3.

PSS/E parser:

  • Refactor RAW parser to a data-driven architecture with PSS/E v34 support.

  • Fix DYR parser to handle embedded quoted strings and comma-separated values.

Refactoring:

  • Refactor System internals by extracting RegistryLoader and CodegenManager; prefer direct calls via system.registry.* and system.codegen.*, with legacy System delegate methods deprecated for removal in v3.0.

  • Convert the System module into a package and extract DAECompactor.

  • Extract config runtime logic into SystemConfigRuntime (andes.system.config_runtime); prefer system.config_runtime.* over facade-level helpers. Legacy wrappers in andes.system.facade are deprecated and scheduled for removal in v3.0.

  • Extract model evaluator logic into ModelEvaluator (andes.core.model.model_evaluator) using composition. Keep Model methods (f_update, g_update, j_update, service/discrete updates, and input refreshers) as delegate wrappers to preserve call sites.

  • Move connectivity check into ConnMan and optimize.

  • Replace ConnMan bus propagation with declarative status framework.

  • Refactor SystemConfigRuntime into phased config resolution (load_rcmerge_file_configapply_cli_overridesfinalize) and restructure System.__init__ with _init_managers / _init_models helpers.

  • Split System.config into system.config (case-relevant: freq, mva, diag_eps, warn_abnormal) and system.runtime (machine/environment: numba, sparselib, dime_*, np_*, etc.). Only case config is written to data files; runtime config persists in andes.rc under [Runtime].

  • Move per-routine sparselib to system-wide system.runtime.sparselib.

  • Add Config.check() warning for unrecognized config fields (typos, misplaced keys) and Config._add() warning for fields moved to [Runtime] in v2.0.

I/O:

  • Add embedded configuration support: xlsx files gain a _config sheet and JSON files gain a _config key, both using a section/key/value record format. File-embedded config overrides andes.rc defaults but is itself overridden by CLI config_option.

  • Route u changes through set_status and remove Bus.set override.

  • Replace ModelCache boilerplate with declarative registration.

  • Rewrite TDS init error diagnostics with limit clamping report and DAE reverse map.

I/O and file loading:

  • Extend --addfile (-a) to accept multiple files and support cross-format loading. Any supported format (xlsx, json, matpower) can be used as an additional file on top of any base case format. The -a flag can be repeated on the command line (e.g., -a f1.dyr -a f2.xlsx), and the Python API accepts both a string and a list.

API improvements:

  • Consolidate set() and alter() into a unified set() method with a cleaner positional signature: set(src, idx, value, base=None). The old alter() method is deprecated and will be removed in v3.0. See the upgrade guide below.

  • Add TDS.get_timeseries(var) convenience method that returns time-series data as a pandas DataFrame, dispatching automatically by variable type (State, Algeb, ExtState, ExtAlgeb, Observable).

  • Add fuzzy-match warnings for unrecognized field names in System.add(), suggesting close matches with difflib.get_close_matches.

  • Rename System.add() first positional parameter from model to model_name to resolve the keyword collision with Alter and Toggle's model device parameter. All models (including Alter and Toggle) can now use kwargs: ss.add('Toggle', model='Line', dev='Line_5', t=1.0). Dict form remains supported for backward compatibility.

  • Add CPF.run_qv() and CPF.plot_qv() for QV curve analysis at a specified bus. Delegates to the existing continuation engine with Q-only targets; results stored in qv_q, qv_v, and qv_bus.

  • Add Plotly backend for interactive TDS plots in Jupyter notebooks via ss.TDS.plt.plot(..., backend='plotly'). Supports zoom, pan, hover tooltips, horizontal/vertical reference lines, figure reuse, and HTML export. LaTeX legend labels are automatically replaced with plain text.

Packaging:

  • Make numba an optional dependency. Install with pip install andes[performance] to enable Numba JIT compilation. ANDES runs without numba by default (runtime.numba = 0); if numba is enabled but not installed, a warning is logged and execution continues without JIT.

Upgrade guide — set() / alter() consolidation:

  • alter()set() with base='device': alter() accepted values in device (input) base, converted them via pu_coeff, and updated the vin record. The new equivalent is set(..., base='device').

    # Before (deprecated, emits FutureWarning):
    ss.GENROU.alter('M', 1, 10.0)
    
    # After:
    ss.GENROU.set('M', 1, 10.0, base='device')
    
  • set() old-style keyword arguments: The old set(src, idx, attr, value) four-argument form is deprecated. Drop the attr argument (it defaults to 'v'):

    # Before (deprecated, emits FutureWarning):
    ss.GENROU.set('M', 'GENROU_1', 'v', 2.0)
    
    # After:
    ss.GENROU.set('M', 'GENROU_1', 2.0)
    
  • Default base is system base: set(src, idx, value) writes the value directly in system per-unit, matching what get() returns. This makes read-modify-write round-trips correct without conversion:

    h = ss.GENROU.get('M', 'GENROU_1')   # system-base value
    ss.GENROU.set('M', 'GENROU_1', h * 1.2)   # 20% increase, same base
    
  • Time constant updates are automatic: When modifying a time constant parameter (one whose variable has a t_const attribute), set() automatically updates dae.Tf and TDS.Teye.

Logging:

  • Unify all runtime output through Python's logging module with a single TqdmStreamHandler that delegates to tqdm.write() to avoid corrupting progress bars. Removes 9 ad-hoc tqdm.write() call sites and their system.options["verbose"] guards. Timer events (Toggle, Fault, Alter, TimeSeries) log at INFO; convergence diagnostics (daeint, QNDF) log at DEBUG. Verbosity is now controlled entirely by logging.setLevel() (CLI: andes -v 10 for DEBUG, -v 30 for WARNING-only). Library callers (e.g., andes.rl) are silent by default since no handler is installed without an explicit config_logger() call.

  • Convert operational print() calls in codegen.py and io/txt.py to logger.info() / logger.error(). CLI user-facing output (print_license, versioninfo, plot) remains as print().

Bug fixes:

  • TDS no longer checks connectivity at initialization time.

  • Fix pflow_tds not updated during TDS initialization.

  • Guard save_unconstrained against non-numeric u.v in discrete components.

  • Disable discrete warning when initialized value is exactly at the limit.

  • Clarify error message for device lookup failures in find_idx.

  • Show slack generator count and bus indices in connectivity warning.

  • Pin pandas version for pandapower compatibility.

v1.10 Notes#

v1.10.1 (2026-03-09)#

  • Fix zero_out bypass in LeadLag and LeadLag2ndOrd blocks. LeadLag now checks only T2 (not both T1 and T2) to activate bypass. LeadLag2ndOrd also checks only T2 instead of requiring all four time constants to be zero.

  • Replace permutation-based eigenvalue reorder with a fold/eliminate/reduce pipeline in EIG routine. Fixes singular matrix errors for cases with zero-Tf states and degenerate model equations.

  • Fix PSS/E convention for tap ratios in _parse_transf_v33; zero taps default to 1.0 pu.

  • Suppress tqdm output when logging level is higher than INFO.

  • Batch parameter correction warnings during setup. Instead of logging one warning per device, corrections (non-zero, non-positive, non-negative) are now grouped and reported once per violation type after all devices are added.

v1.10.0 (2026-01-05)#

This release modernizes the build system and adds Pandapower 3 compatibility. The release also includes a major documentation overhaul.

Build system changes:

  • Migrate to pyproject.toml and remove setup.py support.

  • Remove Azure Pipelines configuration; CI is now handled entirely by GitHub Actions.

  • Remove versioneer.py in favor of modern versioning.

Pandapower compatibility:

  • Update pandapower interface to version 3.x compatibility.

  • Fix interop and tests to be compatible with Pandapower 3.

PSS/E parser improvements:

  • Refactor PSS/E data parsing functions to improve readability and maintainability.

  • Enhance PSS/E RAW parser to support 3-winding transformers with CZ=3 and CM=2. Implement conversion of load loss and impedance to R and X, and no-load loss and excitation current to G and B.

  • Enhance PSS/E RAW parser to correctly handle quoted strings with commas and slashes.

  • Correct a typo in the PSS/E DYR parser, changing "Tprod" to "Tpord".

Bug fixes:

  • Fix PVD1 frequency deadband to only respond to downward frequency deviations. Contributed by @J-K-Peng.

  • Fix a bug in line model that causes incorrect admittance matrix.

  • Fix NumPy NaN compatibility issue in Model.set().

  • In connectivity check, only call SynGen.store_idx_island when there is at least one SynGen.

Documentation improvements:

  • Overhaul the documentation to use MyST and Sphinx 7.0.

Other changes:

  • Enhance Model.set() to support assigning values when the destination is a list. Contributed by @jinningwang.

  • Add ipywidgets to dependencies.

  • Update dependencies in pyproject.toml for compatibility and version constraints.

  • Add a demo QSTS.ipynb to show how to run QSTS simulation in ANDES. See folder andes/examples/demonstration. Contributed by @jinningwang.

  • Update broken link to ESST1A exciter documentation. Contributed by @isilber.

v1.9 Notes#

v1.9.3 (2025-01-05)#

Development of connectivity manager ConnMan:

  • Add case ieee14_conn.xlsx for demonstration.

  • Add ConnMan class to manage connectivity.

  • Add ConnMan to System to as an attribute conn.

  • Add a demo notebook ConnMan.ipynb. See folder andes/examples/demonstration.

Other changes:

  • In the dae module, change self.t.itemset to array assignment to ensure compatibility with NumPy 2.0.

  • Follow RTD's deprecation of Sphinx context injection at build time

  • In symbolic processor, most variables are assumed to be real, except some services that are specified as complex. This will allow generating simplified expressions.

  • Adjust BusFreq.Tw.default to 0.1.

  • Add parameter from_csv=None in TDS.run() to allow loading data from CSV files at TDS begining.

  • Fix TDS.init() and TDS._csv_step() to fit loading from CSV when Output exists.

  • Add function signature allow_all=False to ModelData.find_idx() GroupBase.find_idx() to allow searching all matches.

  • Enhanced three-winding transformer parsing in PSS/E raw files by assigning the equivalent star bus area, owner, and zone using the high-voltage bus values.

  • Add function signature attr='v' to method Model.alter for altering parameter values without manual per unit conversion

  • Add following methods to GroupBase for easier usage: get_all_idxes, alter, as_dict, and as_df

  • Add two demo add_RenGen.ipynb and replace_SynGen.ipynb to show how to do renewable penetration via code. See folder andes/examples/demonstration

  • Add a demo manipulate_params.ipynb to compare the differnce between set and alter

  • Extend SynGen common parameters with bus, gen, Sn, Vn, and fn

  • Extend StaticGen common parameters with bus

  • Fix TDS.init() and TDS._csv_step() to fit loading from CSV when Output exists.

  • Add parameter allow_all=False to ModelData.find_idx() GroupBase.find_idx() to allow searching all matches.

  • Add method GroupBase.get_all_idxes() to get all indices of a group.

  • Enhanced three-winding transformer parsing in PSS/E raw files by assigning the equivalent star bus area, owner, and zone using the high-voltage bus values.

  • Minor fix on model TGOV1NDB

  • Clarification on models ACEc and ACE given NERC's definition, as NERC suggesst that both bias and beta should be nevative

  • Minor fixes for finding dvipng executable.

v1.9.2 (2024-03-25)#

  • Improve PSS/E parser for the wmod field in the static generator section.

  • Consider line status when parsing PSS/E file.

  • Added functions in Line for building network admittance matrix, Bdc matrix for DC power flow, and Bp and Bpp matrices for fast decoupled power flow. See build_y, build_b and build_Bdc.

v1.9.1 (2024-02-04)#

This is a hotfix to pass pip check for KVXOPT version.

v1.9.0 (2024-02-01)#

  • Initially, dae.t is set to -1.0 during power flow calculation. TDS initialization will set dae.t = 0.0.

  • Rewritten the islanding detection algorithm.

  • In system.py, import importlib.util to workaround unexported util module in Python 3.10.

v1.8 Notes#

v1.8.10 (2023-08-10)#

  • An internal change to the xlsx parser option. Previously, the index column was set to 0, which assumes the existence of uid as the header. Manually input sheets without uid will fail. This version unsets the index column when using pandas to parse the xlsx file.

  • Jumper is included for connectivity check.

  • Add curly brackets for LaTeX symbols from sub-blocks. Nested symbols with subscripts and superscripts now display properly.

v1.8.9 (2023-06-22)#

  • Fix Model.alter() for parameters that are time constants for differential equations. Altered time constants are now properly updated in dae.Tf and will be correctly reflected in simulation results.

  • Fix a bug in connectivity check.

  • Support numba for Python 3.11.

v1.8.8 (2023-04-24)#

  • Repository transferred to github.com/curent/andes.

  • Fix for frequency-dependent load model FLoad by not exporting the external bus parameter.

v1.8.7 (2023-03-10)#

  • Added IEEE 39-bus test case with dynamics in the ANDES xlsx format. Contributed by @jinningwang.

  • In interop.pandapower, the _verify_pf function will not be called if TDS has been initialized. This prevents the breaking of variable addresses.

v1.8.6 (2023-02-13)#

  • Minor fix in timeseries.py for backward compatibility with Python 3.6.

v1.8.5 (2022-12-22)#

  • Fixed an issue to properly handle turning off a Jumper.

  • New interface to GridCal by @JosepFanals. GridCal installation required.

  • Bug fixes in WTARA1.

v1.8.4 (2022-11-23)#

  • Fixed a bug in time stepping where step sizes were not properly reduced when the solver failed to converge.

v1.8.3 (2022-11-15)#

  • Support Python 3.11. The average performance gain is a few percent.

  • Made numba an optional dependency because it does not yet support Python 3.11.

  • Fixes a bug in the time stepping logic that causes resumed simulations to overwrite the result of the previous final step.

v1.8.2 (2022-10-30)#

This is a minor release to support SymPy 1.11.x.

Internally, ModelData contains a new member field index_bases to record the variables by which other variables are indexed. Most variables, by default, are indexed by idx. Some models (such as COI) whose device can link to multiple other devices can have multiple index bases.

Index bases are currently placeholders and have not been used in the current version.

v1.8.1 (2022-09-24)#

  • New turbine governor model HYGOV4. Thanks to Zaid Mahmood for the contribution.

  • Bug fixes to saving data to xlsx file.

v1.8.0 (2022-08-30)#

  • Internal change: drop the support for reloading generated code from calls.pkl. All generated code are serialized into Python files and reloaded as a pycode module.

  • Fix an issue where cases in multiprocessing fail to serialize due to not being able to find pycode. pycode is now properly imported by the main process.

  • When one needs to serialize a System object, such as during multiprocessing, one needs to manually import pycode. This can be done by calling andes.system.import_pycode().

  • Internal change: serializing with dill is not set to recursive by default.

v1.7 Notes#

v1.7.8 (2022-08-24)#

  • Support marking tests as extra so that they are not run by default. The function names for extra tests should contain extra_test. To run all tests, use andes st -e or andes selftest --extra.

  • Add the new_A flag for sparse solvers to trigger actions. Currently, only the spsolve solver will need to rebuild and refactorize the sparse matrix.

v1.7.7 (2022-08-02)#

  • Implemented a chattering detection and stop algorithm by increasing the step size when chattering is detected.

  • TimeSeries.get_data() works for systems with Output.

  • Allow freezing states associated with anti-windup limiters after a certain number of iterations to prevent chattering.

Models:

  • New exciter models: ESDC1A, EXAC2.

  • New grid-forming inverter models: REGF1, REGF2, REGF3.

  • For IEEEG1, normalize K1 through K8 if they do not sum up to 1.0

v1.7.6 (2022-07-11)#

  • In eigenvalue analysis, added parameter sweeping and scatter plot for root loci. See revised Example 4.

  • Documentation improvements.

v1.7.5 (2022-07-05)#

  • Added Fortescue model to support symmetric component calculation. The model allows interfacing a positive-sequence bus with three buses representing three phases. See the model description for details.

  • Added PLL2 for the Synchronously-rotating Reference Frame (SRF)-based PLL.

  • REGCP1 works identically to REGCA1 when the pll parameter is empty and works with a PLL.

  • REECA1 is updated to work with vd of the converter. If using the REGCA1 model, vd = v.

  • Reverted a change in Line parameter that caused SMIB case to crash.

v1.7.4 (2022-07-01)#

  • Renamed model Toggler to Toggle.

  • New model: ESAC5A. (Contributed by Ahmad Ali).

  • Added documentation for creating disturbances.

  • Updated documentation for modeling blocks.

v1.7.3 (2022-06-25)#

Bug fix:

  • Fix Ipcmd initialization equation of REGCA1.

Improved the interface to pandapower:

  • Improved to_pandapower performance using vectorized conversion.

  • Enhanced make_link_table to include group RenGen.

v1.7.2 (2022-06-07)#

  • Improved documentation and examples.

v1.7.1 (2022-05-31)#

This release contains minor fixes to the documentation.

Other changes:

  • In PVD1, Enable pmx limiting by default.

  • In ST2CUT, fix the type of busr2 and busr to IdxParam.

v1.7.0 (2022-05-22)#

Allow incrementally offloading simulation data from memory to the output file:

  • [TDS].limit_store is a boolean value to enable the limit for in-memory time-series storage. If set to 1, data will be offloaded to the npz file every [TDS].max_store steps. Offloaded data will then be erased from memory.

  • If you need to interact with the time-series data in memory, you need to keep [TDS].limit_store to 0.

Allow specifying models, variables, and/or devices to output:

  • See Output. The model field is mandatory. Leaving varname or dev blank indicates the selection of all applicable elements. For example, specifying model and varname without dev means that the variable for all devices will be exported.

  • Plot tool works with in-memory time-series data specified by Output.

Simulation output control:

  • Allow controlling the save frequency for output data in [TDS].save_every. The default value is 1, which means that every step will be saved. Setting it to 4, for example, will save data every four steps. This setting applies to the in-memory storage and the output data file.

  • Setting save_every = 0 will immediately discard all data after each simulation step.

  • Added the option [TDS].save_mode to change the automatic simulation data dumping to manual. Accepted values are auto and manual. This option shall only be adjusted to manual when one is manually stepping the simulation and wants to avoid writing to the output file when the simulation reaches TDS.config.tf. One will need to call TDS.save_output() when the full simulation concludes to avoid losing unsaved data.

Other changes:

  • Fix the initialization of offline synchronous generators.

  • Allow styles to be set for plots using the argument style. To generate figures for IEEE publications, use style=ieee (require package scienceplots).

  • Moved the writing of the lst file to the first step of simulation.

  • andes misc -C will not remove _out.csv file as it is considered data for post-processing just like exported figures.

v1.6 Notes#

v1.6.6 (2022-04-30)#

  • Rename [System] call_stats to [System] save_stats for clarity. If turned on, one can retrieve statistics of function calls in TDS.call_stats.

  • Store routine execution time to routine member execution_time.

  • Fix PSS/E parsing issues with GAST.

  • Fix issues and update default parameters for REGCV1 and REGCV2.

  • Allow adjusting limits for state variables during initialization. Like for algebraic variables, the default setting automatically adjusts the upper limit but not the lower one.

v1.6.5 (2022-04-19)#

  • Added a TDS stop criteria based on rotor angle separation with reference to Power System Analysis Toolbox.

  • Fix a bug for snapshot save and load. It now supports writing to and reading from io.BytesIO().

v1.6.4 (2022-04-17)#

Breaking change:

  • PV model no longer has p as a variable in the DAE. p copies the value of p0. This change affects the addresses of variables.

  • Changed models.file_classes to a list to improve the control over the class initialization sequence in the same package.

Operator splitting for internal algebraic variables:

  • VarService can be evaluated model-internal algebraic variables outside the DAE system. This approach is known as operator splitting and is commonly used in other simulation tools.

  • Operator splitting reduces the size of the DAE system but introduces a one-iteration lag between the internal algebraic variables and others in the DAE system.

  • VarService shall be avoided for singular functions (non-continuous) and shall not be adopted to circumvent initializing algebraic equations.

  • VarService takes an argument sequential, which is True by default. Non-sequential VarService shall not depend on other VarService calculated at the same step as they will be evaluated simultaneously.

  • andes.interop.pandapower.to_pandapower() set all generators as controllable by default. Generators in converted the pandapower case are named using the idx of StaticGen.

  • Bug fixes in interop.pandapower.make_link_table().

Other changes:

  • Added a new service type andes.core.service.SubsService for temporary symbols that will be substituted at code generation time.

  • TDS.plt.plot() now accepts a list of variable objects. For example, ss.TDS.plt.plot([ss.GENROU.omega, ss.GENROU.delta], a=[0, 1]) will plot the rotor speed and angles of the 0-th and the 1-st generator.

  • Added REGCP1 model for generic converters with PLL support.

  • Fixed PSS/E parser for HYGOV.

v1.6.3 (2022-04-06)#

  • Adjustments in the Pandapower interface. Added make_GSF() for the generation shift factor matrix.

  • Reduced import overhead for the command-line tool.

v1.6.2 (2022-03-27)#

Interoperability:

  • Added interoperability modules for MATPOWER (through Oct2Py), pandapower and pypowsybl.

  • Added Examples and API reference for the interoperability module.

  • Improved the setup script to support extra dependencies. The following extras groups are supported: dev and interop.

  • Added tests for power flow calculation against MATPOWER.

Others:

  • Added a shorthand command andes.system.example() to return a disposable system. It can be useful for quick prototyping.

  • Improved the formatting and navigation of Model references.

  • Models store the base values for per-unit conversion in Model.bases.

v1.6.1 (2022-03-13)#

  • Revamped documentation with a much improved "Getting started" section.

v1.6.0 (2022-03-11)#

  • Migrated documentation to the pydata template.

  • Added compatibility with SymPy 1.9 and 1.10.

v1.5 Notes#

v1.5.12 (2022-03-05)#

  • Improved PSS/E parsers for WTDTA1 model to follow PSS/E parameter definition.

  • Included the Jupyter notebook examples in the documentation.

  • Tweaks to the plot utility.

v1.5.11 (2022-02-23)#

  • Reduced the tolerance for tiny variable increments to be treated as zero.

  • Fixed PSS/E parsers for renewable models.

  • Minor renewable model fixes.

v1.5.10 (2022-02-01)#

  • Fixed one equation in REGC_A.

v1.5.9 (2022-01-31)#

  • Added PLL1, a simple PLL model.

  • Renamed REGCVSG to REGCV1 and REGCVSG2 to REGCV2.

  • Added an alias list for model names. See models/__init__.py.

  • Multiprocessing now executes on all CPUs that are physical, instead of logical. A new package psutil needs to be installed.

  • Use of Selector is deprecated.

v1.5.8 (2021-12-21)#

  • Full initialization debug message will be printed only when -v 10 and run --init are both used.

  • Improved warning of out-of-limit initialization. Variables initialized at limits will be shown only at the debug level.

  • Initialization improvements for models REGCA1 and REECA1.

  • Added model HYGOV.

  • Changed the default vout of offline exciters to zeros. All vout equations need to be multipled by ue.

v1.5.7 (2021-12-11)#

This minor release highlights the improved debugging of initialization.

Highly verbose initialization output can be enabled when the verbose level is 10 or less. For example,

andes -v 10 run test.xlsx -r tds --init

will set the verbose level to 10 and run test.xlsx in the current folder, proceed to time-domain simulation but only initialize the models. Outputs will be printed to the shell where the command is executed.

To save the output to a file, use the following in a UNIX shell:

andes -v 10 run test.xlsx -r tds --init > info.txt 2>&1

where the first > pipes the output to a file named info.txt, and 2>&1 appends stderr (2) to stdout (1).

The other main improvement is allowing automatic limit adjustment during initialization. Due to parameter errors, some variables will be initialized to values outside the given limits. Most commercial software does not attempt to fix the parameter but rather adjust the limit in run time.

The same approach is followed in ANDES by automatically adjusting the upper limit, if exceeded, to variable initial values. The lower limit, however, is kept unadjusted by default.

Discrete components now take an argument named allow_adjust so that the model developer can specify if its limits can be adjusted or must be kept as is. Each model is allowed to specify three config flags to customize runtime behaviors: allow_adjust, adjust_lower, and adjust_uppwer. By default, allow_adjust=True, adjust_upper=True, and adjust_lower=False. One can modify the config file to enable or disable the limit adjustments for specific models.

Other fixes include:

  • Bug fixes for GAST parameter AT.

  • Bug fixes for IEEET3, GAST, ESAC1A and ESST1A when device is off to avoid matrix singularity.

v1.5.6 (2021-11-25)#

  • Allow specifying config options through command-line arguments --config-option.

  • Added a voltage and frequency playback model PLBVFU1.

  • Bug fixes to an SEXS equation.

v1.5.5 (2021-11-13)#

  • Added a Timeseries model for reading timeseries data from xlsx.

  • Converted several models into Python packages.

  • Bug fixes to TGOV1 equations (#226)

v1.5.4 (2021-11-02)#

  • Fixed a bug in generated select functions that omitted the coefficients of __ones.

v1.5.3 (2021-10-31)#

  • Revered special arguments for the generated select function.

  • Stabilized the argument list of pycode. If the pycode is identical to existing ones, the existing file will not be overwritten. As a result, compiled code is fully cached.

  • Partially seperated time-domain integration method into daeint.py.

v1.5.2 (2021-10-27)#

  • Removed CVXOPT dependency.

  • Removed __zeros and __ones as they are no longer needed.

  • Added andes prep -c to precompile the generated code.

  • Added utility functions for saving and loading system snapshots. See andes/utils/snapshot.py.

  • Compiled numba code is always cached.

  • Bug fixes.

v1.5.1 (2021-10-23)#

  • Restored compatibility with SymPy 1.6.

  • Added a group for voltage compensators.

  • New models: IEEEVC and GAST.

v1.5.0 (2021-10-13)#

  • Support numba just-in-time compilation of all equation and Jacobian calls.

This option accelerates simulations by up to 30%. The acceleration is visible in medium-scale systems with multiple models. Such systems involve heavy function calls but a rather moderate load for linear equation solvers. The speed up is less significant in large-scale systems where solving equations is the major time consumer.

Numba is required and can be installed with pip install numba or conda install numba.

To turn on numba for ANDES, in the ANDES configuration under [System], set numba = 1 and numba_cache = 1.

The just-in-time compilation will compile the code upon the first execution based on the input types. When compilation is triggered, ANDES may appear frozen due to the compilation lag. The option numba_cache = 1 will cache compiled machine code, so that the lag only occurs once until the next andes prep.

  • Allow BackRef to populate to models through Group.

When model A stores an IdxParam pointing to a group, if BackRef with the name A are declared in both the group and the model, both BackRef will retrieve the backward references from model A.

  • Allow BaseVar to accept partial initializations.

If BaseVar.v_str_add = True, the value of v_str will be added in place to variable value. An example is that voltage compensator sets part of the input voltage, and exciter reads the bus voltage. Exciter has v.v_str_add = True so that when compensators exist, the input voltage will be bus voltage (vbus) plus (Eterm - vbus). If no compensator exists, exciter will use bus voltages and function as expected.

  • Added reserved variable names __ones and __zeros for ones and zeros with length equal to the device number.

__ones and __zeros are useful for vectorizing choicelist in Piecewise functions.

v1.4 Notes#

v1.4.4 (2021-10-05)#

  • Bug fixes for refreshing generated code.

v1.4.3 (2021-09-25)#

This release features parallel processing that cuts the time for andes prepare by more than half.

  • andes prepare supports multiprocessing and uses it by default.

  • Added aliases andes st and andes prep for andes selftest and andes prepare.

  • andes.config_logger supports setting new stream_level and file_level.

New exciter models are contributed by Jinning Wang.

  • Added AC8B, IEEET3 and ESAC1A.

Other changes include disallowing numba's nopython mode.

v1.4.2 (2021-09-12)#

  • Bug fixes

  • Dropped support for cvxoptklu.

v1.4.1 (2021-09-12)#

  • Bug fixes.

  • Overhaul of the prepare and undill methods.

  • andes prepare can be called for specific models through -m, which takes one or many model names as arguments.

v1.4.0 (2021-09-08)#

This release highlights the distributed energy resource protection model.

  • Added DGPRCT1 model to provide DG models with voltage- and frequency-based protection following IEEE 1547-2018.

  • REECA1E supports frequency droop on power.

  • Throws TypeError if type mismatches when using ExtAlgeb and ExtState.

v1.3 Notes#

v1.3.12 (2021-08-22)#

Plot enhancements:

  • plot() takes an argument mark for masking y-axis data based on the left and right range parameters.

  • TDS.plt provides a panoview method for plotting an panoramic view for selected variables and devices of a model.

Models:

  • Added WIP EV models and protection models.

Test case: - Added CURENT EI test system. - Added a number of IEEE 14 bus test systems for specific models.

v1.3.11 (2021-07-27)#

  • Added REECA1E model with inertia emulation.

  • Fixed an issue where the vtype of services was ignored.

  • Changed default DPI for plotting to 100.

v1.3.10 (2021-06-08)#

  • Bug fixes for controllers when generators are off.

v1.3.9 (2021-06-02)#

  • Bug fixes in exciters when generators are offline.

  • Added safe_div function for initialization equations.

v1.3.8 (2021-06-02)#

  • Added REGCVSG model for voltage-source controlled renewables.

  • Turbine governors are now aware of the generator connection status.

v1.3.7 (2021-05-03)#

  • Allow manually specifying variables needing initialization preceding a variable. Specify a list of variable names through BaseVar.deps.

v1.3.6 (2021-04-23)#

  • Patched ESD1 model. Converted distributed.py into a package.

  • Bug fixes.

v1.3.5 (2021-03-20)#

  • Fixed a bug in connectivity check when bus 0 is islanded.

  • Updated notebook examples.

  • Updated tutorials.

v1.3.4 (2021-03-13)#

  • Fixed a bug for the generated renewable energy code.

v1.3.2 (2021-03-08)#

  • Relaxed the version requirements for NumPy and SymPy.

v1.3.1 (2021-03-07)#

  • Writes all generated Python code to ~/.andes/pycode by default.

  • Uses generated Python code by default instead of calls.pkl.

  • Works with NumPy 1.20; works on Apple Silicon (use miniforge) to install native Python and NumPy for Apple Silicon.

  • Generalized model initialization: automatically determines the initialization sequence and solve equations iteratively when necessary.

  • In System.config, save_pycode and use_pycode are now deprecated.

v1.3.0 (2021-02-20)#

  • Allow State variable set check_init=False to skip initialization test. One use case is for integrators with non-zero inputs (such as state-of-charge integration).

  • Solves power flow for systems with multiple areas, each with one Slack generator.

  • Added Jumper for connecting two buses with zero impedance.

  • REGCA1 and synchronous generators can take power ratio parameters gammap and gammaq.

  • New models: IEESGO and IEEET1, EXAC4.

  • Refactored exciters, turbine governors, and renewable models into modules.

v1.2 Notes#

v1.2.9 (2021-01-16)#

  • Added system connectivity check for islanded buses.

  • Depend on openpyxl for reading excel files since xlrd dropped support for any format but xlsx since v2.0.0.

v1.2.7 (2020-12-08)#

  • Time-domain integration now evaluates anti-windup limiter before algebraic residuals. It assures that algebraic residuals are calculated with the new state values if pegged at limits.

  • Fixed the conditions for Iq ramping in REGC; removed Iqmax and Iqmin.

  • Added a new plot function plotn to allow multiple subplots in one figure.

  • TDS.config.g_scale is now now used as a factor for scaling algebraic equations for better convergence. Setting it to 1.0 functions the same as before.

v1.2.6 (2020-12-01)#

  • Added TGOV1N model which sums pref and paux after the 1/droop block.

  • Added ZIP and FLoad for dynamic analysis. Need to be initialized after power flow.

  • Added DAETimeSeries.get_data() method.

  • Added IEEE 14-bus test cases with solar PV (ieee14_solar.xlsx) and Generic Type 3 wind (ieee14_wt3.xlsx).

v1.2.5 (2020-11-19)#

  • Added Summary model to allow arbitrary information for a test case. Works in xlsx and json formats.

  • PV reactive power limit works. Automatically determines the number of PVs to convert if npv2pq=0.

  • Limiter and AntiWindup limiter can use sign_upper=-1 and sign_lower=-1 to negate the provided limits.

  • Improved error messages for inconsistent data.

  • DAETimeSeries functions refactored.

v1.2.4 (2020-11-13)#

  • Added switched shunt class ShuntSw.

  • BaseParam takes inconvert and oconvert for converting parameter elements from and to files.

v1.2.3 (2020-11-02)#

  • Support variable sys_mva (system base mva) in equation strings.

  • Default support for KVXOPT through pip installation.

v1.2.2 (2020-11-01)#

New Models:

  • PVD1 model, WECC distributed PV model. Supports multiple PVD1 devices on the same bus.

  • Added ACEc model, ACE calculation with continuous freq.

Changes and fixes:

  • Renamed TDS._itm_step to TDS.itm_step as a public API.

  • Allow variable sys_f (system frequency) in equation strings.

  • Fixed ACE equation. measurement.

  • Support kvxopt as a drop-in replacement for cvxopt to bring KLU to Windows (and other platforms).

  • Added kvxopt as a dependency for PyPI installation.

v1.2.1 (2020-10-11)#

  • Renamed models.non_jit to models.file_classes.

  • Removed models/jit.py as models have to be loaded and instantiated anyway before undill.

  • Skip generating empty equation calls.

v1.2.0 (2020-10-10)#

This version contains major refactor for speed improvement.

  • Refactored Jacobian calls generation so that for each model, one call is generated for each Jacobian type.

  • Refactored Service equation generation so that the exact arguments are passed.

Also contains an experimental Python code dump function.

  • Controlled in System.config, one can turn on save_pycode to dump equation and Jacobian calls to ~/.andes/pycode. Requires one call to andes prepare.

  • The Python code dump can be reformatted with yapf through the config option yapf_pycode. Requires separate installation.

  • The dumped Python code can be used for subsequent simulations through the config option use_pycode.

v1.1 Notes#

v1.1.5 (2020-10-08)#

  • Allow plotting to existing axes with the same plot API.

  • Added TGOV1DB model (TGOV1 with an input dead-band).

  • Added an experimental numba support.

  • Patched LazyImport for a snappier command-line interface.

  • andes selftest -q now skips code generation.

v1.1.4 (2020-09-22)#

  • Support BackRef for groups.

  • Added CLI --pool to use multiprocess.Pool for multiple cases. When combined with --shell, --pool returns System Objects in the list system.

  • Fixed bugs and improved manual.

v1.1.3 (2020-09-05)#

  • Improved documentation.

  • Minor bug fixes.

v1.1.2 (2020-09-03)#

  • Patched time-domain for continuing simulation.

v1.1.1 (2020-09-02)#

  • Added back quasi-real-time speed control through --qrt and --kqrt KQRT.

  • Patched the time-domain routine for the final step.

v1.1.0 (2020-09-01)#

  • Defaulted BaseVar.diag_eps to System.Config.diag_eps.

  • Added option TDS.config.g_scale to allow for scaling the algebraic mismatch with step size.

  • Added induction motor models Motor3 and Motor5 (PSAT models).

  • Allow a PFlow-TDS model to skip TDS initialization by setting ModelFlags.tds_init to False.

  • Added Motor models Motor3 and Motor5.

  • Imported get_case and list_cases to the root package level.

  • Added test cases (Kundur's system) with wind.

Added Generic Type 3 wind turbine component models:

  • Drive-train models WTDTA1 (dual-mass model) and WTDS (single-mass model).

  • Aerodynamic model WTARA1.

  • Pitch controller model WTPTA1.

  • Torque (a.k.a. Pref) model WTTQA1.

v1.0 Notes#

v1.0.8 (2020-07-29)#

New features and models:

  • Added renewable energy models REECA1 and REPCA1.

  • Added service EventFlag which automatically calls events if its input changes.

  • Added service ExtendedEvent which flags an extended event for a given time.

  • Added service ApplyFunc to apply a numeric function. For the most cases where one would need ApplyFunc, consider using ConstService first.

  • Allow selftest -q for quick selftest by skipping codegen.

  • Improved time stepping logic and convergence tests.

  • Updated examples.

Default behavior changes include:

  • andes prepare now takes three mutually exclusive arguments, full, quick and incremental. The command-line now defaults to the quick mode. andes.prepare() still uses the full mode.

  • Model.s_update now evaluates the generated and the user-provided calls in sequence for each service in order.

  • Renamed model REGCAU1 to REGCA1.

v1.0.7 (2020-07-18)#

  • Use in-place assignment when updating Jacobian values in Triplets.

  • Patched a major but simple bug where the Jacobian refactorization flag is set to the wrong place.

  • New models: PMU, REGCAU1 (tests pending).

  • New blocks: DeadBand1, PIFreeze, PITrackAW, PITrackAWFreeze (tests pending), and LagFreeze (tests pending).

  • andes plot supports dashed horizontal and vertical lines through hline1, hline2, vline1 and vline2.

  • Discrete: renamed DeadBand to DeadBandRT (deadband with return).

  • Service: renamed FlagNotNone to FlagValue with an option to flip the flags.

  • Other tweaks.

v1.0.6 (2020-07-08)#

  • Patched step size adjustment algorithm.

  • Added Area Control Error (ACE) model.

v1.0.5 (2020-07-02)#

  • Minor bug fixes for service initialization.

  • Added a wrapper to call TDS.fg_update to allow passing variables from caller.

  • Added pre-event time to the switch_times.

v1.0.4 (2020-06-26)#

  • Implemented compressed NumPy format (npz) for time-domain simulation output data file.

  • Implemented optional attribute vtype for specifying data type for Service.

  • Patched COI speed initialization.

  • Patched PSS/E parser for two-winding transformer winding and impedance modes.

v1.0.3 (2020-06-02)#

  • Patches PQ model equations where the "or" logic "|" is ignored in equation strings. To adjust PQ load in time domain simulation, refer to the note in pq.py.

  • Allow Model.alter to update service values.

v1.0.2 (2020-06-01)#

  • Patches the conda-forge script to use SymPy < 1.6. After SymPy version 1.5.1, comparison operations cannot be sympified. Pip installations are not affected.

v1.0.1 (2020-05-27)#

  • Generate one lambda function for each of f and g, instead of generating one for each single f/g equation. Requires to run andes prepare after updating.

v1.0.0 (2020-05-25)#

This release is going to be tagged as v0.9.5 and later tagged as v1.0.0.

  • Added verification results using IEEE 14-bus, NPCC, and WECC systems under folder examples.

  • Patches GENROU and EXDC2 models.

  • Updated test cases for WECC, NPCC IEEE 14-bus.

  • Documentation improvements.

  • Various tweaks.

Pre-v1.0.0#

v0.9.4 (2020-05-20)#

  • Added exciter models EXST1, ESST3A, ESDC2A, SEXS, and IEEEX1, turbine governor model IEEEG1 (dual-machine support), and stabilizer model ST2CUT.

  • Added blocks HVGate and LVGate with a work-around for sympy.maximum/ minimum.

  • Added services PostInitService (for storing initialized values), and VarService (variable services that get updated) after limiters and before equations).

  • Added service InitChecker for checking initialization values against typical values. Warnings will be issued when out of bound or equality/ inequality conditions are not met.

  • Allow internal variables to be associated with a discrete component which will be updated before initialization (through BaseVar.discrete).

  • Allow turbine governors to specify an optional Tn (turbine rating). If not provided, turbine rating will fall back to Sn (generator rating).

  • Renamed OptionalSelect to DataSelect; Added NumSelect, the array-based version of DataSelect.

  • Allow to regenerate code for updated models through andes prepare -qi.

  • Various patches to allow zeroing out time constants in transfer functions.

v0.9.3 (2020-05-05)#

This version contains bug fixes and performance tweaks.

  • Fixed an AntiWindup issue that causes variables to stuck at limits.

  • Allow TDS.run() to resume from a stopped simulation and run to the new end time in TDS.config.tf.

  • Improved TDS data dump speed by not constructing DataFrame by default.

  • Added tests for kundur_full.xlsx and kundur_aw.xlsx to ensure results are the same as known values.

  • Other bug fixes.

v0.9.1 (2020-05-02)#

This version accelerates computations by about 35%.

  • Models with flag collate=False, which is the new default, will slice DAE arrays for all internal vars to reduce copying back and forth.

  • The change above greatly reduced computation time. For kundur_ieeest.xlsx, simulation time is down from 2.50 sec to 1.64 sec.

  • The side-effects include a change in variable ordering in output lst file. It also eliminated the feasibility of evaluating model equations in parallel, which has not been implemented and does not seem promising in Python.

  • Separated symbolic processor and documentation generator from Model into SymProcessor and Documenter classes.

  • andes prepare now shows progress in the console.

  • Store exit code in System.exit_code and returns to system when called from CLI.

  • Refactored the solver interface.

  • Patched Config.check for routines.

  • SciPy Newton-Krylov power flow solver is no longer supported.

  • Patched a bug in v0.9.0 related to dae.Tf.

v0.8.8 (2020-04-28)#

This update contains a quick but significant fix to boost the simulation speed by avoiding calls to empty user-defined numerical calls.

  • In Model.flags and Block.flags, added f_num, g_num and j_num to indicate if user-defined numerical calls exist.

  • In Model.f_update, Model.g_update and Model.j_update, check the above flags to avoid unnecessary calls to empty numeric functions.

  • For the kundur_ieeest.xlsx case, simulation time was reduced from 3.5s to 2.7s.

v0.8.7 (2020-04-28)#

  • Changed RefParam to a service type called BackRef.

  • Added DeviceFinder, a service type to find device idx when not provided. DeviceFinder will also automatically add devices if not found.

  • Added OptionalSelect, a service type to select optional parameters if provided and select fallback ones otherwise.

  • Added discrete types Derivative, Delay, and Average,

  • Implemented full IEEEST stabilizer.

  • Implemented COI for generator speed and angle measurement.

v0.8.6 (2020-04-21)#

This release contains important documentation fixes and two new blocks.

  • Fixed documentations in andes doc to address a misplacement of symbols and equations.

  • Converted all blocks to the division-free formulation (with dae.zf renamed to dae.Tf).

  • Fixed equation errors in the block documentation.

  • Implemented two new blocks: Lag2ndOrd and LeadLag2ndOrd.

  • Added a prototype for IEEEST stabilizer with some fixes needed.

v0.8.5 (2020-04-17)#

  • Converted the differential equations to the form of T \dot{x} = f(x, y), where T is supplied to t_const of State/ExtState.

  • Added the support for Config fields in documentation (in andes doc and on readthedocs).

  • Added Config consistency checking.

  • Converted Model.idx from a list to DataParam.

  • Renamed the API of routines (summary, init, run, report).

  • Automatically generated indices now start at 1 (i.e., "GENCLS_1" is the first GENCLS device).

  • Added test cases for WECC system. The model with classical generators is verified against TSAT.

  • Minor features: andes -v 1 for debug output with levels and line numbers.

v0.8.4 (2020-04-07)#

  • Added support for JSON case files. Convert existing case file to JSON with --convert json.

  • Added support for PSS/E dyr files, loadable with -addfile ADDFILE.

  • Added andes plot --xargs for searching variable name and plotting. See example 6.

  • Various bug fixes: Fault power injection fix;

v0.8.3 (2020-03-25)#

  • Improved storage for Jacobian triplets (see andes.core.triplet.JacTriplet).

  • On-the-fly parameter alteration for power flow calculations (Model.alter method).

  • Exported frequently used functions to the root package (andes.config_logger, andes.run, andes.prepare and andes.load).

  • Return a list of System objects when multiprocessing in an interactive environment.

  • Exported classes to andes.core.

  • Various bug fixes and documentation improvements.

v0.8.0 (2020-02-12)#

  • First release of the hybrid symbolic-numeric framework in ANDES.

  • A new framework is used to describe DAE models, generate equation documentation, and generate code for numerical simulation.

  • Models are written in the new framework. Supported models include GENCLS, GENROU, EXDC2, TGOV1, TG2

  • PSS/E raw parser, MATPOWER parser, and ANDES xlsx parser.

  • Newton-Raphson power flow, trapezoidal rule for numerical integration, and full eigenvalue analysis.

v0.6.9 (2020-02-12)#

  • Version 0.6.9 is the last version for the numeric-only modeling framework.

  • This version will not be updated any more. But, models, routines and functions will be ported to the new version.