after some trouble, I can now use the XML-RPC interface to open and run PLECS-simulations from an external tool. But it seems, I can only run one simulation at once: set one parameter, run, wait for the result, modify parameter again, run again, wait for result, …Is is possible, to start multiple simulations on a multicore-system in parallel? I’d need to start PLECS with command line parameters like -multipleinstance -rpcport 1081 -nogui
Well, I think, one could work around this by using a different user for each process. But this would cost too much extra-effort for my project.
So I would like to see such a feature soon
One more idea: The float-to-string/string-to-float conversions and the XML parsing of the XML-RPC response costs a significant percentage of CPU-time. For transfering large result data arrays, a memory mapped buffer (shm_open+mmap for Linux, OpenFileMapping+MapViewOfFile for Windows) would be nice. The XML-RPC could then deliver the name and size of this file.
where simStructs is not just one set of parameters to be modified but an array of such structs. Then there is a third parameter, I guess a pointer to a callback function. But how is this call done in XML-RPC?