PowerSystemDataModel icon indicating copy to clipboard operation
PowerSystemDataModel copied to clipboard

Check whether `FactoryData` and subclasses can be eliminated

Open sebastian-peter opened this issue 1 year ago • 3 comments

As another successive issue of #969, there might be a way to eliminate FactoryData and all its subclasses (EntityData etc.) by creating AssetInputs and similar entities directly. To make this work, the new constructors in the form of AssetInputEntityData(EntityData entityData, OperatorInput operator) (but of course adapted for AssetInputs) could be used to iteratively create Inputs from the simplest UniqueEntity to the desired input type.

A side effect of this would be that error messages would be easier to create, since there is no way of ensuring that a FactoryData also includes UUID and id.

sebastian-peter avatar Jan 03 '24 14:01 sebastian-peter

@sebastian-peter To do this we'd have to change classes like AssetInput and UniqueInput from being abstract. This should be done after #1044.

staudtMarius avatar Mar 13 '24 11:03 staudtMarius

@sebastian-peter To do this we'd have to change classes like AssetInput and UniqueInput from being abstract. This should be done after #1044.

Yes, and I'm not really sure if that'd be smart. We should think this through beforehand.

sebastian-peter avatar Mar 15 '24 14:03 sebastian-peter

@sebastian-peter If you want, we could talk about this next week.

staudtMarius avatar Mar 15 '24 14:03 staudtMarius