Models should not specify _nvar
maedoc opened this issue · 1 comments
maedoc commented
Describe the bug
Models can specify incorrect _nvar
.
Steps to reproduce
class Model:
_nvar = 3
state_variables = 'r', 'V'
m = Model()
m.nvar() != len(m.state_variables)
Expected results
class Model:
state_variables = 'r', 'V'
m = Model()
m.nvar() == len(m.state_variables)
The nvar
property should self._nvar = len(m.state_variables)
and return that. Better if these become immutable attributes.