powsybl / powsybl-core

A framework to build power system oriented software
https://www.powsybl.org
Mozilla Public License 2.0
123 stars 39 forks source link

Cloning network variant doesn't clone the components #1548

Open mathbagu opened 3 years ago

mathbagu commented 3 years ago

It could lead to a performance issue due to this unnecessary calculation

(if a question doesn't apply, you can delete it)

geofjamg commented 3 years ago

We do not clone the calculated buses either so why cloning the components? I do not see performance issue here.

mathbagu commented 3 years ago

You right, it doesn't make sense to clone the components without cloning the buses but I was wondering if we should avoid useless connectivity calculation because cloning a variant doesn't change the connectivity.

What is the most costly? run a connectivity calculation or clone everything?

geofjamg commented 3 years ago

Probably cloning is a little bit faster but not so much. Not sure it worse it. Maybe we should benchmark to decide best solution.