PedestrianDynamics / jupedsim

JuPedSim is an open source pedestrian dynamics simulator
http://jupedsim.org
Other
38 stars 26 forks source link

Incompatible constructor arguments #1029

Closed chraibi closed 1 year ago

chraibi commented 1 year ago

On branch SUMO-Integration, latest commit: 15417bae21cc27065bafb4a48b128ed19c4ad27b

Simulating with test_py_jupedsim.py works as expected. However, simulating with this script gets me this error:

Traceback (most recent call last):
  File "/Users/chraibi/workspace/jupedsim/jpscore/librarytest/run_simulation.py", line 111, in <module>
    main()
  File "/Users/chraibi/workspace/jupedsim/jpscore/librarytest/run_simulation.py", line 61, in main
    simulation = jps.Simulation(model, geometry, areas, dt=0.01)
TypeError: __init__(): incompatible constructor arguments. The following argument types are supported:
    1. py_jupedsim.Simulation(arg0: py_jupedsim.OperationalModel, arg1: py_jupedsim.Geometry, arg2: py_jupedsim.Areas, arg3: float)

Invoked with: <py_jupedsim.OperationalModel object at 0x110315770>, <py_jupedsim.Geometry object at 0x1102d3370>, <py_jupedsim.Areas object at 0x1102d57f0>; kwargs: dt=0.01

run_simulation.py.txt

chraibi commented 1 year ago

I found that the problem was in this line:

simulation = jps.Simulation(model, geometry, areas, dt=0.01)

Last parameter should be 0.01 without dt.