Show HN: Power system simulation on GNU Octave in WASM
matpower.app
matpower.app
I'm also curious about why a web GUI is being used here? Power Systems information varies by country, but is generally not something that will ever be publically available, so desktop applications have done well here.
After more thinking, I guess it's a free way for researchers to upload and run public models using free software?
I imagine this app being quite useful to lecturers teaching Power Engineering at Universities. Being able to just send students a link and not requiring them to install complex libraries, deal with licenses or restricted trial versions and them not having to use a particular OS or CPU architecture should help get them started quickly.
Agree that it could be of use for lecturers as most students don't need the full power of PSSE or PowerWorld for the stuff you do in introductory textbooks.
Best of luck in this. I recall during the last FERC Conference on Software that there was at least one academic presentation where they talked about trying to find a good way to visualize these things with a web browser. I can't remember what the specific challenges were though.
WebAssembly creates an exciting opportunity to combine these libraries with convenient, reactive user interfaces that help to manage the their complexity. The web development community is so large and the frameworks and tools available are of such high quality that an individual, or small team of developers, can quickly create complex applications that would have previously taken much longer. Ultimately, this should accelerate the process of bringing the latest research to industry.
On a different note, how are you approaching sparse matrices in Octave? Also, I assumed Octave's performance would be a non-starter here for large models. Is it performant enough for you?
Octave is using UMFPACK to solve sparse systems of linear equations. There may be some performance to be gained by using KLU with AMD preordering.
I am interested to know how best to compile BLAS and LAPACK to WebAssembly. Traditionally, implementations optimized for a particular machine architecture are used to extract maximum performance. However, WebAssembly targets a stack-based conceptual machine. At present, I use LAPACK v3.4.2 and convert it to C with f2c before compiling to WebAssembly. It would be interesting to perform some benchmark tests against other implementations and compare across browsers.
The JavaScript application presents the UI and controls editing of a JSON representation of the MATPOWER case structure. This data can be seen using the JSON option on the Export page. The WebAssembly program contains GNU Octave and its dependencies. It is run in a WebWorker (background thread) and the JSON data is passed to and fro. The program that converts the JSON into Octave data structures and back again is available here: