agentsoz / bdi-abm-integration

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

Write test to load BDI agents initial states from MATSim population file #44

Closed dhixsingh closed 6 years ago

dhixsingh commented 6 years ago

The test should show that the initial state of a BDI agent can be loaded through the MATSim population file via attributes (see #13). For instance, the following specifies how the hasDependents variable of a given resident agent to be initialised:

<attributes>
   <attribute name="BDIAgentType" class="java.lang.String" >io.github.agentsoz.ees.agents.Resident</attribute>
   <attribute name="hasDependents" class="java.lang.Boolean">true</attribute>
</attributes>
dhixsingh commented 6 years ago

Available since 71ae240. Alternatively, BDI agents can now be specified using option --x-load-bdi-agents-from-matsim-plans-file and specifying a jill config placecholder agents:[] that gets filled based on what is specified in the MATSim plans file.

https://github.com/agentsoz/bdi-abm-integration/blob/71ae240beb83a004ea81ce5dc8ce75a25a09d7b2/examples/bushfire/src/test/java/io/github/agentsoz/ees/Maldon100WithEmergencyVehiclesTest.java#L29-L48

dhixsingh commented 6 years ago

/cc @osbornejr

dhixsingh commented 6 years ago

This doesn't allow per-agent-instance config yet, only per-agent-type. Still to do.

dhixsingh commented 6 years ago

Available since e0b4583. Test Maldon100WithEmergencyVehiclesTest test for this, where three responders now attend to three different locations based on configuration in the MATSim population file (see below):

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

And further below:

https://github.com/agentsoz/bdi-abm-integration/blob/e0b4583f3038390e8c7e8703495b99dad52a7dbd/examples/bushfire/scenarios/mount-alexander-shire/maldon-100-with-emergency-vehicles/scenario_matsim_plans_10.xml#L197-L202