Comments (4)
Classes which include subcomponents (changes in #141):
Class | Uses mSubComponents |
Pre- and Post-step called by parent? | Parent calls Pre- and Post-steps via mSubComponents ? |
Remarks |
---|---|---|---|---|
DP_Ph1_AvVoltageSourceInverterDQ | yes | yes | yes | - |
DP_Ph1_NetworkInjection | yes | yes | yes | - |
DP_Ph1_PiLine | yes | yes | yes | changed to utilize mSubComponents |
DP_Ph1_PQLoadCS | yes | yes | yes | changed to utilize mSubComponents and to call subtasks in parent task |
DP_Ph1_RxLine | yes | yes | yes | changed to utilize mSubComponents and to call subtasks in parent task |
DP_Ph1_RxLoad | yes | yes | yes | changed to utilize mSubComponents |
DP_Ph1_RxLoadSwitch | yes | yes | yes | changed to iterate over mSubComponents |
DP_Ph1_SVC | no | yes | no | Class is malformed, should not compile. Not making any changes... |
DP_Ph1_SynchronGeneratorIdeal | yes | yes | yes | changed to iterate over mSubComponents instead of only using comp. 0 |
DP_Ph1_SynchronGeneratorTrStab | yes | yes | yes | changed to utilize mSubComponents and to call subtasks in parent task |
DP_Ph1_Transformer | yes | yes | yes | - |
DP_Ph1_VoltageSourceRamp | yes | yes | yes | changed to utilize mSubComponents and to call subtasks in parent task. Also, why does this class exist at all? Can this not be handled by the normal VoltageSource + SignalGenerator? |
EMT_Ph1_VoltageSourceRamp | yes | yes | yes | changed to utilize mSubComponents and to call subtasks in parent task. Also, why does this class exist at all? Can this not be handled by the normal VoltageSource + SignalGenerator? |
EMT_Ph3_AvVoltageSourceInverterDQ | yes | yes | yes | - |
EMT_Ph3_NetworkInjection | yes | yes | yes | - |
EMT_Ph3_PiLine | yes | yes | yes | changed to utilize mSubComponents |
EMT_Ph3_RxLine | yes | yes | yes | changed to utilize mSubComponents and to call subtasks in parent task |
EMT_Ph3_RXLoad | yes | yes | yes | changed to utilize mSubComponents and to call subtasks in parent task |
EMT_Ph3_SynchronGeneratorIdeal | yes | yes | yes | changed to loop over all subcomponents |
EMT_Ph3_SynchronGeneratorTrStab | yes | yes | yes | changed to utilize mSubComponents and to call subtasks in parent task |
EMT_Ph3_Transformer | yes | yes | yes | - |
SP_Ph1_AvVoltageSourceInverterDQ | yes | yes | yes | - |
SP_Ph1_Load | yes | yes | yes | changed to utilize mSubComponents and to call subtasks in parent task |
SP_Ph1_NetworkInjection | yes | yes | yes | - |
SP_Ph1_PiLine | yes | yes | yes | changed to utilize mSubComponents |
SP_Ph1_RXLine | yes | yes | yes | changed to utilize mSubComponents and to call subtasks in parent task |
SP_Ph1_SolidStateTransformer | yes | has no tasks | has no tasks | changed to add subcomponents into list |
SP_Ph1_SynchronGeneratorTrStab | yes | yes | yes | changed to utilize mSubComponents and to call subtasks in parent task |
SP_Ph1_Transformer | yes | yes | yes | - |
from dpsim.
In addition to the changes made in #141, I propose another way to further unify the behavior of components with subcomponents: By creating a shared superclass MNASimPowerComp that is derived from both SimPowerComp and MNAInterface, it becomes possible to extract the various MNA method calls on the subcomponents into this common superclass. This means that the parent components only register their subcomponents once (e. g. through addMNASubComponent
) and then only contain methods concerned with the MNA operations in the parent. The calls to the MNA methods of the child are handled by the superclass instead, drastically cutting down on the amount of duplicated code (especially the for (auto comp : mSubComponents)
loop) in the parent classes. The MNAPreStep
and MNAPostStep
classes contained in almost all parent components can also be merged into the common superclass. A first working example of this can be found in #144 (Comparison with #141 in subcomponents...unify-mna-subcomponents).
from dpsim.
I would suggest that the new superclass is used only for components that are composed of subcomponents, e.g. PiLine
, while the simple components, e.g. Inductor
remain untouched. The new superclass could be explicitly called CompositePowerComp
. It handles the adding of subcomponents and the collection/arrangement of their mnaPreStep
and mnaPostStep
methods as you described. Any additional functionalities brought by the composite component class can be encapsulated in mnaParentPreStep
and mnaParentPostStep
, which are methods offered by CompositePowerComp
.
from dpsim.
@m-mirz We are thinking of inserting a new class CompositePowerComp
as described above to unify the subcomponent handling. What do you think about that?
from dpsim.
Related Issues (20)
- Compilation warnings and some code improvements HOT 1
- Fix Doxygen documentation HOT 1
- Powerflow improvements and extended validation HOT 1
- Ensure that virtual nodes of subcomponents are created before function `collectVirtualNodes`
- Improve the code checking pipeline to keep sonar up-to-date automatically
- Use higher number of cores for CI build processes
- Building on Ubuntu 22.04 HOT 1
- Pipeline failing for Windows
- Delete stale branches HOT 1
- Configure GitHub repo delete merged branches automatically HOT 2
- Introduce a `CODEOWNERS` file HOT 19
- Reuse conductance stamp code HOT 4
- State Space Group Class
- Fix VILLASnode in Dockerfiles HOT 2
- Log at debug level HOT 1
- CI Flow does not work for Dockerfile changes HOT 3
- Merge MnaSolver and MnaSolverDirect classes HOT 1
- A typo in dpsim_classes_simulation.svg HOT 2
- Allow initialisation of p_inj and q_inj in SP_NetworkInjection
- Heap allocations in real time critical path lead to significant slow down 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 dpsim.