I'm glade to announce the major release of SARL version 0.11.
In addition to the traditional bug fixes, four major changes are available: Janus version 3 (a total re-implementation in SARL of the official SARL virtual machine); New types of participants in spaces (making the difference between agents and user interface); New agent spawning API (more robust and parallel); New tool for SARL contributors (pre-configured Eclipse IDE for SARL contributors).
onAgentKilled
.
Hello everyone! Quick question about events: I created a GUI for my agent application and I try to emit an "SetupSettings" event (exactly like in the fireworks example) to my agent like this:
var ^event : SetupSettings = new SetupSettings(s1, s2, rounds, matches)
startAgentApplication(typeof(Organizer), this.launchedAgent) [
^event.emitToAgents
]
However, the "on SetupSettings { ... }" section in my "Organizer" agents never runs. Does anybody know what my problem is? Thanks!
startAgentApplication
may be reimplemented. Additionnally, could you provide on the same issue a snipset of the code of Organizer
and of your JavaFX controller.
Yes, I'm using 0.11.
This is the specific part of my JavaFX controller:
@FXML
def startMatch() {
rounds = Integer.valueOf(roundNum.getText())
matches = Integer.valueOf(gameNum.getText())
var ^event : SetupSettings = new SetupSettings(s1, s2, rounds, matches)
this.launchedAgent = UUID::randomUUID
startAgentApplication(typeof(Organizer), this.launchedAgent) [
^event.emitToAgents
]
}
And this is the part of my Organizer agent:
agent Organizer {
uses Lifecycle, Schedules, DefaultContextInteractions, Logging
var s1 : String
var s2 : String
var matches : int
var rounds : int
on SetupSettings {
this.s1 = occurrence.s1
this.s2 = occurrence.s2
this.matches = occurrence.matches
this.rounds = occurrence.rounds
info("s1 = " + this.s1 + ", s2 = " + this.s2)
info("matches = " + this.matches + ", rounds: " + this.rounds)
}
...