sogno-platform / dpsim

Real-time power system simulator including powerflow, (dynamic) phasors and EMT
https://sogno.energy/dpsim/
Mozilla Public License 2.0
70 stars 51 forks source link

Check use of parent methods by composite comps #193

Open dinkelbachjan opened 1 year ago

dinkelbachjan commented 1 year ago

A developer of a certain CompositePowerComp should implement custom behaviours for Initialize, ApplySystemMatrixStamp etc. by means of the mnaParent... methods and not by means of the mnaComp... methods of the composite component class. So I would propose to use here override final for all mnaComp... methods.

dinkelbachjan commented 1 year ago

Marking as override final is not feasible yet, since several composite components (e.g. DP_Ph1_Transformer.h) do override mnaComp... methods. It needs to be double-checked whether this is really required in all cases, or whether instead mnaParent... can be used instead and the override final marking realized.

dinkelbachjan commented 1 year ago

Probably override final limits flexibility to much. Nonetheless, double-check whether composite components could use mnaParent... instead of mnaComp...