Torsten Sommer

Results 161 comments of Torsten Sommer

Would it be possible to calculate and cache the values upon the first invocation of the respective API functions?

Does `unzipdir` contain the file `binaries/win32/p4_vecu_sbw_cyt2b.exe`?

You can pass the extracted FMU to `simulate_fmu()`: ```python from fmpy import * unzipdir = extract('p4_vecu_sbw_cyt2b.fmu') result = simulate_fmu(unzipdir) ```

According to https://www.pythonguis.com/faq/pyqt-vs-pyside/ you need a commercial PyQt license if you bundle it with your software and you don't want to ship the source code.

If the FMU supports it, you can get the FMU state after the initialization and then set it before every iteration (see also https://github.com/CATIA-Systems/FMPy/blob/main/tests/test_fmu_state.py).

> I haven't found a way to give an already instantiated FMU as an input to the function, because, if I understand correctly, the FMU can't be pickled. You can...

Can you share some code and an FMU to reproduce the problem?

You should be able to adapt [this example](https://github.com/claxerity/FMPy/blob/master/fmpy/examples/optimize_eggholder_function.py#L39) for your use case. It stores the FMU instance as an attribute of the function to be executed, so there is exactly...

If you're comfortable hacking the source code you can set `maxNumSteps` in https://github.com/CATIA-Systems/FMPy/blob/main/fmpy/simulation.py#L997: ```Python solver = CVodeSolver(..., maxNumSteps=1000) ```