The FMI standard allows duplicate value references, as long as its possible to distinguish the variables somehow, possibly by type.
Currently, an exception is thrown if get_xxx is called and a variable with another type exists.
Correct behavior would be to ignore it.
def __get_integer__(self, vrs, refs):
for i in range(len(vrs)):
vr = vrs[i]
var = self.vars[vr]
if var.is_integer():
refs[i] = getattr(self, var.name)
else:
raise Exception(
f"Variable with valueReference={vr} is not of type Integer!")
The FMI standard allows duplicate value references, as long as its possible to distinguish the variables somehow, possibly by type.
Currently, an exception is thrown if get_xxx is called and a variable with another type exists. Correct behavior would be to ignore it.