Project-OMOTES / simulator-core

Core library for NWN simulator
GNU General Public License v3.0
1 stars 0 forks source link

refactor mappers #143

Open samvanderzwan opened 3 months ago

samvanderzwan commented 3 months ago

Discussed with Michiel. The mappers should be refactored to handle all the esdl logic, This means creating an mapper function for each asset and also parsing the data in that mapper. This can also help in simplifying some functions.

MichielTukker commented 1 month ago

Use EsdlControllerMapper as an example, refactor EsdlEnergySystemMapper to match that pattern

vanmeerkerk commented 1 month ago

For every asset - such as the pipe - create a mapper. The mapper will get all the properties from the ESDL-asset and assign them to the asset.

For the pipe, this would mean that the enitity pipe is constructed with an inner diameter, roughness, length, etc. The setpoints will not be assigned.

vanmeerkerk commented 1 month ago

Goal: to not use the 'EsdlAssetObject' in our own entities, such as the pipe, the consumer, etc.

Start with the pipe and then ask for a review.

Take your time!