Closed steve-biggs-fox closed 2 months ago
I got the description to work like this:
class PythonSlave(Fmi3Slave):
def __init__(self, **kwargs):
super().__init__(**kwargs)
self.description = (
"A simple description"
)
....
i.e. the description needs to be an instance variable (self.description within the init method), not a class variable (just description within the class but outside any methods).
So, it seems this is a problem with the documentation rather than the code.
I'll have to look at this as I have not come across it, thanks for raising it! (And finding the solution)
Fixed. Indicated that the description should appear in __init__
rather than as a class attribute.
Documentation shows that the model description should be specified like this:
However, if I then run
fmpy.dump(...)
on the resultant FMU, it displays the following:By contrast, if I run
fmpy.dump(...)
on an FMU generated by another program, then I get, for example:i.e. the problem is not with
fmpy.dump(...)
.