What is the current behavior?
Indexing error in line 505 and 510 of "bms/core.py" (VariablesValues method)
If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem Avoid reference to other packages
import bms
from bms.signals.functions import Step
from bms.blocks.continuous import Gain
te = 10
ns = 500
R = Step(('In', 'R'))
Y = bms.Variable(('Out', 'Y'))
G = Gain(R, Y, 1)
system = bms.DynamicSystem(te, ns, [G])
simulation = system.Simulate()
system.VariablesValues(Y, t=1)
* **What is the expected behavior?**
>>> 1 (Print a number)
* **What is the motivation / use case for changing the behavior?**
The function dont work
* **Possible fixes**
cast "i" variable in line 505 and 510 like "int(i)"
`variables.values[int(i)]*((ti-t)/self.ts+1)+variables.values[i+1]*(t-ti)/self.ts)`
* **Please tell us about your environment:**
- branch: master
- commit: 245d56c
- python version: Python 3.7.7
I'm submitting a ...
What is the current behavior? Indexing error in line 505 and 510 of "bms/core.py" (VariablesValues method)
If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem Avoid reference to other packages
te = 10 ns = 500
R = Step(('In', 'R')) Y = bms.Variable(('Out', 'Y'))
G = Gain(R, Y, 1)
system = bms.DynamicSystem(te, ns, [G]) simulation = system.Simulate() system.VariablesValues(Y, t=1)