Skip to content

Conversation

@pelesh
Copy link
Collaborator

@pelesh pelesh commented Apr 14, 2025

Review release of v0.1.

pelesh and others added 30 commits April 10, 2024 12:02
* Remove parts of generator model from BusPV.
Prototype Example of Creating a RL Circuit

+Add hypergraph representation
+Added Model form with appropiate indexing
+Added Resistors, Capacitor, Inductor, and VoltageSource Component Models

+Added InductionMotor, Linear Transformer, and SynchronousMachine
+Changes to PowerElectronicsModel

* Added COO Sparse Matrices, Component Jacobians, and Discrete Generator

+ Basic COO Sparse Matrix Implmentation
+ Discrete Generator Component
+ Resistor Jacobian
+ Capacitor Jacobian
+ Voltage Source Jacobian
+ Inductor Jacobian
+ Testing for Sparse Jacobian and Discrete Generator

* Added Jacobian Assembly. Fixed and Added New Functionality to COO Matrices

+Matrix Assembly
+Refactored COO Matrix
+COO can return CSR Data format

* Jacobian Assembly, IDA + KLU Cmake, RL Circuit

+ Cmake configurations for Sundials and SuiteSparse
+ Jacobian Assembly for components
+ Working RL Circuit example utilizing assembly techniques

* Added the Transmission Line Component

* Added Microgrid Example

 - Added MicrogridBusDQ
 - Added MicrogridLine
 - Added MicrogridLoad
 - Updated DiscreteGenerator
 - Added Output Testing for DG
 - Added Microgrid Assmebly Example
 - Updated Capacitor, Inductor, and Voltage residuals
 - Updated RLCircuit Example

* Working Microgrid (Finite Difference)

 - "grounded" the rotor difference in reference
 - Comparing against reference from MATLAB

* Fixed the Jacobian in Microgrid Example

* Added a max step size control for model objects

* Update Solver/Dynamic/CMakeLists.txt

Co-authored-by: pelesh <peless@ornl.gov>

* Updated name DiscreteGenerator -> DistributedGenerator

 - Updated name of generator
 - Some formatting updates

* Fixed Some Bugs

 - Fixed SpMatTest
 - Updates on rebase

* Fixed Memory Error with Grid3BusSys

 - Intalized Pg data

* Fixed Unitalized Variable Stepsize

* Remove parts of generator model from BusPV (#7)

* Formatting updates + Fixed Warnings

 - Update format
 - Fixed casting warnings

* Minor comments and style corrections.

Co-authored-by: Reid <reid-g@users.noreply.github.com>

* Multiple Format & Comment Updates + Valgrind Error Fixes

 - Updated Comments to respect current models
 - Fixed valgrind errors in ida.cpp. Note: there is still more but seg faults are happening from frees

* Formatting Updates with "this" and using + Minor Fixes

 - Removed this-> with usings for formatting
 - Added using for Jac to components which did not have

* Added Better Description to the MicrogridBus

---------

Co-authored-by: Slaven Peles <peless@ornl.gov>
Co-authored-by: Reid <reid-g@users.noreply.github.com>
* Added scalable microgrid example with arbitrary size

* Example is tested with microgrids with 2, 4 and 8 repeated blocks.
* Rename PowerElectronicsComponents folder to PowerElectronics

* Organize components by type.
Optimization model functions return true even when they don't do anything.
* Modify Ida and Kinsol classes to build with SUNDIALS >= 7.

* Update README.

* Use SUNDIALS null communicator.

* Update CMakeLists.txt to explicitly require sundials >= 7.x (no going back)
* Fixed Scale Microgrid Example

* Added DAE Keys for Comparisions + Input Changes

---------

Co-authored-by: Slaven Peles <peless@ornl.gov>
* Add brief style guidelines.

* Add header files include guidelines.

* Add guidelines on line breaks, initializer list, file names.
* Spack submodule.

* Locally added Gridkit Spack package to the submodule.

* Point Spack submodule to my fork, so it can be cloned in CI.

* Setting ipopt spec in Gridkit Spack package should be sufficient if correctly updated.

* Temporarilly commented out ScaleMicrogrid test.

* Removed test_install step from Github actions.
* Fixed IDA Interface: copy final solution to the model

* Updated some comments in Scale Microgrid example

* Reenabled Scale Microgrid Testing

 - Removed DAE Keys
 - Updated Formatting
* Preliminary support for automatic differentiation using Enzyme

* Build GridKit with Enzyme as dependency

* Add simple Enzyme tests

* Add Spack package for GridKit.

* gridkit +enzyme in CI.

* Update README with Enzyme dependency.

* Changed Enzyme add_custom_target name to fix build issues with Ninja.

---------

Co-authored-by: Asher Mancinelli <ashermancinelli@gmail.com>
Co-authored-by: Slaven Peles <peless@ornl.gov>
* First stab at phasor dynamics models:

* Add bus component model.

* Add branch model.

* Updated docs and notation for the two models.
* Fix for file IO in arbitrary directory

 - Crashes for file IO when invalid
 - ParameterEstimation can be run not in directoy without error

* setLookupTable takes istream instead of filename as input.

* Parameter estimation example input is from string, not file.

---------

Co-authored-by: Reid Gomillion <rjg18@vt.edu>
* List pwd in CI.

* Remove lookup_table.dat install.

* Downgrade LLVM from 18 to 16 in CI and update README accordingly.

* Update README.md

---------

Co-authored-by: pelesh <peless@ornl.gov>
* Move sources to src/ dir

* Rename ComponentLib to Model.

* Change dir name SparseMatrix -> LinearAlgebra.

* Rename Documentation -> docs.

* Renamed Examples -> examples.

* Rename CMake -> cmake

* Rename Buildsystem -> buildsystem.
* Fix figure paths in README files
* Update README.md

Correct the documentation around SUNDIALS with KLU support
* Improve the way to find Enzyme.

* Add missing 'REQUIRED' argument to find_library.

* Explicitly look for .dylib and .dll in addition to .so. Not providing an extension does not seem to work for Enzyme plugin.
* fixed some style issues and variable name selection

* fixed guard for hpp file

* fixed typos


---------

Co-authored-by: pelesh <peless@ornl.gov>
* Defined base classes for Buses and components.

* Add infinite bus to phasor dynamic components.

* Setup unit testing for phasor dynamics components.

* Add simple load component.

* Add bus tests.

* Add Branch model.

* Add load tests.

* New Model::Evaluator*

* Use override keyword in phasor dynamics models.

* Expand code comments.
* Replace ModelEvaluator class.

* Remove ModelEvaluatorImpl dependence for power electronics models.

* Move power flow specific files to Model/PowerFlow dir.

* Add phasor dynamics system composer.

* Add test for system composer.

* Add template for implementing synchronous machine model.

* Add testing framework for the synchronous machine model
* Add dependency-tracking variable data type.

* Fix compiler warnings.

* Test chain rule with local variable.

---------

Co-authored-by: shakedregev <35384901+shakedregev@users.noreply.github.com>
)

