mahf-opt / mahf

A framework for modular construction and evaluation of metaheuristics.
GNU General Public License v3.0
10 stars 0 forks source link

Deserialization of `Component`s and `Configuration` #192

Open Saethox opened 1 year ago

Saethox commented 1 year ago

While Configurations are already serializable, the state of deserialization currently looks pretty dire. While some work on de(serialization) of boxed trait objects exists with typetag, it currently does not support trait objects with generic parameters (like Component<P>), and I believe also not generic impls of the trait (e.g. implementing Component for a component with an identifier I).

In general, it would be very nice to deserialize Configurations, especially if they were dynamically created.

Saethox commented 1 year ago

While the issue with deserializing Component<P> could probably be solved by an own Deserialize<P> trait, I'm really not sure how to deserialize structs with generic parameters into boxed trait objects.