How to get variables of a constraint in Pyomo

后端 未结 1 1177
春和景丽
春和景丽 2021-01-29 06:26

In Pyomo, how can I get a list of the variables appearing in a constraint?

I combed through the code in Github, but could not a find any suitable method or attribute fo

相关标签:
1条回答
  • 2021-01-29 07:10

    I found the answer myself: model.con1.body._args gets you the desired list.

    0 讨论(0)
提交回复
热议问题