licit-lab / symupy

SymuPy: A python API for SymuVia
https://symupy.readthedocs.io/en/stable/
MIT License
4 stars 3 forks source link

Having the possibilty to manage multiple simulation at once #82

Open floriangc opened 3 years ago

floriangc commented 3 years ago

Problem

I want to run at least 2 simulation at the same time, so to register for on SymuFlow dll multiple simulation. Currently SymuPy only use the defualt network id when calling the C interface.

aladinoster commented 2 years ago
aladinoster commented 2 years ago

Use case:

x = cdll.LoadLibrary('libSymuFlow.dylib')
id_sim1 = x.LoadNetwork('my_file.xml')

id_sim2 = x.LoadNetwork('my_file.xml')
x.SymurunNextStepEx(id_sim1)
simulator = Simulator() #id1 
simulator2 = Simulator() #id2

with simulator1, simulator2: 
   simulator1.run_step()
   simulator2.run_step()
aladinoster commented 2 years ago

No updates