cazevedo / gspn-lib

Python API to create generalized stochastic Petri nets (GSPNs). It allows to capture multi-robot problems as a GSPN and simulate the model.
1 stars 1 forks source link

Running into error while running the gspn_build_example.py #3

Closed rach21nag closed 1 year ago

rach21nag commented 1 year ago

{'t1': ['imm', 5], 't2': ['imm', 4], 't3': ['imm', 1], 't4': ['exp', 1], 't5': ['imm', 0.6], 't6': ['imm', 0.4], 't7': ['exp', 1]} Traceback (most recent call last): File "d:\Thesis\gspn-lib\examples\gspn_build_example.py", line 28, in a, b = my_pn.add_arcs(arc_in, arc_out) File "d:\thesis2\petrinets\gspn-lib\gspn_lib\gspn.py", line 229, in add_arcs
aux_in_list[1].append(self.transitions_to_index[transition_in]) KeyError: 't'

This is the error I am getting. But I don't see 't' used anywhere. Not sure how to debug this. Could you please help me?

cazevedo commented 1 year ago

Hi @rach21nag can you please put here the code you are trying to run.

Thank you

rach21nag commented 1 year ago

I am trying to run the example code from your repository. https://github.com/cazevedo/gspn-lib/blob/noetic/examples/gspn_build_example.py

cazevedo commented 1 year ago

Sorry I updated the gspn lib to allow arc weights different than 1 and forgot to update the example. Now it is fixed. Please do git pull and try running the example again.