marinlauber / Python-VPP

3-DOF Velocity Prediction Program
MIT License
47 stars 27 forks source link

Executing Benchmark leads to: IndexError: index 3 is out of bounds #5

Closed MG-ng closed 11 months ago

MG-ng commented 11 months ago

I tried executing the benchmark but it lead to an error which you can see after "Optimization successful":

$> python benchmark/benchmark.py -g -o OUTPUT_NAME
Analysis set for TWS:  [5.83203733]
Analysis set for TWA:  [ 41.499       44.6203871   47.74177419  50.86316129  53.98454839
  57.10593548  60.22732258  63.34870968  66.47009677  69.59148387
  72.71287097  75.83425806  78.95564516  82.07703226  85.19841935
  88.31980645  91.44119355  94.56258065  97.68396774 100.80535484
 103.92674194 107.04812903 110.16951613 113.29090323 116.41229032
 119.53367742 122.65506452 125.77645161 128.89783871 132.01922581
 135.1406129  138.262     ]
Using sail quiver  ['YD41 + YD41', 'YD41 + YD41']
Sailing in TWS : 5.8
Sail Config :  YD41 + YD41
100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 32/32 [00:02<00:00, 12.33it/s]
Sail Config :  YD41 + YD41
100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 32/32 [00:01<00:00, 17.32it/s]

Optimization successful.
Traceback (most recent call last):
  File "/workspaces/Python-VPP/benchmark/benchmark.py", line 257, in <module>
    benchmark(parser.parse_args())
  File "/workspaces/Python-VPP/benchmark/benchmark.py", line 234, in benchmark
    calc[s] = compute(s, bm[gt][s][:, 0])
  File "/workspaces/Python-VPP/benchmark/benchmark.py", line 69, in compute
    res[i, :] = [twa , max(vpp.store[0, :, 0][i], vpp.store[0, :, 3][i])]
IndexError: index 3 is out of bounds for axis 2 with size 2

I'm not quite sure how it's supposed to be… Has anyone experienced this too?

marinlauber commented 11 months ago

Hey, This should not throw an error, I will have a look. Cheers, Marin

marinlauber commented 11 months ago

This should have been resolved with c83ff0f0917dd548a9e33c17d514979d557bf774

MG-ng commented 11 months ago

Yes you solved it, thank you very much!