From: <jom...@us...> - 2016-04-11 18:35:39
|
Revision: 1898 http://sourceforge.net/p/jason/svn/1898 Author: jomifred Date: 2016-04-11 18:35:36 +0000 (Mon, 11 Apr 2016) Log Message: ----------- change env template to illustrate informAgsEnvironmentChanged Modified Paths: -------------- trunk/src/jason/infra/centralised/CentralisedAgArchAsynchronous.java trunk/src/templates/environment Modified: trunk/src/jason/infra/centralised/CentralisedAgArchAsynchronous.java =================================================================== --- trunk/src/jason/infra/centralised/CentralisedAgArchAsynchronous.java 2016-04-11 18:09:37 UTC (rev 1897) +++ trunk/src/jason/infra/centralised/CentralisedAgArchAsynchronous.java 2016-04-11 18:35:36 UTC (rev 1898) @@ -1,12 +1,10 @@ package jason.infra.centralised; -import java.util.Collection; import java.util.concurrent.ExecutorService; import jason.asSemantics.ActionExec; import jason.asSemantics.CircumstanceListener; import jason.asSemantics.Message; -import jason.asSyntax.Literal; import jason.infra.components.ActComponent; import jason.infra.components.DeliberateComponent; import jason.infra.components.SenseComponent; Modified: trunk/src/templates/environment =================================================================== --- trunk/src/templates/environment 2016-04-11 18:09:37 UTC (rev 1897) +++ trunk/src/templates/environment 2016-04-11 18:35:36 UTC (rev 1898) @@ -12,13 +12,16 @@ @Override public void init(String[] args) { super.init(args); - addPercept(Literal.parseLiteral("percept(demo)")); + addPercept(ASSyntax.parseLiteral("percept(demo)")); } @Override public boolean executeAction(String agName, Structure action) { logger.info("executing: "+action+", but not implemented!"); - return true; + if (true) { // you may improve this condition + informAgsEnvironmentChanged(); + } + return true; // the action was executed with success } /** Called before the end of MAS execution */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |