Skip to content

How to traverse into components of a model? #356

Discussion options

You must be logged in to vote

Hi @lagamura,
model.components is a class that manages the components, that is why you cannot iterate over it.
I recommend you to use the model documentation to iterate over the components, it is a pandas.DataFrame, for example (teacup.mdl):

>>> model.doc
             Real Name              Py Name Subscripts                      Units          Limits       Type Subtype                                            Comment
0  Characteristic Time  characteristic_time       None                    Minutes      (0.0, nan)   Constant  Normal  How long will it take the teacup to cool 1/e o...
1           FINAL TIME           final_time       None                     Minute      (nan, nan)   Const…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by enekomartinmartinez
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants