Open nmontesg opened 2 years ago
Hi, unfortunately this feature is not implemented yet! But, for sure, it would be a valuable improvement for future releases.
Hi, a somewhat related question is whether a custom agent class can accept arguments. In my case, I want to have a custom agent class with an array of "back up" belief bases. I would like the number of back ups to be an argument provided at runtime. Is this possible? If so, what methods should be overriden (constructor of initAg()
)?
Hi Nives,
All arguments informed for an agent in the .mas2j are stored and available at runtime. They are inside the classe Settings (called UserParameters), that belongs to TransitionSystem, that every agent has one.
I wrote an example:
https://github.com/jason-lang/jason/tree/develop/demos/custom-ag
HTH,
Jomi
On 7 Jun 2022, at 05:35, Nieves Montes Gómez @.***> wrote:
Hi, a somewhat related question is whether a custom agent class can accept arguments. In my case, I want to have a custom agent class with an array of "back up" belief bases. I would like the number of back ups to be an argument provided at runtime. Is this possible? If so, what methods should be overriden (constructor of initAg())?
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.
Hi Jomi,
thanks for the response, it was very helpful!
Hi,
Is it possible to pass command-line arguments when calling the
jason
script?I would like to have command-line arguments when running jason
$jason project.mas2j
that are passed to the MAS file:Is it possible to do such a thing?