-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using Sparse Matrix LU to Decompose and Solve Equations #17
base: master
Are you sure you want to change the base?
Conversation
Maybe that's a good idea. Such global implementations should be offered to the main repository: https://github.com/pfalstad/circuitjs1. Then I would still take this code to this repository. @pfalstad look at this. Patch for your project: 17.patch.zip |
Well, I tested the performance and it's much faster than before. It can support circuits with at least a few thousand nodes. If this project is used for large-scale circuit simulation, there is still a lot of room for optimization. The main branch of this project was originally this https://github.com/pfalstad/circuitjs1 I always thought it was https://github.com/sharpie7 . Do I need to create another dropdown request for the main warehouse? I'm not very good at playing Git |
Wow that sounds great, I’ll definitely take a look! Thanks! |
Should li-zhenhai create pull request for your repository? |
Yes, that would be easiest for me. |
If you're trying to embed parts of his code in your project, you can just apply my patch:
for test this patch:
These patches are extracted from any pull requests ("Add .patch or .diff to the end of URLs") but I modified this patch because we have different paths to the source code. |
Ok I finally took a look at this and it seems slower, at least on the circuits I tested it on. I tested it with the circuit examples Op Amps->741 Internals and Analog/Digital->QAM-256, and they both seemed a bit slower. Maybe it's only better with some types of circuits, like very large ones? I don't have any circuits with a few thousand nodes to try it on. |
Analog/Digital->QAM-256 I used the file "Prova8. circuitjs. txt" from the questioner of this issue for testing,For large circuits, use the default step size of 5 μ s. The calculation is slow, even if the step size is adjusted to 500 μ s. Still slow, use sparse matrix and adjust step size to 500 μ s. The performance improvement for large circuits is very obvious, and I may have forgotten to tell you that large circuits need to adjust the step size to 500 μ s. Even larger step sizes can be adjusted according to the size of the circuit, A set of test results 2167 milliseconds 414.0 milliseconds 1232 Using a better sparse matrix structure can be faster and support larger matrices. Below are the test results: 400ms 24470/22100 |
Well, I can see why making a pull request from the master branch is a bad idea. It should also be recognized that my repository is not yet suitable for third-party developers. I need to do a lot of work to automate the application build at all stages. |
The use of sparse matrices can greatly improve simulation speed. This sparse matrix and sparse matrix LU decomposition are extracted from the EJML project and can be compatible with the GWT project. We hope to merge them into the project and make a contribution to open source development。