Open victorventuri opened 1 week ago
Perhaps the solution would be to create an RC_Elements class (based on the HealthParameter
class) which holds all the RC elements, and its to_numpy
method only outputs the internal parameters of those which can vary with time.
One thought: the SystemState
class currently differentiates the parameters within a list by appending a number after the name (e.g., name_0
). https://github.com/ROVI-org/auto-soh/blob/pydantic-progpy/asoh/models/base.py#L75
Do you think we could have users provide either the name of the attribute to adjust all values (e.g., 'name'
) or a list of specific members within the list to get only get a subset (e.g., 'name_0'
as a string, or ('name', [0])
as a tuple)?
The list of which attributes to adjust would be part of the Estimator class in this picture, so that the same Parameter can be used with multiple filters each acting on different parameters.
PS. I deleted a comment I made earlier about the tuple[float, ...]
because I misread your question. Sorry, I shouldn't go on GitHub before coffee.
We want to allow the user to specify what type of ECM they want, as well as whether to include a series capacitor, and how many RC elements to consider, etc.. We also want to allow the user to specify which of these components should be estimated, and which should be considered fixed.
So, assume a user wants 3 RC components, but only wants us to estimate the RC values for 2 of them, as they are very certain of the values of the third one. How would we go about implementing something like this with
pydantic
'sBaseModel
?My original idea was to dynamically add more RC components as needed (see this issue), but I feel this makes it difficult to deal with cases where some would be updated and some wouldn't...