This article will explore different approaches to connecting JADE (Official Website) (Java Agent Development Framework) with MATLAB/Simulink for multi-agent simulations. By integrating these two powerful tools, we can create comprehensive simulations of multi-agent systems.
I first encountered this problem of connecting JADE with MATLAB in 2018-2019 while doing my master's project. It was not my own project but one of my friends' projects required this functionality to be implemented. The project was to develop a system that can do several control functions of a microgrid. In the research area of muti-agent control for microgrids, this method of connecting JADE with MATAB/Simulink was the most common way to implement it. He finally achieved this using one of the methods discussed here and published his work at an international conference. Also, during 2021-2022 I encountered the same problem but I needed a more robust approach compared to his since this time the simulation was to be extended to a real system after the simulation phase is done. I reviewed several ways to achieve this task and this article will explore them.
- MACSimJX: A Tool for Enabling Agent Modelling with Simulink Using JADE: MACSimJX is an open-source package that serves as a wrapper between MATLAB Simulink and JADE, integrating the two environments for agent-based modelling and control. The main drawback of this method is that it only works with some MATLAB versions released in the 2010-2011 period. Integrating this into later versions is not straightforward since the tool itself is not open-source.
- Data Exchange Through Files: A straightforward approach is data exchange via files. JADE agents can write data to a shared file location accessible by MATLAB/Simulink. Meanwhile, MATLAB/Simulink can continuously monitor the file for changes and read the data written by the agents. This method allows for asynchronous data exchange, making it suitable when real-time interaction is not necessary. By leveraging this approach, JADE and MATLAB/Simulink can effectively communicate and exchange information, facilitating comprehensive multi-agent simulations. This is arguably the easiest way to do this with a lot of conference papers mentioning it or similar ways like using databases. This is what my friend did.
- TCP/IP Sockets: JADE agents can establish a socket connection and transmit data to MATLAB/Simulink. On the other hand, MATLAB/Simulink can listen to the specified socket and receive the data sent by the agents. This method enables real-time interaction between JADE agents and MATLAB/Simulink simulations, allowing for seamless communication and synchronization. By utilizing socket communication, JADE and MATLAB/Simulink can effectively exchange information and create comprehensive multi-agent simulations. This seems to be a robust way to achieve this with the capability of reusing in a prototype. This is the method I preferred for that reason. Also, later I found that there was an implementation by Robin Roche in GitHub which is very useful. The link is given at the end of the article.
- MACSimJX paper: MACSimJX: a tool for enabling agent modelling with Simulink using JADE
- MACSimJX website: Software for Multi-agent Control
- TCP/IP Socket project: robinroche/mat2jade: A basic interface between Matlab and JADE agents using TCP/IP (github.com)
- TCP/IP paper: Multi-Agent System using JADE for Distributed DC Microgrid System Control
Comments
Post a Comment