Closed ericman314 closed 5 years ago
T0.value is a GK_Value, not a float. GK_Value has T0.value.value, T0.value.change, etc. The issue appears to be nested GK_Value definitions when initializing. Something like:
T = m.Var(T0.value.value)
would work but this is non-intuitive. I'm working on a fix either in gk_operators.py or else in gekko.py.
This will be fixed in 0.2rc5. I updated gk_operators.py to identify when the initialized value is a GK_Value and extract the value.value.
When I try to assign a gekko Param to a Var:
I get this:
If I just assign a number to it, it works:
Being able to assign one Param to another, or at the very least a better error message, would be helpful.