I am planning to develop an application about agent migration. In this application an agent in the first sunspot collects the environmental data, i.e., temperature, light, battery level, etc. when the data collection ends, a new agent will be created and this agent will migrate to the second sunspot and displays the collected data. I am wondering if it is possible or not? Would you please tell me how i manage to develop? Thanks in advance.
Best regards,
Hakan.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
This functionality is currently not provided by AFME. Probably the easiest way to implement it is to use an actuator to sent an agent design to the target platform using the Radio gram and stream classes. To implement this, you will need to take a look at how the migration works in the agent platform and in the migration manager class.
An alternative would be to modify the platform (or template for generating the platform) and create a service that references the platform. The service could then call a method that creates an agent.
Hope this helps,
Conor
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thank you for your response. I would like to ask another question. Would you please tell me how i pass parameters to the mobile agents? I want to develop a simple application. Let me explain with one example. There are two sensor nodes. In the first node the agent counts to a random number, then migrates to the second node and continues to count where it left off in the second node, and then returns to the first node and continues to count, and this proces goes on. Here i need to pass this count parameter between nodes. Thanks in advance.
Best regards,
Hakan.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
For the count to be transferred, you will need to adopt it as a belief. So, for instance, you could adopt an initial belief in the agent platform script of count(0). Then in the agent design, have something like: count(?num)>updateCount(?num). In the update count actuator convert the FOS to an int, increment it, and then adopt a count belief. When the agent migrates, the count will still be present.
Hope this helps,
Conor
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
2010-04-08 23:09:19 EEST
Hi Mr.Conor Muldoon,
I am planning to develop an application about agent migration. In this application an agent in the first sunspot collects the environmental data, i.e., temperature, light, battery level, etc. when the data collection ends, a new agent will be created and this agent will migrate to the second sunspot and displays the collected data. I am wondering if it is possible or not? Would you please tell me how i manage to develop? Thanks in advance.
Best regards,
Hakan.
Hi Hakan,
This functionality is currently not provided by AFME. Probably the easiest way to implement it is to use an actuator to sent an agent design to the target platform using the Radio gram and stream classes. To implement this, you will need to take a look at how the migration works in the agent platform and in the migration manager class.
An alternative would be to modify the platform (or template for generating the platform) and create a service that references the platform. The service could then call a method that creates an agent.
Hope this helps,
Conor
Dear Mr.Conor Muldoon,
Thank you for your response. I would like to ask another question. Would you please tell me how i pass parameters to the mobile agents? I want to develop a simple application. Let me explain with one example. There are two sensor nodes. In the first node the agent counts to a random number, then migrates to the second node and continues to count where it left off in the second node, and then returns to the first node and continues to count, and this proces goes on. Here i need to pass this count parameter between nodes. Thanks in advance.
Best regards,
Hakan.
Hi Hakan,
For the count to be transferred, you will need to adopt it as a belief. So, for instance, you could adopt an initial belief in the agent platform script of count(0). Then in the agent design, have something like: count(?num)>updateCount(?num). In the update count actuator convert the FOS to an int, increment it, and then adopt a count belief. When the agent migrates, the count will still be present.
Hope this helps,
Conor
Thanks a lot, i really appreciate.