* Add preliminary Enzyme support

* Use better naming conventions

* More verbose tests for enzyme support.

* int --> double in Enzyme examples.

* Separate scalar and vector examples using Enzyme.

* Use classes in EnzymeLibCheck.

* Basic usage of DenseMatrix in EnzymeVector example.

* Method to convert Dense matriz to COO.

* Use DenseMatrix to store the Jacobians in Enzyme vector example.

* Working Enzyme derivative of DistributedGenerator

* EnzymeLibVectorCheck.

* Better documentation of the DenseMatrix class.

---------

Co-authored-by: Asher Mancinelli <ashermancinelli@gmail.com>
Co-authored-by: pelesh <peles2@llnl.gov>
Co-authored-by: Slaven Peles <peless@ornl.gov>
* Update clang-format rules.

* Add pre-commit hooks.

* Update CONTRIBUTING.md.

* Reformatted code per style guidelines.

* Fix bug in Branch and Load models.

* Update contributing guidelines.


---------

Co-authored-by: pelesh <pelesh@users.noreply.github.com>
Co-authored-by: alexander-novo <alexander-novo@users.noreply.github.com>
Co-authored-by: Nicholson Koukpaizan <72402802+nkoukpaizan@users.noreply.github.com>
* Use v0.23.1 Spack buildcache.

* Upgrade Spack.

* Remove debug (-d) in CI spack concretize.
* Genrou model implemented

* Example to verify correctness and compare results to Powerworld.

* Placeholder for unit tests.

---------

Co-authored-by: abirchfield <adam.b.birchfield@gmail.com>
Co-authored-by: pelesh <pelesh@users.noreply.github.com>
* Update Spack.

* Update CI to install additional LLVM libs needed for Enzyme to build ClangEnzyme*.so.
@pelesh pelesh self-assigned this Apr 14, 2025
@pelesh pelesh requested a review from nkoukpaizan April 14, 2025 18:50
@pelesh pelesh requested review from shakedregev and removed request for nkoukpaizan April 14, 2025 19:04
@pelesh pelesh closed this Apr 14, 2025
@pelesh pelesh removed the request for review from shakedregev April 14, 2025 19:13
* Update documentation for v0.1 release.
@pelesh pelesh reopened this Apr 14, 2025
@pelesh pelesh requested a review from shakedregev April 14, 2025 21:57
@pelesh pelesh merged commit c37a3be into main Apr 14, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants