psrenergy/PSRClassesInterface.jl

How should we treat attributes of type `Reference`?

pedroripper opened this issue · 2 comments

For some PMD files we have a different attribute type, labelled REFERENCE

Example:

  PARM REFERENCE Plant  PSRPlant  

From what I've seen so far, it can be either a PARM or a VECTOR, doesn't have a dimension and isn't indexed by another attribute. Also, it points to an element from a different collection inside the study.

When we parse a PMD file, we create PSR.Attribute objects, that have the following structure:

struct Attribute
name::String
is_vector::Bool
type::DataType
dim::Int
index::String
# interval::String
end

From a discussion yesterday, we discovered that in other packages, this attributes stores a string that, when parsed, can lead to the element in the study.

However, we could consider some other options for PSRI, as we store the reference_id for each element in a hash table. So storing the reference_id would be more efficient.

Another alternative would be to store a tuple with the collection name and the element's index in the collection