diff --git a/doc/install.adoc b/doc/install.adoc index 42bf0e71..3ef01f96 100644 --- a/doc/install.adoc +++ b/doc/install.adoc @@ -7,7 +7,7 @@ + Unix and Windows:: + -Download a Jason release from link:https://github.com/jason-lang/jason/releases[here] (download the file named `jason-bin-.....zip`) and decompress it. The zip file contains documentation, examples, and a sub-directory `bin` with the file *`jason`*. It is a unix executable file, if not, change its properties with `chmod +x jason`. Finally, link:https://www.computerhope.com/issues/ch000549.htm[adds the directory `bin` in your machine `PATH`] so that the command `jason` can be executed in a terminal. +Download a Jason release from link:https://github.com/jason-lang/jason/releases[here] (download the file named `jason-bin-.....zip`) and decompress it. The zip file contains documentation, examples, and a subdirectory `bin` with the file *`jason`*. It is a unix executable file, if not, change its properties with `chmod +x jason`. Finally, link:https://www.computerhope.com/issues/ch000549.htm[adds the directory `bin` in your machine `PATH`] so that the command `jason` can be executed in a terminal. Linux:: You can use `apt-get` to install Jason (details link:https://github.com/chon-group/dpkg-jason[here]): diff --git a/jason-interpreter/src/main/java/jason/asSemantics/Agent.java b/jason-interpreter/src/main/java/jason/asSemantics/Agent.java index 7bcdaf0e..7628b258 100644 --- a/jason-interpreter/src/main/java/jason/asSemantics/Agent.java +++ b/jason-interpreter/src/main/java/jason/asSemantics/Agent.java @@ -35,7 +35,6 @@ import java.util.*; import java.util.concurrent.Executors; import java.util.concurrent.ScheduledExecutorService; -import java.util.concurrent.atomic.AtomicBoolean; import java.util.logging.Level; import java.util.logging.Logger; @@ -79,7 +78,7 @@ public Agent() { /** * Set up the default agent configuration. - * + *

* Creates the agent class defined by agClass, default is jason.asSemantics.Agent. * Creates the TS for the agent. * Creates the belief base for the agent. @@ -90,7 +89,7 @@ public static Agent create(AgArch arch, String agClass, ClassParameters bbPars, new TransitionSystem(ag, null, stts, arch); - BeliefBase bb = null; + BeliefBase bb; if (bbPars == null) bb = new DefaultBeliefBase(); else @@ -108,10 +107,11 @@ public static Agent create(AgArch arch, String agClass, ClassParameters bbPars, //} } - private boolean considerToaddMIForThisAgent = true; + private boolean considerToAddMIForThisAgent = true; public void setConsiderToAddMIForThisAgent(boolean add) { - considerToaddMIForThisAgent = add; + considerToAddMIForThisAgent = add; } + /** Initialises the TS and other components of the agent */ public void initAg() { if (bb == null) bb = new DefaultBeliefBase(); @@ -129,7 +129,7 @@ public void initAg() { //if (ts.getSettings().hasQueryProfiling()) qProfiling = new QueryProfiling(this); //if (ts.getSettings().hasQueryCache()) qCache = new QueryCacheSimple(this, qProfiling); - if (considerToaddMIForThisAgent) + if (considerToAddMIForThisAgent) addToMindInspectorWeb(); } @@ -252,7 +252,7 @@ public void stopAg() { * A new TS is created (based on the cloned circumstance). */ public Agent clone(AgArch arch) { - Agent a = null; + Agent a; try { a = this.getClass().getConstructor().newInstance(); } catch (InstantiationException e1) { @@ -645,6 +645,110 @@ public ActionExec selectAction(Queue actions) { return actions.poll(); } + public List