I have created a model and afterwards deleted states from that model. Thus, the ids of my states are no longer continuous. Now when I try to convert this model into a stormpy model I get the following exception:
Exception has occurred: RuntimeError (note: full exception trace is shown but execution is paused at: <module>)
OutOfRangeException: Item index out of range.
File "/home/luko/Documents/MDP-product/env/lib/python3.11/site-packages/stormvogel/mapping.py", line 66, in add_labels
state_labeling.add_label_to_state(label, state[0])
File "/home/luko/Documents/MDP-product/env/lib/python3.11/site-packages/stormvogel/mapping.py", line 200, in map_pomdp
state_labeling = add_labels(model)
^^^^^^^^^^^^^^^^^
File "/home/luko/Documents/MDP-product/env/lib/python3.11/site-packages/stormvogel/mapping.py", line 283, in stormvogel_to_stormpy
return map_pomdp(model)
^^^^^^^^^^^^^^^^
File "/tmp/ipykernel_142866/3029802077.py", line 1, in <module> (Current frame)
storm_pomdp = stormvogel_to_stormpy(pomdp)
As far as I can see, the error occurs because the state labelling is initialized with the amount of states:
I have created a model and afterwards deleted states from that model. Thus, the ids of my states are no longer continuous. Now when I try to convert this model into a stormpy model I get the following exception:
As far as I can see, the error occurs because the state labelling is initialized with the amount of states:
But it uses the non-continuous ids to add labels to the states in the state labelling: