saroele / awesim

Python module for management of Modelica simulation files in .mat format
46 stars 13 forks source link

Create new class for result of simdex.get() #14

Open saroele opened 12 years ago

saroele commented 12 years ago

I think we could benefit from an additional class. Now, simdex.get() returns a dictionary {sid:value}. I find it cumbersome to do operations on this dictionary, like plotting all of the values with their legend etc. Of course, it is possible, but if I made an additional class of this, I could also implement some very useful features.

Suppose we call this class Result. The core of a result would be the {sid:value} dictionary. Maybe it's even a better idea to extend Result from the dictionary class in order to inherit some of the methods?

Some needed functionality:

It seems like the most easy way will be to make my own class an have a few dictionaries as attributes