agentsoz / bdi-abm-integration

BDI ABM Integration
GNU Lesser General Public License v3.0
8 stars 13 forks source link

Specify BDI agents via population XML #13

Closed dhixsingh closed 6 years ago

dhixsingh commented 6 years ago

Currently, the way BDI agents are specified for EES is a bit messy.

What we would like is this:

One issue with doing this is that at the moment we do not have an explicit map from MATSim population IDs to Jill IDs so this will need to be setup first (raised #14 for this).

osbornejr commented 6 years ago

Further to this, it would be good if in the MATsim population file the attribute indicated which type of BDIagent the agent should be. Like BDIagent='Resident', BDIagent='Responder' etc. In this format, an agent that doesn't need a BDI correspondant could have attribute BDIagent='null'.

dhixsingh commented 6 years ago

@osbornejr, yes likely we want more than one attribute and the ability to add more as we need them. Seems we could do something like this:

<person id="0">
  <attributes>
    <attribute name="BDIAgentType" class="java.lang.String" >io.github.agentsoz.ees.agents.Resident</attribute>
  </attributes>
  <plan selected="yes">
    ...
  </plan>
</person>
kainagel commented 6 years ago

Added a test AttributesInPopulationTest which should explain this. Let me know if you have questions.

dhixsingh commented 6 years ago

@kainagel, is AttributesInPopulationTest not pushed maybe? I can't see it yet.

dhixsingh commented 6 years ago

@kainagel thanks, AttributesInPopulationTest is there now since 845fc54442933312649711ea0d887eb296421365. Yes that's all we need, I can take it from here.

dhixsingh commented 6 years ago

Available since 71ae240. Example input is:

https://github.com/agentsoz/bdi-abm-integration/blob/71ae240beb83a004ea81ce5dc8ce75a25a09d7b2/examples/bushfire/scenarios/mount-alexander-shire/maldon-100-with-emergency-vehicles/scenario_matsim_plans_10.xml#L10-L23

And further below:

https://github.com/agentsoz/bdi-abm-integration/blob/71ae240beb83a004ea81ce5dc8ce75a25a09d7b2/examples/bushfire/scenarios/mount-alexander-shire/maldon-100-with-emergency-vehicles/scenario_matsim_plans_10.xml#L181-L194