sogno-platform/dpsim

Missing "stop" function in the "Simulation" pybind binding

Closed this issue · 1 comments

When using dpsim with the python interface, there is an option to do simulations in steps.

After using Simulation.start() to initiate the simulation and Simulation.step() in a loop to calculate the intermediate results, the Simulation.stop() method is called, but it does not exist and raises an exception.

One would expect this function present in the Simulation class


to also be in the mapping class
py::class_<DPsim::Simulation>(m, "Simulation")
but is not.

This is now being used in a project context with jupyterlab, so it would be nice if we could have the changes also released in PyPI (to enable installation in an easy way).

PR #247 proposes a solution that solves the issue, thanks to @martinmoraga for the hints on how to tackle the problem.