Description
AdmittanceModel
s are not considered equal if columns of the input/output port matrices are permuted, with port names correspondingly permuted. I think it should be safe to consider such models equal---the ordering is entirely arbitrary and not even tied to gauge choice. Columns of the port matrix are not indexed directly, rather only after looking up the column index using the port names vector. Likewise, I think Circuit
s should be considered equal if equal up to a permutation of the vertices.
Furthermore, I noticed there is an isapprox
method defined for AdmittanceModel
s. It appears convenient for some tests but I am not sure how correct it is to implement this because the atol
and rtol
flags are inaccessible. atol
and rtol
would be most useful if they were able to be specified for each matrix separately in the case of a PSOModel
(or Circuit
, which is not an AdmittanceModel
but has a method similarly defined). As implemented, the method does not work in general, because isapprox
is not defined for arrays of String
port names, for example. Finally, I think there is a sense in which one could speak of different kinds of models approximating each other but that's not allowed here.
AdmittanceModels.jl/src/admittance_model.jl
Lines 87 to 102 in f100752