Coder Social home page Coder Social logo

Comments (4)

georgii-tishenin avatar georgii-tishenin commented on July 1, 2024

Hi Team,
@m-mirz, @dinkelbachjan, @stv0g, @martinmoraga, @gnakti, @leonardocarreras, @pipeacosta, @MarvinTollnitschRWTH let me know what you think.

from dpsim.

m-mirz avatar m-mirz commented on July 1, 2024

I think it is a good idea to remove this redundant code. Just two remarks:
Your new implementation seems to test the terminal grounded condition more often for the three phase case. I would try to avoid this since this function is called very often… better write a little bit more code.
I am wondering if we don’t have another place to put this code since it is already a little bit more specific than just „math“. Are there similar redundant pieces of code that we could pull out? You already suggested thevenin like stamps. Maybe even a new file is appropriate here with a more specific name.

from dpsim.

martinmoraga avatar martinmoraga commented on July 1, 2024

great idea!

I totally agree also with the comment of Markus. I think we dont have a specific place to put this code, we have to create a new file for that

from dpsim.

georgii-tishenin avatar georgii-tishenin commented on July 1, 2024

Thank you both for your replies. I agree with both remarks.
Would MNAUtils work as a name for this new utility class? Alternative could be more narrow MNAStampUtils name.

Apart from conductance/admittance stamping, there is more repeating code in the classes derived from MNASimPowerComp. Many of the MNASimPowerComp virtual functions are overridden with repeating code. For some of these virtual functions it may be even possible to provide a default implementation in MNASimPowerComp, that would already cover most of the cases. So, I would not rush to outsource them to utility class.
The reason I have started with mnaCompApplySystemMatrixStamp() is because it is the longest function in many three-phase components.

from dpsim.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.