IndexError + logical error running nl_disturbances.txt
When running etc2traffic.py with nl_disturbances.txt, I get the following error:
Dynamics Matrix([[-w1**2*x1], [d1*w1**3 - w1**2*(e2 + x2) + x1**2*x2 + x2**3 - (e1 + x1)**2*(e2 + x2) - (e2 + x2)**3], [0], [w1**2*x1], [-d1*w1**3 + w1**2*(e2 + x2) - x1**2*x2 - x2**3 + (e1 + x1)**2*(e2 + x2) + (e2 + x2)**3], [0]]) are not yet homogeneous.
Make Homogeneous with degree 2.0 (Default: 2)
Traceback (most recent call last):
File "/Users/gdelimpaltadak/Desktop/Material/Code/Python/Sentient/etc2traffic.py", line 72, in <module>
traffic = construct_nonlinearETC_traffic_from_file(input_file)
File "/Users/gdelimpaltadak/Desktop/Material/Code/Python/Sentient/sentient/util/construct_from_file_nonlinearETC.py", line 253, in construct_nonlinearETC_traffic_from_file
traffic = abstr.TrafficModelNonlinearETC(dict_key_to_attrs['Dynamics'], dict_key_to_attrs['Triggering Condition'], state_vector,
File "/Users/gdelimpaltadak/Desktop/Material/Code/Python/Sentient/sentient/Abstractions/NonlinearETC/TrafficModelNonlinearETC.py", line 221, in __init__
self.Lie = self.lie_derivatives()
File "/Users/gdelimpaltadak/Desktop/Material/Code/Python/Sentient/sentient/Abstractions/NonlinearETC/TrafficModelNonlinearETC.py", line 525, in lie_derivatives
dic[self.State[i]]=-self.State[i-int(len(self.State)/2)]+self.Init_cond_symbols[i-int(len(self.State)/2)]
IndexError: tuple index out of range
Process finished with exit code 1
Does anyone else get this index error? Also, why does the code infer that the given dynamics is not homogeneous? I think it is (note that d1 should count as a constant, not a variable).
Edited by Giannis Delimpaltadakis