From: <jom...@us...> - 2015-02-25 12:35:07
|
Revision: 1820 http://sourceforge.net/p/jason/svn/1820 Author: jomifred Date: 2015-02-25 12:34:59 +0000 (Wed, 25 Feb 2015) Log Message: ----------- update EIS Modified Paths: -------------- trunk/applications/eis-jason/Carriage-1agent.mas2j trunk/applications/eis-jason/Carriage-2agents.mas2j trunk/applications/eis-jason/build.xml trunk/applications/eis-jason/examples/elevator/elevator.mas2j trunk/applications/eis-jason/src/asl/robot2.asl trunk/applications/eis-jason/src/java/jason/eis/EISAdapter.java trunk/examples/cleaning-robots/MarsEnv.java trunk/examples/cleaning-robots/r1.asl trunk/examples/domestic-robot/HouseView.java trunk/examples/domestic-robot/owner.asl trunk/lib/c4jason.jar Modified: trunk/applications/eis-jason/Carriage-1agent.mas2j =================================================================== --- trunk/applications/eis-jason/Carriage-1agent.mas2j 2014-12-10 20:42:30 UTC (rev 1819) +++ trunk/applications/eis-jason/Carriage-1agent.mas2j 2015-02-25 12:34:59 UTC (rev 1820) @@ -1,22 +1,22 @@ -/* - Example of Jason EIS integration - - In this example one agent acts on two entities (robot1 and robot2) - - -- created on September 08, 2009 -*/ - -MAS demo1ag { - infrastructure: Centralised - - // Environment initialisation - environment: jason.eis.EISAdapter( - "lib/eiscarriage-0.3.jar", // jar file containing the environment implementation - agent_entity(robot,robot1), agent_entity(robot,robot2) // agent x entities relation - ) - - agents: - robot; - - aslSourcePath: "src/asl"; -} \ No newline at end of file +/* + Example of Jason EIS integration + + In this example one agent acts on two entities (robot1 and robot2) + + -- created on September 08, 2009 +*/ + +MAS demo1ag { + infrastructure: Centralised + + // Environment initialisation + environment: jason.eis.EISAdapter( + "lib/eiscarriage-0.3.jar", // jar file containing the environment implementation + agent_entity(robot,robot1), agent_entity(robot,robot2) // agent x entities relation + ) + + agents: + robot; + + aslSourcePath: "src/asl"; +} Modified: trunk/applications/eis-jason/Carriage-2agents.mas2j =================================================================== --- trunk/applications/eis-jason/Carriage-2agents.mas2j 2014-12-10 20:42:30 UTC (rev 1819) +++ trunk/applications/eis-jason/Carriage-2agents.mas2j 2015-02-25 12:34:59 UTC (rev 1820) @@ -1,24 +1,24 @@ -/* - Example of Jason EIS integration - - In this example there is one agent for each entity and they have - the same identities (agent is "robot1" and entity is "robot1") - - -- created on September 08, 2009 -*/ - -MAS demo2ag { - infrastructure: Centralised - - environment: jason.eis.EISAdapter( - "lib/eiscarriage-0.3.jar" // jar file containing the environment implementation - // agent x entities relation: - // agent_entity(robot1,robot1), agent_entity(robot2,robot2)) // the default relation: - ) - - agents: - robot1; - robot2; - - aslSourcePath: "src/asl"; -} \ No newline at end of file +/* + Example of Jason EIS integration + + In this example there is one agent for each entity and they have + the same identities (agent is "robot1" and entity is "robot1") + + -- created on September 08, 2009 +*/ + +MAS demo2ag { + infrastructure: Centralised + + environment: jason.eis.EISAdapter( + "lib/eiscarriage-0.3.jar" // jar file containing the environment implementation + // agent x entities relation: + // agent_entity(robot1,robot1), agent_entity(robot2,robot2)) // the default relation: + ) + + agents: + robot1; + robot2; + + aslSourcePath: "src/asl"; +} Modified: trunk/applications/eis-jason/build.xml =================================================================== (Binary files differ) Modified: trunk/applications/eis-jason/examples/elevator/elevator.mas2j =================================================================== --- trunk/applications/eis-jason/examples/elevator/elevator.mas2j 2014-12-10 20:42:30 UTC (rev 1819) +++ trunk/applications/eis-jason/examples/elevator/elevator.mas2j 2015-02-25 12:34:59 UTC (rev 1820) @@ -15,23 +15,23 @@ environment: jason.eis.EISAdapter( "lib/elevatorenv.jar", // EIS environment - agent_entity(ag1,car0), // entities, agent ag is responsible for elevator1 + agent_entity(ag1,car0), // entities, agent ag1 is responsible for elevator0 agent_entity(ag2,car1), agent_entity(ag3,car2), - map("Simulation","Random Rider Insertion"), - map("Floors",10), - map("Cars",3), - map("RandomSeed",635359), - map("Capacity",8), - map("People",20), - map("InsertionTime",50000), - map("TimeFactor",0), - map("Controller","EIS Controller"), - map("InsertionTimeHr","0.3"), - map("StandardDev",1), - map("NPeoplePerFloor",8), - map("Insert2ndReqAt", 29000) - ) + map("Simulation","Random Rider Insertion"), + map("Floors",10), + map("Cars",3), + map("RandomSeed",635359), + map("Capacity",8), + map("People",20), + map("InsertionTime",50000), + map("TimeFactor",0), + map("Controller","EIS Controller"), + map("InsertionTimeHr","0.3"), + map("StandardDev",1), + map("NPeoplePerFloor",8), + map("Insert2ndReqAt", 29000) + ) agents: ag #3; Modified: trunk/applications/eis-jason/src/asl/robot2.asl =================================================================== --- trunk/applications/eis-jason/src/asl/robot2.asl 2014-12-10 20:42:30 UTC (rev 1819) +++ trunk/applications/eis-jason/src/asl/robot2.asl 2015-02-25 12:34:59 UTC (rev 1820) @@ -10,4 +10,4 @@ +!start : true <- wait; push; !start. -+step(X) : carriagePos(C) <- .print("Step ",X,", carriage at ",C). \ No newline at end of file ++step(X) : carriagePos(C) <- .print("Step ",X,", carriage at ",C). Modified: trunk/applications/eis-jason/src/java/jason/eis/EISAdapter.java =================================================================== --- trunk/applications/eis-jason/src/java/jason/eis/EISAdapter.java 2014-12-10 20:42:30 UTC (rev 1819) +++ trunk/applications/eis-jason/src/java/jason/eis/EISAdapter.java 2015-02-25 12:34:59 UTC (rev 1820) @@ -77,7 +77,7 @@ Map<String,Parameter> initMapArgs = new HashMap<String, Parameter>(); List<String[]> agEnt = new ArrayList<String[]>(); - // identify initial paramaters + // identify initial parameters for (int i=1; i<args.length; i++) { Term t = ASSyntax.parseTerm(args[i]); if (t.isStructure()) { @@ -117,7 +117,7 @@ } } } else { - // associate agents to entities + // associate agents to entities for (String[] p: agEnt) { String agName = p[0]; if (!ei.getAgents().contains(agName)) { Modified: trunk/examples/cleaning-robots/MarsEnv.java =================================================================== --- trunk/examples/cleaning-robots/MarsEnv.java 2014-12-10 20:42:30 UTC (rev 1819) +++ trunk/examples/cleaning-robots/MarsEnv.java 2015-02-25 12:34:59 UTC (rev 1820) @@ -209,6 +209,7 @@ g.setColor(Color.white); } super.drawString(g, x, y, defaultFont, label); + repaint(); } public void drawGarb(Graphics g, int x, int y) { Modified: trunk/examples/cleaning-robots/r1.asl =================================================================== --- trunk/examples/cleaning-robots/r1.asl 2014-12-10 20:42:30 UTC (rev 1819) +++ trunk/examples/cleaning-robots/r1.asl 2015-02-25 12:34:59 UTC (rev 1820) @@ -12,14 +12,15 @@ +!check(slots) : not garbage(r1) <- next(slot); - !!check(slots). + !check(slots). +!check(slots). +@lg[atomic] +garbage(r1) : not .desire(carry_to(r2)) <- !carry_to(r2). -+!carry_to(R) ++!carry_to(R) <- // remember where to go back ?pos(r1,X,Y); -+pos(last,X,Y); @@ -29,7 +30,7 @@ // goes back and continue to check !at(last); - !!check(slots). + !check(slots). +!take(S,L) : true <- !ensure_pick(S); Modified: trunk/examples/domestic-robot/HouseView.java =================================================================== --- trunk/examples/domestic-robot/HouseView.java 2014-12-10 20:42:30 UTC (rev 1819) +++ trunk/examples/domestic-robot/HouseView.java 2015-02-25 12:34:59 UTC (rev 1820) @@ -43,6 +43,7 @@ drawString(g, x, y, defaultFont, o); break; } + repaint(); } @Override Modified: trunk/examples/domestic-robot/owner.asl =================================================================== --- trunk/examples/domestic-robot/owner.asl 2014-12-10 20:42:30 UTC (rev 1819) +++ trunk/examples/domestic-robot/owner.asl 2015-02-25 12:34:59 UTC (rev 1820) @@ -22,7 +22,7 @@ <- .random(X); .wait(X*5000+2000); // i get bored at random times .send(robot, askOne, time(_), R); // when bored, I ask the robot about the time .print(R); - !!check_bored. + !check_bored. +msg(M)[source(Ag)] : true <- .print("Message from ",Ag,": ",M); Modified: trunk/lib/c4jason.jar =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |