cstb / citygml-energy

CityGML Energy ADE
41 stars 9 forks source link

EnergyConversionSystem as abstract class #144

Closed JoachimBenner closed 6 years ago

JoachimBenner commented 7 years ago

In the actual version, we declared _EnergyDistributionSystem and _StorageSystem as abstract classes, because we want to ensure that only the specializations like ThermalDistributionSystem are instanziated in an EnergyADE document. Is there a reason why we treat EnergyConversionSystem in a different manner? There are many specific classes for energy conversion systems being derived from the base class EnergyConversionSystem, but it is still possible to use the base class.

RomainNouvel commented 7 years ago

Few years ago, we agreed that it would be possible to use a generic EnergyConversionSystem with few details like efficiency, operating mode etc. This can be useful in the cases where:

gioagu commented 7 years ago

In order to accomodate this need, and also in order to have a sort of design "coherency" with the other _EnergySystems, what about keeping the _EnergyConversionSystem also abstract, but to add a "GenericConversionSystem" class, with no other attributes than those inherited from the abstract class? This is also the way it is done in the UtilityNetwork ADE when they need to deal with a "generic" object.