Returned dataframe of THPSimulation.simulate() does not contains duration column.
Line 678 in simulator.py, Xn.reindex() cause this problem.
Change Xn_list.append(Xn.reindex(columns=['event', 'timestamp', 'node'])) to Xn_list.append(Xn) solve the problem.
Version
1.0.4
Current output
|
event |
timestamp |
node |
| 0 |
1 |
6885 |
0 |
| 1 |
2 |
6094 |
0 |
| ... |
... |
... |
... |
| 399337 |
3 |
6924 |
39 |
Expected output
|
node |
event |
timestamp |
duration |
| 0 |
0 |
1 |
7989 |
8.0 |
| 1 |
0 |
1 |
9779 |
12.0 |
| ... |
... |
... |
... |
... |
| 738188 |
39 |
2 |
271 |
47.0 |