agentsoz / bdi-abm-integration

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

Implement and test new BDI behaviour for residents #45

Closed dhixsingh closed 6 years ago

dhixsingh commented 6 years ago

Implement and test a new Jill resident agent type as per the following behaviour:

gor behaviours _ 31 jul 2018 gor behaviours _ 31 jul 2018 1

dhixsingh commented 6 years ago

Residents' behaviour mostly in place since c2d0d46. Here is the log for a couple of agents that show diverse behaviours:

Time -0001 Resident 0         : memory:-1:BELIEVED:DEPENDENTS_INFO:(Dependent, coords=732198.84,5743741.61), last visited at time=-1.0
Time 36002 Resident 0         : memory:36002:PERCEIVED:emergency_message:ADVICE
Time 36002 Resident 0         : memory:36002:BELIEVED:RESPONSE_BAROMETER_MESSAGES_CHANGED=0.1
Time 36002 Resident 0         : memory:36002:DECIDED:INITIAL_RESPONSE_THRESHOLD_BREACHED
Time 36002 Resident 0         : memory:36002:DECIDED:FINAL_RESPONSE_THRESHOLD_BREACHED
Time 36002 Resident 0         : memory:36002:DECIDED:INITIAL_AND_FINAL_RESPONSE_THRESHOLDS_BREACHED_TOGETHER
Time 36002 Resident 0         : memory:36002:DECIDED:TRIGGER_INITIAL_RESPONSE_NOW
Time 36002 Resident 0         : memory:36002:DECIDED:TRIGGER_FINAL_RESPONSE_NOW
Time 36002 Resident 0         : memory:36002:DECIDED:IS_PLAN_APPLICABLE:InitialResponse|PlanVisitDependentsIfNearby=false
Time 36002 Resident 0         : memory:36002:DECIDED:IS_PLAN_APPLICABLE:InitialResponse|PlanGoHomeIfDependentsAfar=true
Time 36002 Resident 0         : memory:36002:DECIDED:IS_PLAN_APPLICABLE:InitialResponse|PlanInitialResponseWithoutDependents=false
Time 36002 Resident 0         : memory:36002:DECIDED:IS_PLAN_APPLICABLE:InitialResponse|PlanDoNothing=true
Time 36002 Resident 0         : memory:36002:DECIDED:GO_HOME_NOW
Time 36002 Resident 0         : memory:36002:ACTIONED:drive to=(home, coords=777487.95417,5742688.0183)
Time 36167 Resident 0         : memory:36167:PERCEIVED:arrived:52753
Time 36167 Resident 0         : memory:36167:BELIEVED:ARRIVED_HOME
Time 36167 Resident 0         : memory:36167:DECIDED:GO_VISIT_DEPENDENTS_NOW
Time 36167 Resident 0         : memory:36167:ACTIONED:drive to=(Dependent, coords=732198.84,5743741.61)
Time 39867 Resident 0         : memory:39867:PERCEIVED:arrived:20384-20386-20388-49535-38070-38068-38066-38064
Time 39867 Resident 0         : memory:39867:BELIEVED:ARRIVED_AT_DEPENDENTS
Time 39867 Resident 0         : memory:39867:BELIEVED:DEPENDENTS_INFO:(Dependent, coords=732198.84,5743741.61), last visited at time=39867.0
Time 39867 Resident 0         : memory:39867:DECIDED:GO_HOME_NOW
Time 39867 Resident 0         : memory:39867:ACTIONED:drive to=(home, coords=777487.95417,5742688.0183)
Time 43202 Resident 0         : memory:43202:PERCEIVED:emergency_message:WATCH_AND_ACT
Time 43202 Resident 0         : memory:43202:BELIEVED:RESPONSE_BAROMETER_MESSAGES_CHANGED=0.2
Time 43266 Resident 0         : memory:43266:PERCEIVED:arrived:52753
Time 43266 Resident 0         : memory:43266:BELIEVED:ARRIVED_HOME
Time 43266 Resident 0         : memory:43266:DECIDED:IS_PLAN_APPLICABLE:ActNow|PlanGoHomeThenLeave=true
Time 43266 Resident 0         : memory:43266:DECIDED:IS_PLAN_APPLICABLE:ActNow|PlanLeaveNow=true
Time 43266 Resident 0         : memory:43266:DECIDED:IS_PLAN_APPLICABLE:ActNow|PlanDoNothing=true
Time 43266 Resident 0         : memory:43266:DECIDED:LEAVE_NOW, but has no logic yet to decide where to go!!!
Time 46801 Resident 0         : memory:46801:PERCEIVED:fire_alert:46801.0
Time 46801 Resident 0         : memory:46801:BELIEVED:RESPONSE_BAROMETER_FIELD_OF_VIEW_CHANGED=0.4
Time 46802 Resident 0         : memory:46802:PERCEIVED:emergency_message:EVACUATE_NOW
Time 46802 Resident 0         : memory:46802:BELIEVED:RESPONSE_BAROMETER_MESSAGES_CHANGED=0.3
Time -0001 Resident 4         : memory:-1:BELIEVED:DEPENDENTS_INFO:null
Time 46801 Resident 4         : memory:46801:PERCEIVED:fire_alert:46801.0
Time 46801 Resident 4         : memory:46801:BELIEVED:RESPONSE_BAROMETER_FIELD_OF_VIEW_CHANGED=0.4
Time 46801 Resident 4         : memory:46801:DECIDED:INITIAL_RESPONSE_THRESHOLD_BREACHED
Time 46801 Resident 4         : memory:46801:DECIDED:FINAL_RESPONSE_THRESHOLD_BREACHED
Time 46801 Resident 4         : memory:46801:DECIDED:INITIAL_AND_FINAL_RESPONSE_THRESHOLDS_BREACHED_TOGETHER
Time 46801 Resident 4         : memory:46801:DECIDED:TRIGGER_INITIAL_RESPONSE_NOW
Time 46801 Resident 4         : memory:46801:DECIDED:TRIGGER_FINAL_RESPONSE_NOW
Time 46801 Resident 4         : memory:46801:DECIDED:IS_PLAN_APPLICABLE:InitialResponse|PlanVisitDependentsIfNearby=false
Time 46801 Resident 4         : memory:46801:DECIDED:IS_PLAN_APPLICABLE:InitialResponse|PlanGoHomeIfDependentsAfar=false
Time 46801 Resident 4         : memory:46801:DECIDED:IS_PLAN_APPLICABLE:InitialResponse|PlanInitialResponseWithoutDependents=true
Time 46801 Resident 4         : memory:46801:DECIDED:IS_PLAN_APPLICABLE:InitialResponse|PlanDoNothing=true
Time 46801 Resident 4         : memory:46801:DECIDED:DONE_FOR_NOW
Time 46801 Resident 4         : memory:46801:DECIDED:IS_PLAN_APPLICABLE:ActNow|PlanGoHomeThenLeave=true
Time 46801 Resident 4         : memory:46801:DECIDED:IS_PLAN_APPLICABLE:ActNow|PlanLeaveNow=true
Time 46801 Resident 4         : memory:46801:DECIDED:IS_PLAN_APPLICABLE:ActNow|PlanDoNothing=true
Time 46801 Resident 4         : memory:46801:DECIDED:GO_HOME_NOW
Time 46801 Resident 4         : memory:46801:ACTIONED:drive to=(home, coords=759084.76095,5730972.71061)
Time 46852 Resident 4         : memory:46852:PERCEIVED:arrived:4961-4963-4965
Time 46852 Resident 4         : memory:46852:BELIEVED:ARRIVED_HOME
Time 46852 Resident 4         : memory:46852:DECIDED:LEAVE_NOW, but has no logic yet to decide where to go!!!
dhixsingh commented 6 years ago

@osbornejr can you now adjust the test population file (like I did in c2d0d46) such that all the different behaviour variations R1 to R7 are captured?

dhixsingh commented 6 years ago

Still to do: logic to decide where residents should go when they decide to leave now.

/cc @osbornejr

dhixsingh commented 6 years ago

Basic behaviours are working at least as of a8854680846c0d751909ef7723b8c0c16e303cf9.