org-arl / fjage

Framework for Java and Groovy Agents
https://fjage.readthedocs.io/en/latest/
Other
26 stars 13 forks source link

`ParameterMessageBehavior` should only generate a `ParameterChangeNtf` if the parameter value was changed #297

Closed notthetup closed 8 months ago

notthetup commented 9 months ago

ParametersMessageBehaviour triggers onParamChange as long as the setter or the setting of parameters is successful (i.e. doesn't throw or return a null) , which means it would be triggered even if the old value and the new value were the same and there wasn't a change of the parameter value.

From the perspective of another Agent, it's more useful to specifically know if a parameter value did change rather than just the fact that a parameter change was attempted. This would reduce a lot of noise created when setting the same value again and again.