You can subscribe to this list here.
| 2008 |
Jan
|
Feb
|
Mar
(35) |
Apr
(96) |
May
(39) |
Jun
(25) |
Jul
(7) |
Aug
(7) |
Sep
(44) |
Oct
(17) |
Nov
(14) |
Dec
(9) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2009 |
Jan
(5) |
Feb
(28) |
Mar
(26) |
Apr
(14) |
May
(3) |
Jun
(3) |
Jul
(13) |
Aug
(41) |
Sep
(12) |
Oct
|
Nov
(2) |
Dec
(17) |
| 2010 |
Jan
(9) |
Feb
(5) |
Mar
(11) |
Apr
(3) |
May
(4) |
Jun
(2) |
Jul
(3) |
Aug
(8) |
Sep
(2) |
Oct
(11) |
Nov
(3) |
Dec
(1) |
| 2011 |
Jan
|
Feb
(1) |
Mar
(8) |
Apr
(4) |
May
(4) |
Jun
(5) |
Jul
(3) |
Aug
(2) |
Sep
(7) |
Oct
(4) |
Nov
(4) |
Dec
(2) |
| 2012 |
Jan
|
Feb
|
Mar
(4) |
Apr
(11) |
May
(8) |
Jun
(2) |
Jul
(7) |
Aug
(6) |
Sep
(2) |
Oct
(2) |
Nov
|
Dec
(3) |
| 2013 |
Jan
|
Feb
(1) |
Mar
(7) |
Apr
(3) |
May
(1) |
Jun
(4) |
Jul
(8) |
Aug
(4) |
Sep
(4) |
Oct
(6) |
Nov
(8) |
Dec
(6) |
| 2014 |
Jan
|
Feb
|
Mar
(2) |
Apr
(4) |
May
(6) |
Jun
(10) |
Jul
|
Aug
(7) |
Sep
(15) |
Oct
(4) |
Nov
(1) |
Dec
(1) |
| 2015 |
Jan
|
Feb
(1) |
Mar
(10) |
Apr
(4) |
May
(6) |
Jun
(1) |
Jul
|
Aug
(2) |
Sep
(2) |
Oct
(5) |
Nov
(6) |
Dec
(12) |
| 2016 |
Jan
(1) |
Feb
(4) |
Mar
(7) |
Apr
(30) |
May
(5) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: <ga...@us...> - 2008-04-25 10:03:34
|
Revision: 1256
http://jason.svn.sourceforge.net/jason/?rev=1256&view=rev
Author: gauth
Date: 2008-04-25 03:03:30 -0700 (Fri, 25 Apr 2008)
Log Message:
-----------
Some new test-beds:
- for tracker's behavior
- for recruiting (according to cluster size, or distance)
Added Paths:
-----------
trunk/applications/jason-team/massim-server/conf/testRecruitDistance.xml
trunk/applications/jason-team/massim-server/conf/testRecruitSize.xml
trunk/applications/jason-team/massim-server/conf/testTrackerLarge.xml
trunk/applications/jason-team/massim-server/conf/testTrackerMedium.xml
trunk/applications/jason-team/massim-server/conf/testTrackerSmall.xml
Added: trunk/applications/jason-team/massim-server/conf/testRecruitDistance.xml
===================================================================
--- trunk/applications/jason-team/massim-server/conf/testRecruitDistance.xml (rev 0)
+++ trunk/applications/jason-team/massim-server/conf/testRecruitDistance.xml 2008-04-25 10:03:30 UTC (rev 1256)
@@ -0,0 +1,227 @@
+<?xml version="1.0" encoding="utf-8"?>
+<conf tournamentname="GridSimulation" tournamentmode="0"
+ launch-sync-type="key" time-to-launch="10000" reportpath="."
+ backuppath="backup">
+ <network-agent port="12300" backlog="10" />
+ <match>
+ <simulation id="Test trackers' behavior facing two large clusters (must recruit more scouts)"
+ simulationclass="massim.simulation.GridSimulation"
+ configurationclass="massim.simulation.GridSimulationConfigurationHandCrafted"
+ rmiobserver="massim.simulation.GridSimulationRMIObserver"
+ xmlobserver="massim.simulation.GridSimulationXMLObserver"
+ rmixmlobserver="massim.simulation.GridSimulationRMIXMLDocumentObserver"
+ xmlobserverpath="."
+ xmlstatisticsobserver="massim.simulation.GridSimulationXMLStatisticsObserver"
+ file-simulationlog="./log" visualisationobserver="">
+
+
+ <!-- visualisationobserver="massim.simulation.GridSimulationVisualizationObserver" -->
+
+ <configuration xmlns:meta="http://www.tu-clausthal.de/"
+ sizex="70" sizey="70" maxNumberOfSteps="700" numberOfAgents="12"
+ numberOfObstacles="0" numberOfCows="80" cowSpeed="1"
+ agentSpeed="1" lineOfSight="17" fearRange="4" attractionRange="5"
+ cowWeight="5" agentWeight="-200" emptyWeight="1" obstacleWeight="-1"
+ htaccess="1">
+
+ <array item0="35" item1="40" item2="45" item3="50"
+ item4="54" item5="56" item6="1" item7="1" item8="1" item9="2"
+ item10="2" item11="2" meta:length="12"
+ meta:name="agentPositionY" />
+ <array item0="5" item1="10" item2="48" item3="50"
+ item4="16" item5="18" item6="67" item7="68" item8="69" item9="67"
+ item10="68" item11="69" meta:length="12"
+ meta:name="agentPositionX" />
+
+ <array item0="25" item1="28" item2="22" item3="21"
+ item4="26" item5="25" item6="27" item7="22" item8="24" item9="23"
+ item10="25" item11="28" item12="22" item13="21"
+ item14="26" item15="25" item16="27" item17="22" item18="24" item19="23"
+ item20="30" item21="33" item22="27" item23="26"
+ item24="31" item25="30" item26="32" item27="27" item28="29" item29="28"
+ item30="30" item31="33" item32="27" item33="26"
+ item34="31" item35="30" item36="32" item37="27" item38="29" item39="28"
+ item40="45" item41="48" item42="42" item43="41"
+ item44="46" item45="45" item46="47" item47="42" item48="44" item49="43"
+ item50="50" item51="53" item52="57" item53="46"
+ item54="51" item55="50" item56="52" item57="47" item58="49" item59="48"
+ item60="45" item61="48" item62="42" item63="41"
+ item64="46" item65="45" item66="47" item67="42" item68="44" item69="43"
+ item70="50" item71="53" item72="57" item73="46"
+ item74="51" item75="50" item76="52" item77="47" item78="49" item79="48"
+
+ meta:length="80"
+ meta:name="cowPositionY" />
+
+
+ <array item0="12" item1="13" item2="14" item3="15"
+ item4="16" item5="17" item6="18" item7="19" item8="11" item9="15"
+ item10="19" item11="20" item12="21" item13="22"
+ item14="23" item15="24" item16="25" item17="26" item18="18" item19="22"
+ item20="12" item21="13" item22="14" item23="15"
+ item24="16" item25="17" item26="18" item27="19" item28="11" item29="15"
+ item30="19" item31="20" item32="21" item33="22"
+ item34="23" item35="24" item36="25" item37="26" item38="18" item39="22"
+ item40="62" item41="63" item42="64" item43="65"
+ item44="66" item45="67" item46="68" item47="69" item48="61" item49="65"
+ item50="62" item51="63" item52="64" item53="65"
+ item54="66" item55="67" item56="68" item57="69" item58="61" item59="65"
+ item60="57" item61="58" item62="59" item63="60"
+ item64="61" item65="62" item66="63" item67="64" item68="56" item69="60"
+ item70="57" item71="58" item72="59" item73="60"
+ item74="61" item75="62" item76="63" item77="64" item78="56" item79="60"
+ meta:length="80"
+ meta:name="cowPositionX" />
+
+ <array item0="0" item1="14" meta:length="2"
+ meta:name="stable1X" />
+ <array item0="55" item1="69" meta:length="2"
+ meta:name="stable1Y" />
+ <array item0="55" item1="69" meta:length="2"
+ meta:name="stable2X" />
+ <array item0="0" item1="14" meta:length="2"
+ meta:name="stable2Y" />
+
+ <array meta:length="0" meta:name="obstaclePositionX" />
+
+ <array meta:length="0"
+ meta:name="obstaclePositionY" />
+ </configuration>
+
+ <agents>
+ <agent
+ agentclass="massim.simulation.GridSimulationAgent"
+ agentcreationclass="massim.simulation.GridSimulationAgentParameter"
+ team="blue">
+ <configuration />
+ </agent>
+ <agent
+ agentclass="massim.simulation.GridSimulationAgent"
+ agentcreationclass="massim.simulation.GridSimulationAgentParameter"
+ team="blue">
+ <configuration />
+ </agent>
+ <agent
+ agentclass="massim.simulation.GridSimulationAgent"
+ agentcreationclass="massim.simulation.GridSimulationAgentParameter"
+ team="blue">
+ <configuration />
+ </agent>
+ <agent
+ agentclass="massim.simulation.GridSimulationAgent"
+ agentcreationclass="massim.simulation.GridSimulationAgentParameter"
+ team="blue">
+ <configuration />
+ </agent>
+ <agent
+ agentclass="massim.simulation.GridSimulationAgent"
+ agentcreationclass="massim.simulation.GridSimulationAgentParameter"
+ team="blue">
+ <configuration />
+ </agent>
+ <agent
+ agentclass="massim.simulation.GridSimulationAgent"
+ agentcreationclass="massim.simulation.GridSimulationAgentParameter"
+ team="blue">
+ <configuration />
+ </agent>
+ <agent
+ agentclass="massim.simulation.GridSimulationAgent"
+ agentcreationclass="massim.simulation.GridSimulationAgentParameter"
+ team="red">
+ <configuration />
+ </agent>
+ <agent
+ agentclass="massim.simulation.GridSimulationAgent"
+ agentcreationclass="massim.simulation.GridSimulationAgentParameter"
+ team="red">
+ <configuration />
+ </agent>
+ <agent
+ agentclass="massim.simulation.GridSimulationAgent"
+ agentcreationclass="massim.simulation.GridSimulationAgentParameter"
+ team="red">
+ <configuration />
+ </agent>
+ <agent
+ agentclass="massim.simulation.GridSimulationAgent"
+ agentcreationclass="massim.simulation.GridSimulationAgentParameter"
+ team="red">
+ <configuration />
+ </agent>
+ <agent
+ agentclass="massim.simulation.GridSimulationAgent"
+ agentcreationclass="massim.simulation.GridSimulationAgentParameter"
+ team="red">
+ <configuration />
+ </agent>
+ <agent
+ agentclass="massim.simulation.GridSimulationAgent"
+ agentcreationclass="massim.simulation.GridSimulationAgentParameter"
+ team="red">
+ <configuration />
+ </agent>
+ </agents>
+ </simulation>
+
+ </match>
+
+ <accounts>
+ <actionclassmap name="Grid">
+ <actionclass id="action"
+ class="massim.simulation.GridSimulationAgentAction" />
+ <actionclass id="invalid" class="massim.InvalidAction" />
+ </actionclassmap>
+
+ <account actionclassmap="Grid"
+ defaultactionclass="massim.simulation.GridSimulationAgentAction"
+ timeout="8000" auxtimeout="500" maxpacketlength="65536"
+ username="botagent1" password="1" team="bot" />
+ <account actionclassmap="Grid"
+ defaultactionclass="massim.simulation.GridSimulationAgentAction"
+ timeout="8000" auxtimeout="500" maxpacketlength="65536"
+ username="botagent2" password="2" team="bot" />
+ <account actionclassmap="Grid"
+ defaultactionclass="massim.simulation.GridSimulationAgentAction"
+ timeout="8000" auxtimeout="500" maxpacketlength="65536"
+ username="botagent3" password="3" team="bot" />
+ <account actionclassmap="Grid"
+ defaultactionclass="massim.simulation.GridSimulationAgentAction"
+ timeout="8000" auxtimeout="500" maxpacketlength="65536"
+ username="botagent4" password="4" team="bot" />
+ <account actionclassmap="Grid"
+ defaultactionclass="massim.simulation.GridSimulationAgentAction"
+ timeout="8000" auxtimeout="500" maxpacketlength="65536"
+ username="botagent5" password="5" team="bot" />
+ <account actionclassmap="Grid"
+ defaultactionclass="massim.simulation.GridSimulationAgentAction"
+ timeout="8000" auxtimeout="500" maxpacketlength="65536"
+ username="botagent6" password="6" team="bot" />
+
+ <account actionclassmap="Grid"
+ defaultactionclass="massim.simulation.GridSimulationAgentAction"
+ timeout="8000" auxtimeout="500" maxpacketlength="65536"
+ username="participant1" password="1" team="participant" />
+ <account actionclassmap="Grid"
+ defaultactionclass="massim.simulation.GridSimulationAgentAction"
+ timeout="8000" auxtimeout="500" maxpacketlength="65536"
+ username="participant2" password="2" team="participant" />
+ <account actionclassmap="Grid"
+ defaultactionclass="massim.simulation.GridSimulationAgentAction"
+ timeout="8000" auxtimeout="500" maxpacketlength="65536"
+ username="participant3" password="3" team="participant" />
+ <account actionclassmap="Grid"
+ defaultactionclass="massim.simulation.GridSimulationAgentAction"
+ timeout="8000" auxtimeout="500" maxpacketlength="65536"
+ username="participant4" password="4" team="participant" />
+ <account actionclassmap="Grid"
+ defaultactionclass="massim.simulation.GridSimulationAgentAction"
+ timeout="8000" auxtimeout="500" maxpacketlength="65536"
+ username="participant5" password="5" team="participant" />
+ <account actionclassmap="Grid"
+ defaultactionclass="massim.simulation.GridSimulationAgentAction"
+ timeout="8000" auxtimeout="500" maxpacketlength="65536"
+ username="participant6" password="6" team="participant" />
+
+ </accounts>
+</conf>
Added: trunk/applications/jason-team/massim-server/conf/testRecruitSize.xml
===================================================================
--- trunk/applications/jason-team/massim-server/conf/testRecruitSize.xml (rev 0)
+++ trunk/applications/jason-team/massim-server/conf/testRecruitSize.xml 2008-04-25 10:03:30 UTC (rev 1256)
@@ -0,0 +1,214 @@
+<?xml version="1.0" encoding="utf-8"?>
+<conf tournamentname="GridSimulation" tournamentmode="0"
+ launch-sync-type="key" time-to-launch="10000" reportpath="."
+ backuppath="backup">
+ <network-agent port="12300" backlog="10" />
+ <match>
+ <simulation id="Test tracker's behavior facing a large cluster (must recruit more scouts)"
+ simulationclass="massim.simulation.GridSimulation"
+ configurationclass="massim.simulation.GridSimulationConfigurationHandCrafted"
+ rmiobserver="massim.simulation.GridSimulationRMIObserver"
+ xmlobserver="massim.simulation.GridSimulationXMLObserver"
+ rmixmlobserver="massim.simulation.GridSimulationRMIXMLDocumentObserver"
+ xmlobserverpath="."
+ xmlstatisticsobserver="massim.simulation.GridSimulationXMLStatisticsObserver"
+ file-simulationlog="./log" visualisationobserver="">
+
+
+ <!-- visualisationobserver="massim.simulation.GridSimulationVisualizationObserver" -->
+
+ <configuration xmlns:meta="http://www.tu-clausthal.de/"
+ sizex="70" sizey="70" maxNumberOfSteps="700" numberOfAgents="12"
+ numberOfObstacles="0" numberOfCows="50" cowSpeed="1"
+ agentSpeed="1" lineOfSight="17" fearRange="4" attractionRange="5"
+ cowWeight="5" agentWeight="-200" emptyWeight="1" obstacleWeight="-1"
+ htaccess="1">
+
+ <array item0="35" item1="40" item2="45" item3="50"
+ item4="65" item5="65" item6="1" item7="1" item8="1" item9="2"
+ item10="2" item11="2" meta:length="12"
+ meta:name="agentPositionY" />
+ <array item0="5" item1="10" item2="38" item3="40"
+ item4="3" item5="4" item6="67" item7="68" item8="69" item9="67"
+ item10="68" item11="69" meta:length="12"
+ meta:name="agentPositionX" />
+
+ <array item0="25" item1="28" item2="22" item3="21"
+ item4="26" item5="25" item6="27" item7="22" item8="24" item9="23"
+ item10="25" item11="28" item12="22" item13="21"
+ item14="26" item15="25" item16="27" item17="22" item18="24" item19="23"
+ item20="30" item21="33" item22="27" item23="26"
+ item24="31" item25="30" item26="32" item27="27" item28="29" item29="28"
+ item30="30" item31="33" item32="27" item33="26"
+ item34="31" item35="30" item36="32" item37="27" item38="29" item39="28"
+ item40="45" item41="48" item42="42" item43="41"
+ item44="46" item45="45" item46="47" item47="42" item48="44" item49="43"
+ meta:length="50"
+ meta:name="cowPositionY" />
+
+
+ <array item0="12" item1="13" item2="14" item3="15"
+ item4="16" item5="17" item6="18" item7="19" item8="11" item9="15"
+ item10="19" item11="20" item12="21" item13="22"
+ item14="23" item15="24" item16="25" item17="26" item18="18" item19="22"
+ item20="12" item21="13" item22="14" item23="15"
+ item24="16" item25="17" item26="18" item27="19" item28="11" item29="15"
+ item30="19" item31="20" item32="21" item33="22"
+ item34="23" item35="24" item36="25" item37="26" item38="18" item39="22"
+ item40="42" item41="43" item42="44" item43="45"
+ item44="46" item45="47" item46="48" item47="49" item48="41" item49="45"
+ meta:length="50"
+ meta:name="cowPositionX" />
+
+ <array item0="0" item1="14" meta:length="2"
+ meta:name="stable1X" />
+ <array item0="55" item1="69" meta:length="2"
+ meta:name="stable1Y" />
+ <array item0="55" item1="69" meta:length="2"
+ meta:name="stable2X" />
+ <array item0="0" item1="14" meta:length="2"
+ meta:name="stable2Y" />
+
+ <array meta:length="0" meta:name="obstaclePositionX" />
+
+ <array meta:length="0"
+ meta:name="obstaclePositionY" />
+ </configuration>
+
+ <agents>
+ <agent
+ agentclass="massim.simulation.GridSimulationAgent"
+ agentcreationclass="massim.simulation.GridSimulationAgentParameter"
+ team="blue">
+ <configuration />
+ </agent>
+ <agent
+ agentclass="massim.simulation.GridSimulationAgent"
+ agentcreationclass="massim.simulation.GridSimulationAgentParameter"
+ team="blue">
+ <configuration />
+ </agent>
+ <agent
+ agentclass="massim.simulation.GridSimulationAgent"
+ agentcreationclass="massim.simulation.GridSimulationAgentParameter"
+ team="blue">
+ <configuration />
+ </agent>
+ <agent
+ agentclass="massim.simulation.GridSimulationAgent"
+ agentcreationclass="massim.simulation.GridSimulationAgentParameter"
+ team="blue">
+ <configuration />
+ </agent>
+ <agent
+ agentclass="massim.simulation.GridSimulationAgent"
+ agentcreationclass="massim.simulation.GridSimulationAgentParameter"
+ team="blue">
+ <configuration />
+ </agent>
+ <agent
+ agentclass="massim.simulation.GridSimulationAgent"
+ agentcreationclass="massim.simulation.GridSimulationAgentParameter"
+ team="blue">
+ <configuration />
+ </agent>
+ <agent
+ agentclass="massim.simulation.GridSimulationAgent"
+ agentcreationclass="massim.simulation.GridSimulationAgentParameter"
+ team="red">
+ <configuration />
+ </agent>
+ <agent
+ agentclass="massim.simulation.GridSimulationAgent"
+ agentcreationclass="massim.simulation.GridSimulationAgentParameter"
+ team="red">
+ <configuration />
+ </agent>
+ <agent
+ agentclass="massim.simulation.GridSimulationAgent"
+ agentcreationclass="massim.simulation.GridSimulationAgentParameter"
+ team="red">
+ <configuration />
+ </agent>
+ <agent
+ agentclass="massim.simulation.GridSimulationAgent"
+ agentcreationclass="massim.simulation.GridSimulationAgentParameter"
+ team="red">
+ <configuration />
+ </agent>
+ <agent
+ agentclass="massim.simulation.GridSimulationAgent"
+ agentcreationclass="massim.simulation.GridSimulationAgentParameter"
+ team="red">
+ <configuration />
+ </agent>
+ <agent
+ agentclass="massim.simulation.GridSimulationAgent"
+ agentcreationclass="massim.simulation.GridSimulationAgentParameter"
+ team="red">
+ <configuration />
+ </agent>
+ </agents>
+ </simulation>
+
+ </match>
+
+ <accounts>
+ <actionclassmap name="Grid">
+ <actionclass id="action"
+ class="massim.simulation.GridSimulationAgentAction" />
+ <actionclass id="invalid" class="massim.InvalidAction" />
+ </actionclassmap>
+
+ <account actionclassmap="Grid"
+ defaultactionclass="massim.simulation.GridSimulationAgentAction"
+ timeout="8000" auxtimeout="500" maxpacketlength="65536"
+ username="botagent1" password="1" team="bot" />
+ <account actionclassmap="Grid"
+ defaultactionclass="massim.simulation.GridSimulationAgentAction"
+ timeout="8000" auxtimeout="500" maxpacketlength="65536"
+ username="botagent2" password="2" team="bot" />
+ <account actionclassmap="Grid"
+ defaultactionclass="massim.simulation.GridSimulationAgentAction"
+ timeout="8000" auxtimeout="500" maxpacketlength="65536"
+ username="botagent3" password="3" team="bot" />
+ <account actionclassmap="Grid"
+ defaultactionclass="massim.simulation.GridSimulationAgentAction"
+ timeout="8000" auxtimeout="500" maxpacketlength="65536"
+ username="botagent4" password="4" team="bot" />
+ <account actionclassmap="Grid"
+ defaultactionclass="massim.simulation.GridSimulationAgentAction"
+ timeout="8000" auxtimeout="500" maxpacketlength="65536"
+ username="botagent5" password="5" team="bot" />
+ <account actionclassmap="Grid"
+ defaultactionclass="massim.simulation.GridSimulationAgentAction"
+ timeout="8000" auxtimeout="500" maxpacketlength="65536"
+ username="botagent6" password="6" team="bot" />
+
+ <account actionclassmap="Grid"
+ defaultactionclass="massim.simulation.GridSimulationAgentAction"
+ timeout="8000" auxtimeout="500" maxpacketlength="65536"
+ username="participant1" password="1" team="participant" />
+ <account actionclassmap="Grid"
+ defaultactionclass="massim.simulation.GridSimulationAgentAction"
+ timeout="8000" auxtimeout="500" maxpacketlength="65536"
+ username="participant2" password="2" team="participant" />
+ <account actionclassmap="Grid"
+ defaultactionclass="massim.simulation.GridSimulationAgentAction"
+ timeout="8000" auxtimeout="500" maxpacketlength="65536"
+ username="participant3" password="3" team="participant" />
+ <account actionclassmap="Grid"
+ defaultactionclass="massim.simulation.GridSimulationAgentAction"
+ timeout="8000" auxtimeout="500" maxpacketlength="65536"
+ username="participant4" password="4" team="participant" />
+ <account actionclassmap="Grid"
+ defaultactionclass="massim.simulation.GridSimulationAgentAction"
+ timeout="8000" auxtimeout="500" maxpacketlength="65536"
+ username="participant5" password="5" team="participant" />
+ <account actionclassmap="Grid"
+ defaultactionclass="massim.simulation.GridSimulationAgentAction"
+ timeout="8000" auxtimeout="500" maxpacketlength="65536"
+ username="participant6" password="6" team="participant" />
+
+ </accounts>
+</conf>
Added: trunk/applications/jason-team/massim-server/conf/testTrackerLarge.xml
===================================================================
--- trunk/applications/jason-team/massim-server/conf/testTrackerLarge.xml (rev 0)
+++ trunk/applications/jason-team/massim-server/conf/testTrackerLarge.xml 2008-04-25 10:03:30 UTC (rev 1256)
@@ -0,0 +1,210 @@
+<?xml version="1.0" encoding="utf-8"?>
+<conf tournamentname="GridSimulation" tournamentmode="0"
+ launch-sync-type="key" time-to-launch="10000" reportpath="."
+ backuppath="backup">
+ <network-agent port="12300" backlog="10" />
+ <match>
+ <simulation id="Test tracker's behavior facing a large cluster (must recruit more scouts)"
+ simulationclass="massim.simulation.GridSimulation"
+ configurationclass="massim.simulation.GridSimulationConfigurationHandCrafted"
+ rmiobserver="massim.simulation.GridSimulationRMIObserver"
+ xmlobserver="massim.simulation.GridSimulationXMLObserver"
+ rmixmlobserver="massim.simulation.GridSimulationRMIXMLDocumentObserver"
+ xmlobserverpath="."
+ xmlstatisticsobserver="massim.simulation.GridSimulationXMLStatisticsObserver"
+ file-simulationlog="./log" visualisationobserver="">
+
+
+ <!-- visualisationobserver="massim.simulation.GridSimulationVisualizationObserver" -->
+
+ <configuration xmlns:meta="http://www.tu-clausthal.de/"
+ sizex="70" sizey="70" maxNumberOfSteps="700" numberOfAgents="12"
+ numberOfObstacles="0" numberOfCows="40" cowSpeed="1"
+ agentSpeed="1" lineOfSight="17" fearRange="4" attractionRange="5"
+ cowWeight="5" agentWeight="-200" emptyWeight="1" obstacleWeight="-1"
+ htaccess="1">
+
+ <array item0="35" item1="45" item2="60" item3="10"
+ item4="65" item5="65" item6="35" item7="35" item8="35" item9="35"
+ item10="35" item11="35" meta:length="12"
+ meta:name="agentPositionY" />
+ <array item0="5" item1="15" item2="30" item3="50"
+ item4="3" item5="4" item6="63" item7="61" item8="59" item9="57"
+ item10="55" item11="53" meta:length="12"
+ meta:name="agentPositionX" />
+
+ <array item0="25" item1="28" item2="22" item3="21"
+ item4="26" item5="25" item6="27" item7="22" item8="24" item9="23"
+ item10="25" item11="28" item12="22" item13="21"
+ item14="26" item15="25" item16="27" item17="22" item18="24" item19="23"
+ item20="30" item21="33" item22="27" item23="26"
+ item24="31" item25="30" item26="32" item27="27" item28="29" item29="28"
+ item30="30" item31="33" item32="27" item33="26"
+ item34="31" item35="30" item36="32" item37="27" item38="29" item39="28"
+ meta:length="40"
+ meta:name="cowPositionY" />
+
+
+ <array item0="12" item1="13" item2="14" item3="15"
+ item4="16" item5="17" item6="18" item7="19" item8="11" item9="15"
+ item10="19" item11="20" item12="21" item13="22"
+ item14="23" item15="24" item16="25" item17="26" item18="18" item19="22"
+ item20="12" item21="13" item22="14" item23="15"
+ item24="16" item25="17" item26="18" item27="19" item28="11" item29="15"
+ item30="19" item31="20" item32="21" item33="22"
+ item34="23" item35="24" item36="25" item37="26" item38="18" item39="22"
+ meta:length="40"
+ meta:name="cowPositionX" />
+
+ <array item0="0" item1="14" meta:length="2"
+ meta:name="stable1X" />
+ <array item0="55" item1="69" meta:length="2"
+ meta:name="stable1Y" />
+ <array item0="55" item1="69" meta:length="2"
+ meta:name="stable2X" />
+ <array item0="0" item1="14" meta:length="2"
+ meta:name="stable2Y" />
+
+ <array meta:length="0" meta:name="obstaclePositionX" />
+
+ <array meta:length="0"
+ meta:name="obstaclePositionY" />
+ </configuration>
+
+ <agents>
+ <agent
+ agentclass="massim.simulation.GridSimulationAgent"
+ agentcreationclass="massim.simulation.GridSimulationAgentParameter"
+ team="blue">
+ <configuration />
+ </agent>
+ <agent
+ agentclass="massim.simulation.GridSimulationAgent"
+ agentcreationclass="massim.simulation.GridSimulationAgentParameter"
+ team="blue">
+ <configuration />
+ </agent>
+ <agent
+ agentclass="massim.simulation.GridSimulationAgent"
+ agentcreationclass="massim.simulation.GridSimulationAgentParameter"
+ team="blue">
+ <configuration />
+ </agent>
+ <agent
+ agentclass="massim.simulation.GridSimulationAgent"
+ agentcreationclass="massim.simulation.GridSimulationAgentParameter"
+ team="blue">
+ <configuration />
+ </agent>
+ <agent
+ agentclass="massim.simulation.GridSimulationAgent"
+ agentcreationclass="massim.simulation.GridSimulationAgentParameter"
+ team="blue">
+ <configuration />
+ </agent>
+ <agent
+ agentclass="massim.simulation.GridSimulationAgent"
+ agentcreationclass="massim.simulation.GridSimulationAgentParameter"
+ team="blue">
+ <configuration />
+ </agent>
+ <agent
+ agentclass="massim.simulation.GridSimulationAgent"
+ agentcreationclass="massim.simulation.GridSimulationAgentParameter"
+ team="red">
+ <configuration />
+ </agent>
+ <agent
+ agentclass="massim.simulation.GridSimulationAgent"
+ agentcreationclass="massim.simulation.GridSimulationAgentParameter"
+ team="red">
+ <configuration />
+ </agent>
+ <agent
+ agentclass="massim.simulation.GridSimulationAgent"
+ agentcreationclass="massim.simulation.GridSimulationAgentParameter"
+ team="red">
+ <configuration />
+ </agent>
+ <agent
+ agentclass="massim.simulation.GridSimulationAgent"
+ agentcreationclass="massim.simulation.GridSimulationAgentParameter"
+ team="red">
+ <configuration />
+ </agent>
+ <agent
+ agentclass="massim.simulation.GridSimulationAgent"
+ agentcreationclass="massim.simulation.GridSimulationAgentParameter"
+ team="red">
+ <configuration />
+ </agent>
+ <agent
+ agentclass="massim.simulation.GridSimulationAgent"
+ agentcreationclass="massim.simulation.GridSimulationAgentParameter"
+ team="red">
+ <configuration />
+ </agent>
+ </agents>
+ </simulation>
+
+ </match>
+
+ <accounts>
+ <actionclassmap name="Grid">
+ <actionclass id="action"
+ class="massim.simulation.GridSimulationAgentAction" />
+ <actionclass id="invalid" class="massim.InvalidAction" />
+ </actionclassmap>
+
+ <account actionclassmap="Grid"
+ defaultactionclass="massim.simulation.GridSimulationAgentAction"
+ timeout="8000" auxtimeout="500" maxpacketlength="65536"
+ username="botagent1" password="1" team="bot" />
+ <account actionclassmap="Grid"
+ defaultactionclass="massim.simulation.GridSimulationAgentAction"
+ timeout="8000" auxtimeout="500" maxpacketlength="65536"
+ username="botagent2" password="2" team="bot" />
+ <account actionclassmap="Grid"
+ defaultactionclass="massim.simulation.GridSimulationAgentAction"
+ timeout="8000" auxtimeout="500" maxpacketlength="65536"
+ username="botagent3" password="3" team="bot" />
+ <account actionclassmap="Grid"
+ defaultactionclass="massim.simulation.GridSimulationAgentAction"
+ timeout="8000" auxtimeout="500" maxpacketlength="65536"
+ username="botagent4" password="4" team="bot" />
+ <account actionclassmap="Grid"
+ defaultactionclass="massim.simulation.GridSimulationAgentAction"
+ timeout="8000" auxtimeout="500" maxpacketlength="65536"
+ username="botagent5" password="5" team="bot" />
+ <account actionclassmap="Grid"
+ defaultactionclass="massim.simulation.GridSimulationAgentAction"
+ timeout="8000" auxtimeout="500" maxpacketlength="65536"
+ username="botagent6" password="6" team="bot" />
+
+ <account actionclassmap="Grid"
+ defaultactionclass="massim.simulation.GridSimulationAgentAction"
+ timeout="8000" auxtimeout="500" maxpacketlength="65536"
+ username="participant1" password="1" team="participant" />
+ <account actionclassmap="Grid"
+ defaultactionclass="massim.simulation.GridSimulationAgentAction"
+ timeout="8000" auxtimeout="500" maxpacketlength="65536"
+ username="participant2" password="2" team="participant" />
+ <account actionclassmap="Grid"
+ defaultactionclass="massim.simulation.GridSimulationAgentAction"
+ timeout="8000" auxtimeout="500" maxpacketlength="65536"
+ username="participant3" password="3" team="participant" />
+ <account actionclassmap="Grid"
+ defaultactionclass="massim.simulation.GridSimulationAgentAction"
+ timeout="8000" auxtimeout="500" maxpacketlength="65536"
+ username="participant4" password="4" team="participant" />
+ <account actionclassmap="Grid"
+ defaultactionclass="massim.simulation.GridSimulationAgentAction"
+ timeout="8000" auxtimeout="500" maxpacketlength="65536"
+ username="participant5" password="5" team="participant" />
+ <account actionclassmap="Grid"
+ defaultactionclass="massim.simulation.GridSimulationAgentAction"
+ timeout="8000" auxtimeout="500" maxpacketlength="65536"
+ username="participant6" password="6" team="participant" />
+
+ </accounts>
+</conf>
Added: trunk/applications/jason-team/massim-server/conf/testTrackerMedium.xml
===================================================================
--- trunk/applications/jason-team/massim-server/conf/testTrackerMedium.xml (rev 0)
+++ trunk/applications/jason-team/massim-server/conf/testTrackerMedium.xml 2008-04-25 10:03:30 UTC (rev 1256)
@@ -0,0 +1,202 @@
+<?xml version="1.0" encoding="utf-8"?>
+<conf tournamentname="GridSimulation" tournamentmode="0"
+ launch-sync-type="key" time-to-launch="10000" reportpath="."
+ backuppath="backup">
+ <network-agent port="12300" backlog="10" />
+ <match>
+ <simulation id="Test tracker's behavior facing a medium cluster (must keep or recruit its scout)"
+ simulationclass="massim.simulation.GridSimulation"
+ configurationclass="massim.simulation.GridSimulationConfigurationHandCrafted"
+ rmiobserver="massim.simulation.GridSimulationRMIObserver"
+ xmlobserver="massim.simulation.GridSimulationXMLObserver"
+ rmixmlobserver="massim.simulation.GridSimulationRMIXMLDocumentObserver"
+ xmlobserverpath="."
+ xmlstatisticsobserver="massim.simulation.GridSimulationXMLStatisticsObserver"
+ file-simulationlog="./log" visualisationobserver="">
+
+
+ <!-- visualisationobserver="massim.simulation.GridSimulationVisualizationObserver" -->
+
+ <configuration xmlns:meta="http://www.tu-clausthal.de/"
+ sizex="70" sizey="70" maxNumberOfSteps="700" numberOfAgents="12"
+ numberOfObstacles="0" numberOfCows="20" cowSpeed="1"
+ agentSpeed="1" lineOfSight="17" fearRange="4" attractionRange="5"
+ cowWeight="5" agentWeight="-200" emptyWeight="1" obstacleWeight="-1"
+ htaccess="1">
+
+ <array item0="35" item1="45" item2="65" item3="65"
+ item4="65" item5="65" item6="35" item7="35" item8="35" item9="35"
+ item10="35" item11="35" meta:length="12"
+ meta:name="agentPositionY" />
+ <array item0="5" item1="15" item2="1" item3="2"
+ item4="3" item5="4" item6="63" item7="61" item8="59" item9="57"
+ item10="55" item11="53" meta:length="12"
+ meta:name="agentPositionX" />
+
+ <array item0="25" item1="28" item2="22" item3="21"
+ item4="26" item5="25" item6="27" item7="22" item8="24" item9="23"
+ item10="25" item11="28" item12="22" item13="21"
+ item14="26" item15="25" item16="27" item17="22" item18="24" item19="23"
+ meta:length="20"
+ meta:name="cowPositionY" />
+
+
+ <array item0="12" item1="13" item2="14" item3="15"
+ item4="16" item5="17" item6="18" item7="19" item8="11" item9="15"
+ item10="19" item11="20" item12="21" item13="22"
+ item14="23" item15="24" item16="25" item17="26" item18="18" item19="22"
+ meta:length="20"
+ meta:name="cowPositionX" />
+
+ <array item0="0" item1="14" meta:length="2"
+ meta:name="stable1X" />
+ <array item0="55" item1="69" meta:length="2"
+ meta:name="stable1Y" />
+ <array item0="55" item1="69" meta:length="2"
+ meta:name="stable2X" />
+ <array item0="0" item1="14" meta:length="2"
+ meta:name="stable2Y" />
+
+ <array meta:length="0" meta:name="obstaclePositionX" />
+
+ <array meta:length="0"
+ meta:name="obstaclePositionY" />
+ </configuration>
+
+ <agents>
+ <agent
+ agentclass="massim.simulation.GridSimulationAgent"
+ agentcreationclass="massim.simulation.GridSimulationAgentParameter"
+ team="blue">
+ <configuration />
+ </agent>
+ <agent
+ agentclass="massim.simulation.GridSimulationAgent"
+ agentcreationclass="massim.simulation.GridSimulationAgentParameter"
+ team="blue">
+ <configuration />
+ </agent>
+ <agent
+ agentclass="massim.simulation.GridSimulationAgent"
+ agentcreationclass="massim.simulation.GridSimulationAgentParameter"
+ team="blue">
+ <configuration />
+ </agent>
+ <agent
+ agentclass="massim.simulation.GridSimulationAgent"
+ agentcreationclass="massim.simulation.GridSimulationAgentParameter"
+ team="blue">
+ <configuration />
+ </agent>
+ <agent
+ agentclass="massim.simulation.GridSimulationAgent"
+ agentcreationclass="massim.simulation.GridSimulationAgentParameter"
+ team="blue">
+ <configuration />
+ </agent>
+ <agent
+ agentclass="massim.simulation.GridSimulationAgent"
+ agentcreationclass="massim.simulation.GridSimulationAgentParameter"
+ team="blue">
+ <configuration />
+ </agent>
+ <agent
+ agentclass="massim.simulation.GridSimulationAgent"
+ agentcreationclass="massim.simulation.GridSimulationAgentParameter"
+ team="red">
+ <configuration />
+ </agent>
+ <agent
+ agentclass="massim.simulation.GridSimulationAgent"
+ agentcreationclass="massim.simulation.GridSimulationAgentParameter"
+ team="red">
+ <configuration />
+ </agent>
+ <agent
+ agentclass="massim.simulation.GridSimulationAgent"
+ agentcreationclass="massim.simulation.GridSimulationAgentParameter"
+ team="red">
+ <configuration />
+ </agent>
+ <agent
+ agentclass="massim.simulation.GridSimulationAgent"
+ agentcreationclass="massim.simulation.GridSimulationAgentParameter"
+ team="red">
+ <configuration />
+ </agent>
+ <agent
+ agentclass="massim.simulation.GridSimulationAgent"
+ agentcreationclass="massim.simulation.GridSimulationAgentParameter"
+ team="red">
+ <configuration />
+ </agent>
+ <agent
+ agentclass="massim.simulation.GridSimulationAgent"
+ agentcreationclass="massim.simulation.GridSimulationAgentParameter"
+ team="red">
+ <configuration />
+ </agent>
+ </agents>
+ </simulation>
+
+ </match>
+
+ <accounts>
+ <actionclassmap name="Grid">
+ <actionclass id="action"
+ class="massim.simulation.GridSimulationAgentAction" />
+ <actionclass id="invalid" class="massim.InvalidAction" />
+ </actionclassmap>
+
+ <account actionclassmap="Grid"
+ defaultactionclass="massim.simulation.GridSimulationAgentAction"
+ timeout="8000" auxtimeout="500" maxpacketlength="65536"
+ username="botagent1" password="1" team="bot" />
+ <account actionclassmap="Grid"
+ defaultactionclass="massim.simulation.GridSimulationAgentAction"
+ timeout="8000" auxtimeout="500" maxpacketlength="65536"
+ username="botagent2" password="2" team="bot" />
+ <account actionclassmap="Grid"
+ defaultactionclass="massim.simulation.GridSimulationAgentAction"
+ timeout="8000" auxtimeout="500" maxpacketlength="65536"
+ username="botagent3" password="3" team="bot" />
+ <account actionclassmap="Grid"
+ defaultactionclass="massim.simulation.GridSimulationAgentAction"
+ timeout="8000" auxtimeout="500" maxpacketlength="65536"
+ username="botagent4" password="4" team="bot" />
+ <account actionclassmap="Grid"
+ defaultactionclass="massim.simulation.GridSimulationAgentAction"
+ timeout="8000" auxtimeout="500" maxpacketlength="65536"
+ username="botagent5" password="5" team="bot" />
+ <account actionclassmap="Grid"
+ defaultactionclass="massim.simulation.GridSimulationAgentAction"
+ timeout="8000" auxtimeout="500" maxpacketlength="65536"
+ username="botagent6" password="6" team="bot" />
+
+ <account actionclassmap="Grid"
+ defaultactionclass="massim.simulation.GridSimulationAgentAction"
+ timeout="8000" auxtimeout="500" maxpacketlength="65536"
+ username="participant1" password="1" team="participant" />
+ <account actionclassmap="Grid"
+ defaultactionclass="massim.simulation.GridSimulationAgentAction"
+ timeout="8000" auxtimeout="500" maxpacketlength="65536"
+ username="participant2" password="2" team="participant" />
+ <account actionclassmap="Grid"
+ defaultactionclass="massim.simulation.GridSimulationAgentAction"
+ timeout="8000" auxtimeout="500" maxpacketlength="65536"
+ username="participant3" password="3" team="participant" />
+ <account actionclassmap="Grid"
+ defaultactionclass="massim.simulation.GridSimulationAgentAction"
+ timeout="8000" auxtimeout="500" maxpacketlength="65536"
+ username="participant4" password="4" team="participant" />
+ <account actionclassmap="Grid"
+ defaultactionclass="massim.simulation.GridSimulationAgentAction"
+ timeout="8000" auxtimeout="500" maxpacketlength="65536"
+ username="participant5" password="5" team="participant" />
+ <account actionclassmap="Grid"
+ defaultactionclass="massim.simulation.GridSimulationAgentAction"
+ timeout="8000" auxtimeout="500" maxpacketlength="65536"
+ username="participant6" password="6" team="participant" />
+
+ </accounts>
+</conf>
Added: trunk/applications/jason-team/massim-server/conf/testTrackerSmall.xml
===================================================================
--- trunk/applications/jason-team/massim-server/conf/testTrackerSmall.xml (rev 0)
+++ trunk/applications/jason-team/massim-server/conf/testTrackerSmall.xml 2008-04-25 10:03:30 UTC (rev 1256)
@@ -0,0 +1,198 @@
+<?xml version="1.0" encoding="utf-8"?>
+<conf tournamentname="GridSimulation" tournamentmode="0"
+ launch-sync-type="key" time-to-launch="10000" reportpath="."
+ backuppath="backup">
+ <network-agent port="12300" backlog="10" />
+ <match>
+ <simulation id="Test tracker's behavior facing a small cluster (must leave its scout)"
+ simulationclass="massim.simulation.GridSimulation"
+ configurationclass="massim.simulation.GridSimulationConfigurationHandCrafted"
+ rmiobserver="massim.simulation.GridSimulationRMIObserver"
+ xmlobserver="massim.simulation.GridSimulationXMLObserver"
+ rmixmlobserver="massim.simulation.GridSimulationRMIXMLDocumentObserver"
+ xmlobserverpath="."
+ xmlstatisticsobserver="massim.simulation.GridSimulationXMLStatisticsObserver"
+ file-simulationlog="./log" visualisationobserver="">
+
+
+ <!-- visualisationobserver="massim.simulation.GridSimulationVisualizationObserver" -->
+
+ <configuration xmlns:meta="http://www.tu-clausthal.de/"
+ sizex="70" sizey="70" maxNumberOfSteps="700" numberOfAgents="12"
+ numberOfObstacles="0" numberOfCows="5" cowSpeed="1"
+ agentSpeed="1" lineOfSight="17" fearRange="4" attractionRange="5"
+ cowWeight="5" agentWeight="-200" emptyWeight="1" obstacleWeight="-1"
+ htaccess="1">
+
+ <array item0="35" item1="45" item2="65" item3="65"
+ item4="65" item5="65" item6="35" item7="35" item8="35" item9="35"
+ item10="35" item11="35" meta:length="12"
+ meta:name="agentPositionY" />
+ <array item0="5" item1="15" item2="1" item3="2"
+ item4="3" item5="4" item6="63" item7="61" item8="59" item9="57"
+ item10="55" item11="53" meta:length="12"
+ meta:name="agentPositionX" />
+
+ <array item0="25" item1="28" item2="22" item3="21"
+ item4="26"
+ meta:length="5"
+ meta:name="cowPositionY" />
+
+
+ <array item0="12" item1="13" item2="14" item3="15"
+ item4="16"
+ meta:length="5"
+ meta:name="cowPositionX" />
+
+ <array item0="0" item1="14" meta:length="2"
+ meta:name="stable1X" />
+ <array item0="55" item1="69" meta:length="2"
+ meta:name="stable1Y" />
+ <array item0="55" item1="69" meta:length="2"
+ meta:name="stable2X" />
+ <array item0="0" item1="14" meta:length="2"
+ meta:name="stable2Y" />
+
+ <array meta:length="0" meta:name="obstaclePositionX" />
+
+ <array meta:length="0"
+ meta:name="obstaclePositionY" />
+ </configuration>
+
+ <agents>
+ <agent
+ agentclass="massim.simulation.GridSimulationAgent"
+ agentcreationclass="massim.simulation.GridSimulationAgentParameter"
+ team="blue">
+ <configuration />
+ </agent>
+ <agent
+ agentclass="massim.simulation.GridSimulationAgent"
+ agentcreationclass="massim.simulation.GridSimulationAgentParameter"
+ team="blue">
+ <configuration />
+ </agent>
+ <agent
+ agentclass="massim.simulation.GridSimulationAgent"
+ agentcreationclass="massim.simulation.GridSimulationAgentParameter"
+ team="blue">
+ <configuration />
+ </agent>
+ <agent
+ agentclass="massim.simulation.GridSimulationAgent"
+ agentcreationclass="massim.simulation.GridSimulationAgentParameter"
+ team="blue">
+ <configuration />
+ </agent>
+ <agent
+ agentclass="massim.simulation.GridSimulationAgent"
+ agentcreationclass="massim.simulation.GridSimulationAgentParameter"
+ team="blue">
+ <configuration />
+ </agent>
+ <agent
+ agentclass="massim.simulation.GridSimulationAgent"
+ agentcreationclass="massim.simulation.GridSimulationAgentParameter"
+ team="blue">
+ <configuration />
+ </agent>
+ <agent
+ agentclass="massim.simulation.GridSimulationAgent"
+ agentcreationclass="massim.simulation.GridSimulationAgentParameter"
+ team="red">
+ <configuration />
+ </agent>
+ <agent
+ agentclass="massim.simulation.GridSimulationAgent"
+ agentcreationclass="massim.simulation.GridSimulationAgentParameter"
+ team="red">
+ <configuration />
+ </agent>
+ <agent
+ agentclass="massim.simulation.GridSimulationAgent"
+ agentcreationclass="massim.simulation.GridSimulationAgentParameter"
+ team="red">
+ <configuration />
+ </agent>
+ <agent
+ agentclass="massim.simulation.GridSimulationAgent"
+ agentcreationclass="massim.simulation.GridSimulationAgentParameter"
+ team="red">
+ <configuration />
+ </agent>
+ <agent
+ agentclass="massim.simulation.GridSimulationAgent"
+ agentcreationclass="massim.simulation.GridSimulationAgentParameter"
+ team="red">
+ <configuration />
+ </agent>
+ <agent
+ agentclass="massim.simulation.GridSimulationAgent"
+ agentcreationclass="massim.simulation.GridSimulationAgentParameter"
+ team="red">
+ <configuration />
+ </agent>
+ </agents>
+ </simulation>
+
+ </match>
+
+ <accounts>
+ <actionclassmap name="Grid">
+ <actionclass id="action"
+ class="massim.simulation.GridSimulationAgentAction" />
+ <actionclass id="invalid" class="massim.InvalidAction" />
+ </actionclassmap>
+
+ <account actionclassmap="Grid"
+ defaultactionclass="massim.simulation.GridSimulationAgentAction"
+ timeout="8000" auxtimeout="500" maxpacketlength="65536"
+ username="botagent1" password="1" team="bot" />
+ <account actionclassmap="Grid"
+ defaultactionclass="massim.simulation.GridSimulationAgentAction"
+ timeout="8000" auxtimeout="500" maxpacketlength="65536"
+ username="botagent2" password="2" team="bot" />
+ <account actionclassmap="Grid"
+ defaultactionclass="massim.simulation.GridSimulationAgentAction"
+ timeout="8000" auxtimeout="500" maxpacketlength="65536"
+ username="botagent3" password="3" team="bot" />
+ <account actionclassmap="Grid"
+ defaultactionclass="massim.simulation.GridSimulationAgentAction"
+ timeout="8000" auxtimeout="500" maxpacketlength="65536"
+ username="botagent4" password="4" team="bot" />
+ <account actionclassmap="Grid"
+ defaultactionclass="massim.simulation.GridSimulationAgentAction"
+ timeout="8000" auxtimeout="500" maxpacketlength="65536"
+ username="botagent5" password="5" team="bot" />
+ <account actionclassmap="Grid"
+ defaultactionclass="massim.simulation.GridSimulationAgentAction"
+ timeout="8000" auxtimeout="500" maxpacketlength="65536"
+ username="botagent6" password="6" team="bot" />
+
+ <account actionclassmap="Grid"
+ defaultactionclass="massim.simulation.GridSimulationAgentAction"
+ timeout="8000" auxtimeout="500" maxpacketlength="65536"
+ username="participant1" password="1" team="participant" />
+ <account actionclassmap="Grid"
+ defaultactionclass="massim.simulation.GridSimulationAgentAction"
+ timeout="8000" auxtimeout="500" maxpacketlength="65536"
+ username="participant2" password="2" team="participant" />
+ <account actionclassmap="Grid"
+ defaultactionclass="massim.simulation.GridSimulationAgentAction"
+ timeout="8000" auxtimeout="500" maxpacketlength="65536"
+ username="participant3" password="3" team="participant" />
+ <account actionclassmap="Grid"
+ defaultactionclass="massim.simulation.GridSimulationAgentAction"
+ timeout="8000" auxtimeout="500" maxpacketlength="65536"
+ username="participant4" password="4" team="participant" />
+ <account actionclassmap="Grid"
+ defaultactionclass="massim.simulation.GridSimulationAgentAction"
+ timeout="8000" auxtimeout="500" maxpacketlength="65536"
+ username="participant5" password="5" team="participant" />
+ <account actionclassmap="Grid"
+ defaultactionclass="massim.simulation.GridSimulationAgentAction"
+ timeout="8000" auxtimeout="500" maxpacketlength="65536"
+ username="participant6" password="6" team="participant" />
+
+ </accounts>
+</conf>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tom...@us...> - 2008-04-25 01:42:18
|
Revision: 1255
http://jason.svn.sourceforge.net/jason/?rev=1255&view=rev
Author: tomklapiscak
Date: 2008-04-24 18:42:14 -0700 (Thu, 24 Apr 2008)
Log Message:
-----------
Added commerce README
Added Paths:
-----------
trunk/applications/jasdl-owlapi/examples/commerce/README
Added: trunk/applications/jasdl-owlapi/examples/commerce/README
===================================================================
--- trunk/applications/jasdl-owlapi/examples/commerce/README (rev 0)
+++ trunk/applications/jasdl-owlapi/examples/commerce/README 2008-04-25 01:42:14 UTC (rev 1255)
@@ -0,0 +1,53 @@
+JASDL: "Jason AgentSpeak-Description Logic"
+Copyright (C) 2008 Thomas Klapiscak (t.g...@du...)
+JASDL is distributed under the LGPL license (see COPYING and COPYING.LESSER)
+
+********************************************************
+--- Scenario Description ---
+
+This example demonstrates a MAS developed using JASDL that simulates a simplified "e-commerce" scenario. The agent society consists of customers, PAs (personal agents), shops and delivery vans. The agents in this society make use of two ontologies, commerce and society to facilitate enhanced reasoning services and a shared vocabulary (and in some cases, data store).
+
+Commerce.owl describes hierarchy of product classes, where instances of these are particular brands. Such individuals are associated with a stock level, price and weight. Additionally, this ontology describes orders and purchases. An order has associated with it many purchases and a customer. Purchases have assocaited with them a brand (i.e. an instance of Product), a quantity and a shop identifying where the purchase is available.
+
+Society.owl describes a hierarchy of agent types that the agents use to reason about their peers. In addition to providing a shared vocabulary, this ontology also acts as a shared data source, since agent individuals are defined in the ontology schema itself (rather than just the agent's own local in memory instantiation - as products are). Within this ontology we can express agent subservience; agents can employ many other agents but each can be employed only by one other agent. Additionally, we define the Company concept, which is used to organise agents into groups for which each is assumed to share profit (or example, agents are willing to refer purchase requests only to agents from the same company). A company can own many agents, but each agent can only be owned by a single company.
+
+User interaction with the system is facilitated through the use of a swing application (that will automatically appear upon instantiation of the MAS). Here, the user should supply descriptions of a desired product, a quantity and a shop to (initially ask).
+
+Product and shop descriptions should be given in a variant of the Manchester OWL Syntax (Used by Protege 4, see http://www.w3.org/2007/OWL/wiki/ManchesterSyntax for more details). JASDL's variant is known as "Namespace prefix form". It is essentially the same except all references to classes, properties and individuals are given by strings of the form "<label>:<alias>" where label is a JASDL ontology label and <alias> is a JASDL entity alias. Hence, this conveniently short string can be used to unambiguously reference an ontological entity within some ontology, while allowing our definition to include entities from any number of different ontologies. You can view some example product / shop descriptions and associated meaning in english by selecting an item from the "Example Requests" drop-down.
+
+Upon hitting the "Submit Request" button the descriptions are defined as classes (using jasdl.ia.define_class) and passed on to the PA. The PA then ammends the product description with a constraint that the shop has sufficient stock. A side note: this parsing/rendering/parsing process is performed (as opposed to simply sending class descriptions as strings) so that JASDL's syntactic translation mechanism is invoked, ensuring that ontological entities are referred to unambiguously - this would be necessary if the customer agent and its PA made use of disparate label/alias mappings.
+
+The PA then asks the shop (described by the shop description given by the customer) whether it has an available product that matches the given description. If so, the PA then asks the customer (a dialog box will appear on the UI) whether they approve of the brand found by the shop. If so, the product is added to the customer's order. If not, however, the PA ammends the product description with the additional requirement that the product not be this brand. It then resubmits this ammended request and the process repeats.
+
+An additional feature of the system is employed when a shop is unable to find a matching product. Under this circumstance, the shop will attempt to refer the purchase request to another agent within its company. To whom this referral is directed is dependent upon the type of the product. For example, if the product is known to be a type of MeatProduct, it will be referred to butchers. This part of the system makes clever use of JASDL's exhanced plan search flexibility (i.e. employing the trigger generalisation mechanism).
+
+Once a user is happy with their order, they can hit the "Confirm Order" button. At this point the PA will inform, for each purchase included in this order, the appropriate shop of the customer's desire for this product. Each shop will then arrange with the delivery vans it employs to have this order delivered to the customer. A current limitation of the system is that a shop can't reply to a request while it is servicing another order. This issue will be addressed soon.
+
+This example makes extensive use of JASDL feature extensions to Jason. The code is richly commented and should be able to give a reasonable view of what's going on, and how you can use these features for your own applications.
+
+This example application is in a very early stage of development and so is a bit rough around the edges and largely untested. As a side note, this application would probably be better off following a similar design to that seen in Case Study II from the Jason book, adopting a web-page for the user interface rather than a swing application. Additionally, the Manchester OWL syntax class expression style interface is not particularily user-friendly. However, this issue could be addressed perhaps by developing a "visual class expression builder" which could, for instance, allow users to drag-and-drop different constraints to compose an expression.
+
+********************************************************
+
+
+********************************************************
+--- Directory Structure ---
+
+ commerce.mas2j - MAS configuration file
+
+ bin/
+ c-build.xml - Custom MAS build file that will (for convenience) build JASDL (if under jasdl/examples)
+ classes/ - Compile target for commerce classes
+
+ src/
+ java/ - Commerce Java code
+ asl/ - Commerce AgentSpeak code
+ /common - AgentSpeak plans common across agents
+
+
+ onts/ - Contains the ontologies used by the agents
+
+ commerce.owl - An ontology describing a simple commerce domain
+ society.owl - An ontology describing a society of agents and how they are related to one another
+
+*******************************************************
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tom...@us...> - 2008-04-25 01:40:19
|
Revision: 1254
http://jason.svn.sourceforge.net/jason/?rev=1254&view=rev
Author: tomklapiscak
Date: 2008-04-24 18:40:08 -0700 (Thu, 24 Apr 2008)
Log Message:
-----------
JASDL pre-release (version 0.1) complete
Removed Paths:
-------------
trunk/applications/jasdl-owlapi/examples/commerce/src/asl/testing.asl
trunk/applications/jasdl-owlapi/examples/commerce/src/java/commerce/ui/customer/CustomerUIFrame.java
Deleted: trunk/applications/jasdl-owlapi/examples/commerce/src/asl/testing.asl
===================================================================
--- trunk/applications/jasdl-owlapi/examples/commerce/src/asl/testing.asl 2008-04-25 01:38:25 UTC (rev 1253)
+++ trunk/applications/jasdl-owlapi/examples/commerce/src/asl/testing.asl 2008-04-25 01:40:08 UTC (rev 1254)
@@ -1,27 +0,0 @@
-hovis(p002)[o(c)].
-unary(hovis(p001)[o(c)]).
-binary(hovis(p001)[o(c)], product(p002)[o(c)]).
-ternary(product(p001)[o(c)], product(p002)[o(c)], hovis(p003)[o(c)]).
-binaryNestedInBinary(binary(product(p001)[o(c)], product(p002)[o(c)]), binary(product(p003)[o(c)], product(p004)[o(c)])).
-
-+product(PID)[o(c)]
- <-
- .print(PID).
-
-
-+unary(product(PID)[o(c)])
- <-
- .print(PID).
-
-+binary(product(X)[o(c)], product(Y)[o(c)])
- <-
- .print(X, ", ", Y).
-
-+ternary(product(X)[o(c)], product(Y)[o(c)], product(Z)[o(c)])
- <-
- .print(X, ", ", Y, ", ", Z).
-
-
-+binaryNestedInBinary(binary(product(A)[o(c)], product(B)[o(c)]), binary(product(C)[o(c)], product(D)[o(c)]))
- <-
- .print(A, ", ", B, ", ", C, ", ", D).
Deleted: trunk/applications/jasdl-owlapi/examples/commerce/src/java/commerce/ui/customer/CustomerUIFrame.java
===================================================================
--- trunk/applications/jasdl-owlapi/examples/commerce/src/java/commerce/ui/customer/CustomerUIFrame.java 2008-04-25 01:38:25 UTC (rev 1253)
+++ trunk/applications/jasdl-owlapi/examples/commerce/src/java/commerce/ui/customer/CustomerUIFrame.java 2008-04-25 01:40:08 UTC (rev 1254)
@@ -1,36 +0,0 @@
-package commerce.ui.customer;
-
-import java.awt.Dimension;
-
-import javax.swing.JFrame;
-import javax.swing.JTabbedPane;
-
-import commerce.env.CommerceEnvironment;
-import commerce.env.model.ModelCustomer;
-
-public class CustomerUIFrame extends JFrame{
-
- private JTabbedPane tabs;
- private CommerceEnvironment env;
-
- public CustomerUIFrame(CommerceEnvironment env){
- super("Commerce: Customer UI");
- this.env = env;
-
- setPreferredSize(new Dimension(220, 320));
-
- tabs = new JTabbedPane();
- add(tabs);
- tabs.setVisible(true);
-
- pack();
- setVisible(true);
- }
-
- public void addCustomer(ModelCustomer customer){
- CustomerUIPanel panel = new CustomerUIPanel(env, customer);
- tabs.addTab(customer.getLabel(), panel);
- }
-
-
-}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tom...@us...> - 2008-04-25 01:38:36
|
Revision: 1253
http://jason.svn.sourceforge.net/jason/?rev=1253&view=rev
Author: tomklapiscak
Date: 2008-04-24 18:38:25 -0700 (Thu, 24 Apr 2008)
Log Message:
-----------
JASDL pre-release (version 0.1) complete
Modified Paths:
--------------
trunk/applications/jasdl-owlapi/README
trunk/applications/jasdl-owlapi/build.xml
trunk/applications/jasdl-owlapi/examples/commerce/.classpath
trunk/applications/jasdl-owlapi/examples/commerce/bin/build.xml
trunk/applications/jasdl-owlapi/examples/commerce/bin/c-build.xml
trunk/applications/jasdl-owlapi/examples/commerce/commerce.mas2j
trunk/applications/jasdl-owlapi/examples/commerce/onts/commerce.owl
trunk/applications/jasdl-owlapi/examples/commerce/onts/society.owl
trunk/applications/jasdl-owlapi/examples/commerce/src/asl/common/commerce.asl
trunk/applications/jasdl-owlapi/examples/commerce/src/asl/common/society.asl
trunk/applications/jasdl-owlapi/examples/commerce/src/asl/customer.asl
trunk/applications/jasdl-owlapi/examples/commerce/src/asl/delivery_van.asl
trunk/applications/jasdl-owlapi/examples/commerce/src/asl/pa.asl
trunk/applications/jasdl-owlapi/examples/commerce/src/asl/shop.asl
trunk/applications/jasdl-owlapi/examples/commerce/src/java/commerce/env/CommerceEnvironment.java
trunk/applications/jasdl-owlapi/examples/commerce/src/java/commerce/env/CommerceView.java
trunk/applications/jasdl-owlapi/examples/commerce/src/java/commerce/env/model/CommerceModel.java
trunk/applications/jasdl-owlapi/examples/commerce/src/java/commerce/env/model/ModelAgent.java
trunk/applications/jasdl-owlapi/examples/commerce/src/java/commerce/env/model/ModelCrate.java
trunk/applications/jasdl-owlapi/examples/commerce/src/java/commerce/env/model/ModelCustomer.java
trunk/applications/jasdl-owlapi/examples/commerce/src/java/commerce/env/model/ModelCustomerListener.java
trunk/applications/jasdl-owlapi/examples/commerce/src/java/commerce/env/model/ModelDeliveryVan.java
trunk/applications/jasdl-owlapi/examples/commerce/src/java/commerce/env/model/ModelMobileAgent.java
trunk/applications/jasdl-owlapi/examples/commerce/src/java/commerce/env/model/ModelObject.java
trunk/applications/jasdl-owlapi/examples/commerce/src/java/commerce/env/model/ModelPA.java
trunk/applications/jasdl-owlapi/examples/commerce/src/java/commerce/env/model/ModelShop.java
trunk/applications/jasdl-owlapi/examples/commerce/src/java/commerce/env/model/Product.java
trunk/applications/jasdl-owlapi/examples/commerce/src/java/commerce/exception/CommerceException.java
trunk/applications/jasdl-owlapi/examples/commerce/src/java/commerce/exception/ModelAgentException.java
trunk/applications/jasdl-owlapi/examples/commerce/src/java/commerce/exception/ModelDeliveryVanException.java
trunk/applications/jasdl-owlapi/examples/commerce/src/java/commerce/exception/ModelMobileAgentException.java
trunk/applications/jasdl-owlapi/examples/commerce/src/java/commerce/exception/ModelShopException.java
trunk/applications/jasdl-owlapi/examples/commerce/src/java/commerce/ui/customer/CustomerUIPanel.java
trunk/applications/jasdl-owlapi/examples/commerce/src/java/commerce/util/Common.java
trunk/applications/jasdl-owlapi/lib/bebops.jar
trunk/applications/jasdl-owlapi/src/jasdl/asSemantics/JASDLAgent.java
trunk/applications/jasdl-owlapi/src/jasdl/asSemantics/JASDLAgentConfigurator.java
trunk/applications/jasdl-owlapi/src/jasdl/util/JASDLCommon.java
Removed Paths:
-------------
trunk/applications/jasdl-owlapi/examples/travel_agent/
trunk/applications/jasdl-owlapi/src/jasdl/test/
Property Changed:
----------------
trunk/applications/jasdl-owlapi/doc/
Modified: trunk/applications/jasdl-owlapi/README
===================================================================
--- trunk/applications/jasdl-owlapi/README 2008-04-24 22:26:31 UTC (rev 1252)
+++ trunk/applications/jasdl-owlapi/README 2008-04-25 01:38:25 UTC (rev 1253)
@@ -2,58 +2,56 @@
Copyright (C) 2008 Thomas Klapiscak (t.g...@du...)
JASDL is distributed under the LGPL license (see COPYING and COPYING.LESSER)
+Thank you for downloading this pre-release of JASDL.
-*** Running JASDL ***
+My apologies that the documentation is somewhat lacking for this release - this will be addressed soon. For now, the AgentSpeak code for the commerce example is richly commented and so should give you an idea of what is going on. For documentation of the additional internal actions that JASDL provides please consult the jasdl.ia.* package javadocs.
-Firstly, please check you are using the latest revision of the entire Jason trunk from the SVN before use.
+PLEASE NOTE: Your .jason/user.properties file must contain the jasonJar property pointing to a Jason .jar built using source from the Jason SVN revision 1240 or later. Please consult Jason documentation for instructions how to do this.
-To run a JASDL agent, its class-path must include all jars under the sub-directories:
- * trunk/applications/jasdl-owlapi/lib
- * trunk/applications/jmca/lib
- * All standard Jason libraries, please ensure that these are built from the latest revision of the Jason trunk.
+JASDL requires JDK version 5 or later to compile and run.
-The (unmodified) travel_agent example (trunk/applications/jasdl-owlapi/examples/travel_agent/config.mas2j)
-must be run in-situ within the Jason trunk. All necessary ant tasks will be performed by its custom build script.
-
-*** Configuring JASDL ***
+If you have any questions, please don't hesitate to email and I'd be glad to help.
-Please refer to /trunk/jason/applications/jasdl-owlapi/examples/travel_agent/config.mas2j for an example of how to configure JASDL agents.
-
-
-
********************************************************
+
--- Directory Structure ---
The JASDL distribution is structured as such:
-
- README - This file
+ src/ - JASDL source code
+
+ bin/ - Compilation target for JASDL classes
+
+ lib/ - Libraries that JASDL and applications developed using it are dependent upon
+
docs/
- mas2jconfig - Instructions on mas2j setup for a JASDL agent
- java - Java docs for JASDL
+ mas2jconfig - Instructions on configuration of a JASDL agent
+ java - Javadocs for JASDL
-
-
+ examples/ - Examples of applications developed using JASDL
+ commerce/ - An example JASDL application simulating an "e-commerce" scenario. Please consult commerce/README for more information
+
+
+
********************************************************
-*** Known issues ***
+--- Compiling JASDL ---
-The -+ operator does not function properly. Until this problem is fixed the operation must be performed in two steps as shown here:
--+a;
-becomes:
--a;
-+a;
+To compile JASDL run ant on its base directory (the directory this file is in).
-When TG is applied to complex test goals, unifications do not propagate correctly
+********************************************************
-Trigger generalisation is not properly applied when searching for an suitable failure event for intended means that are not in the top level of an intention.
+--- Running JASDL ---
-Complex test goals resulting from queries against the ontology (those whose event has a SE-Literal, e.g. ?hotel(hilton)[o(travel)]), prevent their instantiating intention from properly generating failure events.
+A Jason agent developed using JASDL can be run like any other. Please consult docs/mas2jconfig for instructions on how to setup the .mas2j file of a JASDL agent and examples/commerce/commerce.mas2j for an example.
+********************************************************
+--- Known issues ---
+
Any test queries (and hence ask messages) that might result in the trigger generalisation mechanism being employed will need to include the "jasdl_tg_cause(_)" annotation (the parameter will not be unified and so is best left anonymous for clarity). If future work deems this issue unavoidable, JASDL will make a pass through the plan library and add this annotation automatically where required so the developer need not worry about it.
+*******************************************************
-
-Thank you for your interest in JASDL!
+Finally, thank you for your interest in JASDL! I look forward to hearing your feedback.
Modified: trunk/applications/jasdl-owlapi/build.xml
===================================================================
--- trunk/applications/jasdl-owlapi/build.xml 2008-04-24 22:26:31 UTC (rev 1252)
+++ trunk/applications/jasdl-owlapi/build.xml 2008-04-25 01:38:25 UTC (rev 1253)
@@ -1,44 +1,69 @@
<project basedir="." default="jar" name="jasdl">
- <property name="jason.dir" value="../.."/>
- <property name="apps.dir" value="${jason.dir}/applications"/>
- <property name="jmca.dir" value="${apps.dir}/jmca"/>
- <property name="bebops.dir" value="${apps.dir}/bebops"/>
- <property name="bebops.jar" value="${bebops.dir}/lib/bebops.jar"/>
- <property name="asunit.dir" value="${apps.dir}/as-unit-test"/>
+
+ <property file="${user.home}/.jason/user.properties"/>
+
<property name="source.dir" value="${basedir}/src" />
<property name="build.dir" value="${basedir}/bin" />
- <property name="apidocs.dir" value="${basedir}/doc/api" />
+ <property name="apidocs.dir" value="${basedir}/doc/api/java" />
<property name="lib.dir" value="${basedir}/lib" />
<property name="jasdl.jar" value="${lib.dir}/jasdl.jar" />
+
+
+ <!-- Distribution properties -->
+ <property name="version.jasdl" value="0"/>
+ <property name="release.jasdl" value="1"/>
+
+ <property name="dist.dir" value="${user.home}/tmp/jasdl-owlapi-${version.jasdl}.${release.jasdl}" />
+ <property name="dist.file" value="${dist.dir}.zip" />
+
+
+ <!-- For conveniently building bebops, jason and jmca if present -->
+ <property name="jason.dir" value="../../../jason"/>
+ <property name="apps.dir" value="${jason.dir}/applications"/>
+ <property name="bebops.dir" value="${apps.dir}/bebops"/>
+ <property name="bebops.jar" value="${bebops.dir}/lib/bebops.jar"/>
+ <property name="jmca.dir" value="${apps.dir}/jmca"/>
+ <property name="jmca.jar" value="${jmca.dir}/lib/jmca.jar"/>
+ <property name="jason.dir" value="${apps.dir}/jmca"/>
+
+ <available file="${jason.dir}" type="dir" property="jason.available"/>
+
+ <target name="jason" if="jason.available">
+ <echo message="Building Jason (${jason.dir})"/>
+ <ant dir="${jason.dir}" inheritAll="false" target="jar"/>
+ </target>
-
+ <available file="${bebops.dir}" type="dir" property="bebops.available"/>
+ <target name="bebops" if="bebops.available">
+ <echo message="Building Bebops"/>
+ <ant dir="${bebops.dir}" inheritAll="false"/>
+ <copy file="${bebops.jar}" todir="${lib.dir}"/>
+ </target>
+
+ <available file="${jmca.dir}" type="dir" property="jmca.available"/>
+
+ <target name="jmca" if="jmca.available">
+ <echo message="Building JMCA"/>
+ <ant dir="${jmca.dir}" inheritAll="false"/>
+ <copy file="${jmca.jar}" todir="${lib.dir}"/>
+ </target>
+
+
<path id="project.classpath">
- <pathelement location="${jason.dir}/lib/jason.jar"/>
- <pathelement location="${jmca.dir}/lib/jmca.jar"/>
- <pathelement location="${asunit.dir}/lib/asunit.jar"/>
+ <pathelement location="${jasonJar}"/> <!-- taken from ./jason/user.properties -->
<fileset dir="./lib">
<include name="**/*.jar"/>
</fileset>
</path>
- <path id="test.classpath">
- <path refid="project.classpath" />
- <pathelement location="${build.dir}" />
- </path>
-
<target name="init">
<tstamp/>
<mkdir dir="${build.dir}"/>
- <available file="${bebops.dir}" type="dir" property="bebops.available"/>
</target>
- <target name="bebops" depends="init" if="bebops.available">
- <ant dir="${bebops.dir}" inheritAll="false"/>
- <copy file="${bebops.jar}" todir="${lib.dir}"/>
- </target>
- <target name="compile" depends="init, bebops">
+ <target name="compile" depends="init,jason,bebops,jmca">
<javac srcdir="src" destdir="${build.dir}" debug="true" deprecation="true" optimize="true" nowarn="true" source="1.5" target="1.5">
<classpath refid="project.classpath" />
</javac>
@@ -54,18 +79,6 @@
<delete dir="${apidocs.dir}"/>
</target>
-
- <target name="test" depends="jar">
- <junit printsummary="yes" failureProperty="test.failure">
- <classpath refid="test.classpath" />
- <formatter type="plain" usefile="false" />
- <batchtest>
- <fileset dir="${source.dir}" includes="jasdl/test/*Test.java" />
- </batchtest>
- </junit>
- <fail message="test failed" if="test.failure" />
- </target>
-
<target name="apidoc" depends="compile" >
<javadoc
packagenames="jasdl.*"
@@ -81,5 +94,43 @@
</javadoc>
</target>
+ <target name="dist" depends="clean, jar, apidoc">
+ <echo message="Generating JASDL ${version.jasdl}.${release.jasdl}" />
+
+ <fixcrlf srcdir="${basedir}" eol="crlf" includes="**/*.txt,**/*.bat" />
+
+ <delete failonerror="no" includeEmptyDirs="true" >
+ <fileset dir="${dist.dir}" />
+ <fileset file="${dist.file}" />
+ </delete>
+
+ <mkdir dir="${dist.dir}" />
+
+ <copy todir="${dist.dir}">
+ <fileset dir="${basedir}" includes="build.xml" />
+ <fileset dir="${basedir}" includes="COPYING" />
+ <fileset dir="${basedir}" includes="COPYING.LESSER" />
+ <fileset dir="${basedir}" includes="log4j.properties" />
+ <fileset dir="${basedir}" includes="README" />
+
+ <fileset dir="${basedir}" includes="doc/**/*" />
+ <fileset dir="${basedir}" includes="lib/**/*" />
+ <fileset dir="${basedir}" includes="src/**/*" />
+
+ <fileset dir="${basedir}" includes="examples/commerce/commerce.mas2j" />
+ <fileset dir="${basedir}" includes="examples/commerce/logging.properties" />
+ <fileset dir="${basedir}" includes="examples/commerce/README" />
+
+ <fileset dir="${basedir}" includes="examples/commerce/bin/c-build.xml" />
+ <fileset dir="${basedir}" includes="examples/commerce/src/**/*" />
+ <fileset dir="${basedir}" includes="examples/commerce/onts/**/*" />
+
+
+ </copy>
+
+ <zip basedir="${dist.dir}/.." includes="jasdl-owlapi*/**/*" zipfile="${dist.file}"/>
+ </target>
+
+
</project>
Property changes on: trunk/applications/jasdl-owlapi/doc
___________________________________________________________________
Name: svn:ignore
+ api
Modified: trunk/applications/jasdl-owlapi/examples/commerce/.classpath
===================================================================
--- trunk/applications/jasdl-owlapi/examples/commerce/.classpath 2008-04-24 22:26:31 UTC (rev 1252)
+++ trunk/applications/jasdl-owlapi/examples/commerce/.classpath 2008-04-25 01:38:25 UTC (rev 1253)
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src/java"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="lib" path="/home/tom/workspace/jason/lib/jason.jar" sourcepath="/home/tom/workspace/jason/src">
<attributes>
<attribute name="javadoc_location" value="file:/home/tom/workspace/jason/doc/api/"/>
@@ -13,5 +12,6 @@
<attribute name="javadoc_location" value="file:/home/tom/workspace/owlapi/antbuild/build/javadoc/"/>
</attributes>
</classpathentry>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="output" path="bin/classes"/>
</classpath>
Modified: trunk/applications/jasdl-owlapi/examples/commerce/bin/build.xml
===================================================================
--- trunk/applications/jasdl-owlapi/examples/commerce/bin/build.xml 2008-04-24 22:26:31 UTC (rev 1252)
+++ trunk/applications/jasdl-owlapi/examples/commerce/bin/build.xml 2008-04-25 01:38:25 UTC (rev 1253)
@@ -2,10 +2,10 @@
<!--
- This file was generated by Jason ?
+ This file was generated by Jason 1.0.2
http://jason.sf.net
- April 22, 2008 - 19:07:12
+ April 25, 2008 - 00:06:35
-->
<project name ="commerce"
@@ -23,7 +23,6 @@
<pathelement location="${build.dir}"/>
<pathelement location="${jasonJar}"/>
<fileset dir="../../lib" > <include name="**/*.jar" /> </fileset>
- <pathelement location="../../../jmca/lib/jmca.jar"/>
</path>
Modified: trunk/applications/jasdl-owlapi/examples/commerce/bin/c-build.xml
===================================================================
--- trunk/applications/jasdl-owlapi/examples/commerce/bin/c-build.xml 2008-04-24 22:26:31 UTC (rev 1252)
+++ trunk/applications/jasdl-owlapi/examples/commerce/bin/c-build.xml 2008-04-25 01:38:25 UTC (rev 1253)
@@ -1,15 +1,12 @@
<?xml version="1.0" encoding="ISO-8859-1" ?>
<project name ="custombuild" basedir="..">
- <!-- Ensure we are using the latest build of Jason -->
- <property name="jasonJar" value="../../../../lib/jason.jar"/>
-
+
<import file="build.xml"/>
- <target name="user-init">
- <ant dir="../../../../" inheritAll="false" target="jar"/>
- <ant dir="../../../jmca" inheritAll="false"/>
- <ant dir="../.." inheritAll="false"/>
+ <target name="user-init">
+ <!-- compile JASDL for convenience -->
+ <ant dir="../../" inheritAll="false" target="jar"/>
</target>
<target name="user-end">
Modified: trunk/applications/jasdl-owlapi/examples/commerce/commerce.mas2j
===================================================================
--- trunk/applications/jasdl-owlapi/examples/commerce/commerce.mas2j 2008-04-24 22:26:31 UTC (rev 1252)
+++ trunk/applications/jasdl-owlapi/examples/commerce/commerce.mas2j 2008-04-25 01:38:25 UTC (rev 1253)
@@ -1,12 +1,18 @@
/* .mas2j configuration of the commerce MAS
- * Note:
+ * Notes:
* - this takes advantage of defaults for many of the settings available
* for the configuration of a JASDL agent. Please consult docs/mas2jconfiguration
* for full documentation of these.
* - in the interests of simplicitly, all agents make use of the same label mappings for ontologies
* and (automatic and manual) alias mappings for ontological entities.
- * There could be set arbitrarily for each agent (and the .asl code updated accordingly) and JASDL would
- * still function correctly.
+ * These could be set arbitrarily for each agent (and the .asl code updated accordingly) and JASDL would
+ * still function correctly.
+ * - Each agent in the society must have associated with it an individual in society.owl (with a matching name) and
+ * a ModelAgent instance in the CommerceModel (where its ID matches agent name).
+ * - Although ontology URIs reference related local resources on the file system, they could equally reference (reachable) remote or local
+ * resources (e.g. http://www.dur.ac.uk/t.g.klapiscak/onts/commerce.owl). In fact, any valid URI can be used here.
+ * - Since we make extensive use of inverse object properties, we enable the experimental "contraction" feature to ensure their removals
+ * are properly handled.
*/
MAS commerce {
@@ -22,7 +28,8 @@
[
jasdl_ontologies="c,s",
jasdl_c_uri="/onts/commerce.owl",
- jasdl_s_uri="/onts/society.owl"
+ jasdl_s_uri="/onts/society.owl",
+ jasdl_useContraction = "true"
]
#3
agentArchClass jasdl.architecture.JASDLAgArch
@@ -33,7 +40,8 @@
[
jasdl_ontologies="c,s",
jasdl_c_uri="/onts/commerce.owl",
- jasdl_s_uri="/onts/society.owl"
+ jasdl_s_uri="/onts/society.owl",
+ jasdl_useContraction = "true"
]
#4
agentArchClass jasdl.architecture.JASDLAgArch
@@ -44,7 +52,8 @@
[
jasdl_ontologies="c,s",
jasdl_c_uri="/onts/commerce.owl",
- jasdl_s_uri="/onts/society.owl"
+ jasdl_s_uri="/onts/society.owl",
+ jasdl_useContraction = "true"
]
#3
agentArchClass jasdl.architecture.JASDLAgArch
@@ -55,8 +64,7 @@
[
jasdl_ontologies="c,s",
jasdl_c_uri="/onts/commerce.owl",
- jasdl_s_uri="/onts/society.owl",
-
+ jasdl_s_uri="/onts/society.owl",
jasdl_useContraction = "true"
]
#3
@@ -66,7 +74,6 @@
classpath: "../../lib/**/*.jar"; // JASDL's libraries
- "../../../jmca/lib/jmca.jar"; // JMCA
aslSourcePath: "src/asl";
}
Modified: trunk/applications/jasdl-owlapi/examples/commerce/onts/commerce.owl
===================================================================
--- trunk/applications/jasdl-owlapi/examples/commerce/onts/commerce.owl 2008-04-24 22:26:31 UTC (rev 1252)
+++ trunk/applications/jasdl-owlapi/examples/commerce/onts/commerce.owl 2008-04-25 01:38:25 UTC (rev 1253)
@@ -21,7 +21,12 @@
xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:commerce="http://www.dur.ac.uk/t.g.klapiscak/onts/commerce.owl#">
- <owl:Ontology rdf:about=""/>
+ <owl:Ontology rdf:about="">
+ <rdfs:comment
+ >Individuals (i.e. brands of product) are not instantiated in this ontology schema (since product catalogue varies between shops and should not be shared information). Instead, they are instantiated by the CommerceModel class using SE-Percepts.</rdfs:comment>
+ <rdfs:comment
+ >The full potential for expressing types of products has not been explored here. For example, we could define a "contains" object property, relating a class of products to a notable ingredient that a customer may wish to avoid such as an allergen (e.g. lactose, gluten, etc).</rdfs:comment>
+ </owl:Ontology>
@@ -292,14 +297,6 @@
- <!-- http://www.dur.ac.uk/t.g.klapiscak/onts/commerce.owl#ReadyMeal -->
-
- <owl:Class rdf:about="#ReadyMeal">
- <rdfs:subClassOf rdf:resource="#Grocery"/>
- </owl:Class>
-
-
-
<!-- http://www.dur.ac.uk/t.g.klapiscak/onts/commerce.owl#RootVegetable -->
<owl:Class rdf:about="#RootVegetable">
@@ -309,15 +306,6 @@
- <!-- http://www.dur.ac.uk/t.g.klapiscak/onts/commerce.owl#ShepherdsPie -->
-
- <owl:Class rdf:about="#ShepherdsPie">
- <rdfs:subClassOf rdf:resource="#MeatProduct"/>
- <rdfs:subClassOf rdf:resource="#ReadyMeal"/>
- </owl:Class>
-
-
-
<!-- http://www.dur.ac.uk/t.g.klapiscak/onts/commerce.owl#Vegetable -->
<owl:Class rdf:about="#Vegetable">
@@ -326,15 +314,6 @@
- <!-- http://www.dur.ac.uk/t.g.klapiscak/onts/commerce.owl#VegetableCurry -->
-
- <owl:Class rdf:about="#VegetableCurry">
- <rdfs:subClassOf rdf:resource="#ReadyMeal"/>
- <owl:disjointWith rdf:resource="#ShepherdsPie"/>
- </owl:Class>
-
-
-
<!-- http://www.w3.org/2002/07/owl#Thing -->
<owl:Class rdf:about="&owl;Thing"/>
Modified: trunk/applications/jasdl-owlapi/examples/commerce/onts/society.owl
===================================================================
--- trunk/applications/jasdl-owlapi/examples/commerce/onts/society.owl 2008-04-24 22:26:31 UTC (rev 1252)
+++ trunk/applications/jasdl-owlapi/examples/commerce/onts/society.owl 2008-04-25 01:38:25 UTC (rev 1253)
@@ -40,6 +40,8 @@
<owl:ObjectProperty rdf:about="#employs">
<rdf:type rdf:resource="&owl;InverseFunctionalProperty"/>
+ <rdfs:comment
+ >Inverse of isEmployedBy. An agent can employ many other agents (but each agent may only be employed by one agent)</rdfs:comment>
<rdfs:domain rdf:resource="#Agent"/>
<rdfs:range rdf:resource="#Agent"/>
</owl:ObjectProperty>
@@ -50,6 +52,8 @@
<owl:ObjectProperty rdf:about="#isEmployedBy">
<rdf:type rdf:resource="&owl;FunctionalProperty"/>
+ <rdfs:comment
+ >Inverse of isEmployedByemploys. Each agent may only be employed by one agent (but an agent can employ many other agents)</rdfs:comment>
<rdfs:domain rdf:resource="#Agent"/>
<rdfs:range rdf:resource="#Agent"/>
<owl:inverseOf rdf:resource="#employs"/>
@@ -61,6 +65,10 @@
<owl:ObjectProperty rdf:about="#ownedBy">
<rdf:type rdf:resource="&owl;FunctionalProperty"/>
+ <rdfs:comment
+ >An agent is owned by exactly one company. Inverse of owns</rdfs:comment>
+ <rdfs:domain rdf:resource="#Agent"/>
+ <rdfs:range rdf:resource="#Company"/>
</owl:ObjectProperty>
@@ -69,6 +77,9 @@
<owl:ObjectProperty rdf:about="#owns">
<rdf:type rdf:resource="&owl;InverseFunctionalProperty"/>
+ <rdfs:comment
+ >A company can own many agents. Inverse of ownedBy</rdfs:comment>
+ <rdfs:domain rdf:resource="#Company"/>
<owl:inverseOf rdf:resource="#ownedBy"/>
</owl:ObjectProperty>
@@ -216,15 +227,15 @@
- <!-- http://www.dur.ac.uk/t.g.klapiscak/onts/society.owl#delivery_van_3 -->
+ <!-- http://www.dur.ac.uk/t.g.klapiscak/onts/society.owl#delivery_van3 -->
- <rdf:Description rdf:about="#delivery_van_3"/>
+ <DeliveryVan rdf:about="#delivery_van3"/>
- <!-- http://www.dur.ac.uk/t.g.klapiscak/onts/society.owl#delivery_van_4 -->
+ <!-- http://www.dur.ac.uk/t.g.klapiscak/onts/society.owl#delivery_van4 -->
- <rdf:Description rdf:about="#delivery_van_4"/>
+ <DeliveryVan rdf:about="#delivery_van4"/>
@@ -250,7 +261,7 @@
<Supermarket rdf:about="#shop1">
<employs rdf:resource="#delivery_van1"/>
- <employs rdf:resource="#delivery_van_4"/>
+ <employs rdf:resource="#delivery_van4"/>
<ownedBy rdf:resource="#tescos_inc"/>
</Supermarket>
@@ -268,7 +279,7 @@
<!-- http://www.dur.ac.uk/t.g.klapiscak/onts/society.owl#shop3 -->
<GreenGrocers rdf:about="#shop3">
- <employs rdf:resource="#delivery_van_3"/>
+ <employs rdf:resource="#delivery_van3"/>
<ownedBy rdf:resource="#tescos_inc"/>
</GreenGrocers>
@@ -291,20 +302,20 @@
<rdf:Description>
<rdf:type rdf:resource="&owl;AllDifferent"/>
<owl:distinctMembers rdf:parseType="Collection">
- <rdf:Description rdf:about="#customer3"/>
<rdf:Description rdf:about="#customer2"/>
- <rdf:Description rdf:about="#shop2"/>
+ <rdf:Description rdf:about="#delivery_van1"/>
+ <rdf:Description rdf:about="#pa2"/>
+ <rdf:Description rdf:about="#shop1"/>
<rdf:Description rdf:about="#delivery_van2"/>
<rdf:Description rdf:about="#pa1"/>
- <rdf:Description rdf:about="#delivery_van_3"/>
<rdf:Description rdf:about="#customer1"/>
<rdf:Description rdf:about="#tescos_inc"/>
<rdf:Description rdf:about="#shop3"/>
- <rdf:Description rdf:about="#shop1"/>
- <rdf:Description rdf:about="#pa2"/>
- <rdf:Description rdf:about="#delivery_van_4"/>
- <rdf:Description rdf:about="#delivery_van1"/>
+ <rdf:Description rdf:about="#delivery_van3"/>
<rdf:Description rdf:about="#pa3"/>
+ <rdf:Description rdf:about="#shop2"/>
+ <rdf:Description rdf:about="#customer3"/>
+ <rdf:Description rdf:about="#delivery_van4"/>
</owl:distinctMembers>
</rdf:Description>
</rdf:RDF>
Modified: trunk/applications/jasdl-owlapi/examples/commerce/src/asl/common/commerce.asl
===================================================================
--- trunk/applications/jasdl-owlapi/examples/commerce/src/asl/common/commerce.asl 2008-04-24 22:26:31 UTC (rev 1252)
+++ trunk/applications/jasdl-owlapi/examples/commerce/src/asl/common/commerce.asl 2008-04-25 01:38:25 UTC (rev 1253)
@@ -1,15 +1,41 @@
+/*
+ * Copyright (C) 2008 Thomas Klapiscak (t.g...@du...)
+ *
+ * This file is part of JASDL.
+ *
+ * JASDL is free software: you can redistribute it and/or modify
+ * it under the terms of the Lesser GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * JASDL is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * Lesser GNU General Public License for more details.
+ *
+ * You should have received a copy of the Lesser GNU General Public License
+ * along with JASDL. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+!abolish_order(Order) :
- order(Order)[o(c)]
+ order(Order)[o(c)] // must be a known order
<-
- // Abolish beliefs about purchases included in this order, we no longer need them
+ // Abolish beliefs about purchases included in this order, we no longer need them
.findall(Purchase, includes(Order, Purchase)[o(c)], Purchases);
!abolish_purchases(Purchases);
-order(Order)[o(c), source(_)];
- // note: inverse of hasOrder
+ // note: inverse of hasOrder
-hasCustomer(Order, Customer)[o(c), source(_)].
-
+
+/*
+ * Terminal case
+ */
+!abolish_purchases([]).
+
+/*
+ * Recursive case
+ */
+!abolish_purchases([Purchase|Purchases])
<-
!abolish_purchase(Purchase);
Modified: trunk/applications/jasdl-owlapi/examples/commerce/src/asl/common/society.asl
===================================================================
--- trunk/applications/jasdl-owlapi/examples/commerce/src/asl/common/society.asl 2008-04-24 22:26:31 UTC (rev 1252)
+++ trunk/applications/jasdl-owlapi/examples/commerce/src/asl/common/society.asl 2008-04-25 01:38:25 UTC (rev 1253)
@@ -1,9 +1,30 @@
/*
+ * Copyright (C) 2008 Thomas Klapiscak (t.g...@du...)
+ *
+ * This file is part of JASDL.
+ *
+ * JASDL is free software: you can redistribute it and/or modify
+ * it under the terms of the Lesser GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * JASDL is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * Lesser GNU General Public License for more details.
+ *
+ * You should have received a copy of the Lesser GNU General Public License
+ * along with JASDL. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+/*
* PA is employed by a single customer (enforced by the fact that employs is inverse functional - and isEmployedBy is functional)
- * Unfortunately, since employs has an inverse property, it cannot also be transitive
+ * Unfortunately, since employs has an inverse property, it cannot also be transitive.
*/
// Using SE-Literals in rules.
// In this case essentially grounding the domain of an object property with a commonly used value (i.e. my name)
isEmployedBy(Employer) :- .my_name(Me) & isEmployedBy(Me, Employer)[o(s)].
+
employs(Employee) :- .my_name(Me) & employs(Me, Employee)[o(s)].
Modified: trunk/applications/jasdl-owlapi/examples/commerce/src/asl/customer.asl
===================================================================
--- trunk/applications/jasdl-owlapi/examples/commerce/src/asl/customer.asl 2008-04-24 22:26:31 UTC (rev 1252)
+++ trunk/applications/jasdl-owlapi/examples/commerce/src/asl/customer.asl 2008-04-25 01:38:25 UTC (rev 1253)
@@ -1,23 +1,49 @@
+/*
+ * Copyright (C) 2008 Thomas Klapiscak (t.g...@du...)
+ *
+ * This file is part of JASDL.
+ *
+ * JASDL is free software: you can redistribute it and/or modify
+ * it under the terms of the Lesser GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * JASDL is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * Lesser GNU General Public License for more details.
+ *
+ * You should have received a copy of the Lesser GNU General Public License
+ * along with JASDL. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
{include("common/society.asl")}
{include("common/commerce.asl")}
-/* Orders specified incrementally and tracked by PA. Allows real-time feedback about e.g. product availability
- * Notice that ontology and syntactic translation is providing a well-defined shared vocabulary between agents.
- * Note with an accurate ontology alignment our agents could communicate even without prior agreement on terms.
+/*
+ * Some Notes:
+ * The ontologies and syntactic translation protocol is providing a well-defined shared vocabulary between agents.
+ * With an accurate ontology alignment our agents could communicate even without prior agreement on terms.
* - the structural information in the ontology gives us a richer palette for semantic matching over and above that available through
* e.g. synonym matching.
- * Assuming central repository of agents and their types (society.owl schema)
+ * We are assuming central repository of agents and their types (society.owl schema). We are also assuming agent's cannot falsify their names
+ * (in fact, security is not an issue considered yet throughout the system).
* IDs are propagated through annotations to match product request brands with quantities
*/
+
+/**
+ * Will instantiate a unique order ID and associated it with this customer if none known.
+ * Fails quietly otherwise.
+ */
+!init
<-
- // ask the PA if it already has a current order listed for this custoemr
+ // ask the PA if it already has a current order listed for this custoemr
?employs(PA);
.send(PA, askOne, order(Order)[o(c)], false);
- // ... it does not, give it a new order ID and associate it with this customer
+ // ... it does not, give it a new order ID and associate it with this customer
?employs(PA);
jasdl.ia.get_anonymous_individual(Order);
@@ -28,7 +54,10 @@
.send(PA, tell, order(Order)[o(c)]);
.send(PA, tell, hasOrder(Me, Order)[o(c)]).
-
+
+/**
+ * Fail quietly
+ */
-!init.
@@ -37,32 +66,31 @@
*/
+ui_product_request(ProductDescription, ShopDescription, Qty)[source(percept)]
<-
- !init;
-
- // Get a PA employed by me
- ?employs(PA);
-
- // Explicitly discard the percept - in case an identical request comes in next perception cycle (we still want to catch it)
- -ui_product_request(ProductDescription, ShopDescription, Qty)[source(percept)];
-
- // Must be defined locally in order to take advantage of syntactic translation.
- // If these were simply sent as string to PA and this agent had different entity aliases / ontology labels
- // then the PA would not be able to understand the request.
-
- jasdl.ia.define_class(suitableProduct, ProductDescription);
- jasdl.ia.define_class(suitableShop, ShopDescription);
-
- // Request a suitable brand from the PA
- .send(PA, achieve, suitable(suitableProduct(_)[o(self)], suitableShop(_)[o(self)], Qty)).
+ !init;
+
+ // Get a PA employed by me
+ ?employs(PA);
+
+ // Explicitly discard the percept - in case an identical request comes in next perception cycle (we still want to catch it)
+ -ui_product_request(ProductDescription, ShopDescription, Qty)[source(percept)];
+
+ // Must be defined locally in order to take advantage of syntactic translation.
+ // If these were simply sent as string to PA and this agent had different entity aliases / ontology labels
+ // then the PA would not be able to understand the request.
+ jasdl.ia.define_class(suitableProduct, ProductDescription);
+ jasdl.ia.define_class(suitableShop, ShopDescription);
+
+ // Request a suitable brand from the PA
+ .send(PA, achieve, suitable(suitableProduct(_)[o(self)], suitableShop(_)[o(self)], Qty)).
/*
* The user has hit the "confirm order" button on the customer UI.
*/
+ui_confirm_order[source(Percept)]
<-
- // Find the PA I employ
+ // Find the PA I employ
?employs(PA);
- // Ask the PA to achieve the state of affairs such that the customer's current order is confirmed with the necessary shop agents.
+ // Ask the PA to achieve the state of affairs such that the customer's current order is confirmed with the necessary shop agents.
.send(PA, achieve, order_confirmed).
/**
@@ -70,18 +98,16 @@
* thus displaying a dialog box on the customer UI.
*/
+message(Message)[source(PA)] : pA(PA)[o(s)]
- <-
- // We no longer need (or want) this belief
+ <-
+ // We no longer need (or want) this belief
-message(Message)[source(PA)];
- // Display the dialog on the customer UI
+ // Display the dialog on the customer UI
message(Message).
/**
* The PA has asked for approval from the customer to make a purchase (identified by the approve annotation).
* This results in the execution of the "approve" environmental action. This displays a confirm dialog on the
* customer UI and suspends the thread awaiting a response.
- * The event and resulting response is annotated with the id annotation, thus allowing the PA to match
- * the approval response with the correct purchase.
*/
+?approve(Brand, Answer)
<-
Modified: trunk/applications/jasdl-owlapi/examples/commerce/src/asl/delivery_van.asl
===================================================================
--- trunk/applications/jasdl-owlapi/examples/commerce/src/asl/delivery_van.asl 2008-04-24 22:26:31 UTC (rev 1252)
+++ trunk/applications/jasdl-owlapi/examples/commerce/src/asl/delivery_van.asl 2008-04-25 01:38:25 UTC (rev 1253)
@@ -1,13 +1,40 @@
+/*
+ * Copyright (C) 2008 Thomas Klapiscak (t.g...@du...)
+ *
+ * This file is part of JASDL.
+ *
+ * JASDL is free software: you can redistribute it and/or modify
+ * it under the terms of the Lesser GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * JASDL is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * Lesser GNU General Public License for more details.
+ *
+ * You should have received a copy of the Lesser GNU General Public License
+ * along with JASDL. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
{include("common/society.asl")}
{include("common/commerce.asl")}
+/**
+ * The code for this agent doesn't make particularily intersting use of JASDL features,
+ * so don't worry about it too much.
+ */
+
!init.
+/**
+ * All delivery vans are available at the start of the simulation.
+ */
+!init
<-
.my_name(Me);
?isEmployedBy(Me, Employer)[o(s)];
- .send(Employer, tell, available(Me)).
+ .send(Employer, tell, available).
+!hasPosition(Me, X, Y)[source(Employer)] : .my_name(Me) & hasPosition(Me, X, Y) & isEmployedBy(Employer)
@@ -20,7 +47,7 @@
isEmployedBy(Employer)
<-
move_towards(X, Y);
- .wait(10); // <- simulate movement speed
+ .wait(5); // <- simulate movement speed
!!hasPosition(Me, X, Y)[source(Employer)].
@load_all_2[atomic]
@@ -47,6 +74,6 @@
unload(Purchase); // Unload purchase
!!unload(Purchases)[source(Employer)]. // Unload remaining purchases
-+?~cargo(Purchase) : not cargo(Purchase). // (not cargo) implies ~cargo for the delivery van
++?~cargo(Purchase) : not cargo(Purchase). // (not cargo) implies ~cargo for the delivery van (i.e. we make CWA for this belief)
Modified: trunk/applications/jasdl-owlapi/examples/commerce/src/asl/pa.asl
===================================================================
--- trunk/applications/jasdl-owlapi/examples/commerce/src/asl/pa.asl 2008-04-24 22:26:31 UTC (rev 1252)
+++ trunk/applications/jasdl-owlapi/examples/commerce/src/asl/pa.asl 2008-04-25 01:38:25 UTC (rev 1253)
@@ -1,3 +1,22 @@
+/*
+ * Copyright (C) 2008 Thomas Klapiscak (t.g...@du...)
+ *
+ * This file is part of JASDL.
+ *
+ * JASDL is free software: you can redistribute it and/or modify
+ * it under the terms of the Lesser GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * JASDL is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * Lesser GNU General Public License for more details.
+ *
+ * You should have received a copy of the Lesser GNU General Public License
+ * along with JASDL. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
{include("common/society.asl")}
{include("common/commerce.asl")}
@@ -2,4 +21,6 @@
-/** Plans that are called by the customer agent */
-
+/**
+ * Accepts two SE-Literals used to represent two classes, one describing a desired type of product and the other the
+ * type of shop that should (initially) be asked.
+ */
+!suitable(ProductClass, ShopClass, Qty)
@@ -14,14 +35,15 @@
jasdl.ia.get_individual(ShopClass, Shop);
// Generate a unique (guaranteed across entire agent society) request identifier (individual) for the new purchase
- jasdl.ia.get_anonymous_individual(ID);
-
+ jasdl.ia.get_anonymous_individual(ID);
+
+ // Get the rendering in Namespace-prefix Manchester OWL Syntax
jasdl.ia.get_class_definition(ProductClass, ProductDescription);
- // Add the condition that the product must be in stock (this is not something the customer should be concerned with)
+ // Add the condition that the product must be in stock (this is not something the customer should be concerned with)
.concat("(",ProductDescription,") and c:hasInStock some integer [ >= ",Qty,"]",ProductDescriptionInStock);
- // Parse the product description into a class
+ // Parse the ammended product description into a class
jasdl.ia.define_class(productInStock, ProductDescriptionInStock);
.print("Asking ",Shop,":", ProductDescriptionInStock);
@@ -29,15 +51,16 @@
// Ask for all brands that match these criteria
.send(Shop, askOne,
productInStock(Brand)[o(self), id(ID), stockist(Stockist), jasdl_tg_cause(_)],
- productInStock(Brand)[o(self), id(ID), stockist(Stockist), jasdl_tg_cause(_)]);
-
- .print(Stockist);
+ productInStock(Brand)[o(self), id(ID), stockist(Stockist), jasdl_tg_cause(_)]);
// ask for the customer's approval
!!approve(ID, Brand, ProductDescription, Shop, Qty, Order, Stockist).
-
+/**
+ * Results in the "approve" customer environmental action. If this succeeds, we commit the purchase
+ * details to the belief base.
+ */
+!approve(ID, Brand, ProductDescription, Shop, Qty, Order, Stockist)
<-
?isEmployedBy(Customer);
@@ -51,96 +74,95 @@
+includes(Order, ID)[o(c)];
+purchase(ID)[o(c)];
+hasQuantity(ID, Qty)[o(c)].
-
+
+/**
+ * The customer has rejected this purchase. Try asking the shop for other brands of this type.
+ */
-!approve(ID, Brand, ProductDescription, Shop, Qty, Order, Stockist)
<-
?isEmployedBy(Customer);
// Get the class describing the type of product, adding the additional requirement that it
// also not be the individual rejected by the customer
- jasdl.ia.define_class(ammendedProductClass, "(",ProductDescription,") and not {c:",Brand,"}");
+ jasdl.ia.define_class(ammendedProductClass, "(",ProductDescription,") and (not {c:",Brand,"})");
// We use the same achieve goal used by a customer here, effectively emulating a customer request, but with the ammended product
// description, given the customer's rejection
!suitable(ammendedProductClass(_)[o(self)], shop(Shop)[o(s)], Qty).
-
+/**
+ * The product request has failed. No shop can find a product matching these (possibly ammended) criteria.
+ */
-!suitable(ProductClass, ShopClass, Qty)
<-
?isEmployedBy(Customer);
.send(Customer, tell, message("I am sorry but I am unable to service your request."));
.fail.
-
+/**
+ * The customer has confirmed their current order, instantiate the order confirmation process.
+ */
+!order_confirmed[source(Customer)] : isEmployedBy(Customer)
- <-
+ <-
?hasOrder(Customer, Order)[o(c)];
.findall(ID, purchase(ID)[o(c)], Purchases);
!order_confirmed(Purchases, []).
+/**
+ * The customer has attempted to confirm an order before any purchases have been made, let them know.
+ */
-!order_confirmed[source(Customer)] : isEmployedBy(Customer) & not hasOrder(Customer, _)[o(c)]
- <-
+ <-
.send(Customer, tell, message("You must request some products first")).
+/**
+ * Recursive case of the order confirmation process.
+ */
+!order_confirmed([Purchase|Purchases], Shops)
<-
- // Get the details of this purchase
+ // Get the details of this purchase
?hasBrand(Purchase, Brand)[o(c)];
?hasQuantity(Purchase, Qty)[o(c)];
- // JASDL current doesn't support domain-unground property queries
- // Instead, we use inverse properties such as this one (includedIn is the inverse of includes)
- // Note that both types of assertions have exactly the same meaning as far as JASDL is concerned
+
+ // JASDL current doesn't support domain-unground property queries
+ // Instead, we use inverse properties such as this one (includedIn is the inverse of includes)
+ // Note that both types of assertions have exactly the same meaning as far as JASDL is concerned
?includedIn(Purchase, Order)[o(c)];
- // ... and send them to the appropriate shop agent
+ // ... and send them to the appropriate shop agent
?hasShop(Purchase, Shop)[o(c)];
.send(Shop, tell, purchase(Purchase)[o(c)]);
.send(Shop, tell, includedIn(Purchase, Order)[o(c)]);
.send(Shop, tell, hasBrand(Purchase, Brand)[o(c)]);
.send(Shop, tell, hasQuantity(Purchase, Qty)[o(c)]);
- // Confirm the remaining purchases
+ // Confirm the remaining purchases
+ // (Here we drop the head of Purchases, and add to the list of shops responsible for delivery of this order)
!order_confirmed(Purchases, [Shop|Shops]).
-
+/**
+ * Terminal case of the order confirmation process.
+ */
+!order_confirmed([], Shops)
<-
- // Now we have sent all purchase details, send the location where the order should be delivered to (i.e. the customer)
+ // Now we have sent all purchase details, send the location where the order should be delivered to (i.e. the customer)
?isEmployedBy(Customer);
?hasOrder(Customer, Order)[o(c)];
+
+ // Inform ALL shops involved in this purchase for whom this order is on behalf of
.send(Shops, tell, hasCustomer(Order, Customer)[o(c)]);
- // ... and finish with the order itself, which will instantiate the dispatch process in the shop agents
+ // ... and finish with the order itself, which will instantiate the dispatch process in ALL invovled shop agents
.send(Shops, tell, order(Order)[o(c)]);
- // abolish the order (and all included purchases), we no longer need it
+ // abolish the order (and all included purchases), we no longer need it
!abolish_order(Order);
- // Inform the customer
- .send(Customer, tell, message("Your order has been confirmed and will be dispatched shortly.")).
-
-
-/******************************************************************************/
-
-
-
-+failed(Message)[id(ID), source(Shop)] :
- shop(Shop)[o(s)]
- <-
- // Remove this belief, we no longer need it
- -failed(Message)[id(ID), source(Shop)];
-
- // Delete all trace of the purchase
- !abolish_purchase(ID);
-
- // Get the customer
- ?isEmployedBy(Customer);
-
- // Pass the news on to the customer
+ // Inform the customer
+ .concat("Your order has been confirmed and will be dispatched shortly by ",Shops," respectively.", Message);
.send(Customer, tell, message(Message)).
-
Modified: trunk/applications/jasdl-owlapi/examples/commerce/src/asl/shop.asl
===================================================================
--- trunk/applications/jasdl-owlapi/examples/commerce/src/asl/shop.asl 2008-04-24 22:26:31 UTC (rev 1252)
+++ trunk/applications/jasdl-owlapi/examples/commerce/src/asl/shop.asl 2008-04-25 01:38:25 UTC (rev 1253)
@@ -1,3 +1,22 @@
+/*
+ * Copyright (C) 2008 Thomas Klapiscak (t.g...@du...)
+ *
+ * This file is part of JASDL.
+ *
+ * JASDL is free software: you can redistribute it and/or modify
+ * it under the terms of the Lesser GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * JASDL is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * Lesser GNU General Public License for more details.
+ *
+ * You should have received a copy of the Lesser GNU General Public License
+ * along with JASDL. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
{include("common/society.asl")}
{include("common/commerce.asl")}
@@ -2,7 +21,9 @@
/*
- * Unify with a shop that is a member of the class specified by Expression
- *
- * This is a good example of how certain JASDL features (such as run-time class definition and SE-Literal queries)
+ * Unify PossibleStockist with a shop that is a member of the class specified by Expression. Additionally, we add
+ * the constraints that it not be exhausted (i.e. already tried and failed) for this purchase ID, it is in the same
+ * company as this shop and is not this shop.
+ * This is a good example of how certain JASDL features (such as SE-Literal queries and run-time class definitions)
* can be conveniently expressed within a rule.
*/
+
possibleStockist(ID, Expression, PossibleStockist) :-
@@ -14,7 +35,6 @@
not exhausted(ID)[source(PossibleStockist)] &
not (PossibleStockist == Me).
-
/**
* Unify with a shop, other than this one, that is owned by the same company as this one.
@@ -24,120 +44,144 @@
.my_name(Me) &
ownedBy(Me, Company)[o(s)] &
owns(Company, Shop)[o(s)] &
- (not Shop==Me).
+ (not Shop==Me).
-
/*
- * This shop has managed to find a suitable product in its belief base, directly
- * in response to a PA. Respond to the PA, keeping id annotation intact so the
- * PA can match this response with the customer's request.
+ * The single term of the jasdl_tg_cause annotation is unified with the original cause of this trigger generalisation.
+ * This allows us to use a generalised plan, while still having access to the information given by the (more specific) event that
+ * led to the invocation of this plan.
+ *
+ * This shop has managed to find a suitable product in its belief base.
+ * We know this is the case since the original query leading to generalisation to this is in the context (OriginalQuery).
+ * Respond to the PA, keeping id annotation intact so we can match this response with the customer's request elsewhere.
+ * The up till now unground stockist annotation is grounded with the name of this agent - ultimately informing the PA
+ * of whom it should submit the delivery request to.
*/
@found_product_for_PA
+?product(Brand)[o(c), id(ID), stockist(Me), jasdl_tg_cause(OriginalQuery)] :
OriginalQuery // the agent has found a suitable product within its belief base
- <-
+ <-
.print("Recieved request and is able to service it");
.my_name(Me);
jasdl.ia.get_individual(OriginalQuery, Brand).
+
+/** TODO: Match other, more specific, types of product and opportunistically present special offers to the PA
+ * i.e. "buy two get one free on all types of milk" using a plan such as:
+ *
+ * +?milk(Brand)[o(c), id(ID), stockist(Me), jasdl_tg_cause(OriginalQuery)] :
+ * OriginalQuery
+ * <-
+ * ...
+ */
/**
- * Notice that the two plans below also with "not OriginalQuery" in their context will take precence over this one,
+ * We are unable to find a suitable product, moreover, we are unable to establish a possible stockist to try on behalf of the PA.
+ * Notice that the plans below also with "not OriginalQuery" in their context will take precence over this one,
* since their are both more specific than owl:thing (which is the most general concept) - additionally, plan ordering
* is irrelevant here since JASDL automatically assigns precence according to concept specificity for trigger generalisation
*/
-+?thing(Brand)[o(owl), id(_), stockist(_), jasdl_tg_cause(OriginalQuery)] :
- not OriginalQuery // the agent has found a suitable product within its belief base
++?thing(Brand)[o(owl), id(ID), stockist(_), jasdl_tg_cause(OriginalQuery)] :
+ not OriginalQuery // the agent has not found a suitable product within its belief base
<-
+ !reset(ID);
.print("Recieved request and is UNABLE to service it");
.fail.
/**
* Requested a type of product that this agent cannot supply, try asking any other shop.
*/
-+?product(Brand)[o(c), id(ID), stockist(PossibleStockist), jasdl_tg_cause(OriginalQuery)] :
- not OriginalQuery &
- possibleStockist(ID, "s:shop", PossibleStockist)
- <-
- .print("Unknown GENERAL PRODUCT requested");
- !exhausted(ID);
- ?stocked_by_another_shop(PossibleStockist, ID, OriginalQuery, Brand).
++?product(Brand)[o(c), id(ID), stockist(Stockist), jasdl_tg_cause(OriginalQuery)] :
+ not OriginalQuery & // the agent has not found a suitable product within its belief base
+ possibleStockist(ID, "s:shop", Try)
+ <-
+ .print("Unknown GENERAL PRODUCT requested");
+ !exhausted(ID);
+ ?stocked_by_another_shop(Try, ID, OriginalQuery, Brand, Stockist).
/**
* Requested a type of vegetable product that this agent cannot supply, try asking a greengrocer or a supermarket.
*/
-+?vegetable(Brand)[o(c), id(ID), stockist(PossibleStockist), jasdl_tg_cause(OriginalQuery)] :
- not OriginalQuery &
- possibleStockist(ID, "s:greenGrocers or s:supermarket", PossibleStockist)
- <-
- .print("Unknown VEGETABLE PRODUCT requested");
- !exhausted(ID);
- ?stocked_by_another_shop(PossibleStockist, ID, OriginalQuery, Brand).
++?vegetable(Brand)[o(c), id(ID), stockist(Stockist), jasdl_tg_cause(OriginalQuery)] :
+ not OriginalQuery & // the agent has not found a suitable product within its belief base
+ possibleStockist(ID, "s:greenGrocers or s:supermarket", Try)
+ <-
+ .print("Unknown VEGETABLE PRODUCT requested");
+ !exhausted(ID);
+ ?stocked_by_another_shop(Try, ID, OriginalQuery, Brand, Stockist).
/**
* Requested a type of meat product that this agent cannot supply, try asking a butchers.
*/
-+?meatProduct(Brand)[o(c), id(ID), stockist(PossibleStockist), jasdl_tg_cause(OriginalQuery)] :
- not OriginalQuery &
- possibleStockist(ID, "s:butchers", PossibleStockist)
- <-
- .print("Unknown MEAT PRODUCT requested");
- !exhausted(ID);
- ?stocked_by_another_shop(PossibleStockist, ID, OriginalQuery, Brand).
++?meatProduct(Brand)[o(c), id(ID), stockist(Stockist), jasdl_tg_cause(OriginalQuery)] :
+ not OriginalQuery & // the agent has not found a suitable product within its belief base
+ possibleStockist(ID, "s:butchers", Try)
+ <-
+ .print("Unknown MEAT PRODUCT requested");
+ !exhausted(ID);
+ ?stocked_by_another_shop(Try, ID, OriginalQuery, Brand, Stockist).
+
+/**
+ * Try the shop identified by PossibleStockist, preserving the necessary annotations.
+ */
++?stocked_by_another_shop(PossibleStockist, ID, Query, Answer, Stockist) :
+ shopInSameCompany(PossibleStockist) // Must be a known shop in this company
+ <-
+ .print("Trying ", PossibleStockist);
+ .add_annot(Query, id(ID), Q1);
+ .add_annot(Q1, stockist(Stockist), Q2);
+ .add_annot(Q2, jasdl_tg_cause(_), Q3);
+ .send(PossibleStockist, askOne, Q3, Q3);
+ jasdl.ia.get_individual(Q3, Answer).
+
-+?stocked_by_another_shop(PossibleStockist, ID, Query, Answer)
- <-
- .print("Trying ", PossibleStockist);
- .add_annot(Query, id(ID), Q1);
- .add_annot(Q1, stockist(PossibleStockist), Q2);
- .add_annot(Q2, jasdl_tg_cause(_), Q3);
- .send(PossibleStockist, askOne, Q3, Q3);
- jasdl.ia.get_individual(Q3, Answer).
-
-
-
/**
- * Inform all shops that I have already been tried for this order and unable to service it
+ * Inform all other known shops within this company that I have already been tried for this order and unable to service it
* (so I am not asked again)
*/
+!exhausted(ID)
- <-
- .findall(Shop, shop(Shop)[o(s)], Shops);
- .send(Shops, tell, exhausted(ID)).
-
+ <-
+ .print("Setting exhausted status for purchase ", ID);
+ .findall(Shop, shopInSameCompany(Shop), Shops);
+ .send(Shops, tell, exhausted(ID)).
+
+/**
+ * Reset the exhausted status for a product for this shop and across all other known shops in this company.
+ */
+!reset(ID)
- <-
- .findall(Shop, shopInSameCompany(Shop), Shops);
- .send(Shops, untell, exhausted(ID)).
-
+ <-
+ .print("Resetting exhausted status for purchase ", ID);
+ .findall(Shop, shopInSameCompany(Shop), Shops);
+ .abolish(exhausted(ID)[source(_)]);
+ .send(Shops, untell, exhausted(ID)[source(_)]).
+/**
+ * Another shop has "reset" the exhausted status for a product, ensure all exhausted beliefs for this purchase ID are abolished accordingly.
+ */
+-exhausted(ID)[source(Shop)] :
+ shopInSameCompany(Shop)
+ <-
+ .abolish(exhausted(ID)).
+
/**
* All plans below this point deal with coordinating delivery with a delivery van employed by the shop.
* Note that these are not so interesting in terms of exploring JASDL extensions to Jason's core functionality, so
* don't worry about them too much.
*/
-
-/**
- * Attempts to find an avaiable delivery van (identified by available(Van)).
- * Once found, it deletes the van's status as available.
- * This plan must be atomic to prevent a van being allocated simultaneously to more
- * than one order (i.e. multiple ?'s before we get a chance to remove the van's available status)
- */
-
/**
* An order request has been recieved from a PA, coordinate delivery of it
*/
+order(Order)[o(c), source(PA)] :
hasCustomer(Order, Customer)[o(c)] &
employs(Customer, PA)[o(s)]
- <-
+ <-
// Delopy crates containing product
!deploy(Order);
// Obtain an available van (or suspend this intention until one it available)
- !allocate_available(Van);
+ !wait_available(Van);
// Instruct this van to move to shop's position
!recall(Van);
// Instruct the van to load the deployed products into its cargo hold
@@ -149,106 +193,120 @@
// Abolish beliefs about this order (and all included purchases), we no longer need them
!abolish_order(Order);
// Make the van available again
- +available(Van).
-
-@available[atomic]
-+!allocate_available(Van)
- <-
- ?available(Van)[source(_)];
- -available(Van)[source(_)].
+ +available[source(Van)].
+
-/*
+ /*
* The agent has attempted to find an available van (see above) within the belief base but has failed.
- * Simply suspend the intention until a van notifies the agent that it is available.
+ * Wait until we become aware that there is an agent that it is available (thus resuming the intention).
*/
-+?available(Van)
- <-
- .concat("+",available(Van)[source(_)], WaitFor);
- .wait(WaitFor);
- ?available(Van)[source(_)].
++!wait_available(Van) : not available[source(Van)]
+ <-
+ .wait(800);
+ !wait_available(Van).
+
/**
+ * This must remain atomic to prevent the same van being allocated more than once at any one time.
+ */
+ @allocate_available[atomic]
++!wait_available(Van) : available[source(Van)]
+ <-
+ -available[source(Van)].
+
+
+/**
* Achieve the state of affairs such that a van has loaded an entire order into its cargo.
* (Suspends the intention until this is so)
*/
+!load(Order, Van) : .my_name(Me) & inVicinityOf(Van)
- <-
- -hasPosition(Van, X, Y)[source(Van)];
- .findall(PID, includes(Order, PID)[o(c)], PIDs);
- .send(Van, achieve, load(PIDs));
- L=loading_complete[source(Van)];
- .concat("+", L, WaitFor);
- .wait(WaitFor);
- -L.
-
+ <-
+ -hasPosition(Van, X, Y)[source(Van)];
+ .findall(PID, includes(Order, PID)[o(c)], PIDs);
+ .send(Van, achieve, load(PIDs));
+ !wait_loading_complete(Van).
+
++!wait_loading_complete(Van) : not loading_complete[source(Van)]
+ <-
+ .wait(400);
+ !wait_loading_complete(Van).
+
++!wait_loading_complete(Van) : loading_complete[source(Van)]
+ <-
+ -loading_complete[source(Van)].
+
/**
* Achieve the state of affairs such that a van has unloaded its entire cargo at its current destination
* (Suspends the intention until this is so)
*/
+!unload(Order, Van)
- <-
- .findall(PID, includes(Order, PID)[o(c)], PIDs);
- .send(Van, achieve, unload(PIDs));
- L=unloading_complete[source(Van)];
- .concat("+", L, WaitFor);
-...
[truncated message content] |
|
From: <jom...@us...> - 2008-04-24 22:26:42
|
Revision: 1252
http://jason.svn.sourceforge.net/jason/?rev=1252&view=rev
Author: jomifred
Date: 2008-04-24 15:26:31 -0700 (Thu, 24 Apr 2008)
Log Message:
-----------
create exploration groups for the team
explorer finds a scouter
gauchos code splited in many sources
Modified Paths:
--------------
trunk/applications/jason-eclipse-plugin/.project
trunk/applications/jason-eclipse-plugin/build.xml
trunk/applications/jason-moise/lib/moise.jar
trunk/applications/jason-team/AC-Local-JasonTeam.mas2j
trunk/applications/jason-team/src/asl/dummy.asl
trunk/applications/jason-team/src/asl/gaucho.asl
trunk/applications/jason-team/src/java/arch/ACArchitecture.java
trunk/applications/jason-team/src/java/arch/CowboyArch.java
trunk/applications/jason-team/src/java/arch/WriteStatusThread.java
Added Paths:
-----------
trunk/applications/jason-team/src/asl/exploration.asl
trunk/applications/jason-team/src/asl/goto.asl
trunk/applications/jason-team/src/asl/herding.asl
Modified: trunk/applications/jason-eclipse-plugin/.project
===================================================================
--- trunk/applications/jason-eclipse-plugin/.project 2008-04-24 16:03:14 UTC (rev 1251)
+++ trunk/applications/jason-eclipse-plugin/.project 2008-04-24 22:26:31 UTC (rev 1252)
@@ -1,28 +1,28 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>JasonIDE</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>jason eclipse plugin</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
Modified: trunk/applications/jason-eclipse-plugin/build.xml
===================================================================
--- trunk/applications/jason-eclipse-plugin/build.xml 2008-04-24 16:03:14 UTC (rev 1251)
+++ trunk/applications/jason-eclipse-plugin/build.xml 2008-04-24 22:26:31 UTC (rev 1252)
@@ -25,14 +25,6 @@
<pathelement location="${jasonJar}" />
</path>
- <condition property="parsers-ok" value="ok">
- <and>
- <uptodate property="parsers-ok" targetfile="${basedir}/src/jason/mas2j/parser/mas2j.java" srcfile="${basedir}/src/jason/mas2j/parser/MAS2JavaParser.jcc" />
- <uptodate property="parsers-ok" targetfile="${basedir}/src/jason/asSyntax/parser/as2j.java" srcfile="${basedir}/src/jason/asSyntax/parser/AS2JavaParser.jcc" />
- <uptodate property="parsers-ok" targetfile="${basedir}/doc/AS2JavaParser.html" srcfile="${basedir}/src/jason/asSyntax/parser/AS2JavaParser.jcc" />
- </and>
- </condition>
-
<target name="init">
<mkdir dir="${build.dir}" />
</target>
Modified: trunk/applications/jason-moise/lib/moise.jar
===================================================================
(Binary files differ)
Modified: trunk/applications/jason-team/AC-Local-JasonTeam.mas2j
===================================================================
--- trunk/applications/jason-team/AC-Local-JasonTeam.mas2j 2008-04-24 16:03:14 UTC (rev 1251)
+++ trunk/applications/jason-team/AC-Local-JasonTeam.mas2j 2008-04-24 22:26:31 UTC (rev 1252)
@@ -10,7 +10,7 @@
infrastructure: Centralised
agents:
- orgManager [osfile="src/team-os.xml",gui=no]
+ orgManager [osfile="src/team-os.xml",gui=yes]
agentArchClass jmoise.OrgManager;
gaucho1 gaucho.asl
Modified: trunk/applications/jason-team/src/asl/dummy.asl
===================================================================
--- trunk/applications/jason-team/src/asl/dummy.asl 2008-04-24 16:03:14 UTC (rev 1251)
+++ trunk/applications/jason-team/src/asl/dummy.asl 2008-04-24 22:26:31 UTC (rev 1252)
@@ -115,7 +115,7 @@
<- .current_intention(I); .println("failure in move, intention: ",I);
!move.
-+restart
++!restart
<- .print("*** restart ***");
.drop_all_desires;
.abolish(target(_,_));
Added: trunk/applications/jason-team/src/asl/exploration.asl
===================================================================
--- trunk/applications/jason-team/src/asl/exploration.asl (rev 0)
+++ trunk/applications/jason-team/src/asl/exploration.asl 2008-04-24 22:26:31 UTC (rev 1252)
@@ -0,0 +1,82 @@
+/* -- plans for exploration phase -- */
+
+/* -- initial goals -- */
+
+//!test.
+//+!test <- +gsize(16,8).
+
+/*
+ -- plans for new match
+ -- create the initial exploration groups and areas
+*/
+
+
+/* plans for agent 1 */
+
++gsize(_Weight,_Height) // new match've started
+ : .my_name(gaucho1) // agent 1 is responsible for the team creation
+ <- .print("oooo creating team group");
+ .if( group(team,Old), {
+ jmoise.remove_group(Old)
+ });
+ jmoise.create_group(team).
+
++group(team,GId) // agent 1 is responsible for the creation of exploration groups
+ : .my_name(gaucho1)
+ <- jmoise.create_group(exploration,GId);
+ jmoise.create_group(exploration,GId);
+ jmoise.create_group(exploration,GId).
++group(exploration,_) // compute the area of the groups
+ : .my_name(gaucho1) &
+ .findall(GId, group(exploration,GId), LG) &
+ LG = [G1,G2,G3] // there are three groups
+ <- ?gsize(W,H);
+ X = math.round(((W*H)/3)/H);
+ +group_area(0, G1, area(0, 0, X, H-1));
+ +group_area(1, G2, area(X+1, 0, W-1, H/2));
+ +group_area(2, G3, area(X+1, (H/2)+1, W-1, H-1)).
+
++group_area(ID,G,A)[source(self)]
+ <- .broadcast(tell, group_area(ID,G,A)).
+
+
+/* plans for agents with even id */
+
++gsize(_,_)
+ : .my_name(Me) &
+ agent_id(Me,AgId) &
+ AgId mod 2 == 0 // I have an even Id
+ <- // wait my pos
+ .if(not pos(MyX, MyY,_), { MyX = 333; MyY = 444 }); //.wait("+pos(MyX,MyY,_)")
+ .print("oooo ",MyX, MyY); //?pos(MyX, MyY,_);
+
+ // wait others pos
+ .if(not cell(_,_,ally(_)), { .wait("+cell(_,_,ally(_))") });
+ .wait(200);
+
+ // find distance to odd agents
+ .findall(ag_d(D,AgName),
+ cell(X,Y,ally(AgName)) & .print(AgName) & agent_id(AgName,Id) & .print(AgName," ooo ",Id) & Id mod 2 == 1 & jia.dist(MyX, MyY, X, Y, D),
+ LOdd);
+ .sort(LOdd, LSOdd);
+ // test if I received the area of my group
+ .if( not group_area(AgId div 2,G,A), { .wait("+group_area(AgId div 2,G,A)") });
+ .print("oooo Ags=", LSOdd," in area ",group_area(AgId div 2,G,A));
+
+ // adopt role explorer in the group
+ jmoise.adopt_role(explorer,G);
+ !find_scouter(LSOdd, G).
+
++!find_scouter([],_)
+ <- .print("oooo I do not find a scouter to work with me!").
++!find_scouter([ag_d(_,AgName)|_],GId)
+ <- .send(AgName, achieve, play_role(scouter,GId));
+ .wait("+play(Ag,scouter,GId)",1000).
+-!find_scouter([_|LSOdd],GId) // in case the wait fails, try next agent
+ <- !find_scouter(LSOdd,GId).
+
+
+/* plans for agents the others */
+
++!play_role(Role,Group)
+ <- jmoise.adopt_role(Role,Group).
Modified: trunk/applications/jason-team/src/asl/gaucho.asl
===================================================================
--- trunk/applications/jason-team/src/asl/gaucho.asl 2008-04-24 16:03:14 UTC (rev 1251)
+++ trunk/applications/jason-team/src/asl/gaucho.asl 2008-04-24 22:26:31 UTC (rev 1252)
@@ -18,40 +18,34 @@
/* -- initial beliefs -- */
+agent_id(gaucho1,0).
+agent_id(gaucho2,1).
+agent_id(gaucho3,2).
+agent_id(gaucho4,3).
+agent_id(gaucho5,4).
+agent_id(gaucho6,5).
+
+ag_perception_ratio(8). // ratio of perception of the agent
+cow_perception_ratio(4).
+
/* -- initial goals -- */
-!test.
-+!test <- +gsize(16,8).
+/* -- plans -- */
-/* -- create the initial exploration groups and areas -- */
++end_of_simulation(_Result)
+ <- .abolish(area(_,_,_,_,_,_)).
-+gsize(_Weight,_Height) // new match've started
- : .my_name(gaucho1)
- <- .if( group(team,Old), {
- jmoise.remove_group(Old)
- });
- .abolish(area(_,_,_,_,_));
- jmoise.create_group(team).
-+gsize(_Weight,_Height)
- <- .abolish(area(_,_,_,_,_)).
-
-+group(team,GId)
- : .my_name(gaucho1)
- <- jmoise.create_group(exploration,GId);
- jmoise.create_group(exploration,GId);
- jmoise.create_group(exploration,GId).
-+group(exploration,_) // compute the area of the groups
- : .my_name(gaucho1) &
- .findall(GId, group(exploration,GId), LG) &
- LG = [G1,G2,G3] // there are three groups
- <- ?gsize(W,H);
- X = math.round(((W*H)/3)/H);
- +area(G1, 0, 0, X, H-1);
- +area(G2, X+1, 0, W-1, H/2);
- +area(G3, X+1, (H/2)+1, W-1, H-1).
-+area(G,A,B,C,D)[source(self)]
- <- .broadcast(tell, area(G,A,B,C,D)).
++!restart
+ <- //.print("*** restart ***");
+ .drop_all_desires;
+ .abolish(target(_,_)).
+ // TODO: what to do?
+ //!decide_target.
-// include common plans for MOISE+ agents
-{ include("moise-common.asl") }
+/* -- includes -- */
+{ include("goto.asl") } // include plans for movimentation
+{ include("exploration.asl") } // include plans for exploration
+{ include("herding.asl") } // include plans for herding
+{ include("moise-common.asl") } // include common plans for MOISE+ agents
+
Added: trunk/applications/jason-team/src/asl/goto.asl
===================================================================
--- trunk/applications/jason-team/src/asl/goto.asl (rev 0)
+++ trunk/applications/jason-team/src/asl/goto.asl 2008-04-24 22:26:31 UTC (rev 1252)
@@ -0,0 +1,56 @@
+
+/* -- plans for movimentation -- */
+
+
+/* -- useful rules */
+
+// find a free random location
+random_pos(X,Y) :-
+ pos(AgX,AgY,_) &
+ jia.random(RX,40) & RX > 5 & X = (RX-20)+AgX & X > 0 &
+ jia.random(RY,40,5) & RY > 5 & Y = (RY-20)+AgY &
+ not jia.obstacle(X,Y).
+
+
+
+/* -- plans to move to a destination represented in the belief target(X,Y)
+ -- (it is a kind of persistent goal)
+*/
+
+// if the target is changed, "restart" move
++target(NX,NY)
+ <- .drop_desire(move);
+ jia.set_target(NX,NY);
+ !!move.
+
+// I still do not know my location
++!move
+ : not pos(_,_,_)
+ <- .print("waiting my location....");
+ .wait("+pos(_,_,_)");
+ !move.
+
++!move
+ : not target(_,_)
+ <- .print("waiting my target....");
+ .wait("+target(_,_)");
+ !move.
+
++!move
+ : pos(X,Y,_) & target(X,Y) // I am at target
+ <- -+at_target;
+ do(skip);
+ !!move.
+
+// does one step towards target
++!move
+ : pos(X,Y,_) &
+ target(BX,BY) &
+ jia.direction(X, Y, BX, BY, D) // jia.direction finds one action D (using A*) towards the target
+ <- do(D); // this action will "block" the intention until it is sent to the simulator (in the end of the cycle)
+ !!move. // continue moving
+
+// in case of failure, move
+-!move
+ <- .current_intention(I); .println("failure in move, intention: ",I);
+ !move.
Added: trunk/applications/jason-team/src/asl/herding.asl
===================================================================
--- trunk/applications/jason-team/src/asl/herding.asl (rev 0)
+++ trunk/applications/jason-team/src/asl/herding.asl 2008-04-24 22:26:31 UTC (rev 1252)
@@ -0,0 +1 @@
+/* -- plans for herding phase -- */
Modified: trunk/applications/jason-team/src/java/arch/ACArchitecture.java
===================================================================
--- trunk/applications/jason-team/src/java/arch/ACArchitecture.java 2008-04-24 16:03:14 UTC (rev 1251)
+++ trunk/applications/jason-team/src/java/arch/ACArchitecture.java 2008-04-24 22:26:31 UTC (rev 1252)
@@ -139,6 +139,7 @@
Lock lock = new ReentrantLock();
Condition cycle = lock.newCondition();
long timestartcycle = 0;
+ int cycleCounter = 0;
WaitSleep() {
super("WaitSpeepToSendAction");
@@ -156,6 +157,9 @@
}
void newCycle() {
+ cycleCounter++;
+ if (getCycle() == 1) cycleCounter = 1;
+
StringBuilder notsent = new StringBuilder();
if (toExecute.size() > 1) {
notsent.append(" The following was not sent: ");
@@ -173,7 +177,7 @@
// prepare msg to print out
String w = "";
- if (lastActionInCurrentCycle == null) {
+ if (lastActionInCurrentCycle == null && cycleCounter > 3) { // ignore problem in the first cycles (the agent is still in setup!)
addRestart();
w = "*** ";
}
Modified: trunk/applications/jason-team/src/java/arch/CowboyArch.java
===================================================================
--- trunk/applications/jason-team/src/java/arch/CowboyArch.java 2008-04-24 16:03:14 UTC (rev 1251)
+++ trunk/applications/jason-team/src/java/arch/CowboyArch.java 2008-04-24 22:26:31 UTC (rev 1252)
@@ -2,6 +2,7 @@
import jason.JasonException;
import jason.RevisionFailedException;
+import jason.asSemantics.Intention;
import jason.asSemantics.Message;
import jason.asSyntax.Atom;
import jason.asSyntax.Literal;
@@ -224,9 +225,7 @@
try {
logger.info("** Arch adding restart for "+getAgName());
getTS().getC().create();
-
- getTS().getAg().getBB().abolish(new Literal("restart").getPredicateIndicator());
- getTS().getAg().addBel(new Literal("restart"));
+ getTS().getC().addAchvGoal(new Literal("restart"), Intention.EmptyInt);
lo2 = new Location(-1,-1); // to not restart again in the next cycle
} catch (Exception e) {
logger.info("Error in restart!"+ e);
Modified: trunk/applications/jason-team/src/java/arch/WriteStatusThread.java
===================================================================
--- trunk/applications/jason-team/src/java/arch/WriteStatusThread.java 2008-04-24 16:03:14 UTC (rev 1251)
+++ trunk/applications/jason-team/src/java/arch/WriteStatusThread.java 2008-04-24 22:26:31 UTC (rev 1252)
@@ -67,21 +67,23 @@
//out.println(model.toString());
StringBuilder s = new StringBuilder(String.format("Step %5d : ", owner.getCycle()-1));
for (int agId=0; agId<WorldModel.agsByTeam; agId++) {
- Location agp = agents[agId].getLastLocation();
- if (agp != null) {
- // count how long the agent is in the same location
- int c = 0;
- Iterator<Location> il = locations.get(agId).iterator();
- while (il.hasNext() && il.next().equals(agp) && c <= 11) {
- c++;
- }
- String sc = "*";
- if (c < 10) sc = ""+c;
-
- locations.get(agId).add(0,agp);
- String lastAct = shortActionFormat(agents[agId].getLastAction());
- s.append(String.format("%5d,%2d/%s %s", agp.x, agp.y, sc, lastAct));
- }
+ if (agents[agId] != null) {
+ Location agp = agents[agId].getLastLocation();
+ if (agp != null) {
+ // count how long the agent is in the same location
+ int c = 0;
+ Iterator<Location> il = locations.get(agId).iterator();
+ while (il.hasNext() && il.next().equals(agp) && c <= 11) {
+ c++;
+ }
+ String sc = "*";
+ if (c < 10) sc = ""+c;
+
+ locations.get(agId).add(0,agp);
+ String lastAct = shortActionFormat(agents[agId].getLastAction());
+ s.append(String.format("%5d,%2d/%s %s", agp.x, agp.y, sc, lastAct));
+ }
+ }
}
logger.info(s.toString());
out.println(s.toString());
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ga...@us...> - 2008-04-24 16:18:39
|
Revision: 1251
http://jason.svn.sourceforge.net/jason/?rev=1251&view=rev
Author: gauth
Date: 2008-04-24 09:03:14 -0700 (Thu, 24 Apr 2008)
Log Message:
-----------
New configuration files for testing:
- pairs formation
- partitioning of the environment
- explorer and scout coordination
- dead end problem
Added Paths:
-----------
trunk/applications/jason-team/massim-server/conf/testDeadEnd.xml
trunk/applications/jason-team/massim-server/conf/testExplorerAndScout.xml
trunk/applications/jason-team/massim-server/conf/testPairs.xml
trunk/applications/jason-team/massim-server/conf/testPartition.xml
trunk/applications/jason-team/massim-server/startServer.sh
Added: trunk/applications/jason-team/massim-server/conf/testDeadEnd.xml
===================================================================
--- trunk/applications/jason-team/massim-server/conf/testDeadEnd.xml (rev 0)
+++ trunk/applications/jason-team/massim-server/conf/testDeadEnd.xml 2008-04-24 16:03:14 UTC (rev 1251)
@@ -0,0 +1,231 @@
+<?xml version="1.0" encoding="utf-8"?>
+<conf tournamentname="GridSimulation" tournamentmode="0"
+ launch-sync-type="key" time-to-launch="10000" reportpath="."
+ backuppath="backup">
+ <network-agent port="12300" backlog="10" />
+ <match>
+ <simulation id="Test herding behavior with a deadend"
+ simulationclass="massim.simulation.GridSimulation"
+ configurationclass="massim.simulation.GridSimulationConfigurationHandCrafted"
+ rmiobserver="massim.simulation.GridSimulationRMIObserver"
+ xmlobserver="massim.simulation.GridSimulationXMLObserver"
+ rmixmlobserver="massim.simulation.GridSimulationRMIXMLDocumentObserver"
+ xmlobserverpath="."
+ xmlstatisticsobserver="massim.simulation.GridSimulationXMLStatisticsObserver"
+ file-simulationlog="./log" visualisationobserver="">
+
+
+ <!-- visualisationobserver="massim.simulation.GridSimulationVisualizationObserver" -->
+
+ <configuration xmlns:meta="http://www.tu-clausthal.de/"
+ sizex="70" sizey="70" maxNumberOfSteps="700" numberOfAgents="12"
+ numberOfObstacles="34" numberOfCows="36" cowSpeed="1"
+ agentSpeed="1" lineOfSight="17" fearRange="4" attractionRange="5"
+ cowWeight="5" agentWeight="-200" emptyWeight="1" obstacleWeight="-1"
+ htaccess="1">
+
+ <array item0="35" item1="69" item2="50" item3="34"
+ item4="20" item5="18" item6="1" item7="1" item8="2" item9="2"
+ item10="3" item11="3" meta:length="12"
+ meta:name="agentPositionY" />
+ <array item0="6" item1="69" item2="44" item3="46"
+ item4="44" item5="46" item6="69" item7="68" item8="69" item9="68"
+ item10="69" item11="68" meta:length="12"
+ meta:name="agentPositionX" />
+
+ <array item0="30" item1="30" item2="30" item3="30" item4="30" item5="30"
+ item6="31" item7="31" item8="31" item9="31" item10="31" item11="31"
+ item12="32" item13="32" item14="32" item15="32" item16="32" item17="32"
+ item18="33" item19="33" item20="33" item21="33" item22="33" item23="33"
+ item24="34" item25="34" item26="34" item27="34" item28="34" item29="34"
+ item30="35" item31="35" item32="35" item33="35" item34="35" item35="35"
+ meta:length="36"
+ meta:name="cowPositionY" />
+
+ <array item0="30" item1="31" item2="32" item3="33" item4="34" item5="35"
+ item6="30" item7="31" item8="32" item9="33" item10="34" item11="35"
+ item12="30" item13="31" item14="32" item15="33" item16="34" item17="35"
+ item18="30" item19="31" item20="32" item21="33" item22="34" item23="35"
+ item24="30" item25="31" item26="32" item27="33" item28="34" item29="35"
+ item30="30" item31="31" item32="32" item33="33" item34="34" item35="35"
+ meta:length="36"
+ meta:name="cowPositionX" />
+
+ <array item0="29" item1="38" meta:length="2"
+ meta:name="stable1X" />
+ <array item0="59" item1="69" meta:length="2"
+ meta:name="stable1Y" />
+ <array item0="55" item1="69" meta:length="2"
+ meta:name="stable2X" />
+ <array item0="0" item1="14" meta:length="2"
+ meta:name="stable2Y" />
+
+ <array item0="37" item1="37" item2="37" item3="37" item4="37" item5="37" item6="37" item7="37" item8="37" item9="37"
+ item30="36" item31="36"
+ item10="35" item11="35"
+ item12="34" item13="34"
+ item14="33" item15="33"
+ item16="32" item17="32"
+ item18="31" item19="31"
+ item20="30" item21="30"
+ item22="29" item23="29"
+ item24="28" item25="28"
+ item26="27" item27="27"
+ item28="26" item29="26"
+ item32="25" item33="25"
+ meta:length="34" meta:name="obstaclePositionY" />
+
+ <array item0="28" item1="29" item2="30" item3="31" item4="32" item5="33" item6="34" item7="35" item8="36" item9="37"
+ item10="28" item11="37"
+ item12="28" item13="37"
+ item14="28" item15="37"
+ item16="28" item17="37"
+ item18="28" item19="37"
+ item20="28" item21="37"
+ item22="28" item23="37"
+ item24="28" item25="37"
+ item26="28" item27="37"
+ item28="28" item29="37"
+ item30="28" item31="37"
+ item32="28" item33="37"
+ meta:length="34"
+ meta:name="obstaclePositionX" />
+ </configuration>
+
+ <agents>
+ <agent
+ agentclass="massim.simulation.GridSimulationAgent"
+ agentcreationclass="massim.simulation.GridSimulationAgentParameter"
+ team="blue">
+ <configuration />
+ </agent>
+ <agent
+ agentclass="massim.simulation.GridSimulationAgent"
+ agentcreationclass="massim.simulation.GridSimulationAgentParameter"
+ team="blue">
+ <configuration />
+ </agent>
+ <agent
+ agentclass="massim.simulation.GridSimulationAgent"
+ agentcreationclass="massim.simulation.GridSimulationAgentParameter"
+ team="blue">
+ <configuration />
+ </agent>
+ <agent
+ agentclass="massim.simulation.GridSimulationAgent"
+ agentcreationclass="massim.simulation.GridSimulationAgentParameter"
+ team="blue">
+ <configuration />
+ </agent>
+ <agent
+ agentclass="massim.simulation.GridSimulationAgent"
+ agentcreationclass="massim.simulation.GridSimulationAgentParameter"
+ team="blue">
+ <configuration />
+ </agent>
+ <agent
+ agentclass="massim.simulation.GridSimulationAgent"
+ agentcreationclass="massim.simulation.GridSimulationAgentParameter"
+ team="blue">
+ <configuration />
+ </agent>
+ <agent
+ agentclass="massim.simulation.GridSimulationAgent"
+ agentcreationclass="massim.simulation.GridSimulationAgentParameter"
+ team="red">
+ <configuration />
+ </agent>
+ <agent
+ agentclass="massim.simulation.GridSimulationAgent"
+ agentcreationclass="massim.simulation.GridSimulationAgentParameter"
+ team="red">
+ <configuration />
+ </agent>
+ <agent
+ agentclass="massim.simulation.GridSimulationAgent"
+ agentcreationclass="massim.simulation.GridSimulationAgentParameter"
+ team="red">
+ <configuration />
+ </agent>
+ <agent
+ agentclass="massim.simulation.GridSimulationAgent"
+ agentcreationclass="massim.simulation.GridSimulationAgentParameter"
+ team="red">
+ <configuration />
+ </agent>
+ <agent
+ agentclass="massim.simulation.GridSimulationAgent"
+ agentcreationclass="massim.simulation.GridSimulationAgentParameter"
+ team="red">
+ <configuration />
+ </agent>
+ <agent
+ agentclass="massim.simulation.GridSimulationAgent"
+ agentcreationclass="massim.simulation.GridSimulationAgentParameter"
+ team="red">
+ <configuration />
+ </agent>
+ </agents>
+ </simulation>
+
+ </match>
+
+ <accounts>
+ <actionclassmap name="Grid">
+ <actionclass id="action"
+ class="massim.simulation.GridSimulationAgentAction" />
+ <actionclass id="invalid" class="massim.InvalidAction" />
+ </actionclassmap>
+
+ <account actionclassmap="Grid"
+ defaultactionclass="massim.simulation.GridSimulationAgentAction"
+ timeout="8000" auxtimeout="500" maxpacketlength="65536"
+ username="botagent1" password="1" team="bot" />
+ <account actionclassmap="Grid"
+ defaultactionclass="massim.simulation.GridSimulationAgentAction"
+ timeout="8000" auxtimeout="500" maxpacketlength="65536"
+ username="botagent2" password="2" team="bot" />
+ <account actionclassmap="Grid"
+ defaultactionclass="massim.simulation.GridSimulationAgentAction"
+ timeout="8000" auxtimeout="500" maxpacketlength="65536"
+ username="botagent3" password="3" team="bot" />
+ <account actionclassmap="Grid"
+ defaultactionclass="massim.simulation.GridSimulationAgentAction"
+ timeout="8000" auxtimeout="500" maxpacketlength="65536"
+ username="botagent4" password="4" team="bot" />
+ <account actionclassmap="Grid"
+ defaultactionclass="massim.simulation.GridSimulationAgentAction"
+ timeout="8000" auxtimeout="500" maxpacketlength="65536"
+ username="botagent5" password="5" team="bot" />
+ <account actionclassmap="Grid"
+ defaultactionclass="massim.simulation.GridSimulationAgentAction"
+ timeout="8000" auxtimeout="500" maxpacketlength="65536"
+ username="botagent6" password="6" team="bot" />
+
+ <account actionclassmap="Grid"
+ defaultactionclass="massim.simulation.GridSimulationAgentAction"
+ timeout="8000" auxtimeout="500" maxpacketlength="65536"
+ username="participant1" password="1" team="participant" />
+ <account actionclassmap="Grid"
+ defaultactionclass="massim.simulation.GridSimulationAgentAction"
+ timeout="8000" auxtimeout="500" maxpacketlength="65536"
+ username="participant2" password="2" team="participant" />
+ <account actionclassmap="Grid"
+ defaultactionclass="massim.simulation.GridSimulationAgentAction"
+ timeout="8000" auxtimeout="500" maxpacketlength="65536"
+ username="participant3" password="3" team="participant" />
+ <account actionclassmap="Grid"
+ defaultactionclass="massim.simulation.GridSimulationAgentAction"
+ timeout="8000" auxtimeout="500" maxpacketlength="65536"
+ username="participant4" password="4" team="participant" />
+ <account actionclassmap="Grid"
+ defaultactionclass="massim.simulation.GridSimulationAgentAction"
+ timeout="8000" auxtimeout="500" maxpacketlength="65536"
+ username="participant5" password="5" team="participant" />
+ <account actionclassmap="Grid"
+ defaultactionclass="massim.simulation.GridSimulationAgentAction"
+ timeout="8000" auxtimeout="500" maxpacketlength="65536"
+ username="participant6" password="6" team="participant" />
+
+ </accounts>
+</conf>
Added: trunk/applications/jason-team/massim-server/conf/testExplorerAndScout.xml
===================================================================
--- trunk/applications/jason-team/massim-server/conf/testExplorerAndScout.xml (rev 0)
+++ trunk/applications/jason-team/massim-server/conf/testExplorerAndScout.xml 2008-04-24 16:03:14 UTC (rev 1251)
@@ -0,0 +1,198 @@
+<?xml version="1.0" encoding="utf-8"?>
+<conf tournamentname="GridSimulation" tournamentmode="0"
+ launch-sync-type="key" time-to-launch="10000" reportpath="."
+ backuppath="backup">
+ <network-agent port="12300" backlog="10" />
+ <match>
+ <simulation id="Test explorer and scout interactions"
+ simulationclass="massim.simulation.GridSimulation"
+ configurationclass="massim.simulation.GridSimulationConfigurationHandCrafted"
+ rmiobserver="massim.simulation.GridSimulationRMIObserver"
+ xmlobserver="massim.simulation.GridSimulationXMLObserver"
+ rmixmlobserver="massim.simulation.GridSimulationRMIXMLDocumentObserver"
+ xmlobserverpath="."
+ xmlstatisticsobserver="massim.simulation.GridSimulationXMLStatisticsObserver"
+ file-simulationlog="./log" visualisationobserver="">
+
+
+ <!-- visualisationobserver="massim.simulation.GridSimulationVisualizationObserver" -->
+
+ <configuration xmlns:meta="http://www.tu-clausthal.de/"
+ sizex="70" sizey="70" maxNumberOfSteps="700" numberOfAgents="12"
+ numberOfObstacles="0" numberOfCows="10" cowSpeed="1"
+ agentSpeed="1" lineOfSight="17" fearRange="4" attractionRange="5"
+ cowWeight="5" agentWeight="-200" emptyWeight="1" obstacleWeight="-1"
+ htaccess="1">
+
+ <array item0="35" item1="45" item2="50" item3="50"
+ item4="20" item5="20" item6="35" item7="35" item8="35" item9="35"
+ item10="35" item11="35" meta:length="12"
+ meta:name="agentPositionY" />
+ <array item0="5" item1="15" item2="44" item3="46"
+ item4="44" item5="46" item6="63" item7="61" item8="59" item9="57"
+ item10="55" item11="53" meta:length="12"
+ meta:name="agentPositionX" />
+
+ <array item0="25" item1="28" item2="22" item3="21"
+ item4="26" item5="25" item6="27" item7="22" item8="24" item9="23"
+ meta:length="10"
+ meta:name="cowPositionY" />
+
+
+ <array item0="12" item1="13" item2="14" item3="15"
+ item4="16" item5="17" item6="18" item7="19" item8="11" item9="15"
+ meta:length="10"
+ meta:name="cowPositionX" />
+
+ <array item0="0" item1="14" meta:length="2"
+ meta:name="stable1X" />
+ <array item0="55" item1="69" meta:length="2"
+ meta:name="stable1Y" />
+ <array item0="55" item1="69" meta:length="2"
+ meta:name="stable2X" />
+ <array item0="0" item1="14" meta:length="2"
+ meta:name="stable2Y" />
+
+ <array meta:length="0" meta:name="obstaclePositionX" />
+
+ <array meta:length="0"
+ meta:name="obstaclePositionY" />
+ </configuration>
+
+ <agents>
+ <agent
+ agentclass="massim.simulation.GridSimulationAgent"
+ agentcreationclass="massim.simulation.GridSimulationAgentParameter"
+ team="blue">
+ <configuration />
+ </agent>
+ <agent
+ agentclass="massim.simulation.GridSimulationAgent"
+ agentcreationclass="massim.simulation.GridSimulationAgentParameter"
+ team="blue">
+ <configuration />
+ </agent>
+ <agent
+ agentclass="massim.simulation.GridSimulationAgent"
+ agentcreationclass="massim.simulation.GridSimulationAgentParameter"
+ team="blue">
+ <configuration />
+ </agent>
+ <agent
+ agentclass="massim.simulation.GridSimulationAgent"
+ agentcreationclass="massim.simulation.GridSimulationAgentParameter"
+ team="blue">
+ <configuration />
+ </agent>
+ <agent
+ agentclass="massim.simulation.GridSimulationAgent"
+ agentcreationclass="massim.simulation.GridSimulationAgentParameter"
+ team="blue">
+ <configuration />
+ </agent>
+ <agent
+ agentclass="massim.simulation.GridSimulationAgent"
+ agentcreationclass="massim.simulation.GridSimulationAgentParameter"
+ team="blue">
+ <configuration />
+ </agent>
+ <agent
+ agentclass="massim.simulation.GridSimulationAgent"
+ agentcreationclass="massim.simulation.GridSimulationAgentParameter"
+ team="red">
+ <configuration />
+ </agent>
+ <agent
+ agentclass="massim.simulation.GridSimulationAgent"
+ agentcreationclass="massim.simulation.GridSimulationAgentParameter"
+ team="red">
+ <configuration />
+ </agent>
+ <agent
+ agentclass="massim.simulation.GridSimulationAgent"
+ agentcreationclass="massim.simulation.GridSimulationAgentParameter"
+ team="red">
+ <configuration />
+ </agent>
+ <agent
+ agentclass="massim.simulation.GridSimulationAgent"
+ agentcreationclass="massim.simulation.GridSimulationAgentParameter"
+ team="red">
+ <configuration />
+ </agent>
+ <agent
+ agentclass="massim.simulation.GridSimulationAgent"
+ agentcreationclass="massim.simulation.GridSimulationAgentParameter"
+ team="red">
+ <configuration />
+ </agent>
+ <agent
+ agentclass="massim.simulation.GridSimulationAgent"
+ agentcreationclass="massim.simulation.GridSimulationAgentParameter"
+ team="red">
+ <configuration />
+ </agent>
+ </agents>
+ </simulation>
+
+ </match>
+
+ <accounts>
+ <actionclassmap name="Grid">
+ <actionclass id="action"
+ class="massim.simulation.GridSimulationAgentAction" />
+ <actionclass id="invalid" class="massim.InvalidAction" />
+ </actionclassmap>
+
+ <account actionclassmap="Grid"
+ defaultactionclass="massim.simulation.GridSimulationAgentAction"
+ timeout="8000" auxtimeout="500" maxpacketlength="65536"
+ username="botagent1" password="1" team="bot" />
+ <account actionclassmap="Grid"
+ defaultactionclass="massim.simulation.GridSimulationAgentAction"
+ timeout="8000" auxtimeout="500" maxpacketlength="65536"
+ username="botagent2" password="2" team="bot" />
+ <account actionclassmap="Grid"
+ defaultactionclass="massim.simulation.GridSimulationAgentAction"
+ timeout="8000" auxtimeout="500" maxpacketlength="65536"
+ username="botagent3" password="3" team="bot" />
+ <account actionclassmap="Grid"
+ defaultactionclass="massim.simulation.GridSimulationAgentAction"
+ timeout="8000" auxtimeout="500" maxpacketlength="65536"
+ username="botagent4" password="4" team="bot" />
+ <account actionclassmap="Grid"
+ defaultactionclass="massim.simulation.GridSimulationAgentAction"
+ timeout="8000" auxtimeout="500" maxpacketlength="65536"
+ username="botagent5" password="5" team="bot" />
+ <account actionclassmap="Grid"
+ defaultactionclass="massim.simulation.GridSimulationAgentAction"
+ timeout="8000" auxtimeout="500" maxpacketlength="65536"
+ username="botagent6" password="6" team="bot" />
+
+ <account actionclassmap="Grid"
+ defaultactionclass="massim.simulation.GridSimulationAgentAction"
+ timeout="8000" auxtimeout="500" maxpacketlength="65536"
+ username="participant1" password="1" team="participant" />
+ <account actionclassmap="Grid"
+ defaultactionclass="massim.simulation.GridSimulationAgentAction"
+ timeout="8000" auxtimeout="500" maxpacketlength="65536"
+ username="participant2" password="2" team="participant" />
+ <account actionclassmap="Grid"
+ defaultactionclass="massim.simulation.GridSimulationAgentAction"
+ timeout="8000" auxtimeout="500" maxpacketlength="65536"
+ username="participant3" password="3" team="participant" />
+ <account actionclassmap="Grid"
+ defaultactionclass="massim.simulation.GridSimulationAgentAction"
+ timeout="8000" auxtimeout="500" maxpacketlength="65536"
+ username="participant4" password="4" team="participant" />
+ <account actionclassmap="Grid"
+ defaultactionclass="massim.simulation.GridSimulationAgentAction"
+ timeout="8000" auxtimeout="500" maxpacketlength="65536"
+ username="participant5" password="5" team="participant" />
+ <account actionclassmap="Grid"
+ defaultactionclass="massim.simulation.GridSimulationAgentAction"
+ timeout="8000" auxtimeout="500" maxpacketlength="65536"
+ username="participant6" password="6" team="participant" />
+
+ </accounts>
+</conf>
Added: trunk/applications/jason-team/massim-server/conf/testPairs.xml
===================================================================
--- trunk/applications/jason-team/massim-server/conf/testPairs.xml (rev 0)
+++ trunk/applications/jason-team/massim-server/conf/testPairs.xml 2008-04-24 16:03:14 UTC (rev 1251)
@@ -0,0 +1,194 @@
+<?xml version="1.0" encoding="utf-8"?>
+<conf tournamentname="GridSimulation" tournamentmode="0"
+ launch-sync-type="key" time-to-launch="10000" reportpath="."
+ backuppath="backup">
+ <network-agent port="12300" backlog="10" />
+ <match>
+ <simulation id="Test pairs formation in a simple environment (no cow, no obstacle)"
+ simulationclass="massim.simulation.GridSimulation"
+ configurationclass="massim.simulation.GridSimulationConfigurationHandCrafted"
+ rmiobserver="massim.simulation.GridSimulationRMIObserver"
+ xmlobserver="massim.simulation.GridSimulationXMLObserver"
+ rmixmlobserver="massim.simulation.GridSimulationRMIXMLDocumentObserver"
+ xmlobserverpath="."
+ xmlstatisticsobserver="massim.simulation.GridSimulationXMLStatisticsObserver"
+ file-simulationlog="./log" visualisationobserver="">
+
+
+ <!-- visualisationobserver="massim.simulation.GridSimulationVisualizationObserver" -->
+
+ <configuration xmlns:meta="http://www.tu-clausthal.de/"
+ sizex="70" sizey="70" maxNumberOfSteps="700" numberOfAgents="12"
+ numberOfObstacles="0" numberOfCows="0" cowSpeed="1"
+ agentSpeed="1" lineOfSight="17" fearRange="4" attractionRange="5"
+ cowWeight="5" agentWeight="-200" emptyWeight="1" obstacleWeight="-1"
+ htaccess="1">
+
+ <array item0="35" item1="69" item2="50" item3="34"
+ item4="20" item5="18" item6="1" item7="1" item8="2" item9="2"
+ item10="3" item11="3" meta:length="12"
+ meta:name="agentPositionY" />
+ <array item0="6" item1="69" item2="44" item3="46"
+ item4="44" item5="46" item6="69" item7="68" item8="69" item9="68"
+ item10="69" item11="68" meta:length="12"
+ meta:name="agentPositionX" />
+
+ <array meta:length="0"
+ meta:name="cowPositionY" />
+
+ <array meta:length="0"
+ meta:name="cowPositionX" />
+
+ <array item0="0" item1="14" meta:length="2"
+ meta:name="stable1X" />
+ <array item0="55" item1="69" meta:length="2"
+ meta:name="stable1Y" />
+ <array item0="55" item1="69" meta:length="2"
+ meta:name="stable2X" />
+ <array item0="0" item1="14" meta:length="2"
+ meta:name="stable2Y" />
+
+ <array meta:length="0" meta:name="obstaclePositionX" />
+
+
+ <array meta:length="0"
+ meta:name="obstaclePositionY" />
+ </configuration>
+
+ <agents>
+ <agent
+ agentclass="massim.simulation.GridSimulationAgent"
+ agentcreationclass="massim.simulation.GridSimulationAgentParameter"
+ team="blue">
+ <configuration />
+ </agent>
+ <agent
+ agentclass="massim.simulation.GridSimulationAgent"
+ agentcreationclass="massim.simulation.GridSimulationAgentParameter"
+ team="blue">
+ <configuration />
+ </agent>
+ <agent
+ agentclass="massim.simulation.GridSimulationAgent"
+ agentcreationclass="massim.simulation.GridSimulationAgentParameter"
+ team="blue">
+ <configuration />
+ </agent>
+ <agent
+ agentclass="massim.simulation.GridSimulationAgent"
+ agentcreationclass="massim.simulation.GridSimulationAgentParameter"
+ team="blue">
+ <configuration />
+ </agent>
+ <agent
+ agentclass="massim.simulation.GridSimulationAgent"
+ agentcreationclass="massim.simulation.GridSimulationAgentParameter"
+ team="blue">
+ <configuration />
+ </agent>
+ <agent
+ agentclass="massim.simulation.GridSimulationAgent"
+ agentcreationclass="massim.simulation.GridSimulationAgentParameter"
+ team="blue">
+ <configuration />
+ </agent>
+ <agent
+ agentclass="massim.simulation.GridSimulationAgent"
+ agentcreationclass="massim.simulation.GridSimulationAgentParameter"
+ team="red">
+ <configuration />
+ </agent>
+ <agent
+ agentclass="massim.simulation.GridSimulationAgent"
+ agentcreationclass="massim.simulation.GridSimulationAgentParameter"
+ team="red">
+ <configuration />
+ </agent>
+ <agent
+ agentclass="massim.simulation.GridSimulationAgent"
+ agentcreationclass="massim.simulation.GridSimulationAgentParameter"
+ team="red">
+ <configuration />
+ </agent>
+ <agent
+ agentclass="massim.simulation.GridSimulationAgent"
+ agentcreationclass="massim.simulation.GridSimulationAgentParameter"
+ team="red">
+ <configuration />
+ </agent>
+ <agent
+ agentclass="massim.simulation.GridSimulationAgent"
+ agentcreationclass="massim.simulation.GridSimulationAgentParameter"
+ team="red">
+ <configuration />
+ </agent>
+ <agent
+ agentclass="massim.simulation.GridSimulationAgent"
+ agentcreationclass="massim.simulation.GridSimulationAgentParameter"
+ team="red">
+ <configuration />
+ </agent>
+ </agents>
+ </simulation>
+
+ </match>
+
+ <accounts>
+ <actionclassmap name="Grid">
+ <actionclass id="action"
+ class="massim.simulation.GridSimulationAgentAction" />
+ <actionclass id="invalid" class="massim.InvalidAction" />
+ </actionclassmap>
+
+ <account actionclassmap="Grid"
+ defaultactionclass="massim.simulation.GridSimulationAgentAction"
+ timeout="8000" auxtimeout="500" maxpacketlength="65536"
+ username="botagent1" password="1" team="bot" />
+ <account actionclassmap="Grid"
+ defaultactionclass="massim.simulation.GridSimulationAgentAction"
+ timeout="8000" auxtimeout="500" maxpacketlength="65536"
+ username="botagent2" password="2" team="bot" />
+ <account actionclassmap="Grid"
+ defaultactionclass="massim.simulation.GridSimulationAgentAction"
+ timeout="8000" auxtimeout="500" maxpacketlength="65536"
+ username="botagent3" password="3" team="bot" />
+ <account actionclassmap="Grid"
+ defaultactionclass="massim.simulation.GridSimulationAgentAction"
+ timeout="8000" auxtimeout="500" maxpacketlength="65536"
+ username="botagent4" password="4" team="bot" />
+ <account actionclassmap="Grid"
+ defaultactionclass="massim.simulation.GridSimulationAgentAction"
+ timeout="8000" auxtimeout="500" maxpacketlength="65536"
+ username="botagent5" password="5" team="bot" />
+ <account actionclassmap="Grid"
+ defaultactionclass="massim.simulation.GridSimulationAgentAction"
+ timeout="8000" auxtimeout="500" maxpacketlength="65536"
+ username="botagent6" password="6" team="bot" />
+
+ <account actionclassmap="Grid"
+ defaultactionclass="massim.simulation.GridSimulationAgentAction"
+ timeout="8000" auxtimeout="500" maxpacketlength="65536"
+ username="participant1" password="1" team="participant" />
+ <account actionclassmap="Grid"
+ defaultactionclass="massim.simulation.GridSimulationAgentAction"
+ timeout="8000" auxtimeout="500" maxpacketlength="65536"
+ username="participant2" password="2" team="participant" />
+ <account actionclassmap="Grid"
+ defaultactionclass="massim.simulation.GridSimulationAgentAction"
+ timeout="8000" auxtimeout="500" maxpacketlength="65536"
+ username="participant3" password="3" team="participant" />
+ <account actionclassmap="Grid"
+ defaultactionclass="massim.simulation.GridSimulationAgentAction"
+ timeout="8000" auxtimeout="500" maxpacketlength="65536"
+ username="participant4" password="4" team="participant" />
+ <account actionclassmap="Grid"
+ defaultactionclass="massim.simulation.GridSimulationAgentAction"
+ timeout="8000" auxtimeout="500" maxpacketlength="65536"
+ username="participant5" password="5" team="participant" />
+ <account actionclassmap="Grid"
+ defaultactionclass="massim.simulation.GridSimulationAgentAction"
+ timeout="8000" auxtimeout="500" maxpacketlength="65536"
+ username="participant6" password="6" team="participant" />
+
+ </accounts>
+</conf>
Added: trunk/applications/jason-team/massim-server/conf/testPartition.xml
===================================================================
--- trunk/applications/jason-team/massim-server/conf/testPartition.xml (rev 0)
+++ trunk/applications/jason-team/massim-server/conf/testPartition.xml 2008-04-24 16:03:14 UTC (rev 1251)
@@ -0,0 +1,272 @@
+<?xml version="1.0" encoding="utf-8"?>
+<conf tournamentname="GridSimulation" tournamentmode="0"
+ launch-sync-type="key" time-to-launch="10000" reportpath="."
+ backuppath="backup">
+ <network-agent port="12300" backlog="10" />
+ <match>
+ <simulation id="Test partition of the environement with obstacles"
+ simulationclass="massim.simulation.GridSimulation"
+ configurationclass="massim.simulation.GridSimulationConfigurationHandCrafted"
+ rmiobserver="massim.simulation.GridSimulationRMIObserver"
+ xmlobserver="massim.simulation.GridSimulationXMLObserver"
+ rmixmlobserver="massim.simulation.GridSimulationRMIXMLDocumentObserver"
+ xmlobserverpath="."
+ xmlstatisticsobserver="massim.simulation.GridSimulationXMLStatisticsObserver"
+ file-simulationlog="./log" visualisationobserver="">
+
+
+ <!-- visualisationobserver="massim.simulation.GridSimulationVisualizationObserver" -->
+
+ <configuration xmlns:meta="http://www.tu-clausthal.de/"
+ sizex="70" sizey="70" maxNumberOfSteps="700" numberOfAgents="12"
+ numberOfObstacles="200" numberOfCows="0" cowSpeed="1"
+ agentSpeed="1" lineOfSight="17" fearRange="4" attractionRange="5"
+ cowWeight="5" agentWeight="-200" emptyWeight="1" obstacleWeight="-1"
+ htaccess="1">
+
+ <array item0="35" item1="69" item2="50" item3="34"
+ item4="20" item5="18" item6="1" item7="1" item8="2" item9="2"
+ item10="3" item11="3" meta:length="12"
+ meta:name="agentPositionY" />
+ <array item0="6" item1="69" item2="44" item3="46"
+ item4="44" item5="46" item6="69" item7="68" item8="69" item9="68"
+ item10="69" item11="68" meta:length="12"
+ meta:name="agentPositionX" />
+
+ <array meta:length="0"
+ meta:name="cowPositionY" />
+
+ <array meta:length="0"
+ meta:name="cowPositionX" />
+
+ <array item0="0" item1="14" meta:length="2"
+ meta:name="stable1X" />
+ <array item0="55" item1="69" meta:length="2"
+ meta:name="stable1Y" />
+ <array item0="55" item1="69" meta:length="2"
+ meta:name="stable2X" />
+ <array item0="0" item1="14" meta:length="2"
+ meta:name="stable2Y" />
+
+ <array item0="29" item1="29" item2="29" item3="29"
+ item4="29" item5="29" item6="29" item7="29" item8="29" item9="29"
+ item10="29" item11="15" item12="15" item13="15" item14="15"
+ item15="15" item16="15" item17="15" item18="15" item19="15"
+ item20="15" item21="15" item22="15" item23="15" item24="15"
+ item25="15" item26="54" item27="54" item28="54" item29="54"
+ item30="54" item31="54" item32="54" item33="54" item34="54"
+ item35="54" item36="54" item37="54" item38="54" item39="54"
+ item40="54" item41="40" item42="40" item43="40" item44="40"
+ item45="40" item46="40" item47="40" item48="40" item49="40"
+ item50="40" item51="40" item52="29" item53="29" item54="29"
+ item55="29" item56="29" item57="29" item58="29" item59="29"
+ item60="29" item61="29" item62="29" item63="40" item64="40"
+ item65="40" item66="40" item67="40" item68="40" item69="40"
+ item70="40" item71="40" item72="40" item73="40" item74="49"
+ item75="48" item76="47" item77="46" item78="45" item79="44"
+ item80="43" item81="42" item82="41" item83="54" item89="53"
+ item90="52" item91="51" item92="50" item84="69" item85="68"
+ item86="67" item87="66" item88="65" item93="20" item94="21"
+ item95="22" item96="23" item97="24" item98="25" item99="26"
+ item100="27" item101="28" item102="15" item103="16" item104="17"
+ item105="18" item106="19" item107="0" item108="1" item109="2"
+ item110="3" item111="4" item112="4" item113="4" item114="4"
+ item115="3" item116="3" item117="2" item118="2" item119="1"
+ item120="1" item121="0" item122="0" item123="0" item124="1"
+ item125="2" item126="3" item127="65" item128="65" item129="65"
+ item130="66" item131="66" item132="67" item133="67" item134="68"
+ item135="68" item136="69" item137="69" item138="69" item139="68"
+ item140="67" item141="66" item142="15" item143="16" item144="17"
+ item145="18" item146="19" item147="20" item148="21" item149="22"
+ item150="23" item151="24" item152="25" item153="26" item154="27"
+ item155="28" item156="29" item157="22" item158="22" item159="22"
+ item160="22" item161="22" item162="22" item163="22" item164="22"
+ item165="22" item166="22" item167="54" item168="53" item169="52"
+ item170="51" item171="50" item172="49" item173="48" item174="47"
+ item175="46" item176="45" item177="44" item178="43" item179="42"
+ item180="41" item181="40" item182="47" item183="47" item184="47"
+ item185="47" item186="47" item187="47" item188="47" item189="47"
+ item190="47" item191="47" item192="0" item193="1" item194="2"
+ item195="3" item196="69" item197="68" item198="67" item199="66"
+ meta:length="200" meta:name="obstaclePositionX" />
+
+ <array item0="20" item1="21" item2="22" item3="23"
+ item4="24" item5="25" item6="26" item7="27" item8="28" item9="29"
+ item10="30" item11="55" item12="56" item13="57" item14="58"
+ item15="59" item16="60" item17="61" item18="62" item19="63"
+ item20="64" item21="65" item22="66" item23="67" item24="68"
+ item25="69" item26="0" item27="1" item28="2" item29="3" item30="4"
+ item31="5" item32="6" item33="7" item34="8" item35="9" item36="10"
+ item37="11" item38="12" item39="13" item40="14" item41="20"
+ item42="21" item43="22" item44="23" item45="24" item46="25"
+ item47="26" item48="27" item49="28" item50="29" item51="30"
+ item52="40" item53="41" item54="42" item55="43" item56="44"
+ item57="45" item58="46" item59="47" item60="48" item61="49"
+ item62="50" item63="40" item64="41" item65="42" item66="43"
+ item67="44" item68="45" item69="46" item70="47" item71="48"
+ item72="49" item73="50" item74="50" item75="50" item76="50"
+ item77="50" item78="50" item79="50" item80="50" item81="50"
+ item82="50" item83="50" item89="50" item90="50" item91="50"
+ item92="50" item84="50" item85="50" item86="50" item87="50"
+ item88="50" item93="20" item94="20" item95="20" item96="20"
+ item97="20" item98="20" item99="20" item100="20" item101="20"
+ item102="20" item103="20" item104="20" item105="20" item106="20"
+ item107="20" item108="20" item109="20" item110="20" item111="20"
+ item112="40" item113="41" item114="42" item115="43" item116="44"
+ item117="45" item118="46" item119="47" item120="48" item121="49"
+ item122="50" item123="40" item124="40" item125="40" item126="40"
+ item127="29" item128="28" item129="27" item130="26" item131="25"
+ item132="24" item133="23" item134="22" item135="21" item136="20"
+ item137="19" item138="29" item139="29" item140="29" item141="29"
+ item142="10" item143="10" item144="10" item145="10" item146="10"
+ item147="10" item148="10" item149="10" item150="10" item151="10"
+ item152="10" item153="10" item154="10" item155="10" item156="10"
+ item157="9" item158="8" item159="7" item160="6" item161="5"
+ item162="4" item163="3" item164="2" item165="1" item166="0"
+ item167="59" item168="59" item169="59" item170="59" item171="59"
+ item172="59" item173="59" item174="59" item175="59" item176="59"
+ item177="59" item178="59" item179="59" item180="59" item181="59"
+ item182="60" item183="61" item184="62" item185="63" item186="64"
+ item187="65" item188="66" item189="67" item190="68" item191="69"
+ item192="48" item193="46" item194="44" item195="42" item196="21"
+ item197="23" item198="25" item199="27" meta:length="200"
+ meta:name="obstaclePositionY" />
+ </configuration>
+
+ <agents>
+ <agent
+ agentclass="massim.simulation.GridSimulationAgent"
+ agentcreationclass="massim.simulation.GridSimulationAgentParameter"
+ team="blue">
+ <configuration />
+ </agent>
+ <agent
+ agentclass="massim.simulation.GridSimulationAgent"
+ agentcreationclass="massim.simulation.GridSimulationAgentParameter"
+ team="blue">
+ <configuration />
+ </agent>
+ <agent
+ agentclass="massim.simulation.GridSimulationAgent"
+ agentcreationclass="massim.simulation.GridSimulationAgentParameter"
+ team="blue">
+ <configuration />
+ </agent>
+ <agent
+ agentclass="massim.simulation.GridSimulationAgent"
+ agentcreationclass="massim.simulation.GridSimulationAgentParameter"
+ team="blue">
+ <configuration />
+ </agent>
+ <agent
+ agentclass="massim.simulation.GridSimulationAgent"
+ agentcreationclass="massim.simulation.GridSimulationAgentParameter"
+ team="blue">
+ <configuration />
+ </agent>
+ <agent
+ agentclass="massim.simulation.GridSimulationAgent"
+ agentcreationclass="massim.simulation.GridSimulationAgentParameter"
+ team="blue">
+ <configuration />
+ </agent>
+ <agent
+ agentclass="massim.simulation.GridSimulationAgent"
+ agentcreationclass="massim.simulation.GridSimulationAgentParameter"
+ team="red">
+ <configuration />
+ </agent>
+ <agent
+ agentclass="massim.simulation.GridSimulationAgent"
+ agentcreationclass="massim.simulation.GridSimulationAgentParameter"
+ team="red">
+ <configuration />
+ </agent>
+ <agent
+ agentclass="massim.simulation.GridSimulationAgent"
+ agentcreationclass="massim.simulation.GridSimulationAgentParameter"
+ team="red">
+ <configuration />
+ </agent>
+ <agent
+ agentclass="massim.simulation.GridSimulationAgent"
+ agentcreationclass="massim.simulation.GridSimulationAgentParameter"
+ team="red">
+ <configuration />
+ </agent>
+ <agent
+ agentclass="massim.simulation.GridSimulationAgent"
+ agentcreationclass="massim.simulation.GridSimulationAgentParameter"
+ team="red">
+ <configuration />
+ </agent>
+ <agent
+ agentclass="massim.simulation.GridSimulationAgent"
+ agentcreationclass="massim.simulation.GridSimulationAgentParameter"
+ team="red">
+ <configuration />
+ </agent>
+ </agents>
+ </simulation>
+
+ </match>
+
+ <accounts>
+ <actionclassmap name="Grid">
+ <actionclass id="action"
+ class="massim.simulation.GridSimulationAgentAction" />
+ <actionclass id="invalid" class="massim.InvalidAction" />
+ </actionclassmap>
+
+ <account actionclassmap="Grid"
+ defaultactionclass="massim.simulation.GridSimulationAgentAction"
+ timeout="8000" auxtimeout="500" maxpacketlength="65536"
+ username="botagent1" password="1" team="bot" />
+ <account actionclassmap="Grid"
+ defaultactionclass="massim.simulation.GridSimulationAgentAction"
+ timeout="8000" auxtimeout="500" maxpacketlength="65536"
+ username="botagent2" password="2" team="bot" />
+ <account actionclassmap="Grid"
+ defaultactionclass="massim.simulation.GridSimulationAgentAction"
+ timeout="8000" auxtimeout="500" maxpacketlength="65536"
+ username="botagent3" password="3" team="bot" />
+ <account actionclassmap="Grid"
+ defaultactionclass="massim.simulation.GridSimulationAgentAction"
+ timeout="8000" auxtimeout="500" maxpacketlength="65536"
+ username="botagent4" password="4" team="bot" />
+ <account actionclassmap="Grid"
+ defaultactionclass="massim.simulation.GridSimulationAgentAction"
+ timeout="8000" auxtimeout="500" maxpacketlength="65536"
+ username="botagent5" password="5" team="bot" />
+ <account actionclassmap="Grid"
+ defaultactionclass="massim.simulation.GridSimulationAgentAction"
+ timeout="8000" auxtimeout="500" maxpacketlength="65536"
+ username="botagent6" password="6" team="bot" />
+
+ <account actionclassmap="Grid"
+ defaultactionclass="massim.simulation.GridSimulationAgentAction"
+ timeout="8000" auxtimeout="500" maxpacketlength="65536"
+ username="participant1" password="1" team="participant" />
+ <account actionclassmap="Grid"
+ defaultactionclass="massim.simulation.GridSimulationAgentAction"
+ timeout="8000" auxtimeout="500" maxpacketlength="65536"
+ username="participant2" password="2" team="participant" />
+ <account actionclassmap="Grid"
+ defaultactionclass="massim.simulation.GridSimulationAgentAction"
+ timeout="8000" auxtimeout="500" maxpacketlength="65536"
+ username="participant3" password="3" team="participant" />
+ <account actionclassmap="Grid"
+ defaultactionclass="massim.simulation.GridSimulationAgentAction"
+ timeout="8000" auxtimeout="500" maxpacketlength="65536"
+ username="participant4" password="4" team="participant" />
+ <account actionclassmap="Grid"
+ defaultactionclass="massim.simulation.GridSimulationAgentAction"
+ timeout="8000" auxtimeout="500" maxpacketlength="65536"
+ username="participant5" password="5" team="participant" />
+ <account actionclassmap="Grid"
+ defaultactionclass="massim.simulation.GridSimulationAgentAction"
+ timeout="8000" auxtimeout="500" maxpacketlength="65536"
+ username="participant6" password="6" team="participant" />
+
+ </accounts>
+</conf>
Added: trunk/applications/jason-team/massim-server/startServer.sh
===================================================================
--- trunk/applications/jason-team/massim-server/startServer.sh (rev 0)
+++ trunk/applications/jason-team/massim-server/startServer.sh 2008-04-24 16:03:14 UTC (rev 1251)
@@ -0,0 +1,31 @@
+###############################################################
+#!/bin/sh #
+###############################################################
+# Multi-Agent Programming Contest 2008 #
+# #
+# Support package massim-Server #
+# This script runs the massim server locally with the #
+# default parameters. It also runs at first the rmiregistry #
+# where the server and clients (servermonitor,webinterface) #
+# must connect to. #
+# #
+# For the details on the contest, check the Contest website: #
+# http://cig.in.tu-clausthal.de/agentcontest2008/ #
+# #
+# Organizers: #
+# J. Dix, M. Dastani, P. Novak, T.M. Behrens #
+###############################################################
+
+name=localhost
+
+clear
+
+echo "Launching RMI Registry"
+rmiregistry 1099 &
+sleep 1
+
+echo "Launching Server"
+java -Djava.rmi.server.hostname=$name -jar lib/massimserver.jar --conf conf/serverconfig.xml
+
+echo "Killall RMI Registry"
+killall rmiregistry -w
\ No newline at end of file
Property changes on: trunk/applications/jason-team/massim-server/startServer.sh
___________________________________________________________________
Name: svn:executable
+ *
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jom...@us...> - 2008-04-24 15:32:44
|
Revision: 1250
http://jason.svn.sourceforge.net/jason/?rev=1250&view=rev
Author: jomifred
Date: 2008-04-24 08:32:33 -0700 (Thu, 24 Apr 2008)
Log Message:
-----------
add abort_scheme in jason-moise
Modified Paths:
--------------
trunk/applications/jason-moise/lib/moise.jar
trunk/applications/jason-moise/src/jmoise/remove_mission.java
trunk/applications/jason-moise/src/jmoise/remove_scheme.java
trunk/applications/jason-team/src/asl/gaucho.asl
trunk/applications/jason-team/src/team-os.xml
Added Paths:
-----------
trunk/applications/jason-moise/src/jmoise/abort_scheme.java
Modified: trunk/applications/jason-moise/lib/moise.jar
===================================================================
(Binary files differ)
Added: trunk/applications/jason-moise/src/jmoise/abort_scheme.java
===================================================================
--- trunk/applications/jason-moise/src/jmoise/abort_scheme.java (rev 0)
+++ trunk/applications/jason-moise/src/jmoise/abort_scheme.java 2008-04-24 15:32:33 UTC (rev 1250)
@@ -0,0 +1,50 @@
+package jmoise;
+
+import jason.asSemantics.TransitionSystem;
+import jason.asSemantics.Unifier;
+import jason.asSyntax.Term;
+
+/**
+
+<p>Organisational action: <b><code>jmoise.abort_scheme( SchId )</code></b>:
+ used by an agent to abort the execution of a scheme.
+ SchId is the identification of the scheme instance.
+ This organisational action does not require that no agent is committed to
+ the scheme, as does .jmoise.remove_scheme.
+
+<p>Conditions to succeed:
+<ul>
+<li>the agent performing the action is the owner of the scheme;</li>
+</ul>
+
+<p>Consequences:
+<ul>
+<li>there is no more responsible groups for the scheme;</li>
+<li>the agents of the scheme are no more obligated to achieve the scheme's goals.</li>
+</ul>
+
+<p>Examples:
+<ul>
+<li> <code>jmoise.abort_scheme(wp0)</code>:
+ removes the scheme identified by wp0 form the organisational entity.</li>
+</ul>
+
+@see jmoise.create_scheme
+@see jmoise.commit_mission
+@see jmoise.remove_mission
+@see jmoise.set_goal_arg
+@see jmoise.set_goal_state
+@see jmoise.add_responsible_group
+@see jmoise.remove_scheme
+@see <a href="http://moise.sourceforge.net/doc/tutorial.pdf">Moise+ Tutorial, chapter for J-Moise+</a>
+
+@author Jomi
+
+*/
+public class abort_scheme extends MoiseBaseIA {
+
+ @Override
+ public Object execute(TransitionSystem ts, Unifier un, Term[] args) throws Exception {
+ return super.execute(ts,un,args);
+ }
+}
Modified: trunk/applications/jason-moise/src/jmoise/remove_mission.java
===================================================================
--- trunk/applications/jason-moise/src/jmoise/remove_mission.java 2008-04-24 15:06:43 UTC (rev 1249)
+++ trunk/applications/jason-moise/src/jmoise/remove_mission.java 2008-04-24 15:32:33 UTC (rev 1250)
@@ -16,7 +16,7 @@
<p>Conditions to succeed:
<ul>
<li>the agent is committed to MissionId in SchId;</li>
-<li>all goals of the mission are satisfied; if a super goal of a mission's goal is
+<li>all achievement goals of the mission are satisfied; if a super goal of a mission's goal is
satisfied, the goal is also considered as satisfied.</li>
</ul>
Modified: trunk/applications/jason-moise/src/jmoise/remove_scheme.java
===================================================================
--- trunk/applications/jason-moise/src/jmoise/remove_scheme.java 2008-04-24 15:06:43 UTC (rev 1249)
+++ trunk/applications/jason-moise/src/jmoise/remove_scheme.java 2008-04-24 15:32:33 UTC (rev 1250)
@@ -18,7 +18,7 @@
<p>Consequences:
<ul>
-<li>there is no more responsible groups for the scheme.</li>
+<li>there is no more responsible groups for the scheme.</li>
</ul>
<p>Examples:
@@ -33,6 +33,8 @@
@see jmoise.set_goal_arg
@see jmoise.set_goal_state
@see jmoise.add_responsible_group
+@see jmoise.abort_scheme
+
@see <a href="http://moise.sourceforge.net/doc/tutorial.pdf">Moise+ Tutorial, chapter for J-Moise+</a>
@author Jomi
Modified: trunk/applications/jason-team/src/asl/gaucho.asl
===================================================================
--- trunk/applications/jason-team/src/asl/gaucho.asl 2008-04-24 15:06:43 UTC (rev 1249)
+++ trunk/applications/jason-team/src/asl/gaucho.asl 2008-04-24 15:32:33 UTC (rev 1250)
@@ -32,7 +32,7 @@
});
.abolish(area(_,_,_,_,_));
jmoise.create_group(team).
-+gsize(Weight,Height)
++gsize(_Weight,_Height)
<- .abolish(area(_,_,_,_,_)).
+group(team,GId)
Modified: trunk/applications/jason-team/src/team-os.xml
===================================================================
--- trunk/applications/jason-team/src/team-os.xml 2008-04-24 15:06:43 UTC (rev 1249)
+++ trunk/applications/jason-team/src/team-os.xml 2008-04-24 15:32:33 UTC (rev 1250)
@@ -5,7 +5,7 @@
<organisational-specification
id="jason-cowboys"
- os-version="0.5"
+ os-version="0.6"
xmlns='http://moise.sourceforge.net/os'
xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
@@ -64,9 +64,27 @@
<functional-specification>
+ <scheme id="exploring" >
+ <goal id="find_cows" >
+ <plan operator="parallel">
+ <goal id="goto_near_unvisited" ds="go to the near unvisited location inside the area of the group" type="maintenance"/>
+ <goal id="share_cows" ds="share seen cows with other agents in the scheme" type="maintenance"/>
+ </plan>
+ </goal>
+
+ <mission id="mscouter" >
+ <goal id="share_cows" />
+ </mission>
+ <mission id="mexplorer" min="1">
+ <goal id="goto_near_unvisited" />
+ <goal id="share_cows" />
+ </mission>
+ </scheme>
</functional-specification>
<deontic-specification>
+ <deontic-relation type="obligation" role="explorer" mission="mscouter" />
+ <deontic-relation type="obligation" role="scouter" mission="mexplorer" />
</deontic-specification>
</organisational-specification>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ga...@us...> - 2008-04-24 15:06:55
|
Revision: 1249
http://jason.svn.sourceforge.net/jason/?rev=1249&view=rev
Author: gauth
Date: 2008-04-24 08:06:43 -0700 (Thu, 24 Apr 2008)
Log Message:
-----------
New command to start tests:
./startServerTest <conffile>.xml
.xml configuration files can be found in /jason/applications/jason-team/massim-server/conf
Modified Paths:
--------------
trunk/applications/jason-team/massim-server/conf/serverconfig.xml
Added Paths:
-----------
trunk/applications/jason-team/massim-server/startServerTest.sh
Removed Paths:
-------------
trunk/applications/jason-team/massim-server/startServer.sh
trunk/applications/jason-team/massim-server/startServer_test01.sh
trunk/applications/jason-team/massim-server/startServer_test02.sh
trunk/applications/jason-team/massim-server/startServer_test03.sh
Modified: trunk/applications/jason-team/massim-server/conf/serverconfig.xml
===================================================================
--- trunk/applications/jason-team/massim-server/conf/serverconfig.xml 2008-04-24 14:33:43 UTC (rev 1248)
+++ trunk/applications/jason-team/massim-server/conf/serverconfig.xml 2008-04-24 15:06:43 UTC (rev 1249)
@@ -1,244 +1,318 @@
-<?xml version="1.0" encoding="utf-8"?>
-<conf tournamentname="GridSimulation" tournamentmode="0" launch-sync-type="key" time-to-launch="10000" reportpath="." backuppath="backup">
- <network-agent port="12300" backlog="10"/>
- <match>
- <simulation
- id="WildWildWest"
- simulationclass="massim.simulation.GridSimulation"
- configurationclass="massim.simulation.GridSimulationConfigurationHandCrafted"
- rmiobserver="massim.simulation.GridSimulationRMIObserver"
- xmlobserver="massim.simulation.GridSimulationXMLObserver"
- rmixmlobserver="massim.simulation.GridSimulationRMIXMLDocumentObserver"
- xmlobserverpath="."
- xmlstatisticsobserver="massim.simulation.GridSimulationXMLStatisticsObserver"
- file-simulationlog="./log"
- visualisationobserver=""
- >
-
+<?xml version="1.0" encoding="utf-8"?>
+<conf tournamentname="GridSimulation" tournamentmode="0"
+ launch-sync-type="key" time-to-launch="10000" reportpath="."
+ backuppath="backup">
+ <network-agent port="12300" backlog="10" />
+ <match>
+ <simulation id="WildWildWest"
+ simulationclass="massim.simulation.GridSimulation"
+ configurationclass="massim.simulation.GridSimulationConfigurationHandCrafted"
+ rmiobserver="massim.simulation.GridSimulationRMIObserver"
+ xmlobserver="massim.simulation.GridSimulationXMLObserver"
+ rmixmlobserver="massim.simulation.GridSimulationRMIXMLDocumentObserver"
+ xmlobserverpath="."
+ xmlstatisticsobserver="massim.simulation.GridSimulationXMLStatisticsObserver"
+ file-simulationlog="./log" visualisationobserver="">
-<!-- visualisationobserver="massim.simulation.GridSimulationVisualizationObserver" -->
- <configuration
- xmlns:meta="http://www.tu-clausthal.de/"
- sizex="70"
- sizey="70"
- maxNumberOfSteps="700"
-
- numberOfAgents="12"
- numberOfObstacles="200"
- numberOfCows="100"
-
- cowSpeed="1"
- agentSpeed="1"
-
- lineOfSight="17"
-
- fearRange="4"
- attractionRange="5"
- cowWeight="5"
- agentWeight="-200"
- emptyWeight="1"
- obstacleWeight="-1"
-
- htaccess = "1"
-
- >
-
- <array item0="35" item1="35" item2="35" item3="35" item4="35" item5="35" item6="35" item7="35" item8="35" item9="35" item10="35" item11="35" meta:length="12" meta:name="agentPositionY" />
- <array item0="6" item1="8" item2="10" item3="12" item4="14" item5="16" item6="63" item7="61" item8="59" item9="57" item10="55" item11="53" meta:length="12" meta:name="agentPositionX"/>
-
-
- <array
-
- item0="25" item1="28" item2="22" item3="21" item4="26" item5="25" item6="27" item7="22" item8="24" item9="23"
-
- item10="45" item11="48" item12="42" item13="41" item14="46" item15="45" item16="47" item17="42" item18="44" item19="43"
-
-
-
- item20="62" item21="63" item22="58" item23="68" item24="63" item25="66" item26="60" item27="61" item28="67" item29="59"
-
- item30="7" item31="6" item32="11" item33="1" item34="6" item35="3" item36="9" item37="8" item38="2" item39="10"
-
- item40="39" item41="42" item42="41" item43="38" item44="37" item45="40" item46="39" item47="37" item48="44" item49="36"
-
- item50="39" item51="42" item52="41" item53="38" item54="37" item55="40" item56="39" item57="37" item58="44" item59="36"
-
- item60="5" item61="6" item62="13" item63="4" item64="3" item65="5" item66="8" item67="7" item68="5" item69="1"
-
-
- item70="62" item71="65" item72="59" item73="65" item74="68" item75="61" item76="62" item77="63" item78="69" item79="58"
-
-
-
- item90="23" item91="21" item92="28" item93="28" item94="26" item95="23" item96="29" item97="28" item98="22" item99="29"
-
- item80="28" item81="29" item82="24" item83="33" item84="31" item85="28" item86="34" item87="33" item88="27" item89="26"
-
- meta:length="100" meta:name="cowPositionY"/>
-
-
- <array
-
- item0="32" item1="33" item2="34" item3="35" item4="36" item5="37" item6="38" item7="39" item8="31" item9="35"
-
- item10="32" item11="33" item12="34" item13="35" item14="36" item15="37" item16="38" item17="39" item18="31" item19="35"
-
-
-
- item20="30" item21="27" item22="28" item23="31" item24="32" item25="29" item26="30" item27="32" item28="25" item29="33"
-
- item30="39" item31="42" item32="41" item33="38" item34="37" item35="40" item36="39" item37="37" item38="44" item39="36"
-
- item40="7" item41="6" item42="11" item43="7" item44="6" item45="5" item46="9" item47="8" item48="8" item49="10"
-
- item50="58" item51="59" item52="54" item53="53" item54="59" item55="61" item56="55" item57="56" item58="52" item59="54"
-
- item60="7" item61="6" item62="11" item63="1" item64="6" item65="3" item66="9" item67="8" item68="2" item69="10"
-
- item70="63" item71="64" item72="58" item73="68" item74="66" item75="63" item76="69" item77="68" item78="62" item79="59"
-
- item80="13" item81="11" item82="18" item83="18" item84="16" item85="13" item86="19" item87="18" item88="12" item89="19"
- item90="58" item91="59" item92="53" item93="63" item94="61" item95="58" item96="64" item97="63" item98="57" item99="54"
-
- meta:length="100" meta:name="cowPositionX"/>
-
- <array item0="0" item1="14" meta:length="2" meta:name="stable1X"/>
- <array item0="55" item1="69" meta:length="2" meta:name="stable1Y"/>
- <array item0="55" item1="69" meta:length="2" meta:name="stable2X"/>
- <array item0="0" item1="14" meta:length="2" meta:name="stable2Y"/>
-
-
-
- <array
-
-
- item0="29" item1="29" item2="29" item3="29" item4="29" item5="29" item6="29" item7="29" item8="29" item9="29" item10="29"
-
-
- item11="15" item12="15" item13="15" item14="15" item15="15" item16="15" item17="15" item18="15" item19="15" item20="15" item21="15" item22="15" item23="15" item24="15" item25="15"
-
- item26="54" item27="54" item28="54" item29="54" item30="54" item31="54" item32="54" item33="54" item34="54" item35="54" item36="54" item37="54" item38="54" item39="54" item40="54"
-
-
-
- item41="40" item42="40" item43="40" item44="40" item45="40" item46="40" item47="40" item48="40" item49="40" item50="40" item51="40"
-
-
- item52="29" item53="29" item54="29" item55="29" item56="29" item57="29" item58="29" item59="29" item60="29" item61="29" item62="29"
-
-
- item63="40" item64="40" item65="40" item66="40" item67="40" item68="40" item69="40" item70="40" item71="40" item72="40" item73="40"
-
- item74="49" item75="48" item76="47" item77="46" item78="45" item79="44" item80="43" item81="42" item82="41"
- item83="54" item89="53" item90="52" item91="51" item92="50" item84="69" item85="68" item86="67" item87="66" item88="65"
-
- item93="20" item94="21" item95="22" item96="23" item97="24" item98="25" item99="26" item100="27" item101="28"
- item102="15" item103="16" item104="17" item105="18" item106="19" item107="0" item108="1" item109="2" item110="3" item111="4"
-
-
- item112="4" item113="4" item114="4" item115="3" item116="3" item117="2" item118="2" item119="1" item120="1" item121="0" item122="0"
- item123="0" item124="1" item125="2" item126="3"
-
-
- item127="65" item128="65" item129="65" item130="66" item131="66" item132="67" item133="67" item134="68" item135="68" item136="69" item137="69"
- item138="69" item139="68" item140="67" item141="66"
-
- item142="15" item143="16" item144="17" item145="18" item146="19" item147="20" item148="21" item149="22" item150="23" item151="24" item152="25" item153="26" item154="27" item155="28" item156="29"
- item157="22" item158="22" item159="22" item160="22" item161="22" item162="22" item163="22" item164="22" item165="22" item166="22"
-
-
- item167="54" item168="53" item169="52" item170="51" item171="50" item172="49" item173="48" item174="47" item175="46" item176="45" item177="44" item178="43" item179="42" item180="41" item181="40"
- item182="47" item183="47" item184="47" item185="47" item186="47" item187="47" item188="47" item189="47" item190="47" item191="47"
-
- item192="0" item193="1" item194="2" item195="3" item196="69" item197="68" item198="67" item199="66"
- meta:length="200" meta:name="obstaclePositionX"/>
-
-
- <array
-
-
- item0="20" item1="21" item2="22" item3="23" item4="24" item5="25" item6="26" item7="27" item8="28" item9="29" item10="30"
-
-
-
- item11="55" item12="56" item13="57" item14="58" item15="59" item16="60" item17="61" item18="62" item19="63" item20="64" item21="65" item22="66" item23="67" item24="68" item25="69"
-
- item26="0" item27="1" item28="2" item29="3" item30="4" item31="5" item32="6" item33="7" item34="8" item35="9" item36="10" item37="11" item38="12" item39="13" item40="14"
-
-
- item41="20" item42="21" item43="22" item44="23" item45="24" item46="25" item47="26" item48="27" item49="28" item50="29" item51="30"
-
-
- item52="40" item53="41" item54="42" item55="43" item56="44" item57="45" item58="46" item59="47" item60="48" item61="49" item62="50"
-
-
- item63="40" item64="41" item65="42" item66="43" item67="44" item68="45" item69="46" item70="47" item71="48" item72="49" item73="50"
-
- item74="50" item75="50" item76="50" item77="50" item78="50" item79="50" item80="50" item81="50" item82="50"
- item83="50" item89="50" item90="50" item91="50" item92="50" item84="50" item85="50" item86="50" item87="50" item88="50"
-
- item93="20" item94="20" item95="20" item96="20" item97="20" item98="20" item99="20" item100="20" item101="20"
- item102="20" item103="20" item104="20" item105="20" item106="20" item107="20" item108="20" item109="20" item110="20" item111="20"
-
-
- item112="40" item113="41" item114="42" item115="43" item116="44" item117="45" item118="46" item119="47" item120="48" item121="49" item122="50"
- item123="40" item124="40" item125="40" item126="40"
-
-
- item127="29" item128="28" item129="27" item130="26" item131="25" item132="24" item133="23" item134="22" item135="21" item136="20" item137="19"
- item138="29" item139="29" item140="29" item141="29"
-
- item142="10" item143="10" item144="10" item145="10" item146="10" item147="10" item148="10" item149="10" item150="10" item151="10" item152="10" item153="10" item154="10" item155="10" item156="10"
- item157="9" item158="8" item159="7" item160="6" item161="5" item162="4" item163="3" item164="2" item165="1" item166="0"
-
- item167="59" item168="59" item169="59" item170="59" item171="59" item172="59" item173="59" item174="59" item175="59" item176="59" item177="59" item178="59" item179="59" item180="59" item181="59"
- item182="60" item183="61" item184="62" item185="63" item186="64" item187="65" item188="66" item189="67" item190="68" item191="69"
-
- item192="48" item193="46" item194="44" item195="42" item196="21" item197="23" item198="25" item199="27"
- meta:length="200" meta:name="obstaclePositionY"/>
-
-
-
- </configuration>
-
- <agents>
- <agent agentclass="massim.simulation.GridSimulationAgent" agentcreationclass="massim.simulation.GridSimulationAgentParameter" team="blue"><configuration/></agent>
- <agent agentclass="massim.simulation.GridSimulationAgent" agentcreationclass="massim.simulation.GridSimulationAgentParameter" team="blue"><configuration/></agent>
- <agent agentclass="massim.simulation.GridSimulationAgent" agentcreationclass="massim.simulation.GridSimulationAgentParameter" team="blue"><configuration/></agent>
- <agent agentclass="massim.simulation.GridSimulationAgent" agentcreationclass="massim.simulation.GridSimulationAgentParameter" team="blue"><configuration/></agent>
- <agent agentclass="massim.simulation.GridSimulationAgent" agentcreationclass="massim.simulation.GridSimulationAgentParameter" team="blue"><configuration/></agent>
- <agent agentclass="massim.simulation.GridSimulationAgent" agentcreationclass="massim.simulation.GridSimulationAgentParameter" team="blue"><configuration/></agent>
- <agent agentclass="massim.simulation.GridSimulationAgent" agentcreationclass="massim.simulation.GridSimulationAgentParameter" team="red"><configuration/></agent>
- <agent agentclass="massim.simulation.GridSimulationAgent" agentcreationclass="massim.simulation.GridSimulationAgentParameter" team="red"><configuration/></agent>
- <agent agentclass="massim.simulation.GridSimulationAgent" agentcreationclass="massim.simulation.GridSimulationAgentParameter" team="red"><configuration/></agent>
- <agent agentclass="massim.simulation.GridSimulationAgent" agentcreationclass="massim.simulation.GridSimulationAgentParameter" team="red"><configuration/></agent>
- <agent agentclass="massim.simulation.GridSimulationAgent" agentcreationclass="massim.simulation.GridSimulationAgentParameter" team="red"><configuration/></agent>
- <agent agentclass="massim.simulation.GridSimulationAgent" agentcreationclass="massim.simulation.GridSimulationAgentParameter" team="red"><configuration/></agent>
- </agents>
- </simulation>
-
- </match>
-
- <accounts>
- <actionclassmap name="Grid">
- <actionclass id="action" class="massim.simulation.GridSimulationAgentAction"/>
- <actionclass id="invalid" class="massim.InvalidAction"/>
- </actionclassmap>
-
- <account actionclassmap="Grid" defaultactionclass="massim.simulation.GridSimulationAgentAction" timeout="8000" auxtimeout="500" maxpacketlength="65536" username="botagent1" password="1" team="bot" />
- <account actionclassmap="Grid" defaultactionclass="massim.simulation.GridSimulationAgentAction" timeout="8000" auxtimeout="500" maxpacketlength="65536" username="botagent2" password="2" team="bot" />
- <account actionclassmap="Grid" defaultactionclass="massim.simulation.GridSimulationAgentAction" timeout="8000" auxtimeout="500" maxpacketlength="65536" username="botagent3" password="3" team="bot" />
- <account actionclassmap="Grid" defaultactionclass="massim.simulation.GridSimulationAgentAction" timeout="8000" auxtimeout="500" maxpacketlength="65536" username="botagent4" password="4" team="bot" />
- <account actionclassmap="Grid" defaultactionclass="massim.simulation.GridSimulationAgentAction" timeout="8000" auxtimeout="500" maxpacketlength="65536" username="botagent5" password="5" team="bot" />
- <account actionclassmap="Grid" defaultactionclass="massim.simulation.GridSimulationAgentAction" timeout="8000" auxtimeout="500" maxpacketlength="65536" username="botagent6" password="6" team="bot" />
-
- <account actionclassmap="Grid" defaultactionclass="massim.simulation.GridSimulationAgentAction" timeout="8000" auxtimeout="500" maxpacketlength="65536" username="participant1" password="1" team="participant" />
- <account actionclassmap="Grid" defaultactionclass="massim.simulation.GridSimulationAgentAction" timeout="8000" auxtimeout="500" maxpacketlength="65536" username="participant2" password="2" team="participant" />
- <account actionclassmap="Grid" defaultactionclass="massim.simulation.GridSimulationAgentAction" timeout="8000" auxtimeout="500" maxpacketlength="65536" username="participant3" password="3" team="participant" />
- <account actionclassmap="Grid" defaultactionclass="massim.simulation.GridSimulationAgentAction" timeout="8000" auxtimeout="500" maxpacketlength="65536" username="participant4" password="4" team="participant" />
- <account actionclassmap="Grid" defaultactionclass="massim.simulation.GridSimulationAgentAction" timeout="8000" auxtimeout="500" maxpacketlength="65536" username="participant5" password="5" team="participant" />
- <account actionclassmap="Grid" defaultactionclass="massim.simulation.GridSimulationAgentAction" timeout="8000" auxtimeout="500" maxpacketlength="65536" username="participant6" password="6" team="participant" />
-
- </accounts>
-</conf>
+ <!-- visualisationobserver="massim.simulation.GridSimulationVisualizationObserver" -->
+
+ <configuration xmlns:meta="http://www.tu-clausthal.de/"
+ sizex="70" sizey="70" maxNumberOfSteps="700" numberOfAgents="12"
+ numberOfObstacles="200" numberOfCows="100" cowSpeed="1"
+ agentSpeed="1" lineOfSight="17" fearRange="4" attractionRange="5"
+ cowWeight="5" agentWeight="-200" emptyWeight="1" obstacleWeight="-1"
+ htaccess="1">
+
+ <array item0="35" item1="35" item2="35" item3="35"
+ item4="35" item5="35" item6="35" item7="35" item8="35" item9="35"
+ item10="35" item11="35" meta:length="12"
+ meta:name="agentPositionY" />
+ <array item0="6" item1="8" item2="10" item3="12"
+ item4="14" item5="16" item6="63" item7="61" item8="59" item9="57"
+ item10="55" item11="53" meta:length="12"
+ meta:name="agentPositionX" />
+
+
+ <array item0="25" item1="28" item2="22" item3="21"
+ item4="26" item5="25" item6="27" item7="22" item8="24" item9="23"
+ item10="45" item11="48" item12="42" item13="41" item14="46"
+ item15="45" item16="47" item17="42" item18="44" item19="43"
+ item20="62" item21="63" item22="58" item23="68" item24="63"
+ item25="66" item26="60" item27="61" item28="67" item29="59"
+ item30="7" item31="6" item32="11" item33="1" item34="6" item35="3"
+ item36="9" item37="8" item38="2" item39="10" item40="39"
+ item41="42" item42="41" item43="38" item44="37" item45="40"
+ item46="39" item47="37" item48="44" item49="36" item50="39"
+ item51="42" item52="41" item53="38" item54="37" item55="40"
+ item56="39" item57="37" item58="44" item59="36" item60="5"
+ item61="6" item62="13" item63="4" item64="3" item65="5" item66="8"
+ item67="7" item68="5" item69="1" item70="62" item71="65"
+ item72="59" item73="65" item74="68" item75="61" item76="62"
+ item77="63" item78="69" item79="58" item90="23" item91="21"
+ item92="28" item93="28" item94="26" item95="23" item96="29"
+ item97="28" item98="22" item99="29" item80="28" item81="29"
+ item82="24" item83="33" item84="31" item85="28" item86="34"
+ item87="33" item88="27" item89="26" meta:length="100"
+ meta:name="cowPositionY" />
+
+
+ <array item0="32" item1="33" item2="34" item3="35"
+ item4="36" item5="37" item6="38" item7="39" item8="31" item9="35"
+ item10="32" item11="33" item12="34" item13="35" item14="36"
+ item15="37" item16="38" item17="39" item18="31" item19="35"
+ item20="30" item21="27" item22="28" item23="31" item24="32"
+ item25="29" item26="30" item27="32" item28="25" item29="33"
+ item30="39" item31="42" item32="41" item33="38" item34="37"
+ item35="40" item36="39" item37="37" item38="44" item39="36"
+ item40="7" item41="6" item42="11" item43="7" item44="6" item45="5"
+ item46="9" item47="8" item48="8" item49="10" item50="58"
+ item51="59" item52="54" item53="53" item54="59" item55="61"
+ item56="55" item57="56" item58="52" item59="54" item60="7"
+ item61="6" item62="11" item63="1" item64="6" item65="3" item66="9"
+ item67="8" item68="2" item69="10" item70="63" item71="64"
+ item72="58" item73="68" item74="66" item75="63" item76="69"
+ item77="68" item78="62" item79="59" item80="13" item81="11"
+ item82="18" item83="18" item84="16" item85="13" item86="19"
+ item87="18" item88="12" item89="19" item90="58" item91="59"
+ item92="53" item93="63" item94="61" item95="58" item96="64"
+ item97="63" item98="57" item99="54" meta:length="100"
+ meta:name="cowPositionX" />
+
+ <array item0="0" item1="14" meta:length="2"
+ meta:name="stable1X" />
+ <array item0="55" item1="69" meta:length="2"
+ meta:name="stable1Y" />
+ <array item0="55" item1="69" meta:length="2"
+ meta:name="stable2X" />
+ <array item0="0" item1="14" meta:length="2"
+ meta:name="stable2Y" />
+
+
+
+ <array item0="29" item1="29" item2="29" item3="29"
+ item4="29" item5="29" item6="29" item7="29" item8="29" item9="29"
+ item10="29" item11="15" item12="15" item13="15" item14="15"
+ item15="15" item16="15" item17="15" item18="15" item19="15"
+ item20="15" item21="15" item22="15" item23="15" item24="15"
+ item25="15" item26="54" item27="54" item28="54" item29="54"
+ item30="54" item31="54" item32="54" item33="54" item34="54"
+ item35="54" item36="54" item37="54" item38="54" item39="54"
+ item40="54" item41="40" item42="40" item43="40" item44="40"
+ item45="40" item46="40" item47="40" item48="40" item49="40"
+ item50="40" item51="40" item52="29" item53="29" item54="29"
+ item55="29" item56="29" item57="29" item58="29" item59="29"
+ item60="29" item61="29" item62="29" item63="40" item64="40"
+ item65="40" item66="40" item67="40" item68="40" item69="40"
+ item70="40" item71="40" item72="40" item73="40" item74="49"
+ item75="48" item76="47" item77="46" item78="45" item79="44"
+ item80="43" item81="42" item82="41" item83="54" item89="53"
+ item90="52" item91="51" item92="50" item84="69" item85="68"
+ item86="67" item87="66" item88="65" item93="20" item94="21"
+ item95="22" item96="23" item97="24" item98="25" item99="26"
+ item100="27" item101="28" item102="15" item103="16" item104="17"
+ item105="18" item106="19" item107="0" item108="1" item109="2"
+ item110="3" item111="4" item112="4" item113="4" item114="4"
+ item115="3" item116="3" item117="2" item118="2" item119="1"
+ item120="1" item121="0" item122="0" item123="0" item124="1"
+ item125="2" item126="3" item127="65" item128="65" item129="65"
+ item130="66" item131="66" item132="67" item133="67" item134="68"
+ item135="68" item136="69" item137="69" item138="69" item139="68"
+ item140="67" item141="66" item142="15" item143="16" item144="17"
+ item145="18" item146="19" item147="20" item148="21" item149="22"
+ item150="23" item151="24" item152="25" item153="26" item154="27"
+ item155="28" item156="29" item157="22" item158="22" item159="22"
+ item160="22" item161="22" item162="22" item163="22" item164="22"
+ item165="22" item166="22" item167="54" item168="53" item169="52"
+ item170="51" item171="50" item172="49" item173="48" item174="47"
+ item175="46" item176="45" item177="44" item178="43" item179="42"
+ item180="41" item181="40" item182="47" item183="47" item184="47"
+ item185="47" item186="47" item187="47" item188="47" item189="47"
+ item190="47" item191="47" item192="0" item193="1" item194="2"
+ item195="3" item196="69" item197="68" item198="67" item199="66"
+ meta:length="200" meta:name="obstaclePositionX" />
+
+
+ <array item0="20" item1="21" item2="22" item3="23"
+ item4="24" item5="25" item6="26" item7="27" item8="28" item9="29"
+ item10="30" item11="55" item12="56" item13="57" item14="58"
+ item15="59" item16="60" item17="61" item18="62" item19="63"
+ item20="64" item21="65" item22="66" item23="67" item24="68"
+ item25="69" item26="0" item27="1" item28="2" item29="3" item30="4"
+ item31="5" item32="6" item33="7" item34="8" item35="9" item36="10"
+ item37="11" item38="12" item39="13" item40="14" item41="20"
+ item42="21" item43="22" item44="23" item45="24" item46="25"
+ item47="26" item48="27" item49="28" item50="29" item51="30"
+ item52="40" item53="41" item54="42" item55="43" item56="44"
+ item57="45" item58="46" item59="47" item60="48" item61="49"
+ item62="50" item63="40" item64="41" item65="42" item66="43"
+ item67="44" item68="45" item69="46" item70="47" item71="48"
+ item72="49" item73="50" item74="50" item75="50" item76="50"
+ item77="50" item78="50" item79="50" item80="50" item81="50"
+ item82="50" item83="50" item89="50" item90="50" item91="50"
+ item92="50" item84="50" item85="50" item86="50" item87="50"
+ item88="50" item93="20" item94="20" item95="20" item96="20"
+ item97="20" item98="20" item99="20" item100="20" item101="20"
+ item102="20" item103="20" item104="20" item105="20" item106="20"
+ item107="20" item108="20" item109="20" item110="20" item111="20"
+ item112="40" item113="41" item114="42" item115="43" item116="44"
+ item117="45" item118="46" item119="47" item120="48" item121="49"
+ item122="50" item123="40" item124="40" item125="40" item126="40"
+ item127="29" item128="28" item129="27" item130="26" item131="25"
+ item132="24" item133="23" item134="22" item135="21" item136="20"
+ item137="19" item138="29" item139="29" item140="29" item141="29"
+ item142="10" item143="10" item144="10" item145="10" item146="10"
+ item147="10" item148="10" item149="10" item150="10" item151="10"
+ item152="10" item153="10" item154="10" item155="10" item156="10"
+ item157="9" item158="8" item159="7" item160="6" item161="5"
+ item162="4" item163="3" item164="2" item165="1" item166="0"
+ item167="59" item168="59" item169="59" item170="59" item171="59"
+ item172="59" item173="59" item174="59" item175="59" item176="59"
+ item177="59" item178="59" item179="59" item180="59" item181="59"
+ item182="60" item183="61" item184="62" item185="63" item186="64"
+ item187="65" item188="66" item189="67" item190="68" item191="69"
+ item192="48" item193="46" item194="44" item195="42" item196="21"
+ item197="23" item198="25" item199="27" meta:length="200"
+ meta:name="obstaclePositionY" />
+
+
+
+ </configuration>
+
+ <agents>
+ <agent
+ agentclass="massim.simulation.GridSimulationAgent"
+ agentcreationclass="massim.simulation.GridSimulationAgentParameter"
+ team="blue">
+ <configuration />
+ </agent>
+ <agent
+ agentclass="massim.simulation.GridSimulationAgent"
+ agentcreationclass="massim.simulation.GridSimulationAgentParameter"
+ team="blue">
+ <configuration />
+ </agent>
+ <agent
+ agentclass="massim.simulation.GridSimulationAgent"
+ agentcreationclass="massim.simulation.GridSimulationAgentParameter"
+ team="blue">
+ <configuration />
+ </agent>
+ <agent
+ agentclass="massim.simulation.GridSimulationAgent"
+ agentcreationclass="massim.simulation.GridSimulationAgentParameter"
+ team="blue">
+ <configuration />
+ </agent>
+ <agent
+ agentclass="massim.simulation.GridSimulationAgent"
+ agentcreationclass="massim.simulation.GridSimulationAgentParameter"
+ team="blue">
+ <configuration />
+ </agent>
+ <agent
+ agentclass="massim.simulation.GridSimulationAgent"
+ agentcreationclass="massim.simulation.GridSimulationAgentParameter"
+ team="blue">
+ <configuration />
+ </agent>
+ <agent
+ agentclass="massim.simulation.GridSimulationAgent"
+ agentcreationclass="massim.simulation.GridSimulationAgentParameter"
+ team="red">
+ <configuration />
+ </agent>
+ <agent
+ agentclass="massim.simulation.GridSimulationAgent"
+ agentcreationclass="massim.simulation.GridSimulationAgentParameter"
+ team="red">
+ <configuration />
+ </agent>
+ <agent
+ agentclass="massim.simulation.GridSimulationAgent"
+ agentcreationclass="massim.simulation.GridSimulationAgentParameter"
+ team="red">
+ <configuration />
+ </agent>
+ <agent
+ agentclass="massim.simulation.GridSimulationAgent"
+ agentcreationclass="massim.simulation.GridSimulationAgentParameter"
+ team="red">
+ <configuration />
+ </agent>
+ <agent
+ agentclass="massim.simulation.GridSimulationAgent"
+ agentcreationclass="massim.simulation.GridSimulationAgentParameter"
+ team="red">
+ <configuration />
+ </agent>
+ <agent
+ agentclass="massim.simulation.GridSimulationAgent"
+ agentcreationclass="massim.simulation.GridSimulationAgentParameter"
+ team="red">
+ <configuration />
+ </agent>
+ </agents>
+ </simulation>
+
+ </match>
+
+ <accounts>
+ <actionclassmap name="Grid">
+ <actionclass id="action"
+ class="massim.simulation.GridSimulationAgentAction" />
+ <actionclass id="invalid" class="massim.InvalidAction" />
+ </actionclassmap>
+
+ <account actionclassmap="Grid"
+ defaultactionclass="massim.simulation.GridSimulationAgentAction"
+ timeout="8000" auxtimeout="500" maxpacketlength="65536"
+ username="botagent1" password="1" team="bot" />
+ <account actionclassmap="Grid"
+ defaultactionclass="massim.simulation.GridSimulationAgentAction"
+ timeout="8000" auxtimeout="500" maxpacketlength="65536"
+ username="botagent2" password="2" team="bot" />
+ <account actionclassmap="Grid"
+ defaultactionclass="massim.simulation.GridSimulationAgentAction"
+ timeout="8000" auxtimeout="500" maxpacketlength="65536"
+ username="botagent3" password="3" team="bot" />
+ <account actionclassmap="Grid"
+ defaultactionclass="massim.simulation.GridSimulationAgentAction"
+ timeout="8000" auxtimeout="500" maxpacketlength="65536"
+ username="botagent4" password="4" team="bot" />
+ <account actionclassmap="Grid"
+ defaultactionclass="massim.simulation.GridSimulationAgentAction"
+ timeout="8000" auxtimeout="500" maxpacketlength="65536"
+ username="botagent5" password="5" team="bot" />
+ <account actionclassmap="Grid"
+ defaultactionclass="massim.simulation.GridSimulationAgentAction"
+ timeout="8000" auxtimeout="500" maxpacketlength="65536"
+ username="botagent6" password="6" team="bot" />
+
+ <account actionclassmap="Grid"
+ defaultactionclass="massim.simulation.GridSimulationAgentAction"
+ timeout="8000" auxtimeout="500" maxpacketlength="65536"
+ username="participant1" password="1" team="participant" />
+ <account actionclassmap="Grid"
+ defaultactionclass="massim.simulation.GridSimulationAgentAction"
+ timeout="8000" auxtimeout="500" maxpacketlength="65536"
+ username="participant2" password="2" team="participant" />
+ <account actionclassmap="Grid"
+ defaultactionclass="massim.simulation.GridSimulationAgentAction"
+ timeout="8000" auxtimeout="500" maxpacketlength="65536"
+ username="participant3" password="3" team="participant" />
+ <account actionclassmap="Grid"
+ defaultactionclass="massim.simulation.GridSimulationAgentAction"
+ timeout="8000" auxtimeout="500" maxpacketlength="65536"
+ username="participant4" password="4" team="participant" />
+ <account actionclassmap="Grid"
+ defaultactionclass="massim.simulation.GridSimulationAgentAction"
+ timeout="8000" auxtimeout="500" maxpacketlength="65536"
+ username="participant5" password="5" team="participant" />
+ <account actionclassmap="Grid"
+ defaultactionclass="massim.simulation.GridSimulationAgentAction"
+ timeout="8000" auxtimeout="500" maxpacketlength="65536"
+ username="participant6" password="6" team="participant" />
+
+ </accounts>
+</conf>
Deleted: trunk/applications/jason-team/massim-server/startServer.sh
===================================================================
--- trunk/applications/jason-team/massim-server/startServer.sh 2008-04-24 14:33:43 UTC (rev 1248)
+++ trunk/applications/jason-team/massim-server/startServer.sh 2008-04-24 15:06:43 UTC (rev 1249)
@@ -1,31 +0,0 @@
-###############################################################
-#!/bin/sh #
-###############################################################
-# Multi-Agent Programming Contest 2008 #
-# #
-# Support package massim-Server #
-# This script runs the massim server locally with the #
-# default parameters. It also runs at first the rmiregistry #
-# where the server and clients (servermonitor,webinterface) #
-# must connect to. #
-# #
-# For the details on the contest, check the Contest website: #
-# http://cig.in.tu-clausthal.de/agentcontest2008/ #
-# #
-# Organizers: #
-# J. Dix, M. Dastani, P. Novak, T.M. Behrens #
-###############################################################
-
-name=localhost
-
-clear
-
-echo "Launching RMI Registry"
-rmiregistry 1099 &
-sleep 1
-
-echo "Launching Server"
-java -Djava.rmi.server.hostname=$name -jar lib/massimserver.jar --conf conf/serverconfig.xml
-
-echo "Killall RMI Registry"
-killall rmiregistry -w
\ No newline at end of file
Added: trunk/applications/jason-team/massim-server/startServerTest.sh
===================================================================
--- trunk/applications/jason-team/massim-server/startServerTest.sh (rev 0)
+++ trunk/applications/jason-team/massim-server/startServerTest.sh 2008-04-24 15:06:43 UTC (rev 1249)
@@ -0,0 +1,31 @@
+###############################################################
+#!/bin/sh #
+###############################################################
+# Multi-Agent Programming Contest 2008 #
+# #
+# Support package massim-Server #
+# This script runs the massim server locally with the #
+# default parameters. It also runs at first the rmiregistry #
+# where the server and clients (servermonitor,webinterface) #
+# must connect to. #
+# #
+# For the details on the contest, check the Contest website: #
+# http://cig.in.tu-clausthal.de/agentcontest2008/ #
+# #
+# Organizers: #
+# J. Dix, M. Dastani, P. Novak, T.M. Behrens #
+###############################################################
+
+name=localhost
+
+clear
+
+echo "Launching RMI Registry"
+rmiregistry 1099 &
+sleep 1
+
+echo "Launching Server"
+java -Djava.rmi.server.hostname=$name -jar lib/massimserver.jar --conf $1
+
+echo "Killall RMI Registry"
+killall rmiregistry -w
\ No newline at end of file
Property changes on: trunk/applications/jason-team/massim-server/startServerTest.sh
___________________________________________________________________
Name: svn:executable
+ *
Deleted: trunk/applications/jason-team/massim-server/startServer_test01.sh
===================================================================
--- trunk/applications/jason-team/massim-server/startServer_test01.sh 2008-04-24 14:33:43 UTC (rev 1248)
+++ trunk/applications/jason-team/massim-server/startServer_test01.sh 2008-04-24 15:06:43 UTC (rev 1249)
@@ -1,31 +0,0 @@
-###############################################################
-#!/bin/sh #
-###############################################################
-# Multi-Agent Programming Contest 2008 #
-# #
-# Support package massim-Server #
-# This script runs the massim server locally with the #
-# default parameters. It also runs at first the rmiregistry #
-# where the server and clients (servermonitor,webinterface) #
-# must connect to. #
-# #
-# For the details on the contest, check the Contest website: #
-# http://cig.in.tu-clausthal.de/agentcontest2008/ #
-# #
-# Organizers: #
-# J. Dix, M. Dastani, P. Novak, T.M. Behrens #
-###############################################################
-
-name=localhost
-
-clear
-
-echo "Launching RMI Registry"
-rmiregistry 1099 &
-sleep 1
-
-echo "Launching Server"
-java -Djava.rmi.server.hostname=$name -jar lib/massimserver.jar --conf conf/serverconfig_test01.xml
-
-echo "Killall RMI Registry"
-killall rmiregistry -w
\ No newline at end of file
Deleted: trunk/applications/jason-team/massim-server/startServer_test02.sh
===================================================================
--- trunk/applications/jason-team/massim-server/startServer_test02.sh 2008-04-24 14:33:43 UTC (rev 1248)
+++ trunk/applications/jason-team/massim-server/startServer_test02.sh 2008-04-24 15:06:43 UTC (rev 1249)
@@ -1,31 +0,0 @@
-###############################################################
-#!/bin/sh #
-###############################################################
-# Multi-Agent Programming Contest 2008 #
-# #
-# Support package massim-Server #
-# This script runs the massim server locally with the #
-# default parameters. It also runs at first the rmiregistry #
-# where the server and clients (servermonitor,webinterface) #
-# must connect to. #
-# #
-# For the details on the contest, check the Contest website: #
-# http://cig.in.tu-clausthal.de/agentcontest2008/ #
-# #
-# Organizers: #
-# J. Dix, M. Dastani, P. Novak, T.M. Behrens #
-###############################################################
-
-name=localhost
-
-clear
-
-echo "Launching RMI Registry"
-rmiregistry 1099 &
-sleep 1
-
-echo "Launching Server"
-java -Djava.rmi.server.hostname=$name -jar lib/massimserver.jar --conf conf/serverconfig_test02.xml
-
-echo "Killall RMI Registry"
-killall rmiregistry -w
\ No newline at end of file
Deleted: trunk/applications/jason-team/massim-server/startServer_test03.sh
===================================================================
--- trunk/applications/jason-team/massim-server/startServer_test03.sh 2008-04-24 14:33:43 UTC (rev 1248)
+++ trunk/applications/jason-team/massim-server/startServer_test03.sh 2008-04-24 15:06:43 UTC (rev 1249)
@@ -1,31 +0,0 @@
-###############################################################
-#!/bin/sh #
-###############################################################
-# Multi-Agent Programming Contest 2008 #
-# #
-# Support package massim-Server #
-# This script runs the massim server locally with the #
-# default parameters. It also runs at first the rmiregistry #
-# where the server and clients (servermonitor,webinterface) #
-# must connect to. #
-# #
-# For the details on the contest, check the Contest website: #
-# http://cig.in.tu-clausthal.de/agentcontest2008/ #
-# #
-# Organizers: #
-# J. Dix, M. Dastani, P. Novak, T.M. Behrens #
-###############################################################
-
-name=localhost
-
-clear
-
-echo "Launching RMI Registry"
-rmiregistry 1099 &
-sleep 1
-
-echo "Launching Server"
-java -Djava.rmi.server.hostname=$name -jar lib/massimserver.jar --conf conf/serverconfig_test03.xml
-
-echo "Killall RMI Registry"
-killall rmiregistry -w
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ga...@us...> - 2008-04-24 14:33:55
|
Revision: 1248
http://jason.svn.sourceforge.net/jason/?rev=1248&view=rev
Author: gauth
Date: 2008-04-24 07:33:43 -0700 (Thu, 24 Apr 2008)
Log Message:
-----------
Added some configurations for testing behaviours.
To launch test XX :
./startServer_testXX.sh
Added Paths:
-----------
trunk/applications/jason-team/massim-server/conf/serverconfig_test01.xml
trunk/applications/jason-team/massim-server/conf/serverconfig_test02.xml
trunk/applications/jason-team/massim-server/conf/serverconfig_test03.xml
trunk/applications/jason-team/massim-server/startServer_test01.sh
trunk/applications/jason-team/massim-server/startServer_test02.sh
trunk/applications/jason-team/massim-server/startServer_test03.sh
Added: trunk/applications/jason-team/massim-server/conf/serverconfig_test01.xml
===================================================================
--- trunk/applications/jason-team/massim-server/conf/serverconfig_test01.xml (rev 0)
+++ trunk/applications/jason-team/massim-server/conf/serverconfig_test01.xml 2008-04-24 14:33:43 UTC (rev 1248)
@@ -0,0 +1,292 @@
+<?xml version="1.0" encoding="utf-8"?>
+<conf tournamentname="GridSimulation" tournamentmode="0"
+ launch-sync-type="key" time-to-launch="10000" reportpath="."
+ backuppath="backup">
+ <network-agent port="12300" backlog="10" />
+ <match>
+ <simulation id="Test 01"
+ simulationclass="massim.simulation.GridSimulation"
+ configurationclass="massim.simulation.GridSimulationConfigurationHandCrafted"
+ rmiobserver="massim.simulation.GridSimulationRMIObserver"
+ xmlobserver="massim.simulation.GridSimulationXMLObserver"
+ rmixmlobserver="massim.simulation.GridSimulationRMIXMLDocumentObserver"
+ xmlobserverpath="."
+ xmlstatisticsobserver="massim.simulation.GridSimulationXMLStatisticsObserver"
+ file-simulationlog="./log" visualisationobserver="">
+
+
+ <!-- visualisationobserver="massim.simulation.GridSimulationVisualizationObserver" -->
+
+ <configuration xmlns:meta="http://www.tu-clausthal.de/"
+ sizex="70" sizey="70" maxNumberOfSteps="700" numberOfAgents="12"
+ numberOfObstacles="200" numberOfCows="30" cowSpeed="1"
+ agentSpeed="1" lineOfSight="17" fearRange="4" attractionRange="5"
+ cowWeight="5" agentWeight="-200" emptyWeight="1" obstacleWeight="-1"
+ htaccess="1">
+
+ <array item0="35" item1="35" item2="50" item3="50"
+ item4="20" item5="20" item6="35" item7="35" item8="35" item9="35"
+ item10="35" item11="35" meta:length="12"
+ meta:name="agentPositionY" />
+ <array item0="6" item1="8" item2="44" item3="46"
+ item4="44" item5="46" item6="63" item7="61" item8="59" item9="57"
+ item10="55" item11="53" meta:length="12"
+ meta:name="agentPositionX" />
+
+
+ <array item0="25" item1="28" item2="22" item3="21"
+ item4="26" item5="25" item6="27" item7="22" item8="24" item9="23"
+ item10="15" item11="18" item12="12" item13="11" item14="16"
+ item15="15" item16="17" item17="12" item18="14" item19="13"
+ item20="57" item21="58" item22="53" item23="63" item24="58"
+ item25="61" item26="55" item27="56" item28="52" item29="54"
+ meta:length="30"
+ meta:name="cowPositionY" />
+
+
+ <array item0="12" item1="13" item2="14" item3="15"
+ item4="16" item5="17" item6="18" item7="19" item8="11" item9="15"
+ item10="47" item11="48" item12="49" item13="50" item14="51"
+ item15="52" item16="53" item17="54" item18="46" item19="50"
+ item20="50" item21="47" item22="48" item23="51" item24="52"
+ item25="49" item26="50" item27="52" item28="45" item29="53"
+ meta:length="30"
+ meta:name="cowPositionX" />
+
+ <array item0="0" item1="14" meta:length="2"
+ meta:name="stable1X" />
+ <array item0="55" item1="69" meta:length="2"
+ meta:name="stable1Y" />
+ <array item0="55" item1="69" meta:length="2"
+ meta:name="stable2X" />
+ <array item0="0" item1="14" meta:length="2"
+ meta:name="stable2Y" />
+
+
+
+ <array item0="29" item1="29" item2="29" item3="29"
+ item4="29" item5="29" item6="29" item7="29" item8="29" item9="29"
+ item10="29" item11="15" item12="15" item13="15" item14="15"
+ item15="15" item16="15" item17="15" item18="15" item19="15"
+ item20="15" item21="15" item22="15" item23="15" item24="15"
+ item25="15" item26="54" item27="54" item28="54" item29="54"
+ item30="54" item31="54" item32="54" item33="54" item34="54"
+ item35="54" item36="54" item37="54" item38="54" item39="54"
+ item40="54" item41="40" item42="40" item43="40" item44="40"
+ item45="40" item46="40" item47="40" item48="40" item49="40"
+ item50="40" item51="40" item52="29" item53="29" item54="29"
+ item55="29" item56="29" item57="29" item58="29" item59="29"
+ item60="29" item61="29" item62="29" item63="40" item64="40"
+ item65="40" item66="40" item67="40" item68="40" item69="40"
+ item70="40" item71="40" item72="40" item73="40" item74="49"
+ item75="48" item76="47" item77="46" item78="45" item79="44"
+ item80="43" item81="42" item82="41" item83="54" item89="53"
+ item90="52" item91="51" item92="50" item84="69" item85="68"
+ item86="67" item87="66" item88="65" item93="20" item94="21"
+ item95="22" item96="23" item97="24" item98="25" item99="26"
+ item100="27" item101="28" item102="15" item103="16" item104="17"
+ item105="18" item106="19" item107="0" item108="1" item109="2"
+ item110="3" item111="4" item112="4" item113="4" item114="4"
+ item115="3" item116="3" item117="2" item118="2" item119="1"
+ item120="1" item121="0" item122="0" item123="0" item124="1"
+ item125="2" item126="3" item127="65" item128="65" item129="65"
+ item130="66" item131="66" item132="67" item133="67" item134="68"
+ item135="68" item136="69" item137="69" item138="69" item139="68"
+ item140="67" item141="66" item142="15" item143="16" item144="17"
+ item145="18" item146="19" item147="20" item148="21" item149="22"
+ item150="23" item151="24" item152="25" item153="26" item154="27"
+ item155="28" item156="29" item157="22" item158="22" item159="22"
+ item160="22" item161="22" item162="22" item163="22" item164="22"
+ item165="22" item166="22" item167="54" item168="53" item169="52"
+ item170="51" item171="50" item172="49" item173="48" item174="47"
+ item175="46" item176="45" item177="44" item178="43" item179="42"
+ item180="41" item181="40" item182="47" item183="47" item184="47"
+ item185="47" item186="47" item187="47" item188="47" item189="47"
+ item190="47" item191="47" item192="0" item193="1" item194="2"
+ item195="3" item196="69" item197="68" item198="67" item199="66"
+ meta:length="200" meta:name="obstaclePositionX" />
+
+
+ <array item0="20" item1="21" item2="22" item3="23"
+ item4="24" item5="25" item6="26" item7="27" item8="28" item9="29"
+ item10="30" item11="55" item12="56" item13="57" item14="58"
+ item15="59" item16="60" item17="61" item18="62" item19="63"
+ item20="64" item21="65" item22="66" item23="67" item24="68"
+ item25="69" item26="0" item27="1" item28="2" item29="3" item30="4"
+ item31="5" item32="6" item33="7" item34="8" item35="9" item36="10"
+ item37="11" item38="12" item39="13" item40="14" item41="20"
+ item42="21" item43="22" item44="23" item45="24" item46="25"
+ item47="26" item48="27" item49="28" item50="29" item51="30"
+ item52="40" item53="41" item54="42" item55="43" item56="44"
+ item57="45" item58="46" item59="47" item60="48" item61="49"
+ item62="50" item63="40" item64="41" item65="42" item66="43"
+ item67="44" item68="45" item69="46" item70="47" item71="48"
+ item72="49" item73="50" item74="50" item75="50" item76="50"
+ item77="50" item78="50" item79="50" item80="50" item81="50"
+ item82="50" item83="50" item89="50" item90="50" item91="50"
+ item92="50" item84="50" item85="50" item86="50" item87="50"
+ item88="50" item93="20" item94="20" item95="20" item96="20"
+ item97="20" item98="20" item99="20" item100="20" item101="20"
+ item102="20" item103="20" item104="20" item105="20" item106="20"
+ item107="20" item108="20" item109="20" item110="20" item111="20"
+ item112="40" item113="41" item114="42" item115="43" item116="44"
+ item117="45" item118="46" item119="47" item120="48" item121="49"
+ item122="50" item123="40" item124="40" item125="40" item126="40"
+ item127="29" item128="28" item129="27" item130="26" item131="25"
+ item132="24" item133="23" item134="22" item135="21" item136="20"
+ item137="19" item138="29" item139="29" item140="29" item141="29"
+ item142="10" item143="10" item144="10" item145="10" item146="10"
+ item147="10" item148="10" item149="10" item150="10" item151="10"
+ item152="10" item153="10" item154="10" item155="10" item156="10"
+ item157="9" item158="8" item159="7" item160="6" item161="5"
+ item162="4" item163="3" item164="2" item165="1" item166="0"
+ item167="59" item168="59" item169="59" item170="59" item171="59"
+ item172="59" item173="59" item174="59" item175="59" item176="59"
+ item177="59" item178="59" item179="59" item180="59" item181="59"
+ item182="60" item183="61" item184="62" item185="63" item186="64"
+ item187="65" item188="66" item189="67" item190="68" item191="69"
+ item192="48" item193="46" item194="44" item195="42" item196="21"
+ item197="23" item198="25" item199="27" meta:length="200"
+ meta:name="obstaclePositionY" />
+
+
+
+ </configuration>
+
+ <agents>
+ <agent
+ agentclass="massim.simulation.GridSimulationAgent"
+ agentcreationclass="massim.simulation.GridSimulationAgentParameter"
+ team="blue">
+ <configuration />
+ </agent>
+ <agent
+ agentclass="massim.simulation.GridSimulationAgent"
+ agentcreationclass="massim.simulation.GridSimulationAgentParameter"
+ team="blue">
+ <configuration />
+ </agent>
+ <agent
+ agentclass="massim.simulation.GridSimulationAgent"
+ agentcreationclass="massim.simulation.GridSimulationAgentParameter"
+ team="blue">
+ <configuration />
+ </agent>
+ <agent
+ agentclass="massim.simulation.GridSimulationAgent"
+ agentcreationclass="massim.simulation.GridSimulationAgentParameter"
+ team="blue">
+ <configuration />
+ </agent>
+ <agent
+ agentclass="massim.simulation.GridSimulationAgent"
+ agentcreationclass="massim.simulation.GridSimulationAgentParameter"
+ team="blue">
+ <configuration />
+ </agent>
+ <agent
+ agentclass="massim.simulation.GridSimulationAgent"
+ agentcreationclass="massim.simulation.GridSimulationAgentParameter"
+ team="blue">
+ <configuration />
+ </agent>
+ <agent
+ agentclass="massim.simulation.GridSimulationAgent"
+ agentcreationclass="massim.simulation.GridSimulationAgentParameter"
+ team="red">
+ <configuration />
+ </agent>
+ <agent
+ agentclass="massim.simulation.GridSimulationAgent"
+ agentcreationclass="massim.simulation.GridSimulationAgentParameter"
+ team="red">
+ <configuration />
+ </agent>
+ <agent
+ agentclass="massim.simulation.GridSimulationAgent"
+ agentcreationclass="massim.simulation.GridSimulationAgentParameter"
+ team="red">
+ <configuration />
+ </agent>
+ <agent
+ agentclass="massim.simulation.GridSimulationAgent"
+ agentcreationclass="massim.simulation.GridSimulationAgentParameter"
+ team="red">
+ <configuration />
+ </agent>
+ <agent
+ agentclass="massim.simulation.GridSimulationAgent"
+ agentcreationclass="massim.simulation.GridSimulationAgentParameter"
+ team="red">
+ <configuration />
+ </agent>
+ <agent
+ agentclass="massim.simulation.GridSimulationAgent"
+ agentcreationclass="massim.simulation.GridSimulationAgentParameter"
+ team="red">
+ <configuration />
+ </agent>
+ </agents>
+ </simulation>
+
+ </match>
+
+ <accounts>
+ <actionclassmap name="Grid">
+ <actionclass id="action"
+ class="massim.simulation.GridSimulationAgentAction" />
+ <actionclass id="invalid" class="massim.InvalidAction" />
+ </actionclassmap>
+
+ <account actionclassmap="Grid"
+ defaultactionclass="massim.simulation.GridSimulationAgentAction"
+ timeout="8000" auxtimeout="500" maxpacketlength="65536"
+ username="botagent1" password="1" team="bot" />
+ <account actionclassmap="Grid"
+ defaultactionclass="massim.simulation.GridSimulationAgentAction"
+ timeout="8000" auxtimeout="500" maxpacketlength="65536"
+ username="botagent2" password="2" team="bot" />
+ <account actionclassmap="Grid"
+ defaultactionclass="massim.simulation.GridSimulationAgentAction"
+ timeout="8000" auxtimeout="500" maxpacketlength="65536"
+ username="botagent3" password="3" team="bot" />
+ <account actionclassmap="Grid"
+ defaultactionclass="massim.simulation.GridSimulationAgentAction"
+ timeout="8000" auxtimeout="500" maxpacketlength="65536"
+ username="botagent4" password="4" team="bot" />
+ <account actionclassmap="Grid"
+ defaultactionclass="massim.simulation.GridSimulationAgentAction"
+ timeout="8000" auxtimeout="500" maxpacketlength="65536"
+ username="botagent5" password="5" team="bot" />
+ <account actionclassmap="Grid"
+ defaultactionclass="massim.simulation.GridSimulationAgentAction"
+ timeout="8000" auxtimeout="500" maxpacketlength="65536"
+ username="botagent6" password="6" team="bot" />
+
+ <account actionclassmap="Grid"
+ defaultactionclass="massim.simulation.GridSimulationAgentAction"
+ timeout="8000" auxtimeout="500" maxpacketlength="65536"
+ username="participant1" password="1" team="participant" />
+ <account actionclassmap="Grid"
+ defaultactionclass="massim.simulation.GridSimulationAgentAction"
+ timeout="8000" auxtimeout="500" maxpacketlength="65536"
+ username="participant2" password="2" team="participant" />
+ <account actionclassmap="Grid"
+ defaultactionclass="massim.simulation.GridSimulationAgentAction"
+ timeout="8000" auxtimeout="500" maxpacketlength="65536"
+ username="participant3" password="3" team="participant" />
+ <account actionclassmap="Grid"
+ defaultactionclass="massim.simulation.GridSimulationAgentAction"
+ timeout="8000" auxtimeout="500" maxpacketlength="65536"
+ username="participant4" password="4" team="participant" />
+ <account actionclassmap="Grid"
+ defaultactionclass="massim.simulation.GridSimulationAgentAction"
+ timeout="8000" auxtimeout="500" maxpacketlength="65536"
+ username="participant5" password="5" team="participant" />
+ <account actionclassmap="Grid"
+ defaultactionclass="massim.simulation.GridSimulationAgentAction"
+ timeout="8000" auxtimeout="500" maxpacketlength="65536"
+ username="participant6" password="6" team="participant" />
+
+ </accounts>
+</conf>
Added: trunk/applications/jason-team/massim-server/conf/serverconfig_test02.xml
===================================================================
--- trunk/applications/jason-team/massim-server/conf/serverconfig_test02.xml (rev 0)
+++ trunk/applications/jason-team/massim-server/conf/serverconfig_test02.xml 2008-04-24 14:33:43 UTC (rev 1248)
@@ -0,0 +1,213 @@
+<?xml version="1.0" encoding="utf-8"?>
+<conf tournamentname="GridSimulation" tournamentmode="0"
+ launch-sync-type="key" time-to-launch="10000" reportpath="."
+ backuppath="backup">
+ <network-agent port="12300" backlog="10" />
+ <match>
+ <simulation id="Test 02"
+ simulationclass="massim.simulation.GridSimulation"
+ configurationclass="massim.simulation.GridSimulationConfigurationHandCrafted"
+ rmiobserver="massim.simulation.GridSimulationRMIObserver"
+ xmlobserver="massim.simulation.GridSimulationXMLObserver"
+ rmixmlobserver="massim.simulation.GridSimulationRMIXMLDocumentObserver"
+ xmlobserverpath="."
+ xmlstatisticsobserver="massim.simulation.GridSimulationXMLStatisticsObserver"
+ file-simulationlog="./log" visualisationobserver="">
+
+
+ <!-- visualisationobserver="massim.simulation.GridSimulationVisualizationObserver" -->
+
+ <configuration xmlns:meta="http://www.tu-clausthal.de/"
+ sizex="70" sizey="70" maxNumberOfSteps="700" numberOfAgents="12"
+ numberOfObstacles="0" numberOfCows="30" cowSpeed="1"
+ agentSpeed="1" lineOfSight="17" fearRange="4" attractionRange="5"
+ cowWeight="5" agentWeight="-200" emptyWeight="1" obstacleWeight="-1"
+ htaccess="1">
+
+ <array item0="35" item1="35" item2="50" item3="50"
+ item4="20" item5="20" item6="1" item7="1" item8="2" item9="2"
+ item10="3" item11="3" meta:length="12"
+ meta:name="agentPositionY" />
+ <array item0="6" item1="8" item2="44" item3="46"
+ item4="44" item5="46" item6="69" item7="68" item8="69" item9="68"
+ item10="69" item11="68" meta:length="12"
+ meta:name="agentPositionX" />
+
+
+ <array item0="25" item1="28" item2="22" item3="21"
+ item4="26" item5="25" item6="27" item7="22" item8="24" item9="23"
+ item10="15" item11="18" item12="12" item13="11" item14="16"
+ item15="15" item16="17" item17="12" item18="14" item19="13"
+ item20="57" item21="58" item22="53" item23="63" item24="58"
+ item25="61" item26="55" item27="56" item28="52" item29="54"
+ meta:length="30"
+ meta:name="cowPositionY" />
+
+
+ <array item0="12" item1="13" item2="14" item3="15"
+ item4="16" item5="17" item6="18" item7="19" item8="11" item9="15"
+ item10="47" item11="48" item12="49" item13="50" item14="51"
+ item15="52" item16="53" item17="54" item18="46" item19="50"
+ item20="50" item21="47" item22="48" item23="51" item24="52"
+ item25="49" item26="50" item27="52" item28="45" item29="53"
+ meta:length="30"
+ meta:name="cowPositionX" />
+
+ <array item0="0" item1="14" meta:length="2"
+ meta:name="stable1X" />
+ <array item0="55" item1="69" meta:length="2"
+ meta:name="stable1Y" />
+ <array item0="55" item1="69" meta:length="2"
+ meta:name="stable2X" />
+ <array item0="0" item1="14" meta:length="2"
+ meta:name="stable2Y" />
+
+
+
+ <array meta:length="200" meta:name="obstaclePositionX" />
+
+
+ <array meta:length="200"
+ meta:name="obstaclePositionY" />
+
+
+
+ </configuration>
+
+ <agents>
+ <agent
+ agentclass="massim.simulation.GridSimulationAgent"
+ agentcreationclass="massim.simulation.GridSimulationAgentParameter"
+ team="blue">
+ <configuration />
+ </agent>
+ <agent
+ agentclass="massim.simulation.GridSimulationAgent"
+ agentcreationclass="massim.simulation.GridSimulationAgentParameter"
+ team="blue">
+ <configuration />
+ </agent>
+ <agent
+ agentclass="massim.simulation.GridSimulationAgent"
+ agentcreationclass="massim.simulation.GridSimulationAgentParameter"
+ team="blue">
+ <configuration />
+ </agent>
+ <agent
+ agentclass="massim.simulation.GridSimulationAgent"
+ agentcreationclass="massim.simulation.GridSimulationAgentParameter"
+ team="blue">
+ <configuration />
+ </agent>
+ <agent
+ agentclass="massim.simulation.GridSimulationAgent"
+ agentcreationclass="massim.simulation.GridSimulationAgentParameter"
+ team="blue">
+ <configuration />
+ </agent>
+ <agent
+ agentclass="massim.simulation.GridSimulationAgent"
+ agentcreationclass="massim.simulation.GridSimulationAgentParameter"
+ team="blue">
+ <configuration />
+ </agent>
+ <agent
+ agentclass="massim.simulation.GridSimulationAgent"
+ agentcreationclass="massim.simulation.GridSimulationAgentParameter"
+ team="red">
+ <configuration />
+ </agent>
+ <agent
+ agentclass="massim.simulation.GridSimulationAgent"
+ agentcreationclass="massim.simulation.GridSimulationAgentParameter"
+ team="red">
+ <configuration />
+ </agent>
+ <agent
+ agentclass="massim.simulation.GridSimulationAgent"
+ agentcreationclass="massim.simulation.GridSimulationAgentParameter"
+ team="red">
+ <configuration />
+ </agent>
+ <agent
+ agentclass="massim.simulation.GridSimulationAgent"
+ agentcreationclass="massim.simulation.GridSimulationAgentParameter"
+ team="red">
+ <configuration />
+ </agent>
+ <agent
+ agentclass="massim.simulation.GridSimulationAgent"
+ agentcreationclass="massim.simulation.GridSimulationAgentParameter"
+ team="red">
+ <configuration />
+ </agent>
+ <agent
+ agentclass="massim.simulation.GridSimulationAgent"
+ agentcreationclass="massim.simulation.GridSimulationAgentParameter"
+ team="red">
+ <configuration />
+ </agent>
+ </agents>
+ </simulation>
+
+ </match>
+
+ <accounts>
+ <actionclassmap name="Grid">
+ <actionclass id="action"
+ class="massim.simulation.GridSimulationAgentAction" />
+ <actionclass id="invalid" class="massim.InvalidAction" />
+ </actionclassmap>
+
+ <account actionclassmap="Grid"
+ defaultactionclass="massim.simulation.GridSimulationAgentAction"
+ timeout="8000" auxtimeout="500" maxpacketlength="65536"
+ username="botagent1" password="1" team="bot" />
+ <account actionclassmap="Grid"
+ defaultactionclass="massim.simulation.GridSimulationAgentAction"
+ timeout="8000" auxtimeout="500" maxpacketlength="65536"
+ username="botagent2" password="2" team="bot" />
+ <account actionclassmap="Grid"
+ defaultactionclass="massim.simulation.GridSimulationAgentAction"
+ timeout="8000" auxtimeout="500" maxpacketlength="65536"
+ username="botagent3" password="3" team="bot" />
+ <account actionclassmap="Grid"
+ defaultactionclass="massim.simulation.GridSimulationAgentAction"
+ timeout="8000" auxtimeout="500" maxpacketlength="65536"
+ username="botagent4" password="4" team="bot" />
+ <account actionclassmap="Grid"
+ defaultactionclass="massim.simulation.GridSimulationAgentAction"
+ timeout="8000" auxtimeout="500" maxpacketlength="65536"
+ username="botagent5" password="5" team="bot" />
+ <account actionclassmap="Grid"
+ defaultactionclass="massim.simulation.GridSimulationAgentAction"
+ timeout="8000" auxtimeout="500" maxpacketlength="65536"
+ username="botagent6" password="6" team="bot" />
+
+ <account actionclassmap="Grid"
+ defaultactionclass="massim.simulation.GridSimulationAgentAction"
+ timeout="8000" auxtimeout="500" maxpacketlength="65536"
+ username="participant1" password="1" team="participant" />
+ <account actionclassmap="Grid"
+ defaultactionclass="massim.simulation.GridSimulationAgentAction"
+ timeout="8000" auxtimeout="500" maxpacketlength="65536"
+ username="participant2" password="2" team="participant" />
+ <account actionclassmap="Grid"
+ defaultactionclass="massim.simulation.GridSimulationAgentAction"
+ timeout="8000" auxtimeout="500" maxpacketlength="65536"
+ username="participant3" password="3" team="participant" />
+ <account actionclassmap="Grid"
+ defaultactionclass="massim.simulation.GridSimulationAgentAction"
+ timeout="8000" auxtimeout="500" maxpacketlength="65536"
+ username="participant4" password="4" team="participant" />
+ <account actionclassmap="Grid"
+ defaultactionclass="massim.simulation.GridSimulationAgentAction"
+ timeout="8000" auxtimeout="500" maxpacketlength="65536"
+ username="participant5" password="5" team="participant" />
+ <account actionclassmap="Grid"
+ defaultactionclass="massim.simulation.GridSimulationAgentAction"
+ timeout="8000" auxtimeout="500" maxpacketlength="65536"
+ username="participant6" password="6" team="participant" />
+
+ </accounts>
+</conf>
Added: trunk/applications/jason-team/massim-server/conf/serverconfig_test03.xml
===================================================================
--- trunk/applications/jason-team/massim-server/conf/serverconfig_test03.xml (rev 0)
+++ trunk/applications/jason-team/massim-server/conf/serverconfig_test03.xml 2008-04-24 14:33:43 UTC (rev 1248)
@@ -0,0 +1,241 @@
+<?xml version="1.0" encoding="utf-8"?>
+<conf tournamentname="GridSimulation" tournamentmode="0"
+ launch-sync-type="key" time-to-launch="10000" reportpath="."
+ backuppath="backup">
+ <network-agent port="12300" backlog="10" />
+ <match>
+ <simulation id="Test 02"
+ simulationclass="massim.simulation.GridSimulation"
+ configurationclass="massim.simulation.GridSimulationConfigurationHandCrafted"
+ rmiobserver="massim.simulation.GridSimulationRMIObserver"
+ xmlobserver="massim.simulation.GridSimulationXMLObserver"
+ rmixmlobserver="massim.simulation.GridSimulationRMIXMLDocumentObserver"
+ xmlobserverpath="."
+ xmlstatisticsobserver="massim.simulation.GridSimulationXMLStatisticsObserver"
+ file-simulationlog="./log" visualisationobserver="">
+
+
+ <!-- visualisationobserver="massim.simulation.GridSimulationVisualizationObserver" -->
+
+ <configuration xmlns:meta="http://www.tu-clausthal.de/"
+ sizex="70" sizey="70" maxNumberOfSteps="700" numberOfAgents="12"
+ numberOfObstacles="0" numberOfCows="100" cowSpeed="1"
+ agentSpeed="1" lineOfSight="17" fearRange="4" attractionRange="5"
+ cowWeight="5" agentWeight="-200" emptyWeight="1" obstacleWeight="-1"
+ htaccess="1">
+
+ <array item0="35" item1="35" item2="50" item3="50"
+ item4="20" item5="20" item6="1" item7="1" item8="2" item9="2"
+ item10="3" item11="3" meta:length="12"
+ meta:name="agentPositionY" />
+ <array item0="6" item1="8" item2="44" item3="46"
+ item4="44" item5="46" item6="69" item7="68" item8="69" item9="68"
+ item10="69" item11="68" meta:length="12"
+ meta:name="agentPositionX" />
+
+
+ <array item0="10" item1="12" item2="14" item3="16"
+ item4="18" item5="20" item6="22" item7="24" item8="26" item9="28"
+ item10="10" item11="12" item12="14" item13="16"
+ item14="18" item15="20" item16="22" item17="24" item18="26" item19="28"
+ item20="10" item21="12" item22="14" item23="16"
+ item24="18" item25="20" item26="22" item27="24" item28="26" item29="28"
+ item30="10" item31="12" item32="14" item33="16"
+ item34="18" item35="20" item36="22" item37="24" item38="26" item39="28"
+ item40="10" item41="12" item42="14" item43="16"
+ item44="18" item45="20" item46="22" item47="24" item48="26" item49="28"
+ item50="10" item51="12" item52="14" item53="16"
+ item54="18" item55="20" item56="22" item57="24" item58="26" item59="28"
+ item60="10" item61="12" item62="14" item63="16"
+ item64="18" item65="20" item66="22" item67="24" item68="26" item69="28"
+ item70="10" item71="12" item72="14" item73="16"
+ item74="18" item75="20" item76="22" item77="24" item78="26" item79="28"
+ item80="10" item81="12" item82="14" item83="16"
+ item84="18" item85="20" item86="22" item87="24" item88="26" item89="28"
+ item90="10" item91="12" item92="14" item93="16"
+ item94="18" item95="20" item96="22" item97="24" item98="26" item99="28"
+ meta:length="100"
+ meta:name="cowPositionY" />
+
+
+ <array item0="24" item1="24" item2="24" item3="24"
+ item4="24" item5="24" item6="24" item7="24" item8="24" item9="24"
+ item10="26" item11="26" item12="26" item13="26"
+ item14="26" item15="26" item16="26" item17="26" item18="26" item19="26"
+ item20="28" item21="28" item22="28" item23="28"
+ item24="28" item25="28" item26="28" item27="28" item28="28" item29="28"
+ item30="30" item31="30" item32="30" item33="30"
+ item34="30" item35="30" item36="30" item37="30" item38="30" item39="30"
+ item40="32" item41="32" item42="32" item43="32"
+ item44="32" item45="32" item46="32" item47="32" item48="32" item49="32"
+ item50="34" item51="34" item52="34" item53="34"
+ item54="34" item55="34" item56="34" item57="34" item58="34" item59="34"
+ item60="36" item61="36" item62="36" item63="36"
+ item64="36" item65="36" item66="36" item67="36" item68="36" item69="36"
+ item70="38" item71="38" item72="38" item73="38"
+ item74="38" item75="38" item76="38" item77="38" item78="38" item79="38"
+ item80="40" item81="40" item82="40" item83="40"
+ item84="40" item85="40" item86="40" item87="40" item88="40" item89="40"
+ item90="42" item91="42" item92="42" item93="42"
+ item94="42" item95="42" item96="42" item97="42" item98="42" item99="42"
+ meta:length="100"
+ meta:name="cowPositionX" />
+
+ <array item0="0" item1="14" meta:length="2"
+ meta:name="stable1X" />
+ <array item0="55" item1="69" meta:length="2"
+ meta:name="stable1Y" />
+ <array item0="55" item1="69" meta:length="2"
+ meta:name="stable2X" />
+ <array item0="0" item1="14" meta:length="2"
+ meta:name="stable2Y" />
+
+
+
+ <array meta:length="200" meta:name="obstaclePositionX" />
+
+
+ <array meta:length="200"
+ meta:name="obstaclePositionY" />
+
+
+
+ </configuration>
+
+ <agents>
+ <agent
+ agentclass="massim.simulation.GridSimulationAgent"
+ agentcreationclass="massim.simulation.GridSimulationAgentParameter"
+ team="blue">
+ <configuration />
+ </agent>
+ <agent
+ agentclass="massim.simulation.GridSimulationAgent"
+ agentcreationclass="massim.simulation.GridSimulationAgentParameter"
+ team="blue">
+ <configuration />
+ </agent>
+ <agent
+ agentclass="massim.simulation.GridSimulationAgent"
+ agentcreationclass="massim.simulation.GridSimulationAgentParameter"
+ team="blue">
+ <configuration />
+ </agent>
+ <agent
+ agentclass="massim.simulation.GridSimulationAgent"
+ agentcreationclass="massim.simulation.GridSimulationAgentParameter"
+ team="blue">
+ <configuration />
+ </agent>
+ <agent
+ agentclass="massim.simulation.GridSimulationAgent"
+ agentcreationclass="massim.simulation.GridSimulationAgentParameter"
+ team="blue">
+ <configuration />
+ </agent>
+ <agent
+ agentclass="massim.simulation.GridSimulationAgent"
+ agentcreationclass="massim.simulation.GridSimulationAgentParameter"
+ team="blue">
+ <configuration />
+ </agent>
+ <agent
+ agentclass="massim.simulation.GridSimulationAgent"
+ agentcreationclass="massim.simulation.GridSimulationAgentParameter"
+ team="red">
+ <configuration />
+ </agent>
+ <agent
+ agentclass="massim.simulation.GridSimulationAgent"
+ agentcreationclass="massim.simulation.GridSimulationAgentParameter"
+ team="red">
+ <configuration />
+ </agent>
+ <agent
+ agentclass="massim.simulation.GridSimulationAgent"
+ agentcreationclass="massim.simulation.GridSimulationAgentParameter"
+ team="red">
+ <configuration />
+ </agent>
+ <agent
+ agentclass="massim.simulation.GridSimulationAgent"
+ agentcreationclass="massim.simulation.GridSimulationAgentParameter"
+ team="red">
+ <configuration />
+ </agent>
+ <agent
+ agentclass="massim.simulation.GridSimulationAgent"
+ agentcreationclass="massim.simulation.GridSimulationAgentParameter"
+ team="red">
+ <configuration />
+ </agent>
+ <agent
+ agentclass="massim.simulation.GridSimulationAgent"
+ agentcreationclass="massim.simulation.GridSimulationAgentParameter"
+ team="red">
+ <configuration />
+ </agent>
+ </agents>
+ </simulation>
+
+ </match>
+
+ <accounts>
+ <actionclassmap name="Grid">
+ <actionclass id="action"
+ class="massim.simulation.GridSimulationAgentAction" />
+ <actionclass id="invalid" class="massim.InvalidAction" />
+ </actionclassmap>
+
+ <account actionclassmap="Grid"
+ defaultactionclass="massim.simulation.GridSimulationAgentAction"
+ timeout="8000" auxtimeout="500" maxpacketlength="65536"
+ username="botagent1" password="1" team="bot" />
+ <account actionclassmap="Grid"
+ defaultactionclass="massim.simulation.GridSimulationAgentAction"
+ timeout="8000" auxtimeout="500" maxpacketlength="65536"
+ username="botagent2" password="2" team="bot" />
+ <account actionclassmap="Grid"
+ defaultactionclass="massim.simulation.GridSimulationAgentAction"
+ timeout="8000" auxtimeout="500" maxpacketlength="65536"
+ username="botagent3" password="3" team="bot" />
+ <account actionclassmap="Grid"
+ defaultactionclass="massim.simulation.GridSimulationAgentAction"
+ timeout="8000" auxtimeout="500" maxpacketlength="65536"
+ username="botagent4" password="4" team="bot" />
+ <account actionclassmap="Grid"
+ defaultactionclass="massim.simulation.GridSimulationAgentAction"
+ timeout="8000" auxtimeout="500" maxpacketlength="65536"
+ username="botagent5" password="5" team="bot" />
+ <account actionclassmap="Grid"
+ defaultactionclass="massim.simulation.GridSimulationAgentAction"
+ timeout="8000" auxtimeout="500" maxpacketlength="65536"
+ username="botagent6" password="6" team="bot" />
+
+ <account actionclassmap="Grid"
+ defaultactionclass="massim.simulation.GridSimulationAgentAction"
+ timeout="8000" auxtimeout="500" maxpacketlength="65536"
+ username="participant1" password="1" team="participant" />
+ <account actionclassmap="Grid"
+ defaultactionclass="massim.simulation.GridSimulationAgentAction"
+ timeout="8000" auxtimeout="500" maxpacketlength="65536"
+ username="participant2" password="2" team="participant" />
+ <account actionclassmap="Grid"
+ defaultactionclass="massim.simulation.GridSimulationAgentAction"
+ timeout="8000" auxtimeout="500" maxpacketlength="65536"
+ username="participant3" password="3" team="participant" />
+ <account actionclassmap="Grid"
+ defaultactionclass="massim.simulation.GridSimulationAgentAction"
+ timeout="8000" auxtimeout="500" maxpacketlength="65536"
+ username="participant4" password="4" team="participant" />
+ <account actionclassmap="Grid"
+ defaultactionclass="massim.simulation.GridSimulationAgentAction"
+ timeout="8000" auxtimeout="500" maxpacketlength="65536"
+ username="participant5" password="5" team="participant" />
+ <account actionclassmap="Grid"
+ defaultactionclass="massim.simulation.GridSimulationAgentAction"
+ timeout="8000" auxtimeout="500" maxpacketlength="65536"
+ username="participant6" password="6" team="participant" />
+
+ </accounts>
+</conf>
Added: trunk/applications/jason-team/massim-server/startServer_test01.sh
===================================================================
--- trunk/applications/jason-team/massim-server/startServer_test01.sh (rev 0)
+++ trunk/applications/jason-team/massim-server/startServer_test01.sh 2008-04-24 14:33:43 UTC (rev 1248)
@@ -0,0 +1,31 @@
+###############################################################
+#!/bin/sh #
+###############################################################
+# Multi-Agent Programming Contest 2008 #
+# #
+# Support package massim-Server #
+# This script runs the massim server locally with the #
+# default parameters. It also runs at first the rmiregistry #
+# where the server and clients (servermonitor,webinterface) #
+# must connect to. #
+# #
+# For the details on the contest, check the Contest website: #
+# http://cig.in.tu-clausthal.de/agentcontest2008/ #
+# #
+# Organizers: #
+# J. Dix, M. Dastani, P. Novak, T.M. Behrens #
+###############################################################
+
+name=localhost
+
+clear
+
+echo "Launching RMI Registry"
+rmiregistry 1099 &
+sleep 1
+
+echo "Launching Server"
+java -Djava.rmi.server.hostname=$name -jar lib/massimserver.jar --conf conf/serverconfig_test01.xml
+
+echo "Killall RMI Registry"
+killall rmiregistry -w
\ No newline at end of file
Property changes on: trunk/applications/jason-team/massim-server/startServer_test01.sh
___________________________________________________________________
Name: svn:executable
+ *
Added: trunk/applications/jason-team/massim-server/startServer_test02.sh
===================================================================
--- trunk/applications/jason-team/massim-server/startServer_test02.sh (rev 0)
+++ trunk/applications/jason-team/massim-server/startServer_test02.sh 2008-04-24 14:33:43 UTC (rev 1248)
@@ -0,0 +1,31 @@
+###############################################################
+#!/bin/sh #
+###############################################################
+# Multi-Agent Programming Contest 2008 #
+# #
+# Support package massim-Server #
+# This script runs the massim server locally with the #
+# default parameters. It also runs at first the rmiregistry #
+# where the server and clients (servermonitor,webinterface) #
+# must connect to. #
+# #
+# For the details on the contest, check the Contest website: #
+# http://cig.in.tu-clausthal.de/agentcontest2008/ #
+# #
+# Organizers: #
+# J. Dix, M. Dastani, P. Novak, T.M. Behrens #
+###############################################################
+
+name=localhost
+
+clear
+
+echo "Launching RMI Registry"
+rmiregistry 1099 &
+sleep 1
+
+echo "Launching Server"
+java -Djava.rmi.server.hostname=$name -jar lib/massimserver.jar --conf conf/serverconfig_test02.xml
+
+echo "Killall RMI Registry"
+killall rmiregistry -w
\ No newline at end of file
Property changes on: trunk/applications/jason-team/massim-server/startServer_test02.sh
___________________________________________________________________
Name: svn:executable
+ *
Added: trunk/applications/jason-team/massim-server/startServer_test03.sh
===================================================================
--- trunk/applications/jason-team/massim-server/startServer_test03.sh (rev 0)
+++ trunk/applications/jason-team/massim-server/startServer_test03.sh 2008-04-24 14:33:43 UTC (rev 1248)
@@ -0,0 +1,31 @@
+###############################################################
+#!/bin/sh #
+###############################################################
+# Multi-Agent Programming Contest 2008 #
+# #
+# Support package massim-Server #
+# This script runs the massim server locally with the #
+# default parameters. It also runs at first the rmiregistry #
+# where the server and clients (servermonitor,webinterface) #
+# must connect to. #
+# #
+# For the details on the contest, check the Contest website: #
+# http://cig.in.tu-clausthal.de/agentcontest2008/ #
+# #
+# Organizers: #
+# J. Dix, M. Dastani, P. Novak, T.M. Behrens #
+###############################################################
+
+name=localhost
+
+clear
+
+echo "Launching RMI Registry"
+rmiregistry 1099 &
+sleep 1
+
+echo "Launching Server"
+java -Djava.rmi.server.hostname=$name -jar lib/massimserver.jar --conf conf/serverconfig_test03.xml
+
+echo "Killall RMI Registry"
+killall rmiregistry -w
\ No newline at end of file
Property changes on: trunk/applications/jason-team/massim-server/startServer_test03.sh
___________________________________________________________________
Name: svn:executable
+ *
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gf...@us...> - 2008-04-24 12:37:44
|
Revision: 1247
http://jason.svn.sourceforge.net/jason/?rev=1247&view=rev
Author: gfronza
Date: 2008-04-24 05:37:32 -0700 (Thu, 24 Apr 2008)
Log Message:
-----------
build.xml added.
Added Paths:
-----------
trunk/applications/jason-eclipse-plugin/build.xml
Added: trunk/applications/jason-eclipse-plugin/build.xml
===================================================================
--- trunk/applications/jason-eclipse-plugin/build.xml (rev 0)
+++ trunk/applications/jason-eclipse-plugin/build.xml 2008-04-24 12:37:32 UTC (rev 1247)
@@ -0,0 +1,67 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<project basedir="." default="jar" name="Jason-eclipse-plugin">
+
+ <property environment="env" />
+
+ <property name="regexpJar" value="${basedir}/lib/regexp-1.2-mini.jar" />
+ <property name="dom4JJar" value="${basedir}/lib/dom4j-mini.jar" />
+ <property name="jasonJar" value="${basedir}/lib/jason.jar" />
+
+ <property name="build.dir" value="${basedir}/bin" />
+
+ <property name="dist.properties" value="${basedir}/bin/dist.properties" />
+ <property name="version" value="1" />
+ <property name="release" value="1.1" />
+ <property name="distDir" value="${basedir}/dist" />
+ <property name="distDirPlugins" value="${distDir}/plugins" />
+
+ <property name="pluginJar" value="${distDirPlugins}/net.sourceforge.jasonide_${version}.${release}.jar" />
+ <property name="pluginZip" value="${distDir}/jason-eclipse-plugin-${version}.${release}.zip" />
+
+ <path id="project.classpath">
+ <pathelement location="${regexpJar}" />
+ <pathelement location="${dom4JJar}" />
+ <pathelement location="${jasonJar}" />
+ </path>
+
+ <condition property="parsers-ok" value="ok">
+ <and>
+ <uptodate property="parsers-ok" targetfile="${basedir}/src/jason/mas2j/parser/mas2j.java" srcfile="${basedir}/src/jason/mas2j/parser/MAS2JavaParser.jcc" />
+ <uptodate property="parsers-ok" targetfile="${basedir}/src/jason/asSyntax/parser/as2j.java" srcfile="${basedir}/src/jason/asSyntax/parser/AS2JavaParser.jcc" />
+ <uptodate property="parsers-ok" targetfile="${basedir}/doc/AS2JavaParser.html" srcfile="${basedir}/src/jason/asSyntax/parser/AS2JavaParser.jcc" />
+ </and>
+ </condition>
+
+ <target name="init">
+ <mkdir dir="${build.dir}" />
+ </target>
+
+ <target name="compile" depends="init">
+ <javac srcdir="src" destdir="${build.dir}" debug="true" deprecation="true" optimize="true" nowarn="true" source="1.5" target="1.5">
+ <classpath refid="project.classpath" />
+ </javac>
+ </target>
+
+ <target name="initJar">
+ <mkdir dir="${distDir}" />
+ <mkdir dir="${distDirPlugins}" />
+ </target>
+
+ <target name="jar" depends="compile,initJar">
+ <jar jarfile="${pluginJar}" manifest="${basedir}/META-INF/MANIFEST.MF">
+ <fileset dir="${build.dir}">
+ <include name="**/*.class" />
+ </fileset>
+ <fileset dir="${basedir}">
+ <include name="modes/*"/>
+ <include name="lib/*"/>
+ <include name="icons/*"/>
+ <include name="plugin.xml" />
+ </fileset>
+ </jar>
+
+ <zip destfile="${pluginZip}" basedir="${distDir}" />
+ </target>
+
+</project>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jom...@us...> - 2008-04-24 09:18:31
|
Revision: 1246
http://jason.svn.sourceforge.net/jason/?rev=1246&view=rev
Author: jomifred
Date: 2008-04-24 02:18:29 -0700 (Thu, 24 Apr 2008)
Log Message:
-----------
jason team: fix script for dummies
Modified Paths:
--------------
trunk/applications/jason-team/dummies.xml
trunk/applications/jason-team/readme.txt
Modified: trunk/applications/jason-team/dummies.xml
===================================================================
--- trunk/applications/jason-team/dummies.xml 2008-04-24 09:09:25 UTC (rev 1245)
+++ trunk/applications/jason-team/dummies.xml 2008-04-24 09:18:29 UTC (rev 1246)
@@ -28,6 +28,9 @@
<!-- tasks the user can override in his/her c-build.xml script -->
<target name="user-init">
+ <copy file="../jason-moise/lib/jmoise.jar" todir="lib" />
+ <copy file="../jason-moise/lib/moise.jar" todir="lib" />
+ <copy file="../jason-moise/src/asl/moise-common.asl" todir="src/asl" />
</target>
<target name="user-end">
</target>
Modified: trunk/applications/jason-team/readme.txt
===================================================================
--- trunk/applications/jason-team/readme.txt 2008-04-24 09:09:25 UTC (rev 1245)
+++ trunk/applications/jason-team/readme.txt 2008-04-24 09:18:29 UTC (rev 1246)
@@ -12,15 +12,18 @@
To run this team:
-1. update sources of Jason
+1. update sources of Jason and JMoise+
cd Jason-svn
svn update
ant plugin
-
+
+ cd applications/jason-moise
+ ant jar
+
2. run massim-server
cd applications/jason-team/massim-server
- ./startServer.sh
-
+ ./startServer.sh
+
3. run dummies (written in Jason)
ant -f dummies.xml
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jom...@us...> - 2008-04-24 09:09:29
|
Revision: 1245
http://jason.svn.sourceforge.net/jason/?rev=1245&view=rev
Author: jomifred
Date: 2008-04-24 02:09:25 -0700 (Thu, 24 Apr 2008)
Log Message:
-----------
add junit in jason team svn
Added Paths:
-----------
trunk/applications/jason-team/lib/junit.jar
Added: trunk/applications/jason-team/lib/junit.jar
===================================================================
(Binary files differ)
Property changes on: trunk/applications/jason-team/lib/junit.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jom...@us...> - 2008-04-23 15:22:11
|
Revision: 1244
http://jason.svn.sourceforge.net/jason/?rev=1244&view=rev
Author: jomifred
Date: 2008-04-23 08:22:04 -0700 (Wed, 23 Apr 2008)
Log Message:
-----------
improve org. spec of the team
Modified Paths:
--------------
trunk/applications/jason-moise/lib/moise.jar
trunk/applications/jason-moise/src/jmoise/OrgManager.java
trunk/applications/jason-team/AC-Local-JasonTeam.mas2j
trunk/applications/jason-team/src/asl/gaucho.asl
trunk/applications/jason-team/src/java/arch/CowboyArch.java
trunk/applications/jason-team/src/team-os.xml
Modified: trunk/applications/jason-moise/lib/moise.jar
===================================================================
(Binary files differ)
Modified: trunk/applications/jason-moise/src/jmoise/OrgManager.java
===================================================================
--- trunk/applications/jason-moise/src/jmoise/OrgManager.java 2008-04-22 22:09:11 UTC (rev 1243)
+++ trunk/applications/jason-moise/src/jmoise/OrgManager.java 2008-04-23 15:22:04 UTC (rev 1244)
@@ -67,9 +67,8 @@
// starts GUI
if ("yes".equals(getTS().getSettings().getUserParameter("gui"))) {
try {
- simOE = new SimOE(currentOE);
+ simOE = new SimOE(currentOE, false);
simOE.setName("OrgManager");
- simOE.frame.getContentPane().remove(simOE.frame.OESimTabPanel);
simOE.frame.addWindowListener(new java.awt.event.WindowAdapter() {
public void windowClosing(java.awt.event.WindowEvent e) {
if (simOE != null) {
Modified: trunk/applications/jason-team/AC-Local-JasonTeam.mas2j
===================================================================
--- trunk/applications/jason-team/AC-Local-JasonTeam.mas2j 2008-04-22 22:09:11 UTC (rev 1243)
+++ trunk/applications/jason-team/AC-Local-JasonTeam.mas2j 2008-04-23 15:22:04 UTC (rev 1244)
@@ -10,7 +10,7 @@
infrastructure: Centralised
agents:
- orgManager [osfile="src/team-os.xml",gui=yes]
+ orgManager [osfile="src/team-os.xml",gui=no]
agentArchClass jmoise.OrgManager;
gaucho1 gaucho.asl
Modified: trunk/applications/jason-team/src/asl/gaucho.asl
===================================================================
--- trunk/applications/jason-team/src/asl/gaucho.asl 2008-04-22 22:09:11 UTC (rev 1243)
+++ trunk/applications/jason-team/src/asl/gaucho.asl 2008-04-23 15:22:04 UTC (rev 1244)
@@ -18,18 +18,40 @@
/* -- initial beliefs -- */
-/* -- create the initial exploration groups -- */
+/* -- initial goals -- */
+!test.
++!test <- +gsize(16,8).
+
+/* -- create the initial exploration groups and areas -- */
+
++gsize(_Weight,_Height) // new match've started
+ : .my_name(gaucho1)
+ <- .if( group(team,Old), {
+ jmoise.remove_group(Old)
+ });
+ .abolish(area(_,_,_,_,_));
+ jmoise.create_group(team).
+gsize(Weight,Height)
- : .my_name(gaucho1)
- <- jmoise.create_group(team).
+ <- .abolish(area(_,_,_,_,_)).
+
+group(team,GId)
: .my_name(gaucho1)
<- jmoise.create_group(exploration,GId);
jmoise.create_group(exploration,GId);
jmoise.create_group(exploration,GId).
++group(exploration,_) // compute the area of the groups
+ : .my_name(gaucho1) &
+ .findall(GId, group(exploration,GId), LG) &
+ LG = [G1,G2,G3] // there are three groups
+ <- ?gsize(W,H);
+ X = math.round(((W*H)/3)/H);
+ +area(G1, 0, 0, X, H-1);
+ +area(G2, X+1, 0, W-1, H/2);
+ +area(G3, X+1, (H/2)+1, W-1, H-1).
++area(G,A,B,C,D)[source(self)]
+ <- .broadcast(tell, area(G,A,B,C,D)).
-
// include common plans for MOISE+ agents
{ include("moise-common.asl") }
Modified: trunk/applications/jason-team/src/java/arch/CowboyArch.java
===================================================================
--- trunk/applications/jason-team/src/java/arch/CowboyArch.java 2008-04-22 22:09:11 UTC (rev 1243)
+++ trunk/applications/jason-team/src/java/arch/CowboyArch.java 2008-04-23 15:22:04 UTC (rev 1244)
@@ -30,7 +30,7 @@
*/
public class CowboyArch extends IdentifyCrashed {
- LocalWorldModel model = null;
+ LocalWorldModel model = new LocalWorldModel(10,10);
WorldView view = null;
String simId = null;
Modified: trunk/applications/jason-team/src/team-os.xml
===================================================================
--- trunk/applications/jason-team/src/team-os.xml 2008-04-22 22:09:11 UTC (rev 1243)
+++ trunk/applications/jason-team/src/team-os.xml 2008-04-23 15:22:04 UTC (rev 1244)
@@ -5,7 +5,7 @@
<organisational-specification
id="jason-cowboys"
- os-version="0.4"
+ os-version="0.5"
xmlns='http://moise.sourceforge.net/os'
xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
@@ -13,6 +13,10 @@
http://moise.sourceforge.net/xml/os.xsd' >
<structural-specification>
+ <properties>
+ <property id="check-players-in-remove-group" value="false" />
+ <property id="check-sub-group-in-remove-group" value="false" />
+ </properties>
<role-definitions>
<role id="cowboy" />
@@ -24,6 +28,7 @@
</role-definitions>
<group-specification id="team">
+
<links>
<link from="cowboy" to="cowboy" type="communication"
scope="inter-group" extends-sub-groups="true" bi-dir="false"/>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jom...@us...> - 2008-04-22 22:09:14
|
Revision: 1243
http://jason.svn.sourceforge.net/jason/?rev=1243&view=rev
Author: jomifred
Date: 2008-04-22 15:09:11 -0700 (Tue, 22 Apr 2008)
Log Message:
-----------
add initial code for jason team agents (stop using the code of dummies)
Added Paths:
-----------
trunk/applications/jason-team/src/asl/gaucho.asl
Added: trunk/applications/jason-team/src/asl/gaucho.asl
===================================================================
--- trunk/applications/jason-team/src/asl/gaucho.asl (rev 0)
+++ trunk/applications/jason-team/src/asl/gaucho.asl 2008-04-22 22:09:11 UTC (rev 1243)
@@ -0,0 +1,35 @@
+/*
+ Perceptions
+ Begin:
+ gsize(Weight,Height)
+ steps(MaxSteps)
+ corral(UpperLeft.x,UpperLeft.y,DownRight.x,DownRight.y)
+
+ Step:
+ pos(X,Y,Step)
+ cell(X,Y,Type)
+ Type in { cow(Id), ally(Name), enemy(Id) }
+ // the Id of enemy is not working
+
+ End:
+ end_of_simulation(Result)
+
+*/
+
+/* -- initial beliefs -- */
+
+/* -- create the initial exploration groups -- */
+
++gsize(Weight,Height)
+ : .my_name(gaucho1)
+ <- jmoise.create_group(team).
++group(team,GId)
+ : .my_name(gaucho1)
+ <- jmoise.create_group(exploration,GId);
+ jmoise.create_group(exploration,GId);
+ jmoise.create_group(exploration,GId).
+
+
+// include common plans for MOISE+ agents
+{ include("moise-common.asl") }
+
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jom...@us...> - 2008-04-22 21:57:22
|
Revision: 1242
http://jason.svn.sourceforge.net/jason/?rev=1242&view=rev
Author: jomifred
Date: 2008-04-22 14:57:19 -0700 (Tue, 22 Apr 2008)
Log Message:
-----------
include the moise+ spec of the team
Modified Paths:
--------------
trunk/applications/jason-moise/lib/moise.jar
trunk/applications/jason-moise/src/jmoise/OrgAgent.java
trunk/applications/jason-team/AC-Local-JasonTeam.mas2j
trunk/applications/jason-team/dummies.xml
trunk/applications/jason-team/gauchos.xml
trunk/applications/jason-team/src/java/arch/IdentifyCrashed.java
Added Paths:
-----------
trunk/applications/jason-team/src/asl/orgManager.asl
trunk/applications/jason-team/src/team-os.xml
Removed Paths:
-------------
trunk/applications/jason-moise/example/clima-contest/
Modified: trunk/applications/jason-moise/lib/moise.jar
===================================================================
(Binary files differ)
Modified: trunk/applications/jason-moise/src/jmoise/OrgAgent.java
===================================================================
--- trunk/applications/jason-moise/src/jmoise/OrgAgent.java 2008-04-22 19:02:31 UTC (rev 1241)
+++ trunk/applications/jason-moise/src/jmoise/OrgAgent.java 2008-04-22 21:57:19 UTC (rev 1242)
@@ -91,7 +91,7 @@
if (m.getPropCont() instanceof OE) {
currentOE = (OE) m.getPropCont();
i.remove();
- } else {
+ } else if (m.getSender().equals(getOrgManagerName())) {
// the content is a normal predicate
final String content = m.getPropCont().toString();
final boolean isTell = m.getIlForce().equals("tell");
Modified: trunk/applications/jason-team/AC-Local-JasonTeam.mas2j
===================================================================
--- trunk/applications/jason-team/AC-Local-JasonTeam.mas2j 2008-04-22 19:02:31 UTC (rev 1241)
+++ trunk/applications/jason-team/AC-Local-JasonTeam.mas2j 2008-04-22 21:57:19 UTC (rev 1242)
@@ -10,37 +10,41 @@
infrastructure: Centralised
agents:
- gaucho1 dummy.asl
+ orgManager [osfile="src/team-os.xml",gui=yes]
+ agentArchClass jmoise.OrgManager;
+
+ gaucho1 gaucho.asl
[verbose=1, gui=yes, write_status=yes, ac_sim_back_dir="./massim-server/backup",
host="localhost", port=12300, username=participant1, password="1"]
agentArchClass arch.ACArchitecture
agentClass agent.SelectEvent
beliefBaseClass agent.UniqueBelsBB("gsize(_,_)","steps(_)","cell(_,_,key)","corral(_,_,_,_)","pratio(_)");
- gaucho2 dummy.asl
+ gaucho2 gaucho.asl
[verbose=1,host="localhost", port=12300, username=participant2, password="2"]
agentArchClass arch.ACArchitecture
agentClass agent.SelectEvent
beliefBaseClass agent.UniqueBelsBB("gsize(_,_)","steps(_)","cell(_,_,key)","corral(_,_,_,_)","pratio(_)");
- gaucho3 dummy.asl
+ gaucho3 gaucho.asl
[verbose=1,host="localhost", port=12300, username=participant3, password="3"]
agentArchClass arch.ACArchitecture
agentClass agent.SelectEvent
beliefBaseClass agent.UniqueBelsBB("gsize(_,_)","steps(_)","cell(_,_,key)","corral(_,_,_,_)","pratio(_)");
- gaucho4 dummy.asl
+ gaucho4 gaucho.asl
[verbose=1,host="localhost", port=12300, username=participant4, password="4"]
agentArchClass arch.ACArchitecture
agentClass agent.SelectEvent
beliefBaseClass agent.UniqueBelsBB("gsize(_,_)","steps(_)","cell(_,_,key)","corral(_,_,_,_)","pratio(_)");
- gaucho5 dummy.asl
+ gaucho5 gaucho.asl
[verbose=1,host="localhost", port=12300, username=participant5, password="5"]
agentArchClass arch.ACArchitecture
agentClass agent.SelectEvent
beliefBaseClass agent.UniqueBelsBB("gsize(_,_)","steps(_)","cell(_,_,key)","corral(_,_,_,_)","pratio(_)");
- gaucho6 dummy.asl
+ gaucho6 gaucho.asl
[verbose=1,host="localhost", port=12300, username=participant6, password="6"]
agentArchClass arch.ACArchitecture
agentClass agent.SelectEvent
beliefBaseClass agent.UniqueBelsBB("gsize(_,_)","steps(_)","cell(_,_,key)","corral(_,_,_,_)","pratio(_)");
aslSourcePath: "src/asl";
+
}
Modified: trunk/applications/jason-team/dummies.xml
===================================================================
--- trunk/applications/jason-team/dummies.xml 2008-04-22 19:02:31 UTC (rev 1241)
+++ trunk/applications/jason-team/dummies.xml 2008-04-22 21:57:19 UTC (rev 1242)
@@ -8,7 +8,7 @@
April 10, 2008 - 23:19:55
-->
-<project name ="miners"
+<project name ="dummies"
basedir="."
default="run">
Modified: trunk/applications/jason-team/gauchos.xml
===================================================================
--- trunk/applications/jason-team/gauchos.xml 2008-04-22 19:02:31 UTC (rev 1241)
+++ trunk/applications/jason-team/gauchos.xml 2008-04-22 21:57:19 UTC (rev 1242)
@@ -28,6 +28,9 @@
<!-- tasks the user can override in his/her c-build.xml script -->
<target name="user-init">
+ <copy file="../jason-moise/lib/jmoise.jar" todir="lib" />
+ <copy file="../jason-moise/lib/moise.jar" todir="lib" />
+ <copy file="../jason-moise/src/asl/moise-common.asl" todir="src/asl" />
</target>
<target name="user-end">
</target>
Added: trunk/applications/jason-team/src/asl/orgManager.asl
===================================================================
--- trunk/applications/jason-team/src/asl/orgManager.asl (rev 0)
+++ trunk/applications/jason-team/src/asl/orgManager.asl 2008-04-22 21:57:19 UTC (rev 1242)
@@ -0,0 +1 @@
+/* nothing here, everything is implemented in the arhitecture */
\ No newline at end of file
Modified: trunk/applications/jason-team/src/java/arch/IdentifyCrashed.java
===================================================================
--- trunk/applications/jason-team/src/java/arch/IdentifyCrashed.java 2008-04-22 19:02:31 UTC (rev 1241)
+++ trunk/applications/jason-team/src/java/arch/IdentifyCrashed.java 2008-04-22 21:57:19 UTC (rev 1242)
@@ -1,19 +1,20 @@
package arch;
-import java.util.List;
-
import jason.JasonException;
-import jason.architecture.AgArch;
import jason.asSyntax.Literal;
import jason.mas2j.ClassParameters;
import jason.runtime.Settings;
+import java.util.List;
+
+import jmoise.OrgAgent;
+
/**
* An agent architecture that try to identify a crashed agent and then try to fix it.
*
* @author Jomi
*/
-public class IdentifyCrashed extends AgArch {
+public class IdentifyCrashed extends OrgAgent {
private boolean didPercept = true;
private int maxCycleTime = 4000;
Added: trunk/applications/jason-team/src/team-os.xml
===================================================================
--- trunk/applications/jason-team/src/team-os.xml (rev 0)
+++ trunk/applications/jason-team/src/team-os.xml 2008-04-22 21:57:19 UTC (rev 1242)
@@ -0,0 +1,67 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<?xml-stylesheet href="http://moise.sourceforge.net/xml/os.xsl" type="text/xsl" ?>
+
+<organisational-specification
+
+ id="jason-cowboys"
+ os-version="0.4"
+
+ xmlns='http://moise.sourceforge.net/os'
+ xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
+ xsi:schemaLocation='http://moise.sourceforge.net/os
+ http://moise.sourceforge.net/xml/os.xsd' >
+
+ <structural-specification>
+
+ <role-definitions>
+ <role id="cowboy" />
+ <role id="leader"> <extends role="cowboy"/> </role>
+ <role id="explorer"> <extends role="leader"/> </role>
+ <role id="herder"> <extends role="leader"/> </role>
+ <role id="scouter"> <extends role="cowboy"/> </role>
+ <role id="herdboy"> <extends role="cowboy"/> </role>
+ </role-definitions>
+
+ <group-specification id="team">
+ <links>
+ <link from="cowboy" to="cowboy" type="communication"
+ scope="inter-group" extends-sub-groups="true" bi-dir="false"/>
+ <link from="leader" to="cowboy" type="authority"
+ scope="intra-group" extends-sub-groups="true" bi-dir="false"/>
+ </links>
+
+ <sub-groups>
+
+ <group-specification id="exploration" >
+ <roles>
+ <role id="explorer" min="1" max="1"/>
+ <role id="scouter" />
+ </roles>
+ </group-specification>
+
+ <group-specification id="herding" >
+ <roles>
+ <role id="herder" min="1" max="1"/>
+ <role id="herdboy" />
+ </roles>
+ </group-specification>
+ </sub-groups>
+
+ <formation-constraints>
+ <!--compatibility from="cowboy" to="cowboy" type="compatibility"
+ scope="intra-group" extends-sub-groups="true"
+ bi-dir="true"/ -->
+ </formation-constraints>
+ </group-specification>
+ </structural-specification>
+
+
+
+ <functional-specification>
+ </functional-specification>
+
+ <deontic-specification>
+ </deontic-specification>
+</organisational-specification>
+
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jom...@us...> - 2008-04-22 19:02:32
|
Revision: 1241
http://jason.svn.sourceforge.net/jason/?rev=1241&view=rev
Author: jomifred
Date: 2008-04-22 12:02:31 -0700 (Tue, 22 Apr 2008)
Log Message:
-----------
add setLiteral in Trigger
Modified Paths:
--------------
trunk/src/jason/asSyntax/Trigger.java
Modified: trunk/src/jason/asSyntax/Trigger.java
===================================================================
--- trunk/src/jason/asSyntax/Trigger.java 2008-04-22 18:25:14 UTC (rev 1240)
+++ trunk/src/jason/asSyntax/Trigger.java 2008-04-22 19:02:31 UTC (rev 1241)
@@ -145,6 +145,10 @@
public Literal getLiteral() {
return literal;
}
+
+ public void setLiteral(Literal literal) {
+ this.literal = literal;
+ }
public String toString() {
return operator.toString() + type + literal;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tom...@us...> - 2008-04-22 18:25:21
|
Revision: 1240
http://jason.svn.sourceforge.net/jason/?rev=1240&view=rev
Author: tomklapiscak
Date: 2008-04-22 11:25:14 -0700 (Tue, 22 Apr 2008)
Log Message:
-----------
Pre-release nearly complete
Modified Paths:
--------------
trunk/applications/jasdl-owlapi/README
trunk/applications/jasdl-owlapi/examples/commerce/bin/build.xml
trunk/applications/jasdl-owlapi/examples/commerce/bin/c-build.xml
trunk/applications/jasdl-owlapi/examples/commerce/commerce.mas2j
trunk/applications/jasdl-owlapi/examples/commerce/onts/commerce.owl
trunk/applications/jasdl-owlapi/examples/commerce/onts/society.owl
trunk/applications/jasdl-owlapi/examples/commerce/src/asl/customer.asl
trunk/applications/jasdl-owlapi/examples/commerce/src/asl/delivery_van.asl
trunk/applications/jasdl-owlapi/examples/commerce/src/asl/pa.asl
trunk/applications/jasdl-owlapi/examples/commerce/src/asl/shop.asl
trunk/applications/jasdl-owlapi/examples/commerce/src/java/commerce/env/CommerceEnvironment.java
trunk/applications/jasdl-owlapi/examples/commerce/src/java/commerce/env/CommerceView.java
trunk/applications/jasdl-owlapi/examples/commerce/src/java/commerce/env/model/CommerceModel.java
trunk/applications/jasdl-owlapi/examples/commerce/src/java/commerce/env/model/ModelCustomer.java
trunk/applications/jasdl-owlapi/examples/commerce/src/java/commerce/env/model/ModelCustomerListener.java
trunk/applications/jasdl-owlapi/examples/commerce/src/java/commerce/env/model/ModelShop.java
trunk/applications/jasdl-owlapi/examples/commerce/src/java/commerce/ui/customer/CustomerUIPanel.java
trunk/applications/jasdl-owlapi/src/jasdl/JASDLParams.java
trunk/applications/jasdl-owlapi/src/jasdl/asSemantics/JASDLAgent.java
trunk/applications/jasdl-owlapi/src/jasdl/asSemantics/JASDLAgentConfigurator.java
trunk/applications/jasdl-owlapi/src/jasdl/asSemantics/package.html
trunk/applications/jasdl-owlapi/src/jasdl/asSyntax/JASDLPlanLibrary.java
trunk/applications/jasdl-owlapi/src/jasdl/asSyntax/SEPlan.java
trunk/applications/jasdl-owlapi/src/jasdl/bb/JASDLBeliefBase.java
trunk/applications/jasdl-owlapi/src/jasdl/bridge/JASDLOntologyManager.java
trunk/applications/jasdl-owlapi/src/jasdl/bridge/seliteral/SELiteral.java
trunk/applications/jasdl-owlapi/src/jasdl/ia/define_class.java
trunk/applications/jasdl-owlapi/src/jasdl/ia/get_anonymous_individual.java
trunk/applications/jasdl-owlapi/src/jasdl/ia/get_class_definition.java
trunk/applications/jasdl-owlapi/src/jasdl/ia/get_functor.java
trunk/applications/jasdl-owlapi/src/jasdl/ia/get_individual.java
trunk/applications/jasdl-owlapi/src/jasdl/ia/get_types.java
trunk/applications/jasdl-owlapi/src/jasdl/ia/is_annotation_gathering_enabled.java
trunk/applications/jasdl-owlapi/src/jasdl/ia/is_belief_revision_enabled.java
trunk/applications/jasdl-owlapi/src/jasdl/ia/is_contraction_enabled.java
trunk/applications/jasdl-owlapi/src/jasdl/ia/set_annotation_gathering_enabled.java
trunk/applications/jasdl-owlapi/src/jasdl/ia/set_belief_revision_enabled.java
trunk/applications/jasdl-owlapi/src/jasdl/ia/set_contraction_enabled.java
trunk/applications/jasdl-owlapi/src/jasdl/util/JASDLCommon.java
trunk/applications/jasdl-owlapi/src/jasdl/util/owlapi/parsing/NsPrefixOWLEntityChecker.java
trunk/applications/jasdl-owlapi/src/jasdl/util/owlapi/parsing/URIOWLEntityChecker.java
Added Paths:
-----------
trunk/applications/jasdl-owlapi/doc/
trunk/applications/jasdl-owlapi/doc/mas2jconfiguration
trunk/applications/jasdl-owlapi/examples/commerce/src/asl/common/commerce.asl
Removed Paths:
-------------
trunk/applications/jasdl-owlapi/src/jasdl/bridge/DLUnifier.java
trunk/applications/jasdl-owlapi/src/jasdl/ia/send.java
Property Changed:
----------------
trunk/applications/jasdl-owlapi/examples/commerce/src/asl/
Modified: trunk/applications/jasdl-owlapi/README
===================================================================
--- trunk/applications/jasdl-owlapi/README 2008-04-22 16:46:22 UTC (rev 1239)
+++ trunk/applications/jasdl-owlapi/README 2008-04-22 18:25:14 UTC (rev 1240)
@@ -20,6 +20,23 @@
Please refer to /trunk/jason/applications/jasdl-owlapi/examples/travel_agent/config.mas2j for an example of how to configure JASDL agents.
+
+********************************************************
+--- Directory Structure ---
+
+The JASDL distribution is structured as such:
+
+ README - This file
+
+ docs/
+ mas2jconfig - Instructions on mas2j setup for a JASDL agent
+ java - Java docs for JASDL
+
+
+
+
+********************************************************
+
*** Known issues ***
The -+ operator does not function properly. Until this problem is fixed the operation must be performed in two steps as shown here:
@@ -32,6 +49,11 @@
Trigger generalisation is not properly applied when searching for an suitable failure event for intended means that are not in the top level of an intention.
+Complex test goals resulting from queries against the ontology (those whose event has a SE-Literal, e.g. ?hotel(hilton)[o(travel)]), prevent their instantiating intention from properly generating failure events.
+Any test queries (and hence ask messages) that might result in the trigger generalisation mechanism being employed will need to include the "jasdl_tg_cause(_)" annotation (the parameter will not be unified and so is best left anonymous for clarity). If future work deems this issue unavoidable, JASDL will make a pass through the plan library and add this annotation automatically where required so the developer need not worry about it.
+
+
+
Thank you for your interest in JASDL!
Added: trunk/applications/jasdl-owlapi/doc/mas2jconfiguration
===================================================================
--- trunk/applications/jasdl-owlapi/doc/mas2jconfiguration (rev 0)
+++ trunk/applications/jasdl-owlapi/doc/mas2jconfiguration 2008-04-22 18:25:14 UTC (rev 1240)
@@ -0,0 +1,161 @@
+The following file documents how to configure a Jason agent to make use of JASDL.
+
+
+********************************************************
+--- Necessary settings for standard Jason parameters ---
+
+For each JASDL agent, the following must be set to use JASDL classes (or extensions thereof) as shown.
+
+ agentArchClass jasdl.architecture.JASDLAgArch
+ agentClass jasdl.asSemantics.JASDLAgent
+ beliefBaseClass jasdl.bb.JASDLBeliefBase;
+
+If your MAS makes use of an environment class, the following must be set to use a JASDL class (or an extension thereof) as shown:
+
+ environment: jasdl.env.JASDLEnvironment
+
+Additionally, we must ensure all of the libraries JASDL is dependent upon are in the classpath of a JASDL agent.
+This is not an issue if the libraries are under the agent's directory. However, to avoid unneccesary duplication,
+since commerce and travel_agent are nested within the JASDL distribution, we set the classpath for these as follows:
+
+ classpath: "../../lib/**/*.jar";
+
+********************************************************
+
+
+********************************************************
+--- Necessary JASDL agent settings ---
+
+For each JASDL agent, the following must be specified in its user parameters.
+
+ jasdl_ontologies = "<o_1>, <o_2> ...., <o_n>"
+
+ Where each <o_n> is an atomic label used to identify the ontology within the "o" annotation in the agent's
+ .asl code.
+
+Additionally, for each <o_n>, we must specify the reachable physical URI of the ontology so it can be loaded, as follows:
+
+ jasdl_<o_n>_uri = "<uri>"
+
+ Where <uri> is a valid URI. Note that this can also be specified relative to the execution path of the agent (i.e. the location
+ of the .mas2j file).
+
+********************************************************
+
+
+********************************************************
+--- Optional JASDL agent settings ---
+
+For each JASDL agent, the following settings may be specified in its user parameters. Note that these configure advanced
+features of JASDL, and will not be necessary in some circumstances.
+
+ jasdl_<o>_mapping_strategies = "<class_1>, <class_2> ..., <class_n>"
+
+ Where <o> is some atomic ontology label specified in jasdl_ontologies (see above), and each <class_n>
+ is the fully-qualified class name of an implementation of the jasdl.bridge.mapping.aliasing.MappingStrategy interface.
+ This specifies the automatic mapping strategies that will be applied to the ontological entities
+ contained within <o>. Such a strategy should apply a consistent mapping from the fragment of an entity URI
+ to the atomic functor used to refer to it in the agent's .asl code. For example:
+
+ jasdl_travel_mapping_strategies = "jasdl.bridge.mapping.aliasing.DecapitaliseMappingStrategy",
+ which decapitalises the first letter of any resource whose fragment begins with an upper case letter
+ (in order to make it compatible with AgentSpeak syntax). For instance, this would cause
+ "http://www.owl-ontologies.com/travel.owl#Hotel" to map to the alias "hotel", thus we could refer to
+ this entity with the SE-Literal hotel(X)[o(travel)].
+
+ Note that if an automatic mapping strategy results in a name clash (two identical aliases), JASDL will
+ assign the offending resource an anonymous label. For example, if we applied the strategy above and we had the
+ resources "http://.../travel.owl#Hotel" and "http://.../travel.hotel" (encountered in that order), the latter
+ would be assigned the alias "anon_alias_<n>", where <n> is an integer guaranteeing the uniqueness of the
+ anonymous label.
+
+ This setting defaults to "jasdl.bridge.mapping.aliasing.DecapitaliseMappingStrategy"
+
+ jasdl_default_mappings_strategies = "<class_1>, <class_2> ..., <class_n>"
+
+ Where each <class_n> is the fully-qualified class name of an implementation of the jasdl.bridge.mapping.aliasing.MappingStrategy interface.
+ This specifies the mapping strategies that will be applied to any ontologies / ontological entities instantiated
+ during the execution of the agent.
+
+ This setting defaults to "jasdl.bridge.mapping.aliasing.DecapitaliseMappingStrategy"
+
+ jasdl_<o>_manual_mappings = "<alias_1>=<fragment_1> ... , <alias_n>=<fragment_n>"
+
+ Where each alias_n is the desired alias for the entity referred to by the URI fragment <fragment_n> (which identifies a resource
+ in the ontology referred to by <0>, e.g. "Hotel" might refer to "http://.../travel.owl#Hotel"). We might wish to map
+ the alias "hotel" to this resource, which would achieve using the pair "hotel=Hotel".
+
+ It is predicted that this setting will be of most use when the agent designer is aware of, and wishes to prevent,
+ a name clash that will result from the automatic mapping strategies specified (thus causing an entity to be assigned an
+ anonymous alias).
+
+ This setting defaults to ""
+
+ jasdl_reasonerClass = "<class>"
+
+ Where <class> is the fully-qualified class name of an implementation of the org.semanticweb.owl.inference.OWLReasoner
+ interface, supported by the OWL-API. Currently, JASDL defaults to use Pellet ("org.mindswap.pellet.owlapi.Reasoner").
+ However, there is experimental support for FaCT++ ("uk.ac.manchester.cs.factplusplus.owlapi.Reasoner"), but you advised
+ against its use for now, since JASDL support for it is largely untested and very buggy.
+
+ This setting defaults to "org.mindswap.pellet.owlapi.Reasoner".
+
+The following features are used to enable or support features of JASDL that are currently highly experimental. Moreover,
+they are all computationally expensive to execute and can slow the execution of a JASDL agent significantly.
+As a result, their usage is (for now) discouraged.
+
+ jasdl_useAnnotationGathering = "<boolean>"
+
+ If set to "true", when quering the belief base for an SE-Literal, the resulting SE-Literal, x, will possess
+ not only the annotations explicitly asserted to belong to it, but also the annotations of all SE-Literals
+ whose corresponding assertion in some way contributes to the entailement of x.
+
+ This setting defaults to "false".
+
+ jasdl_useContraction = "<boolean>"
+
+ If set to "true", when removing an SE-Literal, x, from the belief base, JASDL will remove not only x itself,
+ but also all SE-Literals whose corresponding assertion in some way contributes to the entailement of x.
+
+ IMPORTANT NOTE: a common problem when contraction is disabled is encountered when attempting to remove an asserted
+ object property using a SE-Literal removal that refers to the inverse of the asserted property. Without
+ contraction, the assertion will not be removed - the object property used in the original assertion must be used.
+
+ This setting defaults to "false".
+
+ jasdl_useBeliefRevision = "<boolean>"
+
+ If set to "true", JASDL employs its (experimental) DL-based belief revision mechanism.
+
+ This setting defaults to "false". In which case, JASDL employs its legacy consistency assurance mechanism
+ whereby inconsistent assertions are simply rolled back, giving precedence to earlier ones.
+
+ This setting defaults to "false".
+
+ jasdl_known_agents = "<ag_1>, <ag_2> ..., <ag_n>"
+
+ Where each <ag_n> is the name of an agent we might refer to in the source annotation of an SE-Literal.
+ This, combined with their assigned trust ratings (see below), is currently used (only) by JASDL's
+ experimental DL-based belief revision and belief base contraction support.
+
+ In these cases, it is used by the "incision function", which determines which supporting assertions to
+ undermine when attempting to contract a belief (removing the belief itself and all assertions leading to its entailement).
+ Assertions associated (by the source annotation) with least-trusted agents
+ (i.e. those with lowest trust rating - see below) are removed first.
+
+ This setting defaults to "".
+
+ jasdl_<ag_n>_trustRating = "<float>"
+
+ Where each <ag_n> is the name of an agent we might refer to in the source annotation of an SE-Literal, one for each
+ specified in the known_agents setting (see above) and <float> is a numerical value between 0 and 1. See above for
+ discussion on how this is used.
+
+ This setting is mandatory for each agent specified by known_agents and so has no default.
+
+********************************************************
+
+
+
+
+
Modified: trunk/applications/jasdl-owlapi/examples/commerce/bin/build.xml
===================================================================
--- trunk/applications/jasdl-owlapi/examples/commerce/bin/build.xml 2008-04-22 16:46:22 UTC (rev 1239)
+++ trunk/applications/jasdl-owlapi/examples/commerce/bin/build.xml 2008-04-22 18:25:14 UTC (rev 1240)
@@ -5,7 +5,7 @@
This file was generated by Jason ?
http://jason.sf.net
- April 20, 2008 - 17:28:53
+ April 22, 2008 - 19:07:12
-->
<project name ="commerce"
Modified: trunk/applications/jasdl-owlapi/examples/commerce/bin/c-build.xml
===================================================================
--- trunk/applications/jasdl-owlapi/examples/commerce/bin/c-build.xml 2008-04-22 16:46:22 UTC (rev 1239)
+++ trunk/applications/jasdl-owlapi/examples/commerce/bin/c-build.xml 2008-04-22 18:25:14 UTC (rev 1240)
@@ -7,7 +7,7 @@
<import file="build.xml"/>
<target name="user-init">
- <ant dir="../../../../" inheritAll="false" target="plugin"/>
+ <ant dir="../../../../" inheritAll="false" target="jar"/>
<ant dir="../../../jmca" inheritAll="false"/>
<ant dir="../.." inheritAll="false"/>
</target>
Modified: trunk/applications/jasdl-owlapi/examples/commerce/commerce.mas2j
===================================================================
--- trunk/applications/jasdl-owlapi/examples/commerce/commerce.mas2j 2008-04-22 16:46:22 UTC (rev 1239)
+++ trunk/applications/jasdl-owlapi/examples/commerce/commerce.mas2j 2008-04-22 18:25:14 UTC (rev 1240)
@@ -1,4 +1,13 @@
-/* Jason Project */
+/* .mas2j configuration of the commerce MAS
+ * Note:
+ * - this takes advantage of defaults for many of the settings available
+ * for the configuration of a JASDL agent. Please consult docs/mas2jconfiguration
+ * for full documentation of these.
+ * - in the interests of simplicitly, all agents make use of the same label mappings for ontologies
+ * and (automatic and manual) alias mappings for ontological entities.
+ * There could be set arbitrarily for each agent (and the .asl code updated accordingly) and JASDL would
+ * still function correctly.
+ */
MAS commerce {
@@ -7,13 +16,15 @@
environment: commerce.env.CommerceEnvironment
agents:
+
+
shop
[
jasdl_ontologies="c,s",
jasdl_c_uri="/onts/commerce.owl",
jasdl_s_uri="/onts/society.owl"
]
- #2
+ #3
agentArchClass jasdl.architecture.JASDLAgArch
agentClass jasdl.asSemantics.JASDLAgent
beliefBaseClass jasdl.bb.JASDLBeliefBase;
@@ -24,7 +35,7 @@
jasdl_c_uri="/onts/commerce.owl",
jasdl_s_uri="/onts/society.owl"
]
- #2
+ #4
agentArchClass jasdl.architecture.JASDLAgArch
agentClass jasdl.asSemantics.JASDLAgent
beliefBaseClass jasdl.bb.JASDLBeliefBase;
@@ -44,7 +55,9 @@
[
jasdl_ontologies="c,s",
jasdl_c_uri="/onts/commerce.owl",
- jasdl_s_uri="/onts/society.owl"
+ jasdl_s_uri="/onts/society.owl",
+
+ jasdl_useContraction = "true"
]
#3
agentArchClass jasdl.architecture.JASDLAgArch
Modified: trunk/applications/jasdl-owlapi/examples/commerce/onts/commerce.owl
===================================================================
--- trunk/applications/jasdl-owlapi/examples/commerce/onts/commerce.owl 2008-04-22 16:46:22 UTC (rev 1239)
+++ trunk/applications/jasdl-owlapi/examples/commerce/onts/commerce.owl 2008-04-22 18:25:14 UTC (rev 1240)
@@ -40,7 +40,6 @@
<owl:ObjectProperty rdf:about="#contains">
<rdf:type rdf:resource="&owl;TransitiveProperty"/>
- <rdfs:range rdf:resource="#Ingredient"/>
<rdfs:domain rdf:resource="#Product"/>
</owl:ObjectProperty>
@@ -59,7 +58,6 @@
<!-- http://www.dur.ac.uk/t.g.klapiscak/onts/commerce.owl#hasCustomer -->
<owl:ObjectProperty rdf:about="#hasCustomer">
- <rdf:type rdf:resource="&owl;InverseFunctionalProperty"/>
<rdfs:domain rdf:resource="#Order"/>
</owl:ObjectProperty>
@@ -68,13 +66,21 @@
<!-- http://www.dur.ac.uk/t.g.klapiscak/onts/commerce.owl#hasOrder -->
<owl:ObjectProperty rdf:about="#hasOrder">
- <rdf:type rdf:resource="&owl;FunctionalProperty"/>
<rdfs:range rdf:resource="#Order"/>
<owl:inverseOf rdf:resource="#hasCustomer"/>
</owl:ObjectProperty>
+ <!-- http://www.dur.ac.uk/t.g.klapiscak/onts/commerce.owl#hasShop -->
+
+ <owl:ObjectProperty rdf:about="#hasShop">
+ <rdf:type rdf:resource="&owl;FunctionalProperty"/>
+ <rdfs:domain rdf:resource="#Purchase"/>
+ </owl:ObjectProperty>
+
+
+
<!-- http://www.dur.ac.uk/t.g.klapiscak/onts/commerce.owl#includedIn -->
<owl:ObjectProperty rdf:about="#includedIn">
@@ -123,16 +129,6 @@
- <!-- http://www.dur.ac.uk/t.g.klapiscak/onts/commerce.owl#hasProductDescription -->
-
- <owl:DatatypeProperty rdf:about="#hasProductDescription">
- <rdf:type rdf:resource="&owl;FunctionalProperty"/>
- <rdfs:domain rdf:resource="#Purchase"/>
- <rdfs:range rdf:resource="&xsd;string"/>
- </owl:DatatypeProperty>
-
-
-
<!-- http://www.dur.ac.uk/t.g.klapiscak/onts/commerce.owl#hasQuantity -->
<owl:DatatypeProperty rdf:about="#hasQuantity">
@@ -143,25 +139,6 @@
- <!-- http://www.dur.ac.uk/t.g.klapiscak/onts/commerce.owl#hasShopDescription -->
-
- <owl:DatatypeProperty rdf:about="#hasShopDescription">
- <rdfs:domain rdf:resource="#Purchase"/>
- <rdfs:range rdf:resource="&xsd;string"/>
- </owl:DatatypeProperty>
-
-
-
- <!-- http://www.dur.ac.uk/t.g.klapiscak/onts/commerce.owl#hasVolume -->
-
- <owl:DatatypeProperty rdf:about="#hasVolume">
- <rdf:type rdf:resource="&owl;FunctionalProperty"/>
- <rdfs:domain rdf:resource="#Product"/>
- <rdfs:range rdf:resource="&xsd;double"/>
- </owl:DatatypeProperty>
-
-
-
<!-- http://www.dur.ac.uk/t.g.klapiscak/onts/commerce.owl#hasWeight -->
<owl:DatatypeProperty rdf:about="#hasWeight">
@@ -183,26 +160,10 @@
- <!-- http://www.dur.ac.uk/t.g.klapiscak/onts/commerce.owl#Allergen -->
-
- <owl:Class rdf:about="#Allergen">
- <rdfs:subClassOf rdf:resource="#Ingredient"/>
- <rdfs:comment
- >Ingredients that are common allergens</rdfs:comment>
- </owl:Class>
-
-
-
<!-- http://www.dur.ac.uk/t.g.klapiscak/onts/commerce.owl#Beef -->
<owl:Class rdf:about="#Beef">
- <owl:equivalentClass>
- <owl:Restriction>
- <owl:onProperty rdf:resource="#contains"/>
- <owl:hasValue rdf:resource="#BeefIngredient"/>
- </owl:Restriction>
- </owl:equivalentClass>
- <rdfs:subClassOf rdf:resource="#Meat"/>
+ <rdfs:subClassOf rdf:resource="#MeatProduct"/>
<owl:disjointWith rdf:resource="#Chicken"/>
<owl:disjointWith rdf:resource="#Lamb"/>
</owl:Class>
@@ -212,12 +173,6 @@
<!-- http://www.dur.ac.uk/t.g.klapiscak/onts/commerce.owl#Bread -->
<owl:Class rdf:about="#Bread">
- <owl:equivalentClass>
- <owl:Restriction>
- <owl:onProperty rdf:resource="#contains"/>
- <owl:hasValue rdf:resource="#Gluten"/>
- </owl:Restriction>
- </owl:equivalentClass>
<rdfs:subClassOf rdf:resource="#Grocery"/>
</owl:Class>
@@ -234,94 +189,18 @@
<!-- http://www.dur.ac.uk/t.g.klapiscak/onts/commerce.owl#Chicken -->
<owl:Class rdf:about="#Chicken">
- <owl:equivalentClass>
- <owl:Restriction>
- <owl:onProperty rdf:resource="#contains"/>
- <owl:hasValue rdf:resource="#ChickenIngredient"/>
- </owl:Restriction>
- </owl:equivalentClass>
- <rdfs:subClassOf rdf:resource="#Meat"/>
+ <rdfs:subClassOf rdf:resource="#MeatProduct"/>
<owl:disjointWith rdf:resource="#Lamb"/>
</owl:Class>
- <!-- http://www.dur.ac.uk/t.g.klapiscak/onts/commerce.owl#ContainsGluten -->
-
- <owl:Class rdf:about="#ContainsGluten">
- <owl:equivalentClass>
- <owl:Class>
- <owl:intersectionOf rdf:parseType="Collection">
- <owl:Restriction>
- <owl:onProperty rdf:resource="#contains"/>
- <owl:hasValue rdf:resource="#Gluten"/>
- </owl:Restriction>
- <rdf:Description rdf:about="#Grocery"/>
- </owl:intersectionOf>
- </owl:Class>
- </owl:equivalentClass>
- </owl:Class>
-
-
-
- <!-- http://www.dur.ac.uk/t.g.klapiscak/onts/commerce.owl#ContainsLactose -->
-
- <owl:Class rdf:about="#ContainsLactose">
- <owl:equivalentClass>
- <owl:Class>
- <owl:intersectionOf rdf:parseType="Collection">
- <owl:Restriction>
- <owl:onProperty rdf:resource="#contains"/>
- <owl:hasValue rdf:resource="#Lactose"/>
- </owl:Restriction>
- <rdf:Description rdf:about="#Grocery"/>
- </owl:intersectionOf>
- </owl:Class>
- </owl:equivalentClass>
- </owl:Class>
-
-
-
- <!-- http://www.dur.ac.uk/t.g.klapiscak/onts/commerce.owl#ContainsMeat -->
-
- <owl:Class rdf:about="#ContainsMeat">
- <owl:equivalentClass>
- <owl:Class>
- <owl:intersectionOf rdf:parseType="Collection">
- <rdf:Description rdf:about="#Grocery"/>
- <owl:Restriction>
- <owl:onProperty rdf:resource="#contains"/>
- <owl:someValuesFrom rdf:resource="#MeatIngredient"/>
- </owl:Restriction>
- </owl:intersectionOf>
- </owl:Class>
- </owl:equivalentClass>
- </owl:Class>
-
-
-
- <!-- http://www.dur.ac.uk/t.g.klapiscak/onts/commerce.owl#ContainsNuts -->
-
- <owl:Class rdf:about="#ContainsNuts">
- <owl:equivalentClass>
- <owl:Class>
- <owl:intersectionOf rdf:parseType="Collection">
- <owl:Restriction>
- <owl:onProperty rdf:resource="#contains"/>
- <owl:hasValue rdf:resource="#Nuts"/>
- </owl:Restriction>
- <rdf:Description rdf:about="#Grocery"/>
- </owl:intersectionOf>
- </owl:Class>
- </owl:equivalentClass>
- </owl:Class>
-
-
-
<!-- http://www.dur.ac.uk/t.g.klapiscak/onts/commerce.owl#Cream -->
<owl:Class rdf:about="#Cream">
<rdfs:subClassOf rdf:resource="#Dairy"/>
+ <owl:disjointWith rdf:resource="#Butter"/>
+ <owl:disjointWith rdf:resource="#Milk"/>
</owl:Class>
@@ -329,12 +208,6 @@
<!-- http://www.dur.ac.uk/t.g.klapiscak/onts/commerce.owl#Dairy -->
<owl:Class rdf:about="#Dairy">
- <owl:equivalentClass>
- <owl:Restriction>
- <owl:onProperty rdf:resource="#contains"/>
- <owl:hasValue rdf:resource="#Lactose"/>
- </owl:Restriction>
- </owl:equivalentClass>
<rdfs:subClassOf rdf:resource="#Grocery"/>
</owl:Class>
@@ -343,13 +216,7 @@
<!-- http://www.dur.ac.uk/t.g.klapiscak/onts/commerce.owl#Fish -->
<owl:Class rdf:about="#Fish">
- <owl:equivalentClass>
- <owl:Restriction>
- <owl:onProperty rdf:resource="#contains"/>
- <owl:hasValue rdf:resource="#FishIngredient"/>
- </owl:Restriction>
- </owl:equivalentClass>
- <rdfs:subClassOf rdf:resource="#Meat"/>
+ <rdfs:subClassOf rdf:resource="#MeatProduct"/>
<owl:disjointWith rdf:resource="#Beef"/>
<owl:disjointWith rdf:resource="#Chicken"/>
<owl:disjointWith rdf:resource="#Lamb"/>
@@ -357,20 +224,18 @@
- <!-- http://www.dur.ac.uk/t.g.klapiscak/onts/commerce.owl#Grocery -->
+ <!-- http://www.dur.ac.uk/t.g.klapiscak/onts/commerce.owl#GreenVegetable -->
- <owl:Class rdf:about="#Grocery">
- <rdfs:subClassOf rdf:resource="#Product"/>
+ <owl:Class rdf:about="#GreenVegetable">
+ <rdfs:subClassOf rdf:resource="#Vegetable"/>
</owl:Class>
- <!-- http://www.dur.ac.uk/t.g.klapiscak/onts/commerce.owl#Ingredient -->
+ <!-- http://www.dur.ac.uk/t.g.klapiscak/onts/commerce.owl#Grocery -->
- <owl:Class rdf:about="#Ingredient">
- <rdfs:subClassOf rdf:resource="#Grocery"/>
- <rdfs:comment
- >Ingredients that must be noted since some people cannot eat them</rdfs:comment>
+ <owl:Class rdf:about="#Grocery">
+ <rdfs:subClassOf rdf:resource="#Product"/>
</owl:Class>
@@ -378,40 +243,25 @@
<!-- http://www.dur.ac.uk/t.g.klapiscak/onts/commerce.owl#Lamb -->
<owl:Class rdf:about="#Lamb">
- <owl:equivalentClass>
- <owl:Restriction>
- <owl:onProperty rdf:resource="#contains"/>
- <owl:hasValue rdf:resource="#LambIngredient"/>
- </owl:Restriction>
- </owl:equivalentClass>
- <rdfs:subClassOf rdf:resource="#Meat"/>
+ <rdfs:subClassOf rdf:resource="#MeatProduct"/>
</owl:Class>
- <!-- http://www.dur.ac.uk/t.g.klapiscak/onts/commerce.owl#Meat -->
+ <!-- http://www.dur.ac.uk/t.g.klapiscak/onts/commerce.owl#MeatProduct -->
- <owl:Class rdf:about="#Meat">
+ <owl:Class rdf:about="#MeatProduct">
<rdfs:subClassOf rdf:resource="#Grocery"/>
<owl:disjointWith rdf:resource="#Vegetable"/>
</owl:Class>
- <!-- http://www.dur.ac.uk/t.g.klapiscak/onts/commerce.owl#MeatIngredient -->
-
- <owl:Class rdf:about="#MeatIngredient">
- <rdfs:subClassOf rdf:resource="#Ingredient"/>
- <rdfs:comment
- >Types of meat that food may contain</rdfs:comment>
- </owl:Class>
-
-
-
<!-- http://www.dur.ac.uk/t.g.klapiscak/onts/commerce.owl#Milk -->
<owl:Class rdf:about="#Milk">
<rdfs:subClassOf rdf:resource="#Dairy"/>
+ <owl:disjointWith rdf:resource="#Butter"/>
</owl:Class>
@@ -430,20 +280,6 @@
<owl:Class rdf:about="#Product">
<rdfs:subClassOf rdf:resource="&owl;Thing"/>
- <rdfs:subClassOf>
- <owl:Class>
- <owl:unionOf rdf:parseType="Collection">
- <owl:Restriction>
- <owl:onProperty rdf:resource="#hasVolume"/>
- <owl:someValuesFrom rdf:resource="&xsd;double"/>
- </owl:Restriction>
- <owl:Restriction>
- <owl:onProperty rdf:resource="#hasWeight"/>
- <owl:someValuesFrom rdf:resource="&xsd;double"/>
- </owl:Restriction>
- </owl:unionOf>
- </owl:Class>
- </rdfs:subClassOf>
</owl:Class>
@@ -464,15 +300,19 @@
+ <!-- http://www.dur.ac.uk/t.g.klapiscak/onts/commerce.owl#RootVegetable -->
+
+ <owl:Class rdf:about="#RootVegetable">
+ <rdfs:subClassOf rdf:resource="#Vegetable"/>
+ <owl:disjointWith rdf:resource="#GreenVegetable"/>
+ </owl:Class>
+
+
+
<!-- http://www.dur.ac.uk/t.g.klapiscak/onts/commerce.owl#ShepherdsPie -->
<owl:Class rdf:about="#ShepherdsPie">
- <owl:equivalentClass>
- <owl:Restriction>
- <owl:onProperty rdf:resource="#contains"/>
- <owl:hasValue rdf:resource="#BeefIngredient"/>
- </owl:Restriction>
- </owl:equivalentClass>
+ <rdfs:subClassOf rdf:resource="#MeatProduct"/>
<rdfs:subClassOf rdf:resource="#ReadyMeal"/>
</owl:Class>
@@ -490,6 +330,7 @@
<owl:Class rdf:about="#VegetableCurry">
<rdfs:subClassOf rdf:resource="#ReadyMeal"/>
+ <owl:disjointWith rdf:resource="#ShepherdsPie"/>
</owl:Class>
@@ -497,88 +338,4 @@
<!-- http://www.w3.org/2002/07/owl#Thing -->
<owl:Class rdf:about="&owl;Thing"/>
-
-
-
- <!--
- ///////////////////////////////////////////////////////////////////////////////////////
- //
- // Individuals
- //
- ///////////////////////////////////////////////////////////////////////////////////////
- -->
-
-
-
-
- <!-- http://www.dur.ac.uk/t.g.klapiscak/onts/commerce.owl#BeefIngredient -->
-
- <MeatIngredient rdf:about="#BeefIngredient"/>
-
-
-
- <!-- http://www.dur.ac.uk/t.g.klapiscak/onts/commerce.owl#ChickenIngredient -->
-
- <MeatIngredient rdf:about="#ChickenIngredient"/>
-
-
-
- <!-- http://www.dur.ac.uk/t.g.klapiscak/onts/commerce.owl#FishIngredient -->
-
- <MeatIngredient rdf:about="#FishIngredient"/>
-
-
-
- <!-- http://www.dur.ac.uk/t.g.klapiscak/onts/commerce.owl#Gluten -->
-
- <Allergen rdf:about="#Gluten"/>
-
-
-
- <!-- http://www.dur.ac.uk/t.g.klapiscak/onts/commerce.owl#Lactose -->
-
- <Allergen rdf:about="#Lactose"/>
-
-
-
- <!-- http://www.dur.ac.uk/t.g.klapiscak/onts/commerce.owl#LambIngredient -->
-
- <MeatIngredient rdf:about="#LambIngredient"/>
-
-
-
- <!-- http://www.dur.ac.uk/t.g.klapiscak/onts/commerce.owl#Nuts -->
-
- <Allergen rdf:about="#Nuts"/>
-
-
-
- <!-- http://www.dur.ac.uk/t.g.klapiscak/onts/commerce.owl#sdfsdf -->
-
- <Product rdf:about="#sdfsdf">
- <hasInStock rdf:datatype="&xsd;int">1</hasInStock>
- </Product>
-
-
-
- <!--
- ///////////////////////////////////////////////////////////////////////////////////////
- //
- // General axioms
- //
- ///////////////////////////////////////////////////////////////////////////////////////
- -->
-
- <rdf:Description>
- <rdf:type rdf:resource="&owl;AllDifferent"/>
- <owl:distinctMembers rdf:parseType="Collection">
- <rdf:Description rdf:about="#BeefIngredient"/>
- <rdf:Description rdf:about="#LambIngredient"/>
- <rdf:Description rdf:about="#Gluten"/>
- <rdf:Description rdf:about="#ChickenIngredient"/>
- <rdf:Description rdf:about="#FishIngredient"/>
- <rdf:Description rdf:about="#Nuts"/>
- <rdf:Description rdf:about="#Lactose"/>
- </owl:distinctMembers>
- </rdf:Description>
</rdf:RDF>
Modified: trunk/applications/jasdl-owlapi/examples/commerce/onts/society.owl
===================================================================
--- trunk/applications/jasdl-owlapi/examples/commerce/onts/society.owl 2008-04-22 16:46:22 UTC (rev 1239)
+++ trunk/applications/jasdl-owlapi/examples/commerce/onts/society.owl 2008-04-22 18:25:14 UTC (rev 1240)
@@ -216,6 +216,18 @@
+ <!-- http://www.dur.ac.uk/t.g.klapiscak/onts/society.owl#delivery_van_3 -->
+
+ <rdf:Description rdf:about="#delivery_van_3"/>
+
+
+
+ <!-- http://www.dur.ac.uk/t.g.klapiscak/onts/society.owl#delivery_van_4 -->
+
+ <rdf:Description rdf:about="#delivery_van_4"/>
+
+
+
<!-- http://www.dur.ac.uk/t.g.klapiscak/onts/society.owl#pa1 -->
<PA rdf:about="#pa1"/>
@@ -238,6 +250,7 @@
<Supermarket rdf:about="#shop1">
<employs rdf:resource="#delivery_van1"/>
+ <employs rdf:resource="#delivery_van_4"/>
<ownedBy rdf:resource="#tescos_inc"/>
</Supermarket>
@@ -252,6 +265,15 @@
+ <!-- http://www.dur.ac.uk/t.g.klapiscak/onts/society.owl#shop3 -->
+
+ <GreenGrocers rdf:about="#shop3">
+ <employs rdf:resource="#delivery_van_3"/>
+ <ownedBy rdf:resource="#tescos_inc"/>
+ </GreenGrocers>
+
+
+
<!-- http://www.dur.ac.uk/t.g.klapiscak/onts/society.owl#tescos_inc -->
<Company rdf:about="#tescos_inc"/>
@@ -269,17 +291,20 @@
<rdf:Description>
<rdf:type rdf:resource="&owl;AllDifferent"/>
<owl:distinctMembers rdf:parseType="Collection">
- <rdf:Description rdf:about="#pa3"/>
<rdf:Description rdf:about="#customer3"/>
- <rdf:Description rdf:about="#delivery_van1"/>
- <rdf:Description rdf:about="#pa2"/>
- <rdf:Description rdf:about="#shop1"/>
+ <rdf:Description rdf:about="#customer2"/>
+ <rdf:Description rdf:about="#shop2"/>
+ <rdf:Description rdf:about="#delivery_van2"/>
<rdf:Description rdf:about="#pa1"/>
+ <rdf:Description rdf:about="#delivery_van_3"/>
<rdf:Description rdf:about="#customer1"/>
- <rdf:Description rdf:about="#customer2"/>
<rdf:Description rdf:about="#tescos_inc"/>
- <rdf:Description rdf:about="#delivery_van2"/>
- <rdf:Description rdf:about="#shop2"/>
+ <rdf:Description rdf:about="#shop3"/>
+ <rdf:Description rdf:about="#shop1"/>
+ <rdf:Description rdf:about="#pa2"/>
+ <rdf:Description rdf:about="#delivery_van_4"/>
+ <rdf:Description rdf:about="#delivery_van1"/>
+ <rdf:Description rdf:about="#pa3"/>
</owl:distinctMembers>
</rdf:Description>
</rdf:RDF>
Property changes on: trunk/applications/jasdl-owlapi/examples/commerce/src/asl
___________________________________________________________________
Name: svn:ignore
+ sho222p.asl
Added: trunk/applications/jasdl-owlapi/examples/commerce/src/asl/common/commerce.asl
===================================================================
--- trunk/applications/jasdl-owlapi/examples/commerce/src/asl/common/commerce.asl (rev 0)
+++ trunk/applications/jasdl-owlapi/examples/commerce/src/asl/common/commerce.asl 2008-04-22 18:25:14 UTC (rev 1240)
@@ -0,0 +1,27 @@
++!abolish_order(Order) :
+ order(Order)[o(c)]
+ <-
+ // Abolish beliefs about purchases included in this order, we no longer need them
+ .findall(Purchase, includes(Order, Purchase)[o(c)], Purchases);
+ !abolish_purchases(Purchases);
+
+ -order(Order)[o(c), source(_)];
+ // note: inverse of hasOrder
+ -hasCustomer(Order, Customer)[o(c), source(_)].
+
++!abolish_purchases([]).
++!abolish_purchases([Purchase|Purchases])
+ <-
+ !abolish_purchase(Purchase);
+ !abolish_purchases(Purchases).
+
+
++!abolish_purchase(ID) :
+ purchase(ID)[o(c)]
+ <-
+ -hasProductDescription(ID, _)[o(c), source(_)];
+ -includedIn(ID, _)[o(c), source(_)];
+ -hasQuantity(ID, _)[o(c), source(_)];
+ -purchase(ID)[o(c), source(_)];
+ -hasShop(ID, _)[o(c), source(_)].
+
Modified: trunk/applications/jasdl-owlapi/examples/commerce/src/asl/customer.asl
===================================================================
--- trunk/applications/jasdl-owlapi/examples/commerce/src/asl/customer.asl 2008-04-22 16:46:22 UTC (rev 1239)
+++ trunk/applications/jasdl-owlapi/examples/commerce/src/asl/customer.asl 2008-04-22 18:25:14 UTC (rev 1240)
@@ -1,4 +1,5 @@
{include("common/society.asl")}
+{include("common/commerce.asl")}
/* Orders specified incrementally and tracked by PA. Allows real-time feedback about e.g. product availability
* Notice that ontology and syntactic translation is providing a well-defined shared vocabulary between agents.
@@ -8,12 +9,35 @@
* Assuming central repository of agents and their types (society.owl schema)
* IDs are propagated through annotations to match product request brands with quantities
*/
+
++!init
+ <-
+ // ask the PA if it already has a current order listed for this custoemr
+ ?employs(PA);
+ .send(PA, askOne, order(Order)[o(c)], false);
+
+ // ... it does not, give it a new order ID and associate it with this customer
+ ?employs(PA);
-
+ jasdl.ia.get_anonymous_individual(Order);
+
+ .my_name(Me);
+ +order(Order)[o(c)];
+ +hasOrder(Me, Order)[o(c)]; // note: inverse of hasCustomer
+
+ .send(PA, tell, order(Order)[o(c)]);
+ .send(PA, tell, hasOrder(Me, Order)[o(c)]).
+
+-!init.
+
+
+/**
+ * The user has hit the "submit request" button on the customer UI.
+ */
+ui_product_request(ProductDescription, ShopDescription, Qty)[source(percept)]
- <-
- .print("UI recieved request");
+ <-
+ !init;
// Get a PA employed by me
?employs(PA);
@@ -26,23 +50,45 @@
// then the PA would not be able to understand the request.
jasdl.ia.define_class(suitableProduct, ProductDescription);
- jasdl.ia.define_class(suitableShop, ShopDescription);
+ jasdl.ia.define_class(suitableShop, ShopDescription);
-
// Request a suitable brand from the PA
- jasdl.ia.send(PA, achieve, suitable(suitableProduct(_)[o(self)], suitableShop(_)[o(self)], Qty)).
-
-
-+!product(Brand)[o(c), source(PA), approve, id(ID)] :
- employs(PA)
+ .send(PA, achieve, suitable(suitableProduct(_)[o(self)], suitableShop(_)[o(self)], Qty)).
+
+/*
+ * The user has hit the "confirm order" button on the customer UI.
+ */
++ui_confirm_order[source(Percept)]
<-
- approve(Brand);
- .send(PA, tell, approved(product(Brand)[o(c), id(ID)])).
+ // Find the PA I employ
+ ?employs(PA);
+ // Ask the PA to achieve the state of affairs such that the customer's current order is confirmed with the necessary shop agents.
+ .send(PA, achieve, order_confirmed).
+
+/**
+ * A message has been recieved from the PA. Execute the "message" environmental action,
+ * thus displaying a dialog box on the customer UI.
+ */
++message(Message)[source(PA)] : pA(PA)[o(s)]
+ <-
+ // We no longer need (or want) this belief
+ -message(Message)[source(PA)];
+ // Display the dialog on the customer UI
+ message(Message).
--!product(Brand)[o(c), source(PA), approve, id(ID)] :
- employs(PA)
+/**
+ * The PA has asked for approval from the customer to make a purchase (identified by the approve annotation).
+ * This results in the execution of the "approve" environmental action. This displays a confirm dialog on the
+ * customer UI and suspends the thread awaiting a response.
+ * The event and resulting response is annotated with the id annotation, thus allowing the PA to match
+ * the approval response with the correct purchase.
+ */
++?approve(Brand, Answer)
<-
- .send(PA, tell, rejected(product(Brand)[o(c), id(ID)])).
+ // Execute the "approve" environmental action
+ approve(Brand);
+ // Will only be reached if the user hits "OK" - otherwise the above environmental action will fail
+ Answer = true.
Modified: trunk/applications/jasdl-owlapi/examples/commerce/src/asl/delivery_van.asl
===================================================================
--- trunk/applications/jasdl-owlapi/examples/commerce/src/asl/delivery_van.asl 2008-04-22 16:46:22 UTC (rev 1239)
+++ trunk/applications/jasdl-owlapi/examples/commerce/src/asl/delivery_van.asl 2008-04-22 18:25:14 UTC (rev 1240)
@@ -1,4 +1,5 @@
{include("common/society.asl")}
+{include("common/commerce.asl")}
!init.
Modified: trunk/applications/jasdl-owlapi/examples/commerce/src/asl/pa.asl
===================================================================
--- trunk/applications/jasdl-owlapi/examples/commerce/src/asl/pa.asl 2008-04-22 16:46:22 UTC (rev 1239)
+++ trunk/applications/jasdl-owlapi/examples/commerce/src/asl/pa.asl 2008-04-22 18:25:14 UTC (rev 1240)
@@ -1,131 +1,146 @@
{include("common/society.asl")}
+{include("common/commerce.asl")}
+/** Plans that are called by the customer agent */
-+!suitable(ProductClass, ShopClass, Qty)[source(Customer)] :
- isEmployedBy(Customer)
- <-
- ?hasOrder(Customer, Order)[o(c)];
- .print(Order);
++!suitable(ProductClass, ShopClass, Qty)
+ <-
+ ?isEmployedBy(Customer);
+
+ ?hasOrder(Customer, Order)[o(c)];
+
+ ?ShopClass;
+ jasdl.ia.get_individual(ShopClass, Shop);
- ?ShopClass;
- jasdl.ia.get_individual(ShopClass, Shop);
+ // Generate a unique (guaranteed across entire agent society) request identifier (individual) for the new purchase
+ jasdl.ia.get_anonymous_individual(ID);
+ jasdl.ia.get_class_definition(ProductClass, ProductDescription);
+
+ // Add the condition that the product must be in stock (this is not something the customer should be concerned with)
+ .concat("(",ProductDescription,") and c:hasInStock some integer [ >= ",Qty,"]",ProductDescriptionInStock);
+
+ // Parse the product description into a class
+ jasdl.ia.define_class(productInStock, ProductDescriptionInStock);
+
+ .print("Asking ",Shop,":", ProductDescriptionInStock);
+
+ // Ask for all brands that match these criteria
+ .send(Shop, askOne,
+ productInStock(Brand)[o(self), id(ID), stockist(Stockist), jasdl_tg_cause(_)],
+ productInStock(Brand)[o(self), id(ID), stockist(Stockist), jasdl_tg_cause(_)]);
+
+ .print(Stockist);
- // Generate a unique (guaranteed across entire agent society) request identifier (individual)
- jasdl.ia.get_anonymous_individual(ID);
-
- jasdl.ia.get_class_definition(ShopClass, ShopDescription);
- jasdl.ia.get_class_definition(ProductClass, ProductDescription);
-
- // Add the condition that the product must be in stock (this is not something the customer should be concerned with)
- .concat("(",ProductDescription,") and c:hasInStock some integer [ >= ",Qty,"]",ProductDescriptionInStock);
-
- // Parse the product description into a class
- jasdl.ia.define_class(productInStock, ProductDescriptionInStock);
-
- .print("Asking ",Shop,":", ProductDescriptionInStock);
-
- // Ask for all brands that match these criteria
- //jasdl.ia.send(Shop, achieve, suitable(description(Brand)[o(self)])[id(ID)]).
- jasdl.ia.send(Shop, askOne, productInStock(Brand)[o(self), id(ID)]);
+ // ask for the customer's approval
+ !!approve(ID, Brand, ProductDescription, Shop, Qty, Order, Stockist).
+
- +purchase(ID)[o(c)];
- +includes(Order, ID)[o(c)];
- +hasQuantity(ID, Qty)[o(c)];
- +hasProductDescription(ID, ProductDescription)[o(c)];
- +hasShopDescription(ID, ShopDescription)[o(c)].
-
-
-+product(Brand)[o(c), id(ID), source(Shop)] :
- shop(Shop)[o(s)] // from a known shop
+
++!approve(ID, Brand, ProductDescription, Shop, Qty, Order, Stockist)
<-
- !approve(product(Brand)[o(c), id(ID)]).
-
-+referral(Referred)[id(ID), source(Shop)] :
- shop(Referred)[o(s)] &
- shop(Shop)[o(s)]
+ ?isEmployedBy(Customer);
+ .send(Customer, askOne,
+ approve(Brand, Answer),
+ approve(Brand, true));
+
+ // Commit the purchase details to the belief base
+ +hasBrand(ID, Brand)[o(c)];
+ +hasShop(ID, Stockist)[o(c)];
+ +includes(Order, ID)[o(c)];
+ +purchase(ID)[o(c)];
+ +hasQuantity(ID, Qty)[o(c)].
+
+-!approve(ID, Brand, ProductDescription, Shop, Qty, Order, Stockist)
<-
- -referral(Referred)[id(ID), source(Shop)];
- .print("referred to ", Referred).
+ ?isEmployedBy(Customer);
+
+ // Get the class describing the type of product, adding the additional requirement that it
+ // also not be the individual rejected by the customer
+ jasdl.ia.define_class(ammendedProductClass, "(",ProductDescription,") and not {c:",Brand,"}");
+
+ // We use the same achieve goal used by a customer here, effectively emulating a customer request, but with the ammended product
+ // description, given the customer's rejection
+ !suitable(ammendedProductClass(_)[o(self)], shop(Shop)[o(s)], Qty).
-+failed[id(ID), source(Shop)] :
- shop(Shop)[o(s)]
- <-
- !abolish_purchase(ID);
- .print("Failed!").
-+!approve(A)
+-!suitable(ProductClass, ShopClass, Qty)
+ <-
+ ?isEmployedBy(Customer);
+ .send(Customer, tell, message("I am sorry but I am unable to service your request."));
+ .fail.
+
+
++!order_confirmed[source(Customer)] : isEmployedBy(Customer)
<-
+ ?hasOrder(Customer, Order)[o(c)];
+ .findall(ID, purchase(ID)[o(c)], Purchases);
+ !order_confirmed(Purchases, []).
+
+-!order_confirmed[source(Customer)] : isEmployedBy(Customer) & not hasOrder(Customer, _)[o(c)]
+ <-
+ .send(Customer, tell, message("You must request some products first")).
+
+
++!order_confirmed([Purchase|Purchases], Shops)
+ <-
- // get my employer (rule expressed in terms of SE-Literals, see common/society.asl)
- ?isEmployedBy(Employer);
+ // Get the details of this purchase
+ ?hasBrand(Purchase, Brand)[o(c)];
+ ?hasQuantity(Purchase, Qty)[o(c)];
+ // JASDL current doesn't support domain-unground property queries
+ // Instead, we use inverse properties such as this one (includedIn is the inverse of includes)
+ // Note that both types of assertions have exactly the same meaning as far as JASDL is concerned
+ ?includedIn(Purchase, Order)[o(c)];
- .my_name(Me);
- .add_annot(A, source(Me), B);
-
- // ask customer for approval
- // We add the approve annotation to isolate this
- // type of query from others
- .add_annot(B, approve, C);
- .send(Employer, achieve, C).
-
-+approved(product(Brand)[o(c), id(ID)])[source(Employer)] :
- isEmployedBy(Employer)
+ // ... and send them to the appropriate shop agent
+ ?hasShop(Purchase, Shop)[o(c)];
+ .send(Shop, tell, purchase(Purchase)[o(c)]);
+ .send(Shop, tell, includedIn(Purchase, Order)[o(c)]);
+ .send(Shop, tell, hasBrand(Purchase, Brand)[o(c)]);
+ .send(Shop, tell, hasQuantity(Purchase, Qty)[o(c)]);
+
+ // Confirm the remaining purchases
+ !order_confirmed(Purchases, [Shop|Shops]).
+
+
++!order_confirmed([], Shops)
<-
- +hasBrand(ID, Brand)[o(c)];
- .print("Approved ", Brand, " (id: ", ID, ")").
+ // Now we have sent all purchase details, send the location where the order should be delivered to (i.e. the customer)
+ ?isEmployedBy(Customer);
+ ?hasOrder(Customer, Order)[o(c)];
+ .send(Shops, tell, hasCustomer(Order, Customer)[o(c)]);
+
+ // ... and finish with the order itself, which will instantiate the dispatch process in the shop agents
+ .send(Shops, tell, order(Order)[o(c)]);
+
+ // abolish the order (and all included purchases), we no longer need it
+ !abolish_order(Order);
-@sdfdsf[breakpoint]
-+rejected(product(Brand)[o(c), id(ID)])[source(Employer)] :
- isEmployedBy(Employer)
- <-
- ?includedIn(ID, Order)[o(c)];
- ?hasQuantity(ID, Qty)[o(c)];
- ?hasProductDescription(ID, ProductDescription)[o(c)];
- ?hasShopDescription(ID, ShopDescription)[o(c)];
-
- !abolish_purchase(ID);
-
- .concat("(",ProductDescription,") and not {c:",Brand,"}", AmmendedProductDescription);
+ // Inform the customer
+ .send(Customer, tell, message("Your order has been confirmed and will be dispatched shortly.")).
- .print("Rejected ", Brand, " (id: ", ID, ")");
+
+/******************************************************************************/
+
- // We need this individual to be instantiated in our own commerce ontology
- // to allow us to safely refer to it in class expressions
- //+product(Brand)[o(c)];
- // Get the class describing the type of product, adding the additional requirement that it
- // also not be the individual rejected by the customer
- jasdl.ia.define_class(ammendedProductClass, AmmendedProductDescription);
++failed(Message)[id(ID), source(Shop)] :
+ shop(Shop)[o(s)]
+ <-
+ // Remove this belief, we no longer need it
+ -failed(Message)[id(ID), source(Shop)];
- // Get the class describing the desired type of shop, without changing any requirements
- jasdl.ia.define_class(shopClass, ShopDescription);
+ // Delete all trace of the purchase
+ !abolish_purchase(ID);
- .print("Rejected ", Brand, ". Retry with shop=", ShopDescription, " and product=", AmmendedProductDescription);
-
- // We use the same achieve goal used by a customer here, effectively emulating a customer request, but with the ammended product
- // description, given the customer's rejection
- !suitable(ammendedProductClass(_)[o(self)], shopClass(_)[o(self)], Qty)[source(Employer)].
+ // Get the customer
+ ?isEmployedBy(Customer);
+
+ // Pass the news on to the customer
+ .send(Customer, tell, message(Message)).
-+!abolish_purchase(ID) :
- purchase(ID)[o(c)]
- <-
- -hasProductDescription(ID, _)[o(c), source(self)];
- -hasShopDescription(ID, _)[o(c), source(self)];
- -includedIn(ID, _)[o(c), source(self)];
- -hasQuantity(ID, _)[o(c), source(self)];
- -purchase(ID)[o(c), source(self)].
-
-/* Opening a new order.
- * Will only be generated with no order can be found (or at least none by this name)
- */
-+?hasOrder(Customer, Order)[o(c)] :
- isEmployedBy(Customer)
- <-
- jasdl.ia.get_anonymous_individual(Order);
- +hasOrder(Customer, Order)[o(c)].
-
Modified: trunk/applications/jasdl-owlapi/examples/commerce/src/asl/shop.asl
===================================================================
--- trunk/applications/jasdl-owlapi/examples/commerce/src/asl/shop.asl 2008-04-22 16:46:22 UTC (rev 1239)
+++ trunk/applications/jasdl-owlapi/examples/commerce/src/asl/shop.asl 2008-04-22 18:25:14 UTC (rev 1240)
@@ -1,113 +1,176 @@
{include("common/society.asl")}
+{include("common/commerce.asl")}
-+!kqml_received(Sender, askOne, Content[o(O), id(ID)], MsgId) :
- pA(PA)[o(s)]
- <-
- .add_annot(Content, source(Sender), X);
- .add_annot(X, o(O), Y);
- .add_annot(Y, id(ID), Z);
- ?Z.
+/*
+ * Unify with a shop that is a member of the class specified by Expression
+ *
+ * This is a good example of how certain JASDL features (such as run-time class definition and SE-Literal queries)
+ * can be conveniently expressed within a rule.
+ */
+possibleStockist(ID, Expression, PossibleStockist) :-
+ jasdl.ia.define_class(possibleStockist, Expression) &
+ possibleStockist(PossibleStockist)[o(self)] &
+ shopInSameCompany(PossibleStockist) & // note: this constraint could be more flexible by using an expression such as '' in the above class definition
+ not exhausted(ID)[source(PossibleStockist)] &
+ not (PossibleStockist == Me).
+
+/**
+ * Unify with a shop, other than this one, that is owned by the same company as this one.
+ */
+shopInSameCompany(Shop) :-
+ shop(Shop)[o(s)] &
+ .my_name(Me) &
+ ownedBy(Me, Company)[o(s)] &
+ owns(Company, Shop)[o(s)] &
+ (not Shop==Me).
-
-
-
-+?product(Brand)[o(c), id(ID), source(PA)] : JASDL_TG_CAUSE
+/*
+ * This shop has managed to find a suitable product in its belief base, directly
+ * in response to a PA. Respond to the PA, keeping id annotation intact so the
+ * PA can match this response with the customer's request.
+ */
+@found_product_for_PA
++?product(Brand)[o(c), id(ID), stockist(Me), jasdl_tg_cause(OriginalQuery)] :
+ OriginalQuery // the agent has found a suitable product within its belief base
<-
- //.add_annot(JASDL_TG_CAUSE, id(ID), Response);
- //.send(PA, tell, Response).
- jasdl.ia.get_individual(JASDL_TG_CAUSE, Brand);
- .print("Sending ", JASDL_TG_CAUSE);
- .send(PA, tell, product(Brand)[o(c), id(ID)]).
+ .print("Recieved request and is able to service it");
+ .my_name(Me);
+ jasdl.ia.get_individual(OriginalQuery, Brand).
-/** Plans dealing with a failure to find a suitable product within the belief-base of this agent */
-
-+?thing(Brand)[o(owl), id(ID), source(PA)] :
- not JASDL_TG_CAUSE
+/**
+ * Notice that the two plans below also with "not OriginalQuery" in their context will take precence over this one,
+ * since their are both more specific than owl:thing (which is the most general concept) - additionally, plan ordering
+ * is irrelevant here since JASDL automatically assigns precence according to concept specificity for trigger generalisation
+ */
++?thing(Brand)[o(owl), id(_), stockist(_), jasdl_tg_cause(OriginalQuery)] :
+ not OriginalQuery // the agent has found a suitable product within its belief base
<-
- .print("Requested unknown product, moreover, no other shops in this company can be identified to potentially service this request");
- .send(PA, tell, failure[id(ID)]).
+ .print("Recieved request and is UNABLE to service it");
+ .fail.
+
+/**
+ * Requested a type of product that this agent cannot supply, try asking any other shop.
+ */
++?product(Brand)[o(c), id(ID), stockist(PossibleStockist), jasdl_tg_cause(OriginalQuery)] :
+ not OriginalQuery &
+ possibleStockist(ID, "s:shop", PossibleStockist)
+ <-
+ .print("Unknown GENERAL PRODUCT requested");
+ !exhausted(ID);
+ ?stocked_by_another_shop(PossibleStockist, ID, OriginalQuery, Brand).
-+?product(Brand)[o(c), id(ID), source(PA)] :
- not JASDL_TG_CAUSE &
- .my_name(Me) &
- ownedBy(Me, Owner)[o(s)] &
- jasdl.ia.define_class(mightStock, "s:shop and s:ownedBy value s:",Owner," and (not {s:",Me,"})") &
- mightStock(Shop)[o(self)]
+/**
+ * Requested a type of vegetable product that this agent cannot supply, try asking a greengrocer or a supermarket.
+ */
++?vegetable(Brand)[o(c), id(ID), stockist(PossibleStockist), jasdl_tg_cause(OriginalQuery)] :
+ not OriginalQuery &
+ possibleStockist(ID, "s:greenGrocers or s:supermarket", PossibleStockist)
<-
- .print("Requested unknown product, attempting to refer to any other shop owned by this company");
- .send(PA, tell, referral(Shop)[id(ID)]).
+ .print("Unknown VEGETABLE PRODUCT requested");
+ !exhausted(ID);
+ ?stocked_by_another_shop(PossibleStockist, ID, OriginalQuery, Brand).
/**
- * No suitable product has been found in this agent's belief base. However,
- * because it is a type of meat product, it might be worth looking for butchers
- * owned by this company and referring to PA to them (if any are known).
- */
-+?meat(Brand)[o(c), id(ID), source(PA)] :
- not JASDL_TG_CAUSE &
- .my_name(Me) &
- ownedBy(Me, Owner)[o(s)] &
- jasdl.ia.define_class(mightStock, "s:butchers and s:ownedBy value s:",Owner," and (not {s:",Me,"})") &
- mightStock(Butchers)[o(self)]
+ * Requested a type of meat product that this agent cannot supply, try asking a butchers.
+ */
++?meatProduct(Brand)[o(c), id(ID), stockist(PossibleStockist), jasdl_tg_cause(OriginalQuery)] :
+ not OriginalQuery &
+ possibleStockist(ID, "s:butchers", PossibleStockist)
<-
- .print("Requested unknown meat product, attempting to refer to a butchers owned by this company");
- .send(PA, tell, referral(Butchers)[id(ID)]).
-
-/****************************************************************/
-
-
-
+ .print("Unknown MEAT PRODUCT requested");
+ !exhausted(ID);
+ ?stocked_by_another_shop(PossibleStockist, ID, OriginalQuery, Brand).
-
-+!add_to_order(Order, Brand, Qty)[source(PA)] :
- product(Brand)[o(c)] & // check known product brand
- hasCustomer(Order, Customer)[o(c)] & employs(Customer, PA)[o(s)] & // check PA is authorised to speak on behalf of customer whose order it is
- hasInStock(Brand, StockLevel)[o(c)] & StockLevel>=Qty // check we have enough stock
++?stocked_by_another_shop(PossibleStockist, ID, Query, Answer)
<-
+ .print("Trying ", PossibleStockist);
+ .add_annot(Query, id(ID), Q1);
+ .add_annot(Q1, stockist(PossibleStockist), Q2);
+ .add_annot(Q2, jasdl_tg_cause(_), Q3);
+ .send(PossibleStockist, askOne, Q3, Q3);
+ jasdl.ia.get_individual(Q3, Answer).
- // get a unique purchase identifier
- jasdl.ia.get_anonymous_individual(PID);
- // add purchase
- +purchase(PID)[o(c)];
- +includes(Order, PID)[o(c)];
- +hasBrand(PID, Brand)[o(c)];
- +hasQuantity(PID, Qty)[o(c)];
- .send(PA, tell, confirmed(Order, Brand, Qty)).
+
+/**
+ * Inform all shops that I have already been tried for this order and unable to service it
+ * (so I am not asked again)
+ */
++!exhausted(ID)
+ <-
+ .findall(Shop, shop(Shop)[o(s)], Shops);
+ .send(Shops, tell, exhausted(ID)).
+
++!reset(ID)
+ <-
+ .findall(Shop, shopInSameCompany(Shop), Shops);
+ .send(Shops, untell, exhausted(ID)).
+
-
-
-+!confirm_order(Order)[source(PA)] :
+
+
+/**
+ * All plans below this point deal with coordinating delivery with a delivery van employed by the shop.
+ * Note that these are not so interesting in terms of exploring JASDL extensions to Jason's core functionality, so
+ * don't worry about them too much.
+ */
+
+/**
+ * Attempts to find an avaiable delivery van (identified by available(Van)).
+ * Once found, it deletes the van's status as available.
+ * This plan must be atomic to prevent a van being allocated simultaneously to more
+ * than one order (i.e. multiple ?'s before we get a chance to remove the van's available status)
+ */
+
+
+ /**
+ * An order request has been recieved from a PA, coordinate delivery of it
+ */
++order(Order)[o(c), source(PA)] :
hasCustomer(Order, Customer)[o(c)] &
employs(Customer, PA)[o(s)]
<-
- !deploy(Order);
- !allocate_available(Van);
- !recall(Van);
- !load(Order, Van);
- !dispatch(Order, Van);
- !unload(Order, Van);
- +available(Van);
- .abolish(includes(Order, _)[o(c)]);
- .send(Customer, tell, order_complete(Order)).
-
-
-
+ // Delopy crates containing product
+ !deploy(Order);
+ // Obtain an available van (or suspend this intention until one it available)
+ !allocate_available(Van);
+ // Instruct this van to move to shop's position
+ !recall(Van);
+ // Instruct the van to load the deployed products into its cargo hold
+ !load(Order, Van);
+ // Instruct the van to move to the customer's position
+ !dispatch(Order, Van);
+ // Instruct the van to unload its cargo at its current position (i.e. the customer's)
+ !unload(Order, Van);
+ // Abolish beliefs about this order (and all included purchases), we no longer need them
+ !abolish_order(Order);
+ // Make the van available again
+ +available(Van).
+
@available[atomic]
+!allocate_available(Van)
<-
- ?available(Van)[source(_)];
- -available(Van)[source(_)].
-
+ ?available(Van)[source(_)];
+ -available(Van)[source(_)].
+
+/*
+ * The agent has attempted to find an available van (see above) within the belief base but has failed.
+ * Simply suspend the intention until a van notifies the agent that it is available.
+ */
+?available(Van)
<-
- .concat("+",available(Van)[source(_)], WaitFor);
- .wait(WaitFor);
- ?available(Van)[source(_)].
+ .concat("+",available(Van)[source(_)], WaitFor);
+ .wait(WaitFor);
+ ?available(Van)[source(_)].
+/**
+ * Achieve the state of affairs such that a van has loaded an entire order into its cargo.
+ * (Suspends the intention until this is so)
+ */
+!load(Order, Van) : .my_name(Me) & inVicinityOf(Van)
<-
-hasPosition(Van, X, Y)[source(Van)];
@@ -118,6 +181,10 @@
.wait(WaitFor);
-L.
+/**
+ * Achieve the state of affairs such that a van has unloaded its entire cargo at its current destination
+ * (Suspends the intention un...
[truncated message content] |
|
From: <jom...@us...> - 2008-04-22 16:46:32
|
Revision: 1239
http://jason.svn.sourceforge.net/jason/?rev=1239&view=rev
Author: jomifred
Date: 2008-04-22 09:46:22 -0700 (Tue, 22 Apr 2008)
Log Message:
-----------
experimentally remove import E.TE annots to Plan.TE annots
Modified Paths:
--------------
trunk/applications/as-unit-test/src/jason/tests/BugListReturnUnification.java
trunk/src/jason/asSemantics/IntendedMeans.java
trunk/src/jason/asSemantics/TransitionSystem.java
trunk/src/jason/asSyntax/Plan.java
Modified: trunk/applications/as-unit-test/src/jason/tests/BugListReturnUnification.java
===================================================================
--- trunk/applications/as-unit-test/src/jason/tests/BugListReturnUnification.java 2008-04-22 16:24:29 UTC (rev 1238)
+++ trunk/applications/as-unit-test/src/jason/tests/BugListReturnUnification.java 2008-04-22 16:46:22 UTC (rev 1239)
@@ -22,16 +22,25 @@
"+!test2 <- L=[A,B,C,D]; !bundle(L); jason.asunit.print(L). "+
"+!bundle([]). "+
- "+!bundle([a|T]) <- !bundle(T). "
+ "+!bundle([a|T]) <- !bundle(T). "+
+
+ "+!test3 <- !a(Y)[x(Z), y]; jason.asunit.print(Y, Z). "+
+ "+!a(Y)[x(Z),kk] <- Y=3; Z=4. "+
+ "+!a(Y)[x(Z),source(self)] <- Y=1; Z=2. "
);
}
@Test
- public void testContext() {
+ public void testList() {
ag.addGoal("test1");
ag.assertPrint("[a,a]", 10);
ag.addGoal("test2");
ag.assertPrint("[a,a,a,a]", 10);
}
+ @Test
+ public void testAnnots() {
+ ag.addGoal("test3");
+ ag.assertPrint("12", 10);
+ }
}
Modified: trunk/src/jason/asSemantics/IntendedMeans.java
===================================================================
--- trunk/src/jason/asSemantics/IntendedMeans.java 2008-04-22 16:24:29 UTC (rev 1238)
+++ trunk/src/jason/asSemantics/IntendedMeans.java 2008-04-22 16:46:22 UTC (rev 1239)
@@ -24,12 +24,11 @@
package jason.asSemantics;
-import jason.asSyntax.PlanBody;
-import jason.asSyntax.PlanBodyImpl;
import jason.asSyntax.ListTerm;
import jason.asSyntax.ListTermImpl;
-import jason.asSyntax.Literal;
import jason.asSyntax.Plan;
+import jason.asSyntax.PlanBody;
+import jason.asSyntax.PlanBodyImpl;
import jason.asSyntax.StringTermImpl;
import jason.asSyntax.Structure;
import jason.asSyntax.Term;
@@ -51,12 +50,15 @@
public IntendedMeans(Option opt, Trigger te) {
plan = opt.getPlan().cloneOnlyBody();
unif = opt.getUnifier(); //(Unifier)opt.getUnifier().clone();
+
+ // REMOVED: experimental
+ /*
Literal planLiteral = plan.getTrigger().getLiteral();
if (planLiteral.hasAnnot()) {
planLiteral.getAnnots().apply(unif);
// TODO: why?
- // if the plans.TE is not change, we do not need to clone it in plan.cloneBodyOnly
}
+ */
if (te == null) {
trigger = plan.getTrigger();
} else {
@@ -65,10 +67,9 @@
// add annots of the trigger into the plan's te
// so that the event +!g[source(ag1)] will add source(ag1)
// in the TE of the plan
- // TODO: why? -- in the TS.applyClrInt -- end of the method, the unification could be g,tel and not tel,g!
- // (the plan trigger will be used latter to "return" values
- // see TS.applyClrInt -- end of the method)
- planLiteral.addAnnots(trigger.getLiteral().getAnnots());
+ // TODO: why?
+ // REMOVED: experimental
+ //planLiteral.addAnnots(trigger.getLiteral().getAnnots());
}
}
Modified: trunk/src/jason/asSemantics/TransitionSystem.java
===================================================================
--- trunk/src/jason/asSemantics/TransitionSystem.java 2008-04-22 16:24:29 UTC (rev 1238)
+++ trunk/src/jason/asSemantics/TransitionSystem.java 2008-04-22 16:46:22 UTC (rev 1239)
@@ -657,7 +657,6 @@
// they are anonymous)
Literal tel = topIM.getPlan().getTrigger().getLiteral();
tel.apply(topIM.unif);
- // TODO: why not unifies(g,tel)?
im.unif.unifies(tel, g);
}
}
Modified: trunk/src/jason/asSyntax/Plan.java
===================================================================
--- trunk/src/jason/asSyntax/Plan.java 2008-04-22 16:24:29 UTC (rev 1238)
+++ trunk/src/jason/asSyntax/Plan.java 2008-04-22 16:46:22 UTC (rev 1239)
@@ -218,9 +218,9 @@
p.isAllUnifs = isAllUnifs;
}
- p.tevent = (Trigger)tevent.clone();
+ p.tevent = (Trigger)tevent.clone();
p.context = context;
- p.body = (PlanBody)body.clone();
+ p.body = (PlanBody)body.clone();
p.setSrc(this);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jom...@us...> - 2008-04-22 16:24:38
|
Revision: 1238
http://jason.svn.sourceforge.net/jason/?rev=1238&view=rev
Author: jomifred
Date: 2008-04-22 09:24:29 -0700 (Tue, 22 Apr 2008)
Log Message:
-----------
improvements in jason team
Modified Paths:
--------------
trunk/applications/jason-team/src/java/arch/ACArchitecture.java
trunk/applications/jason-team/src/java/arch/ACProxy.java
trunk/applications/jason-team/src/java/arch/CowboyArch.java
trunk/applications/jason-team/src/java/arch/LocalWorldModel.java
trunk/applications/jason-team/src/java/env/WorldModel.java
trunk/applications/jason-team/src/java/jia/Search.java
trunk/applications/jason-team/src/java/jia/Vec.java
trunk/applications/jason-team/src/java/jia/direction.java
trunk/applications/jason-team/src/java/jia/herd_position.java
trunk/applications/jason-team/src/java/test/TestBasicHerding.java
Modified: trunk/applications/jason-team/src/java/arch/ACArchitecture.java
===================================================================
--- trunk/applications/jason-team/src/java/arch/ACArchitecture.java 2008-04-22 11:20:01 UTC (rev 1237)
+++ trunk/applications/jason-team/src/java/arch/ACArchitecture.java 2008-04-22 16:24:29 UTC (rev 1238)
@@ -138,6 +138,7 @@
Queue<ActionExec> toExecute = new ConcurrentLinkedQueue<ActionExec>();
Lock lock = new ReentrantLock();
Condition cycle = lock.newCondition();
+ long timestartcycle = 0;
WaitSleep() {
super("WaitSpeepToSendAction");
@@ -155,24 +156,37 @@
}
void newCycle() {
- String w = "";
- if (lastActionInCurrentCycle == null) {
- addRestart();
- w = "*** ";
- }
- logger.info(w+"Last sent action was "+lastActionInCurrentCycle+" for cycle "+getCycle()+". The following was not sent: "+toExecute);
-
- setLastAct(lastActionInCurrentCycle);
- lastActionInCurrentCycle = null;
-
+ StringBuilder notsent = new StringBuilder();
+ if (toExecute.size() > 1) {
+ notsent.append(" The following was not sent: ");
+ }
// set all actions as successfully executed
List<ActionExec> feedback = getTS().getC().getFeedbackActions();
while (!toExecute.isEmpty()) {
ActionExec action = toExecute.poll();
action.setResult(true);
feedback.add(action);
+ if (!toExecute.isEmpty())
+ notsent.append(action.getActionTerm()+" ");
}
go(); // reset the wait
+
+ // prepare msg to print out
+ String w = "";
+ if (lastActionInCurrentCycle == null) {
+ addRestart();
+ w = "*** ";
+ }
+
+ long timetoact = 0;
+ if (timestartcycle > 0) {
+ timetoact = System.currentTimeMillis() - timestartcycle;
+ }
+ timestartcycle = System.currentTimeMillis();
+
+ logger.info(w+"Last sent action was "+lastActionInCurrentCycle+" for cycle "+getCycle()+ " (act in "+timetoact+" ms). "+notsent);
+ setLastAct(lastActionInCurrentCycle);
+ lastActionInCurrentCycle = null;
}
void go() {
Modified: trunk/applications/jason-team/src/java/arch/ACProxy.java
===================================================================
--- trunk/applications/jason-team/src/java/arch/ACProxy.java 2008-04-22 11:20:01 UTC (rev 1237)
+++ trunk/applications/jason-team/src/java/arch/ACProxy.java 2008-04-22 16:24:29 UTC (rev 1238)
@@ -206,7 +206,7 @@
}
- arq.sendCowsToTeam();
+ //arq.sendCowsToTeam();
arq.startNextStep(step, percepts);
//if (logger.isLoggable(Level.FINE))
Modified: trunk/applications/jason-team/src/java/arch/CowboyArch.java
===================================================================
--- trunk/applications/jason-team/src/java/arch/CowboyArch.java 2008-04-22 11:20:01 UTC (rev 1237)
+++ trunk/applications/jason-team/src/java/arch/CowboyArch.java 2008-04-22 16:24:29 UTC (rev 1238)
@@ -319,10 +319,12 @@
while (im.hasNext()) {
Message m = im.next();
if (m.getIlForce().equals("tell-cows")) {
- for (Location l: (Collection<Location>)m.getPropCont()) {
- cowPerceived(l.x, l.y);
+ im.remove();
+ if (model != null) {
+ for (Location l: (Collection<Location>)m.getPropCont()) {
+ cowPerceived(l.x, l.y);
+ }
}
- im.remove();
} else {
String ms = m.getPropCont().toString();
if (ms.startsWith("cell") && ms.endsWith("obstacle)") && model != null) {
Modified: trunk/applications/jason-team/src/java/arch/LocalWorldModel.java
===================================================================
--- trunk/applications/jason-team/src/java/arch/LocalWorldModel.java 2008-04-22 11:20:01 UTC (rev 1237)
+++ trunk/applications/jason-team/src/java/arch/LocalWorldModel.java 2008-04-22 16:24:29 UTC (rev 1238)
@@ -23,9 +23,13 @@
int minVisited = 0; // min value for near least visited
private Random random = new Random();
-
+
Set<Location> cows = new HashSet<Location>();
+ int[][] cowsrep; // cows repulsion
+ int[][] agsrep; // agents repulsion
+ int[][] obsrep; // obstacle repulsion
+
//private Logger logger = Logger.getLogger("jasonTeamSimLocal.mas2j." + LocalWorldModel.class.getName());
public static LocalWorldModel create(int w, int h, int nbAg) {
@@ -40,39 +44,109 @@
super(w, h, nbAg);
visited = new int[getWidth()][getHeight()];
- for (int i = 0; i < getWidth(); i++) {
- for (int j = 0; j < getHeight(); j++) {
+ for (int i = 0; i < getWidth(); i++)
+ for (int j = 0; j < getHeight(); j++)
visited[i][j] = 0;
- }
- }
+
+ cowsrep = new int[getWidth()][getHeight()];
+
+ agsrep = new int[getWidth()][getHeight()];
+ for (int i = 0; i < getWidth(); i++)
+ for (int j = 0; j < getHeight(); j++)
+ agsrep[i][j] = 0;
+
+ obsrep = new int[getWidth()][getHeight()];
+ for (int i = 0; i < getWidth(); i++)
+ for (int j = 0; j < getHeight(); j++)
+ obsrep[i][j] = 0;
+
}
+
+ @Override
+ public void add(int value, int x, int y) {
+ super.add(value, x, y);
+ //if (value == WorldModel.AGENT || value == WorldModel.ENEMY) {
+ if (value == WorldModel.ENEMY) {
+ increp(agsrep, x, y, 2, 2);
+ } else if (value == WorldModel.OBSTACLE) {
+ increp(obsrep, x, y, 1, 1);
+ }
+ }
+ @Override
+ public void remove(int value, int x, int y) {
+ super.remove(value, x, y);
+ //if (value == WorldModel.AGENT || value == WorldModel.ENEMY) {
+ if (value == WorldModel.ENEMY) {
+ increp(agsrep, x, y, 2, -2);
+ }
+ }
+
public void clearCows() {
removeAll(WorldModel.COW);
+
+ for (int i = 0; i < getWidth(); i++)
+ for (int j = 0; j < getHeight(); j++)
+ cowsrep[i][j] = 0;
+
cows.clear();
}
+
public void addCow(int x, int y) {
add(WorldModel.COW, x, y);
cows.add(new Location(x,y));
+
+ increp(cowsrep, x, y, 2, 1);
}
+
+ private void increp(int[][] m, int x, int y, int maxr, int value) {
+ for (int r = 1; r <= maxr; r++)
+ for (int c = x-r; c <= x+r; c++)
+ for (int l = y-r; l <= y+r; l++)
+ if (inGrid(c,l))
+ m[c][l] += value;
+ }
+
public void addCow(Location l) {
addCow(l.x, l.y);
}
+
public Collection<Location> getCows() {
return cows;
}
+
+ public int getCowsRep(int x, int y) {
+ return cowsrep[x][y];
+ }
+ public int getAgsRep(int x, int y) {
+ return agsrep[x][y];
+ }
+ public int getObsRep(int x, int y) {
+ return obsrep[x][y];
+ }
public Location nearFree(Location l) throws Exception {
int w = 0;
List<Location> options = new ArrayList<Location>();
while (true) {
options.clear();
+ for (int y=l.y-w+1; y<l.y+w; y++) {
+ //System.out.println(" "+(l.x+w)+" "+y);
+ //System.out.println(" "+(l.x-w)+" "+y);
+ if (isFree(l.x-w,y))
+ options.add(new Location(l.x-w,y));
+ if (isFree(l.x+w,y))
+ options.add(new Location(l.x+w,y));
+ }
for (int x=l.x-w; x<=l.x+w;x++) {
+ //System.out.println(" "+x+" "+(l.y-w));
+ //System.out.println(" "+x+" "+(l.y+w));
if (isFree(x,l.y-w))
options.add(new Location(x,l.y-w));
if (isFree(x,l.y+w))
options.add(new Location(x,l.y+w));
}
+ //System.out.println(w + " " + options);
if (!options.isEmpty())
return options.get(random.nextInt(options.size()));
w++;
@@ -100,15 +174,13 @@
}
public void incVisited(int x, int y) {
visited[x][y] += 2;
-
- // TODO: review this
- if (x > 0) visited[x-1][y]++;
- if (y > 0) visited[x][y-1]++;
- if (y > 0 && x > 0) visited[x-1][y-1]++;
- if (y+1 < getHeight()) visited[x][y+1]++;
- if (x > 0 && y+1 < getHeight()) visited[x-1][y+1]++;
- if (x+1 < getWidth()) visited[x+1][y]++;
- if (x+1 < getWidth() && y > 0) visited[x+1][y-1]++;
+ if (x > 0) visited[x-1][y ]++;
+ if (y > 0) visited[x ][y-1]++;
+ if (y > 0 && x > 0) visited[x-1][y-1]++;
+ if (y+1 < getHeight()) visited[x ][y+1]++;
+ if (x > 0 && y+1 < getHeight()) visited[x-1][y+1]++;
+ if (x+1 < getWidth()) visited[x+1][y ]++;
+ if (x+1 < getWidth() && y > 0) visited[x+1][y-1]++;
if (x+1 < getWidth() && y+1 < getHeight()) visited[x+1][y+1]++;
}
Modified: trunk/applications/jason-team/src/java/env/WorldModel.java
===================================================================
--- trunk/applications/jason-team/src/java/env/WorldModel.java 2008-04-22 11:20:01 UTC (rev 1237)
+++ trunk/applications/jason-team/src/java/env/WorldModel.java 2008-04-22 16:24:29 UTC (rev 1238)
@@ -158,7 +158,7 @@
public void wall(int x1, int y1, int x2, int y2) {
for (int i=x1; i<=x2; i++) {
for (int j=y1; j<=y2; j++) {
- data[i][j] = OBSTACLE;
+ add(OBSTACLE, i, j);;
}
}
}
Modified: trunk/applications/jason-team/src/java/jia/Search.java
===================================================================
--- trunk/applications/jason-team/src/java/jia/Search.java 2008-04-22 11:20:01 UTC (rev 1237)
+++ trunk/applications/jason-team/src/java/jia/Search.java 2008-04-22 16:24:29 UTC (rev 1238)
@@ -27,6 +27,9 @@
final boolean considerAgentsAsObstacles;
final boolean considerCorralAsObstacles;
final boolean considerCowsAsObstacles;
+ final boolean considerRepulsionForCows;
+ int maxDistFromCluster;
+
WorldModel.Move[] actionsOrder;
int nbStates = 0;
AgArch agArch;
@@ -44,30 +47,43 @@
Logger logger = Logger.getLogger(Search.class.getName());
- public Search(LocalWorldModel m, Location from, Location to, WorldModel.Move[] actions, boolean considerAgentsAsObstacles, boolean considerCorralAsObstacles, boolean considerCowsAsObstacles, AgArch agArch) {
+ public Search(LocalWorldModel m, Location from, Location to, WorldModel.Move[] actions,
+ boolean considerAgentsAsObstacles,
+ boolean considerCorralAsObstacles,
+ boolean considerCowsAsObstacles,
+ boolean considerRepulsionForCows,
+ AgArch agArch) {
+
this.model = m;
this.from = from;
this.to = to;
this.considerAgentsAsObstacles = considerAgentsAsObstacles;
this.considerCorralAsObstacles = considerCorralAsObstacles;
this.considerCowsAsObstacles = considerCowsAsObstacles;
+ this.considerRepulsionForCows = considerRepulsionForCows;
this.agArch = agArch;
if (actions != null) {
this.actionsOrder = actions;
} else {
this.actionsOrder = defaultActions;
}
+
+ this.maxDistFromCluster = 4;
}
+
+ public void setMaxDistFromCluster(int m) {
+ maxDistFromCluster = m;
+ }
/** used normally to discover the distance from 'from' to 'to' */
Search(LocalWorldModel m, Location from, Location to, AgArch agArch) {
- this(m,from,to,null,false, false, false, agArch);
+ this(m,from,to,null,false, false, false, false, agArch);
}
public Nodo search() throws Exception {
Busca searchAlg = new AEstrela();
//searchAlg.ssetMaxAbertos(1000);
- GridState root = new GridState(from, WorldModel.Move.skip, this, 1);
+ GridState root = new GridState(from, WorldModel.Move.skip, this);
root.setAsRoot();
return searchAlg.busca(root);
}
@@ -142,13 +158,11 @@
final Search ia;
final int hashCode;
boolean isRoot = false;
- int cost = 1;
- public GridState(Location l, WorldModel.Move op, Search ia, int cost) {
+ public GridState(Location l, WorldModel.Move op, Search ia) {
this.pos = l;
this.op = op;
this.ia = ia;
- this.cost = cost;
hashCode = pos.hashCode();
ia.nbStates++;
@@ -159,7 +173,19 @@
}
public int custo() {
- return cost;
+ if (isRoot)
+ return 0;
+ if (ia.considerCowsAsObstacles)
+ return ia.model.getCowsRep(pos.x, pos.y)+1;
+
+ if (ia.considerRepulsionForCows) {
+ // consider the cost of agents only if they are near
+ int c = ia.model.getObsRep(pos.x, pos.y) + 1;
+ if (ia.from.maxBorder(pos) <= ia.maxDistFromCluster)
+ c += ia.model.getAgsRep(pos.x, pos.y);
+ return c;
+ }
+ return 1;
}
public boolean ehMeta() {
@@ -208,14 +234,7 @@
if (ia.considerCowsAsObstacles && ia.model.hasObject(WorldModel.COW,newl) && ia.from.maxBorder(newl) <= Search.DIST_FOR_AG_OBSTACLE)
return;
- int cost = 1;
-
- if (ia.considerCowsAsObstacles) {
- cost += ia.model.countObjInArea(WorldModel.CORRAL, newl,1);
- cost += ia.model.countObjInArea(WorldModel.CORRAL, newl,2);
- }
-
- s.add(new GridState(newl,op,ia, cost));
+ s.add(new GridState(newl,op,ia));
}
public boolean equals(Object o) {
Modified: trunk/applications/jason-team/src/java/jia/Vec.java
===================================================================
--- trunk/applications/jason-team/src/java/jia/Vec.java 2008-04-22 11:20:01 UTC (rev 1237)
+++ trunk/applications/jason-team/src/java/jia/Vec.java 2008-04-22 16:24:29 UTC (rev 1238)
@@ -8,8 +8,9 @@
import arch.LocalWorldModel;
-public class Vec implements Cloneable {
+public final class Vec implements Cloneable {
+ // immutable fields (for a immutable object)
public final double x,y;
public final double r,t;
@@ -46,7 +47,7 @@
return new Vec(x - v.x, y - v.y);
}
public Vec product(double e) {
- return new Vec((int)(x * e), (int)(y *e));
+ return new Vec( x * e, y * e);
}
public Vec newAngle(double t) {
while (t > PI2) t = t - PI2;
@@ -69,7 +70,6 @@
return this; // it is an immutable object, no need to create a new one
}
-
/**
* Provides info on which octant (0-7) the vector lies in.
@@ -102,7 +102,7 @@
public static Vec max(List<Vec> vs) {
Vec max = null;
for (Vec v: vs) {
- if (max == null || max.magnitude() < v.magnitude())
+ if (max == null || max.r < v.r)
max = v;
}
return max;
@@ -117,14 +117,16 @@
}
public static List<Vec> cluster(List<Vec> vs, int maxstddev) {
- vs = new ArrayList<Vec>(vs);
- Vec stddev = Vec.stddev(vs);
+ vs = new ArrayList<Vec>(vs); // result vectors in the cluster
+ Vec mean = Vec.mean(vs);
+ Vec stddev = Vec.stddev(vs, mean);
+
// remove max if stddev is too big
while (stddev.magnitude() > maxstddev) {
- Vec mean = Vec.mean(vs);
Vec max = Vec.max(Vec.sub(vs, mean));
vs.remove(max.add(mean));
- stddev = Vec.stddev(vs);
+ mean = Vec.mean(vs);
+ stddev = Vec.stddev(vs, mean);
}
return vs;
}
@@ -132,7 +134,7 @@
public static Vec mean(List<Vec> vs) {
if (vs.isEmpty())
return new Vec(0,0);
- int x = 0, y = 0;
+ double x = 0, y = 0;
for (Vec v: vs) {
x += v.x;
y += v.y;
@@ -140,19 +142,18 @@
return new Vec(x/vs.size(), y/vs.size());
}
- public static Vec stddev(List<Vec> vs) {
+ public static Vec stddev(List<Vec> vs, Vec mean) {
if (vs.isEmpty())
return new Vec(0,0);
- Vec mean = mean(vs);
- int x = 0, y = 0;
+ double x = 0, y = 0;
for (Vec v: vs) {
- x += Math.pow(v.x - mean.x,2);
- y += Math.pow(v.y - mean.y,2);
+ x += Math.pow(v.x - mean.x, 2);
+ y += Math.pow(v.y - mean.y, 2);
}
x = x / vs.size();
y = y / vs.size();
- return new Vec( (int)Math.sqrt(x), (int)Math.sqrt(y));
+ return new Vec( Math.sqrt(x), Math.sqrt(y));
}
Modified: trunk/applications/jason-team/src/java/jia/direction.java
===================================================================
--- trunk/applications/jason-team/src/java/jia/direction.java 2008-04-22 11:20:01 UTC (rev 1237)
+++ trunk/applications/jason-team/src/java/jia/direction.java 2008-04-22 16:24:29 UTC (rev 1238)
@@ -61,7 +61,7 @@
actionsOrder[i2] = actionsOrder[i1];
actionsOrder[i1] = temp;
- Search astar = new Search(model, from, to, actionsOrder, true, true, true, ts.getUserAgArch());
+ Search astar = new Search(model, from, to, actionsOrder, true, true, true, false, ts.getUserAgArch());
Nodo solution = astar.search();
if (solution != null) {
WorldModel.Move m = astar.firstAction(solution);
Modified: trunk/applications/jason-team/src/java/jia/herd_position.java
===================================================================
--- trunk/applications/jason-team/src/java/jia/herd_position.java 2008-04-22 11:20:01 UTC (rev 1237)
+++ trunk/applications/jason-team/src/java/jia/herd_position.java 2008-04-22 16:24:29 UTC (rev 1238)
@@ -9,6 +9,7 @@
import java.util.ArrayList;
import java.util.List;
+import java.util.ListIterator;
import java.util.logging.Level;
import arch.CowboyArch;
@@ -97,12 +98,12 @@
cows = Vec.cluster(cows, 2); // find center/clusterise
Vec mean = Vec.mean(cows);
+ int stepsFromCenter = (int)Math.round(Vec.max(cows).sub(mean).magnitude())+1;
// run A* to see the cluster target in n steps
- Search s = new Search(model, mean.getLocation(model), model.getCorralCenter(), null, false, false, false, null);
+ Search s = new Search(model, mean.getLocation(model), model.getCorralCenter(), null, false, false, false, true, null);
+ s.setMaxDistFromCluster(stepsFromCenter+Search.DIST_FOR_AG_OBSTACLE);
List<Nodo> np = s.normalPath(s.search());
-
- int stepsFromCenter = (int)Vec.max(cows).sub(mean).magnitude()+1;
int n = Math.min(stepsFromCenter, np.size());
Vec cowstarget = new Vec(model, s.getNodeLocation(np.get(n)));
@@ -111,6 +112,13 @@
List<Location> r = new ArrayList<Location>();
for (int angle: formation.getAngles()) {
double nt = angle * (Math.PI / 180);
+
+ agTarget = agsTarget.newAngle(agsTarget.angle() + nt);
+ Location l = agTarget.add(mean).getLocation(model);
+ r.add(l);
+
+ // TODO: test the code below
+ /*
for (double varangle = nt; nt < 180; nt += 5) {
agTarget = agsTarget.newAngle(agsTarget.angle() + varangle);
Location l = agTarget.add(mean).getLocation(model);
@@ -118,7 +126,7 @@
// if l is in the path of cows, continue with next varangle
boolean inpath = false;
for (Nodo pn: np) {
- if (l.equals(s.getNodeLocation(pn))) {
+ if (l.maxBorder(s.getNodeLocation(pn)) <= 0) {
inpath = true;
break;
}
@@ -128,22 +136,27 @@
break;
}
}
+ */
}
- return r;
+ return r;
}
public Location nearFreeForAg(LocalWorldModel model, Location ag, Location t) throws Exception {
// run A* to get the path from ag to t
- Search s = new Search(model, t, ag, null, false, false, true, null);
+ if (! model.inGrid(t))
+ t = model.nearFree(t);
+
+ Search s = new Search(model, ag, t, null, true, true, true, false, null);
List<Nodo> np = s.normalPath(s.search());
int i = 0;
- for (Nodo n: np) {
+ ListIterator<Nodo> inp = np.listIterator(np.size());
+ while (inp.hasPrevious()) {
+ Nodo n = inp.previous();
if (model.isFree(s.getNodeLocation(n))) {
return s.getNodeLocation(n);
}
- i++;
- if (i > 3) // do not go to far from target
+ if (i++ > 3) // do not go to far from target
break;
}
return model.nearFree(t);
Modified: trunk/applications/jason-team/src/java/test/TestBasicHerding.java
===================================================================
--- trunk/applications/jason-team/src/java/test/TestBasicHerding.java 2008-04-22 11:20:01 UTC (rev 1237)
+++ trunk/applications/jason-team/src/java/test/TestBasicHerding.java 2008-04-22 16:24:29 UTC (rev 1238)
@@ -7,6 +7,7 @@
import java.util.ArrayList;
import java.util.List;
+import jia.Search;
import jia.Vec;
import jia.herd_position;
import jia.herd_position.Formation;
@@ -15,6 +16,7 @@
import org.junit.Test;
import arch.LocalWorldModel;
+import busca.Nodo;
import env.WorldModel;
public class TestBasicHerding {
@@ -32,7 +34,8 @@
public void scenario1() {
cowboy = new Vec(3,5);
-
+ model.add(WorldModel.AGENT, cowboy.getLocation(model));
+
cows = new Vec[5];
cows[0] = new Vec(6,7);
cows[1] = new Vec(5,30);
@@ -47,6 +50,7 @@
public void scenario2() {
cowboy = new Vec(11,3);
+ model.add(WorldModel.AGENT, cowboy.getLocation(model));
cows = new Vec[9];
cows[0] = new Vec(8,0);
@@ -76,6 +80,100 @@
assertEquals(v, v.newAngle(v.angle()));
}
+ @Test
+ public void testCowsRepMat() throws Exception {
+ scenario1();
+ assertEquals(2, model.getCowsRep(5,38));
+ assertEquals(1, model.getCowsRep(5,37));
+ assertEquals(0, model.getCowsRep(5,36));
+ assertEquals(5, model.getCowsRep(5,40));
+ }
+
+ @Test
+ public void testAgsRepMat() throws Exception {
+ scenario1();
+ //assertEquals(4, model.getAgsRep(3,43));
+ //assertEquals(2, model.getAgsRep(5,42));
+ //assertEquals(0, model.getAgsRep(6,42));
+
+ model.add(WorldModel.ENEMY, 4, 44);
+ assertEquals(4, model.getAgsRep(3,43));
+ assertEquals(2, model.getAgsRep(5,42));
+ assertEquals(2, model.getAgsRep(6,42));
+
+ model.remove(WorldModel.ENEMY, 4, 44);
+ /*assertEquals(4, model.getAgsRep(3,43));
+ assertEquals(2, model.getAgsRep(5,42));
+ assertEquals(0, model.getAgsRep(6,42));
+
+ model.remove(WorldModel.AGENT, cowboy.getLocation(model));
+ */
+ assertEquals(0, model.getAgsRep(3,43));
+ assertEquals(0, model.getAgsRep(5,42));
+ assertEquals(0, model.getAgsRep(6,42));
+
+ assertEquals(2, model.getObsRep(6, 44));
+ assertEquals(1, model.getObsRep(7, 43));
+ assertEquals(0, model.getObsRep(5, 44));
+ }
+
+ @Test
+ public void testAStar1() throws Exception {
+ scenario1();
+ Search s = new Search(model, cowboy.getLocation(model), new Location(8,37), null, true, true, true, false, null);
+ Nodo path = s.search();
+ assertEquals(13, s.normalPath(path).size());
+ }
+
+ @Test
+ public void moveCows2() throws Exception {
+ scenario1();
+
+ List<Vec> cowsl = new ArrayList<Vec>();
+ for (int i=0; i<cows.length; i++) {
+ cowsl.add(cows[i]);
+ }
+
+ // find center/clusterise
+ cowsl = Vec.cluster(cowsl, 2);
+ Vec stddev = Vec.stddev(cowsl, Vec.mean(cowsl));
+ assertTrue(stddev.magnitude() < 3);
+
+ Vec mean = Vec.mean(cowsl);
+ assertEquals(new Vec(5,8), mean);
+
+ //Search s = new Search(model, mean.getLocation(model), model.getCorralCenter(), null, false, false, false, true, null);
+ //List<Nodo> np = s.normalPath(s.search());
+
+ int stepsFromCenter = (int)Math.round(Vec.max(cowsl).sub(mean).magnitude())+1;
+ assertEquals(3, stepsFromCenter);
+
+ Location byIA = new herd_position().getAgTarget(model, Formation.one, cowboy.getLocation(model));
+ assertEquals(new Location(7,37), byIA);
+
+ byIA = new herd_position().getAgTarget(model, Formation.six, cowboy.getLocation(model));
+ assertEquals(new Location(6,37), byIA);
+
+ // add an agent in 6,38
+ model.add(WorldModel.AGENT, 6,38);
+ byIA = new herd_position().getAgTarget(model, Formation.six, cowboy.getLocation(model));
+ assertEquals(new Location(8,38), byIA);
+
+ // add an agent in 8,39 (near 8,38)
+ model.add(WorldModel.AGENT, 8,39);
+ byIA = new herd_position().getAgTarget(model, Formation.six,cowboy.getLocation(model));
+ assertEquals(new Location(3,37), byIA);
+ }
+
+ @Test
+ public void moveCows3() throws Exception {
+ scenario2();
+ model.add(WorldModel.ENEMY, 11,48);
+ Location byIA = new herd_position().getAgTarget(model, Formation.one, cowboy.getLocation(model));
+ byIA = new herd_position().nearFreeForAg(model, new Location(11,46), byIA);
+ assertEquals(new Location(11,49), byIA);
+ }
+
/*
@Test
public void oneCow() throws Exception {
@@ -184,54 +282,5 @@
}
*/
- @Test
- public void moveCows2() throws Exception {
- scenario1();
-
- List<Vec> cowsl = new ArrayList<Vec>();
- for (int i=0; i<cows.length; i++) {
- cowsl.add(cows[i]);
- }
- // find center/clusterise
- cowsl = Vec.cluster(cowsl, 2);
- Vec stddev = Vec.stddev(cowsl);
- assertTrue(stddev.magnitude() < 3);
-
- Vec mean = Vec.mean(cowsl);
- assertEquals(new Vec(5,8), mean);
-
- int stepsFromCenter = (int)Vec.max(cowsl).sub(mean).magnitude()+1;
- assertEquals(3, stepsFromCenter);
-
- Location byIA = new herd_position().getAgTarget(model, Formation.one, cowboy.getLocation(model));
- assertEquals(new Location(7,38), byIA);
-
- byIA = new herd_position().getAgTarget(model, Formation.six, cowboy.getLocation(model));
- assertEquals(new Location(6,38), byIA);
-
- // add an agent in 6,38
- model.add(WorldModel.AGENT, 6,38);
- byIA = new herd_position().getAgTarget(model, Formation.six, cowboy.getLocation(model));
- assertEquals(new Location(8,39), byIA);
-
- // add an agent in 8,40 (near 8,39)
- model.add(WorldModel.AGENT, 8,40);
- byIA = new herd_position().getAgTarget(model, Formation.six,cowboy.getLocation(model));
- assertEquals(new Location(3,38), byIA);
-
- // add an agent in 2,38 (near 3,38)
- // no good location possible, go to ags target
- model.add(WorldModel.AGENT, 2,38);
- byIA = new herd_position().getAgTarget(model, Formation.valueOf("six"), cowboy.getLocation(model));
- //assertEquals(new Location(7,38), byIA);
- }
-
- @Test
- public void moveCows3() throws Exception {
- scenario2();
- Location byIA = new herd_position().getAgTarget(model, Formation.one, cowboy.getLocation(model));
- byIA = new herd_position().nearFreeForAg(model, new Location(11,46), byIA);
- assertEquals(new Location(11,49), byIA);
- }
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jom...@us...> - 2008-04-22 11:20:05
|
Revision: 1237
http://jason.svn.sourceforge.net/jason/?rev=1237&view=rev
Author: jomifred
Date: 2008-04-22 04:20:01 -0700 (Tue, 22 Apr 2008)
Log Message:
-----------
fix auto update
Modified Paths:
--------------
trunk/build.xml
trunk/release-notes.txt
trunk/src/jason/jeditplugin/CheckVersion.java
Modified: trunk/build.xml
===================================================================
--- trunk/build.xml 2008-04-21 16:46:57 UTC (rev 1236)
+++ trunk/build.xml 2008-04-22 11:20:01 UTC (rev 1237)
@@ -229,6 +229,8 @@
</propertyfile>
<property file="${dist.properties}" />
+ <antcall target="plugin" />
+
<fixcrlf eol="crlf" includes="**/*.txt,**/*.bat" srcdir="${basedir}" />
<delete failonerror="no" includeEmptyDirs="true">
Modified: trunk/release-notes.txt
===================================================================
--- trunk/release-notes.txt 2008-04-21 16:46:57 UTC (rev 1236)
+++ trunk/release-notes.txt 2008-04-22 11:20:01 UTC (rev 1237)
@@ -3,16 +3,16 @@
-------------
New features
-. Terms can be body plans enclosed by |{ ... }", as in the following
+. Terms can be body plans enclosed by "{ ... }", as in the following
example:
test({ a1; !g; ?b(X); .print(X) }, 10)
Bugs fixed:
+. unification in return of ! and ?
. use nested source annotations in communication
. add "source(self)" in goals without source
. correctly handle failure event caused by no relevant plans
. timeout in .wait does not cause a runtime exception
-. unification in return of ! and ?
-------------
Modified: trunk/src/jason/jeditplugin/CheckVersion.java
===================================================================
--- trunk/src/jason/jeditplugin/CheckVersion.java 2008-04-21 16:46:57 UTC (rev 1236)
+++ trunk/src/jason/jeditplugin/CheckVersion.java 2008-04-22 11:20:01 UTC (rev 1237)
@@ -21,7 +21,7 @@
public static final String JasonSite = "http://jason.sf.net";
String download;
- int version;
+ String version;
String release;
String getLatestVersion() {
@@ -30,10 +30,11 @@
Properties p = new Properties();
p.load(new URL(JasonSite+"/latest.properties").openStream());
download = p.getProperty("download");
- version = Integer.parseInt(p.getProperty("version"));
+ version = p.getProperty("version");
release = p.getProperty("release");
return version + "." + release;
} catch (Exception ex) {
+ System.out.println(ex);
return null;
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jom...@us...> - 2008-04-21 16:47:00
|
Revision: 1236
http://jason.svn.sourceforge.net/jason/?rev=1236&view=rev
Author: jomifred
Date: 2008-04-21 09:46:57 -0700 (Mon, 21 Apr 2008)
Log Message:
-----------
minor changes in jason team
Modified Paths:
--------------
trunk/applications/jason-team/src/asl/dummy.asl
trunk/applications/jason-team/src/java/arch/ACArchitecture.java
trunk/applications/jason-team/src/java/arch/ACProxy.java
trunk/applications/jason-team/src/java/arch/CowboyArch.java
trunk/applications/jason-team/src/java/arch/LocalWorldModel.java
trunk/applications/jason-team/src/java/arch/WriteStatusThread.java
trunk/applications/jason-team/src/java/env/WorldModel.java
trunk/applications/jason-team/src/java/jia/herd_position.java
trunk/applications/jason-team/todo.org
Removed Paths:
-------------
trunk/applications/jason-team/run.sh
Deleted: trunk/applications/jason-team/run.sh
===================================================================
--- trunk/applications/jason-team/run.sh 2008-04-21 12:59:17 UTC (rev 1235)
+++ trunk/applications/jason-team/run.sh 2008-04-21 16:46:57 UTC (rev 1236)
@@ -1,5 +0,0 @@
-#!/bin/sh
-
-java -cp ../../lib/jason.jar:lib/search.jar:bin/classes \
- jason.infra.centralised.RunCentralisedMAS \
- AC-Local-JasonTeam.mas2j
Modified: trunk/applications/jason-team/src/asl/dummy.asl
===================================================================
--- trunk/applications/jason-team/src/asl/dummy.asl 2008-04-21 12:59:17 UTC (rev 1235)
+++ trunk/applications/jason-team/src/asl/dummy.asl 2008-04-21 16:46:57 UTC (rev 1236)
@@ -6,7 +6,6 @@
gsize(Weight,Height)
steps(MaxSteps)
corral(UpperLeft.x,UpperLeft.y,DownRight.x,DownRight.y)
- pratio(Int) // ratio of perception of the agent
Step:
pos(X,Y,Step)
@@ -19,6 +18,11 @@
*/
+/* -- initial beliefs -- */
+
+ag_perception_ratio(8). // ratio of perception of the agent
+cow_perception_ratio(4).
+
/* -- useful rules */
// find a free random location
@@ -125,5 +129,4 @@
+corral(X1,Y1,X2,Y2) <- .println("corral = ",X1,",",Y1," -- ",X2,",",Y2).
//+cell(X,Y,Type) <- .println("cell = ",X,",",Y," = ",Type).
-+pratio(R) <- .println("pratio = ",R).
+pos(X,Y,S) <- .println("pos = ",X,",",Y,"/",S).
Modified: trunk/applications/jason-team/src/java/arch/ACArchitecture.java
===================================================================
--- trunk/applications/jason-team/src/java/arch/ACArchitecture.java 2008-04-21 12:59:17 UTC (rev 1235)
+++ trunk/applications/jason-team/src/java/arch/ACArchitecture.java 2008-04-21 16:46:57 UTC (rev 1236)
@@ -11,6 +11,10 @@
import java.util.List;
import java.util.Queue;
import java.util.concurrent.ConcurrentLinkedQueue;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.locks.Condition;
+import java.util.concurrent.locks.Lock;
+import java.util.concurrent.locks.ReentrantLock;
import java.util.logging.Level;
import java.util.logging.Logger;
@@ -24,6 +28,8 @@
*/
public class ACArchitecture extends CowboyArch {
+ public static final int actionTimeout = 1500; // timeout to send an action
+
private Logger logger;
private ACProxy proxy;
@@ -130,23 +136,29 @@
ActionExec lastAction;
String lastActionInCurrentCycle;
Queue<ActionExec> toExecute = new ConcurrentLinkedQueue<ActionExec>();
-
+ Lock lock = new ReentrantLock();
+ Condition cycle = lock.newCondition();
WaitSleep() {
super("WaitSpeepToSendAction");
}
- synchronized void addAction(ActionExec action) {
- if (lastAction != null)
- toExecute.offer(lastAction);
- lastAction = action;
+ void addAction(ActionExec action) {
+ lock.lock();
+ try {
+ if (lastAction != null)
+ toExecute.offer(lastAction);
+ lastAction = action;
+ } finally {
+ lock.unlock();
+ }
}
void newCycle() {
String w = "";
if (lastActionInCurrentCycle == null) {
+ addRestart();
w = "*** ";
- addRestart();
}
logger.info(w+"Last sent action was "+lastActionInCurrentCycle+" for cycle "+getCycle()+". The following was not sent: "+toExecute);
@@ -160,14 +172,25 @@
action.setResult(true);
feedback.add(action);
}
+ go(); // reset the wait
}
- synchronized void go() {
- notifyAll();
+ void go() {
+ lock.lock();
+ try {
+ cycle.signal();
+ } finally {
+ lock.unlock();
+ }
}
- synchronized void waitSleep() throws InterruptedException {
- // TODO: do something by timeout?
- wait();
+
+ boolean waitSleep() throws InterruptedException {
+ lock.lock();
+ try {
+ return !cycle.await(actionTimeout, TimeUnit.MILLISECONDS);
+ } finally {
+ lock.unlock();
+ }
}
@Override
@@ -175,7 +198,7 @@
while (true) {
try {
lastAction = null;
- waitSleep();
+ waitSleep();
if (lastAction != null) {
lastActionInCurrentCycle = lastAction.getActionTerm().getTerm(0).toString();
proxy.sendAction(lastActionInCurrentCycle);
Modified: trunk/applications/jason-team/src/java/arch/ACProxy.java
===================================================================
--- trunk/applications/jason-team/src/java/arch/ACProxy.java 2008-04-21 12:59:17 UTC (rev 1235)
+++ trunk/applications/jason-team/src/java/arch/ACProxy.java 2008-04-21 16:46:57 UTC (rev 1236)
@@ -136,9 +136,6 @@
}
}
- int maxx = 0; // max value of some cell'x
-
-
public void processRequestAction(Element perception, long currenttime, long deadline) {
try {
List<Literal> percepts = new ArrayList<Literal>();
@@ -172,9 +169,6 @@
int absx = agx + cellx;
int absy = agy + celly;
- if (cellx > maxx)
- maxx = cellx;
-
NodeList cnl = cell.getChildNodes();
for (int j=0; j < cnl.getLength(); j++) {
if (cnl.item(j).getNodeType() == Element.ELEMENT_NODE && cellx != 0 && celly != 0) {
@@ -212,7 +206,6 @@
}
- arq.perceptionRatioPerceived(maxx);
arq.sendCowsToTeam();
arq.startNextStep(step, percepts);
Modified: trunk/applications/jason-team/src/java/arch/CowboyArch.java
===================================================================
--- trunk/applications/jason-team/src/java/arch/CowboyArch.java 2008-04-21 12:59:17 UTC (rev 1235)
+++ trunk/applications/jason-team/src/java/arch/CowboyArch.java 2008-04-21 16:46:57 UTC (rev 1236)
@@ -13,6 +13,7 @@
import jason.mas2j.ClassParameters;
import jason.runtime.Settings;
+import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator;
import java.util.logging.Level;
@@ -140,14 +141,6 @@
model.setMaxSteps(s);
}
- /** The perception ratio is discovered */
- void perceptionRatioPerceived(int s) throws RevisionFailedException {
- if (s != model.getPerceptionRatio()) {
- model.setPerceptionRatio(s);
- getTS().getAg().addBel(Literal.parseLiteral("pratio("+s+")"));
- }
- }
-
/** update the model with obstacle and share them with the team mates */
void obstaclePerceived(int x, int y, Literal p) {
if (! model.hasObject(WorldModel.OBSTACLE, x, y)) {
@@ -249,9 +242,22 @@
}
private static final Literal cowstoclean = Literal.parseLiteral("cell(_,_,cow(_))");
- synchronized void initKnownCows() throws RevisionFailedException {
+ private boolean cleanCows = false;
+
+ @Override
+ public synchronized void agDidPerceive() {
+ super.agDidPerceive();
+ if (cleanCows) {
+ try {
+ getTS().getAg().abolish(cowstoclean, null);
+ } catch (RevisionFailedException e) {}
+ cleanCows = false;
+ }
+ }
+
+ void initKnownCows() {
model.clearCows();
- getTS().getAg().abolish(cowstoclean, null);
+ cleanCows = true;
}
void cowPerceived(int x, int y) {
model.addCow(x,y);
@@ -259,7 +265,7 @@
void sendCowsToTeam() {
try {
- Message m = new Message("tell-cows", null, null, model.getCows());
+ Message m = new Message("tell-cows", null, null, new ArrayList<Location>(model.getCows()));
broadcast(m);
} catch (Exception e) {
e.printStackTrace();
@@ -303,7 +309,7 @@
@SuppressWarnings("unchecked")
@Override
- synchronized public void checkMail() {
+ public void checkMail() {
try {
super.checkMail();
Modified: trunk/applications/jason-team/src/java/arch/LocalWorldModel.java
===================================================================
--- trunk/applications/jason-team/src/java/arch/LocalWorldModel.java 2008-04-21 12:59:17 UTC (rev 1235)
+++ trunk/applications/jason-team/src/java/arch/LocalWorldModel.java 2008-04-21 16:46:57 UTC (rev 1236)
@@ -203,7 +203,7 @@
/** removes enemies/gold around x,y */
public void clearAgView(int x, int y) {
- int r = getPerceptionRatio();
+ int r = agPerceptionRatio;
for (int c=x-r; c<=x+r; c++) {
for (int l=y-r; l<=y+r; l++) {
if (inGrid(c, l)) {
Modified: trunk/applications/jason-team/src/java/arch/WriteStatusThread.java
===================================================================
--- trunk/applications/jason-team/src/java/arch/WriteStatusThread.java 2008-04-21 12:59:17 UTC (rev 1235)
+++ trunk/applications/jason-team/src/java/arch/WriteStatusThread.java 2008-04-21 16:46:57 UTC (rev 1236)
@@ -109,7 +109,7 @@
if (act.equals(WorldModel.Move.southwest.toString())) return "sw";
if (act.equals(WorldModel.Move.north.toString())) return "n ";
if (act.equals(WorldModel.Move.south.toString())) return "s ";
- if (act.equals(WorldModel.Move.skip.toString())) return "sk";
+ if (act.equals(WorldModel.Move.skip.toString())) return "--";
return act;
}
Modified: trunk/applications/jason-team/src/java/env/WorldModel.java
===================================================================
--- trunk/applications/jason-team/src/java/env/WorldModel.java 2008-04-21 12:59:17 UTC (rev 1235)
+++ trunk/applications/jason-team/src/java/env/WorldModel.java 2008-04-21 16:46:57 UTC (rev 1236)
@@ -21,7 +21,10 @@
public static final int nbActions = 8;
- public static final int agsByTeam = 6;
+ public static final int agsByTeam = 6;
+
+ public static final int agPerceptionRatio = 8;
+ public static final int cowPerceptionRatio = 4;
double PSim = 0.1; // probability of action/information failure
@@ -35,8 +38,6 @@
int maxSteps = 0; // number of steps of the simulation
- int pratio = -1; // perception ratio
-
private Logger logger = Logger.getLogger("jasonTeamSimLocal.mas2j." + WorldModel.class.getName());
public enum Move {
@@ -98,46 +99,6 @@
cowsRed = c;
}
- public void setPerceptionRatio(int r) {
- pratio = r;
- }
- public int getPerceptionRatio() {
- return pratio;
- }
-
- /*
- public boolean hasGold() {
- return countObjects(COW) > 0;
- }
-
- public boolean isAllGoldsCollected() {
- return goldsInDepotRed + goldsInDepotBlue == initialNbCows;
- }
-
- public void setInitialNbGolds(int i) {
- initialNbCows = i;
- }
-
- public int getInitialNbGolds() {
- return initialNbCows;
- }
-
- public boolean isCarryingGold(int ag) {
- return goldsWithAg[ag] > 0;
- }
-
- public boolean mayCarryMoreGold(int ag) {
- return goldsWithAg[ag] < AG_CAPACITY;
- }
-
- public int getGoldsWithAg(int ag) {
- return goldsWithAg[ag];
- }
- public void setGoldsWithAg(int ag, int n) {
- goldsWithAg[ag] = n;
- }
- */
-
public void setPSim(double psim) {
PSim = psim;
}
@@ -145,19 +106,6 @@
PMax = pmax;
}
- /** returns the probability of action/perception failure for an agent
- based on the number of golds it is carrying
- */
- /*
- public double getAgFatigue(int ag) {
- return getAgFatigue(ag, goldsWithAg[ag]);
- }
-
- public double getAgFatigue(int ag, int golds) {
- return PSim + ((PMax - PSim)/AG_CAPACITY) * golds;
- }
- */
-
public void setMaxSteps(int s) {
maxSteps = s;
}
Modified: trunk/applications/jason-team/src/java/jia/herd_position.java
===================================================================
--- trunk/applications/jason-team/src/java/jia/herd_position.java 2008-04-21 12:59:17 UTC (rev 1235)
+++ trunk/applications/jason-team/src/java/jia/herd_position.java 2008-04-21 16:46:57 UTC (rev 1236)
@@ -45,11 +45,13 @@
if (arch.hasGUI())
setFormationLoc(model, Formation.valueOf(terms[0].toString()));
- Location agTarget = getAgTarget(model,Formation.valueOf(terms[0].toString()), agLoc);
+ Location agTarget = getAgTarget(model, Formation.valueOf(terms[0].toString()), agLoc);
if (agTarget != null) {
agTarget = nearFreeForAg(model, agLoc, agTarget);
return un.unifies(terms[1], new NumberTermImpl(agTarget.x)) &&
un.unifies(terms[2], new NumberTermImpl(agTarget.y));
+ } else {
+ ts.getLogger().info("No target! I am at "+agLoc+" places are "+formationPlaces(model, Formation.valueOf(terms[0].toString())));
}
} catch (Throwable e) {
ts.getLogger().log(Level.SEVERE, "herd_position error: "+e, e);
@@ -60,11 +62,11 @@
public Location getAgTarget(LocalWorldModel model, Formation formation, Location ag) throws Exception {
Location r = null;
List<Location> locs = formationPlaces(model, formation);
- if (locs != null) {
- for (Location l : locs) {
- r = l;
+ if (locs != null) {
+ for (Location l : locs) {
+ r = l;
if (ag.equals(l) || // I am there
- model.countObjInArea(WorldModel.AGENT, l, 1) == 0) { // someone else is there
+ model.countObjInArea(WorldModel.AGENT, l, 1) == 0) { // no one else is there
break;
}
}
Modified: trunk/applications/jason-team/todo.org
===================================================================
--- trunk/applications/jason-team/todo.org 2008-04-21 12:59:17 UTC (rev 1235)
+++ trunk/applications/jason-team/todo.org 2008-04-21 16:46:57 UTC (rev 1236)
@@ -1,20 +1,19 @@
-* faster simulator
-* DONE develop a team of dummies to play against
- CLOSED: [2008-04-20 Sun 22:23]
-** what is a dummy strategy?
-* base components
-** DONE Vectors (operations)
- CLOSED: [2008-04-20 Sun 22:23]
-* new scenarios
* team formations (moise+ representation of the team)
** Structure (we have something from the proposal)
** Functioning (we have noting, but I not sure we need...)
** computation of ideal locations of an agent to maintain a formation (can we use maintainance goal pattern?)
-* protocols
-* exploration strategy
- details
* herding strategy
details
+* exploration strategy
+ details
+* new scenarios
+* protocols
+* faster simulator
+* DONE Vectors (operations)
+ CLOSED: [2008-04-20 Sun 22:23]
+* DONE develop a team of dummies to play against
+ CLOSED: [2008-04-20 Sun 22:23]
+** what is a dummy strategy?
* DONE A* (update previous to new directions)
CLOSED: [2008-03-16 Sun 15:29]
* DONE integration with new simulator
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jom...@us...> - 2008-04-21 12:59:22
|
Revision: 1235
http://jason.svn.sourceforge.net/jason/?rev=1235&view=rev
Author: jomifred
Date: 2008-04-21 05:59:17 -0700 (Mon, 21 Apr 2008)
Log Message:
-----------
start new release of Jason (1.1.2)
Modified Paths:
--------------
trunk/build.xml
Modified: trunk/build.xml
===================================================================
--- trunk/build.xml 2008-04-20 20:25:43 UTC (rev 1234)
+++ trunk/build.xml 2008-04-21 12:59:17 UTC (rev 1235)
@@ -15,7 +15,7 @@
<property name="dist.properties" value="${basedir}/bin/dist.properties" />
<property name="version" value="1" />
- <property name="release" value="1.1" />
+ <property name="release" value="1.2" />
<property name="distDir" value="${env.HOME}/tmp/x/Jason-${version}.${release}" />
<property name="distFile" value="${env.HOME}/Jason-${version}.${release}" />
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jom...@us...> - 2008-04-20 20:25:45
|
Revision: 1234
http://jason.svn.sourceforge.net/jason/?rev=1234&view=rev
Author: jomifred
Date: 2008-04-20 13:25:43 -0700 (Sun, 20 Apr 2008)
Log Message:
-----------
jason-team: add basic formation for dummies
Modified Paths:
--------------
trunk/applications/jason-team/src/asl/dummy.asl
trunk/applications/jason-team/todo.org
trunk/src/jason/asSemantics/Agent.java
trunk/src/jason/asSemantics/IntendedMeans.java
trunk/src/jason/asSemantics/TransitionSystem.java
trunk/src/jason/asSyntax/Plan.java
trunk/src/jason/asSyntax/Trigger.java
trunk/src/jason/asSyntax/parser/AS2JavaParser.jcc
trunk/src/jason/asSyntax/parser/as2j.java
trunk/src/jason/environment/grid/GridWorldView.java
trunk/src/jason/stdlib/create_agent.java
trunk/src/jason/stdlib/desire.java
trunk/src/jason/stdlib/drop_desire.java
trunk/src/jason/stdlib/succeed_goal.java
trunk/src/test/TermTest.java
Modified: trunk/applications/jason-team/src/asl/dummy.asl
===================================================================
--- trunk/applications/jason-team/src/asl/dummy.asl 2008-04-20 20:16:53 UTC (rev 1233)
+++ trunk/applications/jason-team/src/asl/dummy.asl 2008-04-20 20:25:43 UTC (rev 1234)
@@ -28,16 +28,7 @@
jia.random(RY,40,5) & RY > 5 & Y = (RY-20)+AgY &
not jia.obstacle(X,Y).
-// whether some location X,Y has an agent and I am near that location
-/*
-agent_in_target :-
- pos(AgX,AgY,_) &
- target(TX,TY) &
- (cell(TX,TY,ally(_)) | cell(TX,TY,enemy(_)) | cell(TX,TY,cow(_))) &
- jia.dist(TX,TY,AgX,AgY,D) &
- D <= 2. // this number should be the same used by A* (DIST_FOR_AG_OBSTACLE constant)
-*/
-
+
/* -- initial goal */
!decide_target.
@@ -65,8 +56,7 @@
!decide_target.
+!decide_target
- : jia.herd_position(six,X,Y) //& // compute new location
- //(not target(_,_) | (target(TX,TY) & (TX \== X | TY \== Y))) // no target OR new target
+ : jia.herd_position(six,X,Y)
<- .print("COWS! going to ",X,",",Y); //," previous target ",TX,",",TY);
-+goal(herd);
-+target(X,Y).
@@ -78,11 +68,7 @@
-+goal(search);
-+target(NX,NY).
-//+!decide_target
-// <- .print("No need for a new target, consider last herding location.");
-// do(skip). // send an action so that the simulator does not wait for me.
-
/* -- plans to move to a destination represented in the belief target(X,Y)
-- (it is a kind of persistent goal)
*/
@@ -120,17 +106,6 @@
<- do(D); // this action will "block" the intention until it is sent to the simulator (in the end of the cycle)
!!move. // continue moving
-// find a new destination
-/*+!move
- : pos(X,Y,_) &
- (not target(_,_) | // I have no target OR
- target(X,Y) | // I am at target OR
- jia_obstacle(X,Y) | // An obstacle was discovered in the target
- agent_in_target | // there is an agent in the target
- (target(BX,BY) & jia.direction(X, Y, BX, BY, skip))) // is impossible to go to target
- <- !decide_target.
-*/
-
// in case of failure, move
-!move
<- .current_intention(I); .println("failure in move, intention: ",I);
@@ -144,6 +119,7 @@
/* -- tests -- */
+
+gsize(Weight,Height) <- .println("gsize = ",Weight,",",Height).
+steps(MaxSteps) <- .println("steps = ",MaxSteps).
+corral(X1,Y1,X2,Y2) <- .println("corral = ",X1,",",Y1," -- ",X2,",",Y2).
Modified: trunk/applications/jason-team/todo.org
===================================================================
--- trunk/applications/jason-team/todo.org 2008-04-20 20:16:53 UTC (rev 1233)
+++ trunk/applications/jason-team/todo.org 2008-04-20 20:25:43 UTC (rev 1234)
@@ -1,8 +1,10 @@
* faster simulator
-* develop a team of dummies to play against
+* DONE develop a team of dummies to play against
+ CLOSED: [2008-04-20 Sun 22:23]
** what is a dummy strategy?
* base components
-** Vectors (operations)
+** DONE Vectors (operations)
+ CLOSED: [2008-04-20 Sun 22:23]
* new scenarios
* team formations (moise+ representation of the team)
** Structure (we have something from the proposal)
Modified: trunk/src/jason/asSemantics/Agent.java
===================================================================
--- trunk/src/jason/asSemantics/Agent.java 2008-04-20 20:16:53 UTC (rev 1233)
+++ trunk/src/jason/asSemantics/Agent.java 2008-04-20 20:25:43 UTC (rev 1234)
@@ -647,7 +647,7 @@
if (!inBB.isRule()) {
// need to clone unifier since it is changed in previous iteration
Unifier unC = (un == null ? new Unifier() : (Unifier)un.clone());
- if (unC.unifies(bel, inBB)) {
+ if (unC.unifiesNoUndo(bel, inBB)) {
toDel.add(inBB);
}
}
Modified: trunk/src/jason/asSemantics/IntendedMeans.java
===================================================================
--- trunk/src/jason/asSemantics/IntendedMeans.java 2008-04-20 20:16:53 UTC (rev 1233)
+++ trunk/src/jason/asSemantics/IntendedMeans.java 2008-04-20 20:25:43 UTC (rev 1234)
@@ -49,11 +49,13 @@
private Trigger trigger; // the trigger which created this IM
public IntendedMeans(Option opt, Trigger te) {
- plan = opt.getPlan().cloneBodyOnly();
+ plan = opt.getPlan().cloneOnlyBody();
unif = opt.getUnifier(); //(Unifier)opt.getUnifier().clone();
Literal planLiteral = plan.getTrigger().getLiteral();
if (planLiteral.hasAnnot()) {
planLiteral.getAnnots().apply(unif);
+ // TODO: why?
+ // if the plans.TE is not change, we do not need to clone it in plan.cloneBodyOnly
}
if (te == null) {
trigger = plan.getTrigger();
@@ -63,6 +65,9 @@
// add annots of the trigger into the plan's te
// so that the event +!g[source(ag1)] will add source(ag1)
// in the TE of the plan
+ // TODO: why? -- in the TS.applyClrInt -- end of the method, the unification could be g,tel and not tel,g!
+ // (the plan trigger will be used latter to "return" values
+ // see TS.applyClrInt -- end of the method)
planLiteral.addAnnots(trigger.getLiteral().getAnnots());
}
}
@@ -127,7 +132,7 @@
}
public String toString() {
- return plan + " : " + unif;
+ return plan + " / " + unif;
}
public Term getAsTerm() {
Modified: trunk/src/jason/asSemantics/TransitionSystem.java
===================================================================
--- trunk/src/jason/asSemantics/TransitionSystem.java 2008-04-20 20:16:53 UTC (rev 1233)
+++ trunk/src/jason/asSemantics/TransitionSystem.java 2008-04-20 20:25:43 UTC (rev 1234)
@@ -651,9 +651,13 @@
// removes !b or ?s
Term g = im.removeCurrentStep();
// make the TE of finished plan ground and unify that
- // with goal in the body
+ // with goal/test in the body (to "return" values).
+ // (it must the plan TE and not the IM.trigger because the
+ // vars have name only in the plan TE, in the IM.trigger
+ // they are anonymous)
Literal tel = topIM.getPlan().getTrigger().getLiteral();
tel.apply(topIM.unif);
+ // TODO: why not unifies(g,tel)?
im.unif.unifies(tel, g);
}
}
Modified: trunk/src/jason/asSyntax/Plan.java
===================================================================
--- trunk/src/jason/asSyntax/Plan.java 2008-04-20 20:16:53 UTC (rev 1233)
+++ trunk/src/jason/asSyntax/Plan.java 2008-04-20 20:25:43 UTC (rev 1234)
@@ -208,7 +208,8 @@
return p;
}
- public Plan cloneBodyOnly() {
+ /** used to create a plan clone in a new IM */
+ public Plan cloneOnlyBody() {
Plan p = new Plan();
if (label != null) {
p.label = label;
Modified: trunk/src/jason/asSyntax/Trigger.java
===================================================================
--- trunk/src/jason/asSyntax/Trigger.java 2008-04-20 20:16:53 UTC (rev 1233)
+++ trunk/src/jason/asSyntax/Trigger.java 2008-04-20 20:25:43 UTC (rev 1234)
@@ -32,6 +32,7 @@
* a type (<empty>, !, or ?);
* a literal
*/
+import jason.asSemantics.Unifier;
import jason.asSyntax.parser.ParseException;
import jason.asSyntax.parser.as2j;
@@ -136,6 +137,10 @@
}
return piCache;
}
+
+ public boolean apply(Unifier u) {
+ return literal.apply(u);
+ }
public Literal getLiteral() {
return literal;
Modified: trunk/src/jason/asSyntax/parser/AS2JavaParser.jcc
===================================================================
--- trunk/src/jason/asSyntax/parser/AS2JavaParser.jcc 2008-04-20 20:16:53 UTC (rev 1233)
+++ trunk/src/jason/asSyntax/parser/AS2JavaParser.jcc 2008-04-20 20:25:43 UTC (rev 1234)
@@ -409,7 +409,7 @@
return new InternalActionLiteral(F, curAg);
} catch (Exception e) {
if (getArithFunction(F) == null) // it is not a registered function
- logger.warning(getSourceRef(F)+" The internal action class for '"+F+"' was not found!");
+ logger.warning(getSourceRef(F)+" warning: The internal action class for '"+F+"' was not found!");
}
}
return new Literal(type,F);
Modified: trunk/src/jason/asSyntax/parser/as2j.java
===================================================================
--- trunk/src/jason/asSyntax/parser/as2j.java 2008-04-20 20:16:53 UTC (rev 1233)
+++ trunk/src/jason/asSyntax/parser/as2j.java 2008-04-20 20:25:43 UTC (rev 1234)
@@ -555,7 +555,7 @@
{if (true) return new InternalActionLiteral(F, curAg);}
} catch (Exception e) {
if (getArithFunction(F) == null) // it is not a registered function
- logger.warning(getSourceRef(F)+" The internal action class for '"+F+"' was not found!");
+ logger.warning(getSourceRef(F)+" warning: The internal action class for '"+F+"' was not found!");
}
}
{if (true) return new Literal(type,F);}
Modified: trunk/src/jason/environment/grid/GridWorldView.java
===================================================================
--- trunk/src/jason/environment/grid/GridWorldView.java 2008-04-20 20:16:53 UTC (rev 1233)
+++ trunk/src/jason/environment/grid/GridWorldView.java 2008-04-20 20:25:43 UTC (rev 1234)
@@ -114,10 +114,7 @@
}
if ((model.data[x][y] & GridWorldModel.AGENT) != 0) {
- //int ag = ;
- //if (ag != -1) {
drawAgent(drawArea.getGraphics(), x, y, Color.blue, model.getAgAtPos(x, y));
- //}
}
}
Modified: trunk/src/jason/stdlib/create_agent.java
===================================================================
--- trunk/src/jason/stdlib/create_agent.java 2008-04-20 20:16:53 UTC (rev 1233)
+++ trunk/src/jason/stdlib/create_agent.java 2008-04-20 20:25:43 UTC (rev 1234)
@@ -57,24 +57,23 @@
from the source file in "/tmp/x.asl".</li>
<li>
- <code>.create_agent(bob,"x.asl", [agentClass(myp.MyAgent)])</code>:
+ <code>.create_agent(bob,"x.asl", [agentClass("myp.MyAgent")])</code>:
creates the agent with customised agent class
<code>myp.MyAgent</code>.</li>
- <code>.create_agent(bob,"x.asl", [agentArchClass(myp.MyArch)])</code>:
+ <code>.create_agent(bob,"x.asl", [agentArchClass("myp.MyArch")])</code>:
creates the agent with customised architecture class
<code>myp.MyArch</code>.</li>
- <code>.create_agent(bob,"x.asl", [beliefBaseClass(jason.bb.TextPersistentBB)])</code>:
+ <code>.create_agent(bob,"x.asl", [beliefBaseClass("jason.bb.TextPersistentBB")])</code>:
creates the agent with customised belief base
<code>jason.bb.TextPersistentBB</code>.</li>
- <code>.create_agent(bob,"x.asl", [agentClass(myp.MyAgent),
- agentArchClass(myp.MyArch),
- beliefBaseClass(jason.bb.TextPersistentBB)])</code>: creates the
+ <code>.create_agent(bob,"x.asl", [agentClass("myp.MyAgent"),
+ agentArchClass("myp.MyArch"),
+ beliefBaseClass("jason.bb.TextPersistentBB")])</code>: creates the
agent with agent, acrchitecture and belief base customised.</li>
-
</ul>
@see jason.stdlib.kill_agent
@@ -104,11 +103,11 @@
if (t.isStructure()) {
Structure s = (Structure)t;
if (s.getFunctor().equals("beliefBaseClass")) {
- bbPars = new ClassParameters((Structure)s.getTerm(0));
+ bbPars = new ClassParameters(testString(s.getTerm(0)));
} else if (s.getFunctor().equals("agentClass")) {
- agClass = s.getTerm(0).toString();
+ agClass = testString(s.getTerm(0)).toString();
} else if (s.getFunctor().equals("agentArchClass")) {
- agArchClass = s.getTerm(0).toString();
+ agArchClass = testString(s.getTerm(0)).toString();
}
}
}
@@ -124,4 +123,12 @@
throw new JasonException("Error in internal action 'create_agent': " + e, e);
}
}
+
+ private Structure testString(Term t) {
+ if (t.isStructure())
+ return (Structure)t;
+ if (t.isString())
+ return Structure.parse(((StringTerm)t).getString());
+ return null;
+ }
}
Modified: trunk/src/jason/stdlib/desire.java
===================================================================
--- trunk/src/jason/stdlib/desire.java 2008-04-20 20:16:53 UTC (rev 1233)
+++ trunk/src/jason/stdlib/desire.java 2008-04-20 20:25:43 UTC (rev 1234)
@@ -85,7 +85,7 @@
Intention i = C.getSelectedEvent().getIntention();
if (i != Intention.EmptyInt && i.size() > 0) {
t = (Trigger) t.clone();
- t.getLiteral().apply(i.peek().getUnif());
+ t.apply(i.peek().getUnif());
}
if (un.unifies(t, teFromL)) {
return true;
@@ -97,7 +97,7 @@
Intention i = ei.getIntention();
if (i != Intention.EmptyInt && i.size() > 0) {
t = (Trigger) t.clone();
- t.getLiteral().apply(i.peek().getUnif());
+ t.apply(i.peek().getUnif());
}
if (un.unifies(t, teFromL)) {
return true;
Modified: trunk/src/jason/stdlib/drop_desire.java
===================================================================
--- trunk/src/jason/stdlib/drop_desire.java 2008-04-20 20:16:53 UTC (rev 1233)
+++ trunk/src/jason/stdlib/drop_desire.java 2008-04-20 20:25:43 UTC (rev 1234)
@@ -92,7 +92,7 @@
Trigger t = ei.getTrigger();
if (ei.getIntention() != Intention.EmptyInt) {
t = (Trigger) t.clone();
- t.getLiteral().apply(ei.getIntention().peek().getUnif());
+ t.apply(ei.getIntention().peek().getUnif());
}
if (un.unifies(t, te)) {
// old implementation: t.setTrigType(Trigger.TEDel); // Just changing "+!g" to "-!g"
Modified: trunk/src/jason/stdlib/succeed_goal.java
===================================================================
--- trunk/src/jason/stdlib/succeed_goal.java 2008-04-20 20:16:53 UTC (rev 1233)
+++ trunk/src/jason/stdlib/succeed_goal.java 2008-04-20 20:25:43 UTC (rev 1234)
@@ -108,7 +108,7 @@
Trigger t = e.getTrigger();
if (i != Intention.EmptyInt && i.size() > 0) {
t = (Trigger) t.clone();
- t.getLiteral().apply(i.peek().getUnif());
+ t.apply(i.peek().getUnif());
}
if (un.unifies(t, g)) {
dropInEvent(ts,e,i);
Modified: trunk/src/test/TermTest.java
===================================================================
--- trunk/src/test/TermTest.java 2008-04-20 20:16:53 UTC (rev 1233)
+++ trunk/src/test/TermTest.java 2008-04-20 20:25:43 UTC (rev 1234)
@@ -379,7 +379,7 @@
Unifier u = new Unifier();
assertTrue(u.unifies(t1,t2));
//System.out.println(u);
- t2.getLiteral().apply(u);
+ t2.apply(u);
//System.out.println("t2 with apply = "+t2);
assertEquals(t1.toString(), t2.toString());
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jom...@us...> - 2008-04-20 20:16:55
|
Revision: 1233
http://jason.svn.sourceforge.net/jason/?rev=1233&view=rev
Author: jomifred
Date: 2008-04-20 13:16:53 -0700 (Sun, 20 Apr 2008)
Log Message:
-----------
update jason team
add massim monitor
Modified Paths:
--------------
trunk/applications/jason-team/AC-Local-JasonTeam.mas2j
trunk/applications/jason-team/massim-agents/demoAgent.jar
trunk/applications/jason-team/src/asl/dummy.asl
trunk/applications/jason-team/src/java/agent/UniqueBelsBB.java
trunk/applications/jason-team/src/java/arch/ACArchitecture.java
trunk/applications/jason-team/src/java/arch/ACProxy.java
trunk/applications/jason-team/src/java/arch/CowboyArch.java
trunk/applications/jason-team/src/java/arch/LocalWorldModel.java
trunk/applications/jason-team/src/java/env/WorldModel.java
trunk/applications/jason-team/src/java/env/WorldView.java
trunk/applications/jason-team/src/java/jia/Search.java
trunk/applications/jason-team/src/java/jia/Vec.java
trunk/applications/jason-team/src/java/jia/herd_position.java
trunk/applications/jason-team/src/java/test/TestBasicHerding.java
Added Paths:
-----------
trunk/applications/jason-team/doc/scenario-r4.pdf
trunk/applications/jason-team/massim-server/massim/rmi/
trunk/applications/jason-team/massim-server/massim/rmi/SimulationStateServer.class
trunk/applications/jason-team/massim-server/massim/rmi/SimulationStateServerObserver$SimulationStateServerImplementation.class
trunk/applications/jason-team/massim-server/massim/rmi/SimulationStateServerObserver.class
trunk/applications/jason-team/massim-server/massim/rmi/StringMapServer.class
trunk/applications/jason-team/massim-server/massim/rmi/XMLDocumentObserver$XMLDocumentServerImplementation.class
trunk/applications/jason-team/massim-server/massim/rmi/XMLDocumentObserver.class
trunk/applications/jason-team/massim-server/massim/rmi/XMLDocumentServer.class
trunk/applications/jason-team/massim-servermonitor/
trunk/applications/jason-team/massim-servermonitor/LICENSE
trunk/applications/jason-team/massim-servermonitor/README
trunk/applications/jason-team/massim-servermonitor/massimServerMonitor.jar
trunk/applications/jason-team/massim-servermonitor/startMonitor.sh
Removed Paths:
-------------
trunk/applications/jason-team/doc/scenario-r3.pdf
Modified: trunk/applications/jason-team/AC-Local-JasonTeam.mas2j
===================================================================
--- trunk/applications/jason-team/AC-Local-JasonTeam.mas2j 2008-04-20 20:13:53 UTC (rev 1232)
+++ trunk/applications/jason-team/AC-Local-JasonTeam.mas2j 2008-04-20 20:16:53 UTC (rev 1233)
@@ -11,7 +11,7 @@
agents:
gaucho1 dummy.asl
- [verbose=1, gui=no, write_status=yes, ac_sim_back_dir="./massim-server/backup",
+ [verbose=1, gui=yes, write_status=yes, ac_sim_back_dir="./massim-server/backup",
host="localhost", port=12300, username=participant1, password="1"]
agentArchClass arch.ACArchitecture
agentClass agent.SelectEvent
Deleted: trunk/applications/jason-team/doc/scenario-r3.pdf
===================================================================
(Binary files differ)
Added: trunk/applications/jason-team/doc/scenario-r4.pdf
===================================================================
(Binary files differ)
Property changes on: trunk/applications/jason-team/doc/scenario-r4.pdf
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: trunk/applications/jason-team/massim-agents/demoAgent.jar
===================================================================
(Binary files differ)
Added: trunk/applications/jason-team/massim-server/massim/rmi/SimulationStateServer.class
===================================================================
(Binary files differ)
Property changes on: trunk/applications/jason-team/massim-server/massim/rmi/SimulationStateServer.class
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/applications/jason-team/massim-server/massim/rmi/SimulationStateServerObserver$SimulationStateServerImplementation.class
===================================================================
(Binary files differ)
Property changes on: trunk/applications/jason-team/massim-server/massim/rmi/SimulationStateServerObserver$SimulationStateServerImplementation.class
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/applications/jason-team/massim-server/massim/rmi/SimulationStateServerObserver.class
===================================================================
(Binary files differ)
Property changes on: trunk/applications/jason-team/massim-server/massim/rmi/SimulationStateServerObserver.class
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/applications/jason-team/massim-server/massim/rmi/StringMapServer.class
===================================================================
(Binary files differ)
Property changes on: trunk/applications/jason-team/massim-server/massim/rmi/StringMapServer.class
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/applications/jason-team/massim-server/massim/rmi/XMLDocumentObserver$XMLDocumentServerImplementation.class
===================================================================
(Binary files differ)
Property changes on: trunk/applications/jason-team/massim-server/massim/rmi/XMLDocumentObserver$XMLDocumentServerImplementation.class
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/applications/jason-team/massim-server/massim/rmi/XMLDocumentObserver.class
===================================================================
(Binary files differ)
Property changes on: trunk/applications/jason-team/massim-server/massim/rmi/XMLDocumentObserver.class
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/applications/jason-team/massim-server/massim/rmi/XMLDocumentServer.class
===================================================================
(Binary files differ)
Property changes on: trunk/applications/jason-team/massim-server/massim/rmi/XMLDocumentServer.class
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/applications/jason-team/massim-servermonitor/LICENSE
===================================================================
--- trunk/applications/jason-team/massim-servermonitor/LICENSE (rev 0)
+++ trunk/applications/jason-team/massim-servermonitor/LICENSE 2008-04-20 20:16:53 UTC (rev 1233)
@@ -0,0 +1,353 @@
+###############################################################
+# Multi-Agent Programming Contest 2008 #
+# #
+# Support package MASSim servermonitor #
+# LICENSE file for the MASSim servermonitor package #
+# #
+# For the details on the contest, check the Contest website: #
+# http://cig.in.tu-clausthal.de/agentcontest2008/ #
+# #
+# Organizers: #
+# J. Dix, M. Dastani, P. Novak, T.M. Behrens #
+###############################################################
+
+ GNU GENERAL PUBLIC LICENSE
+ Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users. This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it. (Some other Free Software Foundation software is covered by
+the GNU Library General Public License instead.) You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+ To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have. You must make sure that they, too, receive or can get the
+source code. And you must show them these terms so they know their
+rights.
+
+ We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+ Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software. If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+ Finally, any free program is threatened constantly by software
+patents. We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary. To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ GNU GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License. The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language. (Hereinafter, translation is included without limitation in
+the term "modification".) Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+ 1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+ 2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) You must cause the modified files to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ b) You must cause any work that you distribute or publish, that in
+ whole or in part contains or is derived from the Program or any
+ part thereof, to be licensed as a whole at no charge to all third
+ parties under the terms of this License.
+
+ c) If the modified program normally reads commands interactively
+ when run, you must cause it, when started running for such
+ interactive use in the most ordinary way, to print or display an
+ announcement including an appropriate copyright notice and a
+ notice that there is no warranty (or else, saying that you provide
+ a warranty) and that users may redistribute the program under
+ these conditions, and telling the user how to view a copy of this
+ License. (Exception: if the Program itself is interactive but
+ does not normally print such an announcement, your work based on
+ the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+ a) Accompany it with the complete corresponding machine-readable
+ source code, which must be distributed under the terms of Sections
+ 1 and 2 above on a medium customarily used for software interchange; or,
+
+ b) Accompany it with a written offer, valid for at least three
+ years, to give any third party, for a charge no more than your
+ cost of physically performing source distribution, a complete
+ machine-readable copy of the corresponding source code, to be
+ distributed under the terms of Sections 1 and 2 above on a medium
+ customarily used for software interchange; or,
+
+ c) Accompany it with the information you received as to the offer
+ to distribute corresponding source code. (This alternative is
+ allowed only for noncommercial distribution and only if you
+ received the program in object code or executable form with such
+ an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it. For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable. However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License. Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+ 5. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Program or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+ 6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+ 7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all. For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded. In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+ 9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation. If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+ 10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission. For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this. Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+ NO WARRANTY
+
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the program's name and a brief idea of what it does.>
+ Copyright (C) <year> <name of author>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
+
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+ Gnomovision version 69, Copyright (C) year name of author
+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+ `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+ <signature of Ty Coon>, 1 April 1989
+ Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs. If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library. If this is what you want to do, use the GNU Library General
+Public License instead of this License.
Added: trunk/applications/jason-team/massim-servermonitor/README
===================================================================
--- trunk/applications/jason-team/massim-servermonitor/README (rev 0)
+++ trunk/applications/jason-team/massim-servermonitor/README 2008-04-20 20:16:53 UTC (rev 1233)
@@ -0,0 +1,58 @@
+###############################################################
+# Multi-Agent Programming Contest 2008 #
+# #
+# Support package MASSim servermonitor #
+# README file for the MASSim servermonitor package #
+# #
+# For the details on the contest, check the Contest website: #
+# http://cig.in.tu-clausthal.de/agentcontest2008/ #
+# #
+# Organizers: #
+# J. Dix, M. Dastani, P. Novak, T.M. Behrens #
+###############################################################
+
+MASSim servermonitor package.
+
+1. Prerequisites.
+
+You only need the sun-java5 / sun-java6 (jre and jdk) installed to run the server.
+
+2. Installing and running.
+
+·Unpack the file anywhere:
+ tar xzvf massim-ServerMonitor-version.tag.gz -C output_dir
+
+·Switch to the new directory:
+ cd output_dir/massim-ServerMonitor
+
+·Run the script provided in the package:
+ ./startMonitor.sh
+
+3. Options.
+You can pass to startMonitor.sh script any of the following parameters:
+ --help Displays the help
+ --host <RMI hostname> Hostname of the computer where the massim-server is running
+ --port <RMI port> Port of the rmiregistry
+ --service <RMI servicename> See 4 for details
+ --sleeptime <time> Thread sleeptime in ms
+ --disable-stylesheets Disables reading of configfile and stylesheet use
+ --conf <configfile>
+
+If no parameters are given default values will be used.
+Default values:
+ host = localhost
+ port = 1099
+ service = xmlsimulation
+ sleeptime = 10000ms
+ conf = configfile contained in servermonitor.jar
+
+4. RMI servicesnames
+ xmlsimulation Simulation dependend statistics (number of steps, agentscores, ...)
+ statistics Statistics for the tournament (ranking, results of simulations, ...)
+ server2 Statistics of connected agents (name, port, ip)
+
+5. Questions, problems, suggestions, ...
+
+please, ask to the Agent Contest 2008 mail-list agentcontest2008-general [at] in.tu-clausthal.de
+or for more fast communication: jens.dehnert [at] tu-clausthal.de or slawomir.deren [at] tu-clausthal.de
+
Added: trunk/applications/jason-team/massim-servermonitor/massimServerMonitor.jar
===================================================================
(Binary files differ)
Property changes on: trunk/applications/jason-team/massim-servermonitor/massimServerMonitor.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/applications/jason-team/massim-servermonitor/startMonitor.sh
===================================================================
--- trunk/applications/jason-team/massim-servermonitor/startMonitor.sh (rev 0)
+++ trunk/applications/jason-team/massim-servermonitor/startMonitor.sh 2008-04-20 20:16:53 UTC (rev 1233)
@@ -0,0 +1,8 @@
+###################################
+#!/bin/sh #
+###################################
+
+clear
+
+echo "Launching Monitor"
+java -jar massimServerMonitor.jar $*
\ No newline at end of file
Property changes on: trunk/applications/jason-team/massim-servermonitor/startMonitor.sh
___________________________________________________________________
Name: svn:executable
+ *
Modified: trunk/applications/jason-team/src/asl/dummy.asl
===================================================================
--- trunk/applications/jason-team/src/asl/dummy.asl 2008-04-20 20:13:53 UTC (rev 1232)
+++ trunk/applications/jason-team/src/asl/dummy.asl 2008-04-20 20:16:53 UTC (rev 1233)
@@ -29,44 +29,60 @@
not jia.obstacle(X,Y).
// whether some location X,Y has an agent and I am near that location
+/*
agent_in_target :-
pos(AgX,AgY,_) &
target(TX,TY) &
(cell(TX,TY,ally(_)) | cell(TX,TY,enemy(_)) | cell(TX,TY,cow(_))) &
jia.dist(TX,TY,AgX,AgY,D) &
D <= 2. // this number should be the same used by A* (DIST_FOR_AG_OBSTACLE constant)
+*/
/* -- initial goal */
-!move.
+!decide_target.
-/* -- reaction to cows -- */
+/* -- reaction to some perceptions -- */
+// revise target when see first cow
+pos(_,_,_) // new cycle
- : cell(_,_,cow(_)) // I see cows
+ : goal(search) & cell(_,_,cow(_)) // I see cows and was searching
<- !decide_target.
+
+// revise target each 4 steps
++pos(Step,_,_) // new cycle
+ : Step mod 4 == 0
+ <- !decide_target.
-/* -- what todo when arrive at location */
+/* -- decide a new target -- */
++!decide_target
+ : not pos(_,_,_)
+ <- .print("waiting my location....");
+ .wait("+pos(_,_,_)");
+ !decide_target.
+
+!decide_target
- : jia.herd_position(X,Y) & // compute new location
- (not target(_,_) | (target(TX,TY) & (TX \== X | TY \== Y))) // no target OR new target?
- <- .print("COWS! going to ",X,",",Y," previous target ",TX,",",TY);
+ : jia.herd_position(six,X,Y) //& // compute new location
+ //(not target(_,_) | (target(TX,TY) & (TX \== X | TY \== Y))) // no target OR new target
+ <- .print("COWS! going to ",X,",",Y); //," previous target ",TX,",",TY);
+ -+goal(herd);
-+target(X,Y).
+!decide_target // chose a new random pos
: not cell(_,_,cow(_))
<- ?random_pos(NX,NY);
.print("New random target: ",NX,",",NY);
+ -+goal(search);
-+target(NX,NY).
+
+//+!decide_target
+// <- .print("No need for a new target, consider last herding location.");
+// do(skip). // send an action so that the simulator does not wait for me.
-+!decide_target
- <- .print("No need for a new target, consider last herding location.");
- do(skip). // send an action so that the simulator does not wait for me.
-
/* -- plans to move to a destination represented in the belief target(X,Y)
-- (it is a kind of persistent goal)
*/
@@ -84,8 +100,28 @@
.wait("+pos(_,_,_)");
!move.
++!move
+ : not target(_,_)
+ <- .print("waiting my target....");
+ .wait("+target(_,_)");
+ !move.
+
++!move
+ : pos(X,Y,_) & target(X,Y) // I am at target
+ <- -+at_target;
+ do(skip);
+ !!move.
+
+// does one step towards target
++!move
+ : pos(X,Y,_) &
+ target(BX,BY) &
+ jia.direction(X, Y, BX, BY, D) // jia.direction finds one action D (using A*) towards the target
+ <- do(D); // this action will "block" the intention until it is sent to the simulator (in the end of the cycle)
+ !!move. // continue moving
+
// find a new destination
-+!move
+/*+!move
: pos(X,Y,_) &
(not target(_,_) | // I have no target OR
target(X,Y) | // I am at target OR
@@ -93,26 +129,18 @@
agent_in_target | // there is an agent in the target
(target(BX,BY) & jia.direction(X, Y, BX, BY, skip))) // is impossible to go to target
<- !decide_target.
-
-// does one step towards target
-+!move
- : pos(X,Y,_) &
- target(BX,BY) &
- jia.direction(X, Y, BX, BY, D) // jia.direction finds one action D (using A*) towards the target
- <- do(D); // this action will "block" the intention until it is sent to the simulator (in the end of the cycle)
- !!move. // continue moving
+*/
// in case of failure, move
-!move
<- .current_intention(I); .println("failure in move, intention: ",I);
!move.
-
+restart
<- .print("*** restart ***");
.drop_all_desires;
.abolish(target(_,_));
- !move.
+ !decide_target.
/* -- tests -- */
Modified: trunk/applications/jason-team/src/java/agent/UniqueBelsBB.java
===================================================================
--- trunk/applications/jason-team/src/java/agent/UniqueBelsBB.java 2008-04-20 20:13:53 UTC (rev 1232)
+++ trunk/applications/jason-team/src/java/agent/UniqueBelsBB.java 2008-04-20 20:16:53 UTC (rev 1233)
@@ -45,7 +45,7 @@
Literal linbb = null;
boolean remove = false;
- Iterator<Literal> relevant = getRelevant(bel);
+ Iterator<Literal> relevant = getCandidateBeliefs(bel, null);
if (relevant != null) {
final int kbArity = kb.getArity();
while (relevant.hasNext() && !remove) {
Modified: trunk/applications/jason-team/src/java/arch/ACArchitecture.java
===================================================================
--- trunk/applications/jason-team/src/java/arch/ACArchitecture.java 2008-04-20 20:13:53 UTC (rev 1232)
+++ trunk/applications/jason-team/src/java/arch/ACArchitecture.java 2008-04-20 20:16:53 UTC (rev 1233)
@@ -144,7 +144,10 @@
void newCycle() {
String w = "";
- if (lastActionInCurrentCycle == null) w = "*** ";
+ if (lastActionInCurrentCycle == null) {
+ w = "*** ";
+ addRestart();
+ }
logger.info(w+"Last sent action was "+lastActionInCurrentCycle+" for cycle "+getCycle()+". The following was not sent: "+toExecute);
setLastAct(lastActionInCurrentCycle);
Modified: trunk/applications/jason-team/src/java/arch/ACProxy.java
===================================================================
--- trunk/applications/jason-team/src/java/arch/ACProxy.java 2008-04-20 20:13:53 UTC (rev 1232)
+++ trunk/applications/jason-team/src/java/arch/ACProxy.java 2008-04-20 20:16:53 UTC (rev 1233)
@@ -160,7 +160,7 @@
lpos.addTerm(new NumberTermImpl(step));
percepts.add(lpos);
- arq.getModel().clearCowsList();
+ arq.initKnownCows();
int enemyId = 1;
// add in perception what is around
@@ -211,12 +211,13 @@
}
}
- //if (logger.isLoggable(Level.FINE))
- logger.info("Request action for "+lpos+" / "+rid + " percepts: "+percepts);
arq.perceptionRatioPerceived(maxx);
+ arq.sendCowsToTeam();
arq.startNextStep(step, percepts);
+ //if (logger.isLoggable(Level.FINE))
+ logger.info("Request action for "+lpos+" / percepts: "+percepts);
} catch (Exception e) {
logger.log(Level.SEVERE, "error processing request",e);
}
Modified: trunk/applications/jason-team/src/java/arch/CowboyArch.java
===================================================================
--- trunk/applications/jason-team/src/java/arch/CowboyArch.java 2008-04-20 20:13:53 UTC (rev 1232)
+++ trunk/applications/jason-team/src/java/arch/CowboyArch.java 2008-04-20 20:16:53 UTC (rev 1233)
@@ -13,6 +13,7 @@
import jason.mas2j.ClassParameters;
import jason.runtime.Settings;
+import java.util.Collection;
import java.util.Iterator;
import java.util.logging.Level;
import java.util.logging.Logger;
@@ -83,6 +84,10 @@
simId = id;
}
+ public boolean hasGUI() {
+ return gui;
+ }
+
public int getMyId() {
if (myId < 0) {
myId = getAgId(getAgName());
@@ -162,7 +167,8 @@
lo3 = new Location(-1,-1),
lo4 = new Location(-1,-1),
lo5 = new Location(-1,-1),
- lo6 = new Location(-1,-1);
+ lo6 = new Location(-1,-1),
+ lo7 = new Location(-1,-1);
Location oldLoc;
@@ -203,6 +209,7 @@
}
}
+ lo7 = lo6;
lo6 = lo5;
lo5 = lo4;
lo4 = lo3;
@@ -211,23 +218,27 @@
lo1 = new Location(x,y);
if (isRobotFrozen()) {
- try {
- logger.info("** Arch adding restart for "+getAgName());
- getTS().getC().create();
-
- getTS().getAg().getBB().abolish(new Literal("restart").getPredicateIndicator());
- getTS().getAg().addBel(new Literal("restart"));
- lo2 = new Location(-1,-1); // to not restart again in the next cycle
- } catch (Exception e) {
- logger.info("Error in restart!"+ e);
- }
+ addRestart();
}
}
/** returns true if the agent do not move in the last 5 location perception */
public boolean isRobotFrozen() {
- return lo1.equals(lo2) && lo2.equals(lo3) && lo3.equals(lo4) && lo4.equals(lo5) && lo5.equals(lo6);
+ return lo1.equals(lo2) && lo2.equals(lo3) && lo3.equals(lo4) && lo4.equals(lo5) && lo5.equals(lo6) && lo6.equals(lo7);
}
+
+ protected void addRestart() {
+ try {
+ logger.info("** Arch adding restart for "+getAgName());
+ getTS().getC().create();
+
+ getTS().getAg().getBB().abolish(new Literal("restart").getPredicateIndicator());
+ getTS().getAg().addBel(new Literal("restart"));
+ lo2 = new Location(-1,-1); // to not restart again in the next cycle
+ } catch (Exception e) {
+ logger.info("Error in restart!"+ e);
+ }
+ }
public static Literal createCellPerception(int x, int y, Term obj) {
Literal l = new Literal("cell");
@@ -237,9 +248,23 @@
return l;
}
+ private static final Literal cowstoclean = Literal.parseLiteral("cell(_,_,cow(_))");
+ synchronized void initKnownCows() throws RevisionFailedException {
+ model.clearCows();
+ getTS().getAg().abolish(cowstoclean, null);
+ }
void cowPerceived(int x, int y) {
model.addCow(x,y);
}
+
+ void sendCowsToTeam() {
+ try {
+ Message m = new Message("tell-cows", null, null, model.getCows());
+ broadcast(m);
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
void enemyPerceived(int x, int y) {
model.add(WorldModel.ENEMY, x, y);
@@ -276,8 +301,9 @@
}
}
+ @SuppressWarnings("unchecked")
@Override
- public void checkMail() {
+ synchronized public void checkMail() {
try {
super.checkMail();
@@ -286,38 +312,45 @@
Iterator<Message> im = getTS().getC().getMailBox().iterator();
while (im.hasNext()) {
Message m = im.next();
- String ms = m.getPropCont().toString();
- if (ms.startsWith("cell") && ms.endsWith("obstacle)") && model != null) {
- Literal p = (Literal)m.getPropCont();
- int x = (int)((NumberTerm)p.getTerm(0)).solve();
- int y = (int)((NumberTerm)p.getTerm(1)).solve();
- if (model.inGrid(x,y)) {
- model.add(WorldModel.OBSTACLE, x, y);
- if (acView != null) acView.addObject(WorldModel.OBSTACLE, x, y);
+ if (m.getIlForce().equals("tell-cows")) {
+ for (Location l: (Collection<Location>)m.getPropCont()) {
+ cowPerceived(l.x, l.y);
}
im.remove();
- //getTS().getAg().getLogger().info("received obs="+p);
-
- } else if (ms.startsWith("my_status") && model != null) {
- // update others location
- Literal p = Literal.parseLiteral(m.getPropCont().toString());
- int x = (int)((NumberTerm)p.getTerm(0)).solve();
- int y = (int)((NumberTerm)p.getTerm(1)).solve();
- if (model.inGrid(x,y)) {
- try {
- int agid = getAgId(m.getSender());
- model.setAgPos(agid, x, y);
- if (acView != null) acView.getModel().setAgPos(agid, x, y);
- model.incVisited(x, y);
- //getTS().getAg().getLogger().info("ag pos "+getMinerId(m.getSender())+" = "+x+","+y);
- Structure tAlly = new Structure("ally");
- tAlly.addTerm(new Atom(m.getSender()));
- getTS().getAg().addBel( createCellPerception(x, y, tAlly));
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
- im.remove();
+ } else {
+ String ms = m.getPropCont().toString();
+ if (ms.startsWith("cell") && ms.endsWith("obstacle)") && model != null) {
+ Literal p = (Literal)m.getPropCont();
+ int x = (int)((NumberTerm)p.getTerm(0)).solve();
+ int y = (int)((NumberTerm)p.getTerm(1)).solve();
+ if (model.inGrid(x,y)) {
+ model.add(WorldModel.OBSTACLE, x, y);
+ if (acView != null) acView.addObject(WorldModel.OBSTACLE, x, y);
+ }
+ im.remove();
+ //getTS().getAg().getLogger().info("received obs="+p);
+
+ } else if (ms.startsWith("my_status") && model != null) {
+ // update others location
+ Literal p = Literal.parseLiteral(m.getPropCont().toString());
+ int x = (int)((NumberTerm)p.getTerm(0)).solve();
+ int y = (int)((NumberTerm)p.getTerm(1)).solve();
+ if (model.inGrid(x,y)) {
+ try {
+ int agid = getAgId(m.getSender());
+ model.setAgPos(agid, x, y);
+ if (acView != null) acView.getModel().setAgPos(agid, x, y);
+ model.incVisited(x, y);
+ //getTS().getAg().getLogger().info("ag pos "+getMinerId(m.getSender())+" = "+x+","+y);
+ Structure tAlly = new Structure("ally");
+ tAlly.addTerm(new Atom(m.getSender()));
+ getTS().getAg().addBel( createCellPerception(x, y, tAlly));
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+ im.remove();
+ }
}
}
} catch (Exception e) {
Modified: trunk/applications/jason-team/src/java/arch/LocalWorldModel.java
===================================================================
--- trunk/applications/jason-team/src/java/arch/LocalWorldModel.java 2008-04-20 20:13:53 UTC (rev 1232)
+++ trunk/applications/jason-team/src/java/arch/LocalWorldModel.java 2008-04-20 20:16:53 UTC (rev 1233)
@@ -3,8 +3,11 @@
import jason.environment.grid.Location;
import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashSet;
import java.util.List;
import java.util.Random;
+import java.util.Set;
import env.WorldModel;
@@ -21,7 +24,7 @@
private Random random = new Random();
- List<Location> cows = new ArrayList<Location>();
+ Set<Location> cows = new HashSet<Location>();
//private Logger logger = Logger.getLogger("jasonTeamSimLocal.mas2j." + LocalWorldModel.class.getName());
@@ -44,7 +47,8 @@
}
}
- public void clearCowsList() {
+ public void clearCows() {
+ removeAll(WorldModel.COW);
cows.clear();
}
public void addCow(int x, int y) {
@@ -54,7 +58,7 @@
public void addCow(Location l) {
addCow(l.x, l.y);
}
- public List<Location> getCows() {
+ public Collection<Location> getCows() {
return cows;
}
@@ -75,6 +79,18 @@
}
}
+ public int countObjInArea(int obj, Location startPoint, int size) {
+ int c = 0;
+ for (int x = startPoint.x-size; x <= startPoint.x+size; x++) {
+ for (int y = startPoint.y-size; y <= startPoint.y+size; y++) {
+ if (hasObject(obj, x, y)) {
+ c++;
+ }
+ }
+ }
+ return c;
+ }
+
public int getVisited(Location l) {
return visited[l.x][l.y];
}
Modified: trunk/applications/jason-team/src/java/env/WorldModel.java
===================================================================
--- trunk/applications/jason-team/src/java/env/WorldModel.java 2008-04-20 20:13:53 UTC (rev 1232)
+++ trunk/applications/jason-team/src/java/env/WorldModel.java 2008-04-20 20:16:53 UTC (rev 1233)
@@ -17,6 +17,7 @@
public static final int CORRAL = 32;
public static final int ENEMY = 64;
public static final int TARGET = 128; // one agent target location
+ public static final int FORPLACE = 256; // a place in a formation
public static final int nbActions = 8;
@@ -164,6 +165,14 @@
return maxSteps;
}
+ public void removeAll(int obj) {
+ for (int i = 0; i < width; i++) {
+ for (int j = 0; j < height; j++) {
+ if (hasObject(obj, i, j))
+ remove(obj, i, j);
+ }
+ }
+ }
/** Actions **/
Modified: trunk/applications/jason-team/src/java/env/WorldView.java
===================================================================
--- trunk/applications/jason-team/src/java/env/WorldView.java 2008-04-20 20:13:53 UTC (rev 1232)
+++ trunk/applications/jason-team/src/java/env/WorldView.java 2008-04-20 20:16:53 UTC (rev 1233)
@@ -202,6 +202,7 @@
case WorldModel.COW: drawCow(g, x, y); break;
case WorldModel.ENEMY: drawEnemy(g, x, y); break;
case WorldModel.TARGET: drawTarget(g, x, y); break;
+ case WorldModel.FORPLACE: drawFormPlace(g, x, y); break;
}
}
@@ -269,6 +270,15 @@
g.drawRect(x * cellSizeW + 4, y * cellSizeH + 4, cellSizeW - 8, cellSizeH - 8);
}
+ public void drawFormPlace(Graphics g, int x, int y) {
+ g.setColor(Color.green);
+ g.drawRect(x * cellSizeW + 2, y * cellSizeH + 2, cellSizeW - 4, cellSizeH - 4);
+ g.setColor(Color.lightGray);
+ g.drawRect(x * cellSizeW + 3, y * cellSizeH + 3, cellSizeW - 6, cellSizeH - 6);
+ g.setColor(Color.gray);
+ g.drawRect(x * cellSizeW + 4, y * cellSizeH + 4, cellSizeW - 8, cellSizeH - 8);
+ }
+
public void drawCow(Graphics g, int x, int y) {
g.setColor(Color.black);
g.drawRect(x * cellSizeW + 2, y * cellSizeH + 2, cellSizeW - 4, cellSizeH - 4);
Modified: trunk/applications/jason-team/src/java/jia/Search.java
===================================================================
--- trunk/applications/jason-team/src/java/jia/Search.java 2008-04-20 20:13:53 UTC (rev 1232)
+++ trunk/applications/jason-team/src/java/jia/Search.java 2008-04-20 20:16:53 UTC (rev 1233)
@@ -211,36 +211,13 @@
int cost = 1;
if (ia.considerCowsAsObstacles) {
- cost += countCowsBeside(newl,1);
- cost += countCowsBeside(newl,2);
+ cost += ia.model.countObjInArea(WorldModel.CORRAL, newl,1);
+ cost += ia.model.countObjInArea(WorldModel.CORRAL, newl,2);
}
s.add(new GridState(newl,op,ia, cost));
}
-
- private int countCowsBeside(Location l, int d) {
- int c = 0;
- for (int x = l.x-d; x <= l.x+d; x++) {
- for (int y = l.y-d; y <= l.y+d; y++) {
- if (ia.model.hasObject(WorldModel.COW, x, y)) {
- c++;
- }
- }
- }
- return c;
- /*
- if (ia.model.hasObject(WorldModel.COW, l.x, l.y)) c++;
- if (ia.model.hasObject(WorldModel.COW, l.x+1, l.y)) c++;
- if (ia.model.hasObject(WorldModel.COW, l.x-1, l.y)) c++;
- if (ia.model.hasObject(WorldModel.COW, l.x, l.y+1)) c++;
- if (ia.model.hasObject(WorldModel.COW, l.x, l.y-1)) c++;
- if (ia.model.hasObject(WorldModel.COW, l.x+1, l.y+1)) c++;
- if (ia.model.hasObject(WorldModel.COW, l.x-1, l.y+1)) c++;
- if (ia.model.hasObject(WorldModel.COW, l.x+1, l.y-1)) c++;
- if (ia.model.hasObject(WorldModel.COW, l.x-1, l.y-1)) c++;
- */
- }
-
+
public boolean equals(Object o) {
if (o != null && o instanceof GridState) {
GridState m = (GridState)o;
Modified: trunk/applications/jason-team/src/java/jia/Vec.java
===================================================================
--- trunk/applications/jason-team/src/java/jia/Vec.java 2008-04-20 20:13:53 UTC (rev 1232)
+++ trunk/applications/jason-team/src/java/jia/Vec.java 2008-04-20 20:16:53 UTC (rev 1233)
@@ -10,10 +10,12 @@
public class Vec implements Cloneable {
- public final int x,y;
+ public final double x,y;
public final double r,t;
- public Vec(int x, int y) {
+ public static final double PI2 = 2.0 * Math.PI;
+
+ public Vec(double x, double y) {
this.x = x;
this.y = y;
this.r = Math.sqrt(x*x + y*y);
@@ -28,13 +30,13 @@
this.t = Math.atan2(y,x);
}
- public int getX() { return x; }
- public int getY() { return y; }
+ public int getX() { return (int)Math.round(x); }
+ public int getY() { return (int)Math.round(y); }
public double magnitude() { return r; }
public double angle() { return t; }
- public Location getLocation(LocalWorldModel model) {
- return new Location(x, model.getHeight()-y-1);
+ public Location getLocation(LocalWorldModel model) {
+ return new Location(getX(), model.getHeight()-getY()-1);
}
public Vec add(Vec v) {
@@ -46,6 +48,11 @@
public Vec product(double e) {
return new Vec((int)(x * e), (int)(y *e));
}
+ public Vec newAngle(double t) {
+ while (t > PI2) t = t - PI2;
+ while (t < 0) t = t + PI2;
+ return new Vec(r*Math.cos(t), r*Math.sin(t));
+ }
@Override
public boolean equals(Object o) {
@@ -53,7 +60,7 @@
if (o == this) return true;
if (o instanceof Vec) {
Vec v = (Vec)o;
- return (x == v.x) && (y == v.y);
+ return (getX() == v.getX()) && (getY() == v.getY());
}
return false;
}
@@ -151,6 +158,6 @@
@Override
public String toString() {
- return x + "," + y;
+ return getX() + "," + getY();
}
}
Modified: trunk/applications/jason-team/src/java/jia/herd_position.java
===================================================================
--- trunk/applications/jason-team/src/java/jia/herd_position.java 2008-04-20 20:13:53 UTC (rev 1232)
+++ trunk/applications/jason-team/src/java/jia/herd_position.java 2008-04-20 20:16:53 UTC (rev 1233)
@@ -14,6 +14,7 @@
import arch.CowboyArch;
import arch.LocalWorldModel;
import busca.Nodo;
+import env.WorldModel;
/**
* Gives a good location to herd cows
@@ -24,17 +25,31 @@
public static final double maxStdDev = 3;
+ public enum Formation {
+ one { int[] getAngles() { return new int[] { 0 }; } },
+ six { int[] getAngles() { return new int[] { 10, -10, 30, -30, 60, -60 }; } };
+ abstract int[] getAngles();
+ };
+
@Override
public Object execute(TransitionSystem ts, Unifier un, Term[] terms) throws Exception {
try {
+ CowboyArch arch = (CowboyArch)ts.getUserAgArch();
+ LocalWorldModel model = arch.getModel();
+ if (model == null)
+ return false;
- LocalWorldModel model = ((CowboyArch)ts.getUserAgArch()).getModel();
-
- Location agTarget = getAgTarget(model);
+ Location agLoc = model.getAgPos(arch.getMyId());
+
+ // update GUI
+ if (arch.hasGUI())
+ setFormationLoc(model, Formation.valueOf(terms[0].toString()));
+
+ Location agTarget = getAgTarget(model,Formation.valueOf(terms[0].toString()), agLoc);
if (agTarget != null) {
- agTarget = model.nearFree(agTarget);
- return un.unifies(terms[0], new NumberTermImpl(agTarget.x)) &&
- un.unifies(terms[1], new NumberTermImpl(agTarget.y));
+ agTarget = nearFreeForAg(model, agLoc, agTarget);
+ return un.unifies(terms[1], new NumberTermImpl(agTarget.x)) &&
+ un.unifies(terms[2], new NumberTermImpl(agTarget.y));
}
} catch (Throwable e) {
ts.getLogger().log(Level.SEVERE, "herd_position error: "+e, e);
@@ -42,7 +57,34 @@
return false;
}
- public Location getAgTarget(LocalWorldModel model) throws Exception {
+ public Location getAgTarget(LocalWorldModel model, Formation formation, Location ag) throws Exception {
+ Location r = null;
+ List<Location> locs = formationPlaces(model, formation);
+ if (locs != null) {
+ for (Location l : locs) {
+ r = l;
+ if (ag.equals(l) || // I am there
+ model.countObjInArea(WorldModel.AGENT, l, 1) == 0) { // someone else is there
+ break;
+ }
+ }
+ }
+ return r;
+ }
+
+ public void setFormationLoc(LocalWorldModel model, Formation formation) throws Exception {
+ model.removeAll(WorldModel.FORPLACE);
+ List<Location> locs = formationPlaces(model, formation);
+ if (locs != null) {
+ for (Location l : locs) {
+ if (model.inGrid(l)) {
+ model.add(WorldModel.FORPLACE, l);
+ }
+ }
+ }
+ }
+
+ private List<Location> formationPlaces(LocalWorldModel model, Formation formation) throws Exception {
List<Vec> cows = new ArrayList<Vec>();
for (Location c: model.getCows()) {
cows.add(new Vec(model, c));
@@ -61,34 +103,48 @@
int stepsFromCenter = (int)Vec.max(cows).sub(mean).magnitude()+1;
int n = Math.min(stepsFromCenter, np.size());
- Vec ctarget = new Vec(model, s.getNodeLocation(np.get(n)));
- Vec agTarget = mean.sub(ctarget).add(mean); // .product(1.5)
- return agTarget.getLocation(model);
+ Vec cowstarget = new Vec(model, s.getNodeLocation(np.get(n)));
+ Vec agsTarget = mean.sub(cowstarget);
+ Vec agTarget = agsTarget;
+ List<Location> r = new ArrayList<Location>();
+ for (int angle: formation.getAngles()) {
+ double nt = angle * (Math.PI / 180);
+ for (double varangle = nt; nt < 180; nt += 5) {
+ agTarget = agsTarget.newAngle(agsTarget.angle() + varangle);
+ Location l = agTarget.add(mean).getLocation(model);
- /*
- List<Vec> cowsTarget = new ArrayList<Vec>();
- for (Location c: model.getCows()) {
- Search s = new Search(model, c, model.getCorralCenter(), null, false, false, false, null);
- Location cowTarget = WorldModel.getNewLocationForAction(c, s.firstAction(s.search()));
- cowsTarget.add(new Vec(model, cowTarget));
+ // if l is in the path of cows, continue with next varangle
+ boolean inpath = false;
+ for (Nodo pn: np) {
+ if (l.equals(s.getNodeLocation(pn))) {
+ inpath = true;
+ break;
+ }
+ }
+ if (!inpath) {
+ r.add(l);
+ break;
+ }
+ }
}
-
- Vec stddev = Vec.stddev(cowsTarget);
-
- // remove max if stddev is too big
- while (stddev.magnitude() > maxStdDev) {
- cowsTarget.remove(Vec.max(cowsTarget));
- stddev = Vec.stddev(cowsTarget);
+ return r;
+ }
+
+ public Location nearFreeForAg(LocalWorldModel model, Location ag, Location t) throws Exception {
+ // run A* to get the path from ag to t
+ Search s = new Search(model, t, ag, null, false, false, true, null);
+ List<Nodo> np = s.normalPath(s.search());
+
+ int i = 0;
+ for (Nodo n: np) {
+ if (model.isFree(s.getNodeLocation(n))) {
+ return s.getNodeLocation(n);
+ }
+ i++;
+ if (i > 3) // do not go to far from target
+ break;
}
-
- Vec mean = Vec.mean(cowsTarget);
- if (mean.magnitude() > 0) {
- double incvalue = (Vec.max(cowsTarget).sub(mean).magnitude()+2) / mean.magnitude();
- return mean.product(incvalue+1).getLocation(model);
- } else {
- return null;
- }
- */
+ return model.nearFree(t);
}
}
Modified: trunk/applications/jason-team/src/java/test/TestBasicHerding.java
===================================================================
--- trunk/applications/jason-team/src/java/test/TestBasicHerding.java 2008-04-20 20:13:53 UTC (rev 1232)
+++ trunk/applications/jason-team/src/java/test/TestBasicHerding.java 2008-04-20 20:16:53 UTC (rev 1233)
@@ -7,15 +7,15 @@
import java.util.ArrayList;
import java.util.List;
-import jia.Search;
import jia.Vec;
import jia.herd_position;
+import jia.herd_position.Formation;
import org.junit.Before;
import org.junit.Test;
import arch.LocalWorldModel;
-import busca.Nodo;
+import env.WorldModel;
public class TestBasicHerding {
@@ -72,6 +72,8 @@
assertEquals(new Location(3,44), cowboy.getLocation(model));
assertEquals(new Location(1,49), model.getCorralCenter());
assertEquals(new Vec(3,2), new Vec(6,7).sub(cowboy)); //new Vec(model, cowboy.getLocation(model), cow.add(cowboy).getLocation(model)));
+ Vec v = new Vec(3,2);
+ assertEquals(v, v.newAngle(v.angle()));
}
/*
@@ -144,6 +146,7 @@
}
*/
+ /*
@Test
public void moveCows2() throws Exception {
scenario1();
@@ -179,40 +182,56 @@
Location byIA = new herd_position().getAgTarget(model);
assertEquals(byIA, agTarget.getLocation(model));
}
-
+ */
+
@Test
- public void moveCows3() throws Exception {
- scenario2();
- List<Vec> cowsTarget = new ArrayList<Vec>();
+ public void moveCows2() throws Exception {
+ scenario1();
+
+ List<Vec> cowsl = new ArrayList<Vec>();
for (int i=0; i<cows.length; i++) {
- cowsTarget.add(cows[i]);
+ cowsl.add(cows[i]);
}
// find center/clusterise
- cowsTarget = Vec.cluster(cowsTarget, 2);
+ cowsl = Vec.cluster(cowsl, 2);
+ Vec stddev = Vec.stddev(cowsl);
+ assertTrue(stddev.magnitude() < 3);
- Vec mean = Vec.mean(cowsTarget);
- assertEquals(new Vec(9,1), mean);
+ Vec mean = Vec.mean(cowsl);
+ assertEquals(new Vec(5,8), mean);
- // run A* to see the cluster target in n steps
- Search s = new Search(model, mean.getLocation(model), model.getCorralCenter(), null, false, false, false, null);
- List<Nodo> np = s.normalPath(s.search());
- //System.out.println(np);
+ int stepsFromCenter = (int)Vec.max(cowsl).sub(mean).magnitude()+1;
+ assertEquals(3, stepsFromCenter);
+
+ Location byIA = new herd_position().getAgTarget(model, Formation.one, c...
[truncated message content] |
|
From: <jom...@us...> - 2008-04-20 20:13:57
|
Revision: 1232
http://jason.svn.sourceforge.net/jason/?rev=1232&view=rev
Author: jomifred
Date: 2008-04-20 13:13:53 -0700 (Sun, 20 Apr 2008)
Log Message:
-----------
update massim-server
Modified Paths:
--------------
trunk/applications/jason-team/massim-server/lib/massimserver.jar
Removed Paths:
-------------
trunk/applications/jason-team/massim-server/massim/rmi/
Modified: trunk/applications/jason-team/massim-server/lib/massimserver.jar
===================================================================
(Binary files differ)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|