Comments (4)
Typed on phone, please excuse the formatting.
I will work on refactoring the parsers.
For the xlsx reader, I have to switch back to pandas.read_excel to specify openpyxl as the engine, since xlrd deprecated the support for xlsx file. But that shouldn’t make a difference for the purpose of reading from a file object.
from andes.
Fixed it in dfeea93.
Added a wrapper read_file_like(infile)
in andes.io.__init__
to accept a file-like or a str for path.
Modified each parser to use it instead of directly calling open
.
To create a system object and load from file, use
import andes
fd = open(andes.get_case("npcc/npcc.raw"))
ss = andes.System() # args can go here.
ss.undill()
andes.io.psse.read(ss, fd)
ss.setup()
fd.close()
In order for Andes to output correctly, you will need to call ss.files.set("presumed_case_name")
manually. I hope you won't mind checking the code in andes/variables/fileman.py
.
Let me know if you have other suggestions.
from andes.
Thank you very much for making these changes so quickly. This will be much more convenient than writing out to temporary files.
from andes.
You are welcome. As always, thank you for the suggestion.
from andes.
Related Issues (20)
- variable wt in 'wtdta1.py' is not set up as the type <y> HOT 8
- Parsing issue in dyr for HYGOV HOT 2
- Andes speed calculation HOT 11
- `config_option` fails when the value is a floating number
- Time domain simulation of fault failed for system with renewables HOT 11
- Running PFlow after TDS.run() HOT 1
- TGOV1N setpoint for reactive power (qref0) does not seem to be implemented in contrast to documentation HOT 3
- Data file likely contains references to unsupported models. HOT 2
- 借个楼问下崔老师还招phd嘛? HOT 1
- TDS Convergence is not likely. HOT 4
- Kundur under-damped modes HOT 2
- Documentation not being updated after repository transfer HOT 4
- Problems in the simulation of generator frequency HOT 8
- FLoad error HOT 1
- Bug in selftest HOT 4
- Reloading pycode from a custom `user_pycode_path` fails in Python 3.9 due to missing `importlib.util` import HOT 3
- Bug with dependency kvxopt 1.3.2.0 HOT 2
- Inconsistence between timeseries data shape and variable name with model Output HOT 6
- Parameter updating does not reflect in export file HOT 2
- Typo in matpower tests HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from andes.