CURENT / andes

Python toolbox / library for power system transient dynamics simulation with symbolic modeling and numerical analysis 🔥
https://ltb.curent.org
Other
208 stars 108 forks source link

FLoad error #444

Closed jinningwang closed 1 year ago

jinningwang commented 1 year ago

Error

ANDES version: 1.5.1.post2+ge8465ce0, case: ieee14_fload.json

The error occurred in method ModelCache.refresh in model.py. The error was caused by the bus value being none by ss.FLoad.as_dict(vin=True). Output results are shown below:

ss.FLoad.as_dict(vin=False)

{'uid': array([0]),
...
 'bus': [2]}

ss.FLoad.as_dict(vin=True)

{'uid': array([0]),
...
 'bus': array([], dtype=float64)}

First bad commit

After inspection, the issue first occurred in commit e8465ce0264304fee945b8968db53fa5206849e2, and I am working on this.

Procedures to identify the known bad commit

Using git bisect to locate the first known issue commit

Start the git bisect by git bisect

Mark first known good commit 9c2a5c84 using git bisect good 9c2a5c84

Make first know bad commit f417cf2e using git bisect bad f417cf2e

Then do the bisection by

git checkout <commit>
pip install -e .
andes prep
andes st
andes run /Users/jinningwang/Documents/work/andes/andes/cases/ieee14/ieee14_fload.json -r tds

After test run, mark it as good or bad

Originally posted by @jinningwang in https://github.com/CURENT/andes/discussions/442#discussioncomment-5686545

cuihantao commented 1 year ago

Fixed in b199dfe.