Hi Markus,
first of all, welcome to the list! Thanks for your introduction and description of what you’re planning to do (it absolutely _makes_ sense what you’ve written 😉). So you’re absolutely correct, a pipeline element in StreamPipes takes some input events, applies an algorithm and forwards the result to another pipeline element (which could be another algorithm or a sink such as a database or notification system). Pipeline elements are written using a provided Software Development Kit, where we currently mainly support Java, but the community is currently also working on a Python-based SDK. A pipeline element can include the implementation of the algorithm itself, but you could also think of a pipeline element that only provides some StreamPipes logic (e.g., the description of input requirements which define what kind of input signals are needed by the algorithm) and triggers a service that provides the algorithm itself. In general, I’m not really familiar with Matlab, but as far as I understood, you can provide a Matlab algorithm as a standalone service. The question will be if/how this service can be invoked/accessed from outside (e.g., as a web service). Another option would be to use some integration (maybe a bridge or a library as this one at [1]?) of Matlab with one of the supported programming languages (Java and Python), if there is any. To give you a good answer, it would also be interesting what kind of algorithm you’d plan to integrate and how input signals look like. So sorry that there is no simple Yes/No answer by know, but we’re happy to help you finding out whether StreamPipes fits your needs. Maybe also this talk might be interesting to learn a bit about StreamPipes: <https://www.youtube.com/watch?v=mlbPYBjXosA> https://www.youtube.com/watch?v=mlbPYBjXosA Dominik [1] <https://www.mathworks.com/help/matlab/matlab-engine-api-for-java.html> https://www.mathworks.com/help/matlab/matlab-engine-api-for-java.html From: Markus Neuvonen <[email protected]> Sent: Friday, August 14, 2020 2:14 PM To: [email protected] Subject: Matlab as a processing element? Hello, I am developing a digital twin of a power plant. The twin, along with associated optimization algorithms, will be implemented in Matlab. My work is a part of a larger project, where several similar-ish tools will be integrated into same toolbox. The project has suggested StreamPipes to be used as a common platform for this shared toolbox of all sub-projects. Now I would need to confirm whether this kind of Matlab digital twin can be integrated into StreamPipes or not. Unfortunately I do not have the skills to evaluate such a thing. After three days of trying, I have been able to install StreamPipes and I have run the tutorials to have a vague feel for what the software does. IF I have understood correctly, I would need to create a custom pipeline processing element that takes input signals, calls _somehow_ the algorithms written in Matlab, and sends the outputs to sink. Is this correct? This part would be some sort of Java-implementation(?), along the lines of examples that are given in Developer Tutorials. As I have zero experience in Java, this interface would need to be either super simple to do, or done by someone else. Once done, it would need to be fixed for given inputs and outputs – to enable working with the Matlab-part while not worrying about the Java-part. My assumption is that the best way to integrate the Matlab-part would be by compiling it as an executable. Running Matlab executables requires an installation of standalone Matlab Runtime. How to have Matlab Runtime running in StreamPipes in order to run the integrated Matlab executables, I have no idea. I actually don’t even know if any of what I’ve written so far makes sense. I would greatly appreciate if someone would take the time to answer “Yes, this kind of thing can be done!” or “No, it would require at least a few weeks of work.” to the question of integration of Matlab to StreamPipes. If added information is needed from the Matlab-side to determine if integration is possible, I can be in contact with Matlab’s support. Markus Neuvonen | PhD student , M.Sc. University of Oulu | Intelligent Machines and Systems Phone: 040 584 3079 Room: TF318
