You can subscribe to this list here.
| 2004 | 
          Jan
           (1)  | 
        
        
        
        
          Feb
           (1)  | 
        
        
        
        
          Mar
           (3)  | 
        
        
        
        
          Apr
           (12)  | 
        
        
        
        
          May
           (1)  | 
        
        
        
        
          Jun
           | 
        
        
        
        
          Jul
           | 
        
        
        
        
          Aug
           | 
        
        
        
        
          Sep
           (5)  | 
        
        
        
        
          Oct
           (3)  | 
        
        
        
        
          Nov
           (2)  | 
        
        
        
        
          Dec
           | 
        
      
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2005 | 
          Jan
           | 
        
        
        
        
          Feb
           | 
        
        
        
        
          Mar
           (6)  | 
        
        
        
        
          Apr
           (2)  | 
        
        
        
        
          May
           (3)  | 
        
        
        
        
          Jun
           (6)  | 
        
        
        
        
          Jul
           | 
        
        
        
        
          Aug
           (1)  | 
        
        
        
        
          Sep
           (5)  | 
        
        
        
        
          Oct
           (32)  | 
        
        
        
        
          Nov
           | 
        
        
        
        
          Dec
           (4)  | 
        
      
| 2006 | 
          Jan
           (1)  | 
        
        
        
        
          Feb
           (1)  | 
        
        
        
        
          Mar
           (3)  | 
        
        
        
        
          Apr
           (1)  | 
        
        
        
        
          May
           (1)  | 
        
        
        
        
          Jun
           | 
        
        
        
        
          Jul
           (1)  | 
        
        
        
        
          Aug
           (1)  | 
        
        
        
        
          Sep
           | 
        
        
        
        
          Oct
           (6)  | 
        
        
        
        
          Nov
           (6)  | 
        
        
        
        
          Dec
           | 
        
      
| 2007 | 
          Jan
           | 
        
        
        
        
          Feb
           (7)  | 
        
        
        
        
          Mar
           (20)  | 
        
        
        
        
          Apr
           (9)  | 
        
        
        
        
          May
           (4)  | 
        
        
        
        
          Jun
           (13)  | 
        
        
        
        
          Jul
           (9)  | 
        
        
        
        
          Aug
           (8)  | 
        
        
        
        
          Sep
           | 
        
        
        
        
          Oct
           (7)  | 
        
        
        
        
          Nov
           (7)  | 
        
        
        
        
          Dec
           (3)  | 
        
      
| 2008 | 
          Jan
           | 
        
        
        
        
          Feb
           (5)  | 
        
        
        
        
          Mar
           (1)  | 
        
        
        
        
          Apr
           (46)  | 
        
        
        
        
          May
           (7)  | 
        
        
        
        
          Jun
           (5)  | 
        
        
        
        
          Jul
           (1)  | 
        
        
        
        
          Aug
           (15)  | 
        
        
        
        
          Sep
           (19)  | 
        
        
        
        
          Oct
           | 
        
        
        
        
          Nov
           (2)  | 
        
        
        
        
          Dec
           (1)  | 
        
      
| 2009 | 
          Jan
           (3)  | 
        
        
        
        
          Feb
           (2)  | 
        
        
        
        
          Mar
           (10)  | 
        
        
        
        
          Apr
           (16)  | 
        
        
        
        
          May
           (18)  | 
        
        
        
        
          Jun
           (12)  | 
        
        
        
        
          Jul
           (13)  | 
        
        
        
        
          Aug
           (10)  | 
        
        
        
        
          Sep
           (5)  | 
        
        
        
        
          Oct
           | 
        
        
        
        
          Nov
           (2)  | 
        
        
        
        
          Dec
           (3)  | 
        
      
| 2010 | 
          Jan
           (17)  | 
        
        
        
        
          Feb
           (10)  | 
        
        
        
        
          Mar
           (3)  | 
        
        
        
        
          Apr
           (2)  | 
        
        
        
        
          May
           (12)  | 
        
        
        
        
          Jun
           (17)  | 
        
        
        
        
          Jul
           (27)  | 
        
        
        
        
          Aug
           (20)  | 
        
        
        
        
          Sep
           (8)  | 
        
        
        
        
          Oct
           (12)  | 
        
        
        
        
          Nov
           (3)  | 
        
        
        
        
          Dec
           (2)  | 
        
      
| 2011 | 
          Jan
           (16)  | 
        
        
        
        
          Feb
           (6)  | 
        
        
        
        
          Mar
           (3)  | 
        
        
        
        
          Apr
           (2)  | 
        
        
        
        
          May
           | 
        
        
        
        
          Jun
           (11)  | 
        
        
        
        
          Jul
           (4)  | 
        
        
        
        
          Aug
           (9)  | 
        
        
        
        
          Sep
           (10)  | 
        
        
        
        
          Oct
           (8)  | 
        
        
        
        
          Nov
           (10)  | 
        
        
        
        
          Dec
           (3)  | 
        
      
| 2012 | 
          Jan
           (6)  | 
        
        
        
        
          Feb
           (4)  | 
        
        
        
        
          Mar
           (3)  | 
        
        
        
        
          Apr
           (10)  | 
        
        
        
        
          May
           (7)  | 
        
        
        
        
          Jun
           (5)  | 
        
        
        
        
          Jul
           (4)  | 
        
        
        
        
          Aug
           (18)  | 
        
        
        
        
          Sep
           (14)  | 
        
        
        
        
          Oct
           (17)  | 
        
        
        
        
          Nov
           (12)  | 
        
        
        
        
          Dec
           | 
        
      
| 2013 | 
          Jan
           (6)  | 
        
        
        
        
          Feb
           (7)  | 
        
        
        
        
          Mar
           (4)  | 
        
        
        
        
          Apr
           (8)  | 
        
        
        
        
          May
           (5)  | 
        
        
        
        
          Jun
           (7)  | 
        
        
        
        
          Jul
           (4)  | 
        
        
        
        
          Aug
           (1)  | 
        
        
        
        
          Sep
           (3)  | 
        
        
        
        
          Oct
           | 
        
        
        
        
          Nov
           | 
        
        
        
        
          Dec
           (6)  | 
        
      
| 2014 | 
          Jan
           (4)  | 
        
        
        
        
          Feb
           | 
        
        
        
        
          Mar
           (6)  | 
        
        
        
        
          Apr
           (2)  | 
        
        
        
        
          May
           | 
        
        
        
        
          Jun
           (10)  | 
        
        
        
        
          Jul
           (1)  | 
        
        
        
        
          Aug
           (2)  | 
        
        
        
        
          Sep
           (1)  | 
        
        
        
        
          Oct
           | 
        
        
        
        
          Nov
           | 
        
        
        
        
          Dec
           | 
        
      
| 2015 | 
          Jan
           | 
        
        
        
        
          Feb
           | 
        
        
        
        
          Mar
           (3)  | 
        
        
        
        
          Apr
           (3)  | 
        
        
        
        
          May
           (7)  | 
        
        
        
        
          Jun
           (5)  | 
        
        
        
        
          Jul
           (1)  | 
        
        
        
        
          Aug
           (3)  | 
        
        
        
        
          Sep
           (2)  | 
        
        
        
        
          Oct
           (2)  | 
        
        
        
        
          Nov
           (6)  | 
        
        
        
        
          Dec
           (3)  | 
        
      
| 2016 | 
          Jan
           (2)  | 
        
        
        
        
          Feb
           | 
        
        
        
        
          Mar
           | 
        
        
        
        
          Apr
           (7)  | 
        
        
        
        
          May
           | 
        
        
        
        
          Jun
           (5)  | 
        
        
        
        
          Jul
           (1)  | 
        
        
        
        
          Aug
           (2)  | 
        
        
        
        
          Sep
           (5)  | 
        
        
        
        
          Oct
           (5)  | 
        
        
        
        
          Nov
           (2)  | 
        
        
        
        
          Dec
           | 
        
      
| 2017 | 
          Jan
           (5)  | 
        
        
        
        
          Feb
           (4)  | 
        
        
        
        
          Mar
           (3)  | 
        
        
        
        
          Apr
           (6)  | 
        
        
        
        
          May
           | 
        
        
        
        
          Jun
           | 
        
        
        
        
          Jul
           | 
        
        
        
        
          Aug
           (2)  | 
        
        
        
        
          Sep
           (1)  | 
        
        
        
        
          Oct
           | 
        
        
        
        
          Nov
           (1)  | 
        
        
        
        
          Dec
           | 
        
      
| 2018 | 
          Jan
           (2)  | 
        
        
        
        
          Feb
           | 
        
        
        
        
          Mar
           | 
        
        
        
        
          Apr
           | 
        
        
        
        
          May
           (6)  | 
        
        
        
        
          Jun
           (1)  | 
        
        
        
        
          Jul
           (3)  | 
        
        
        
        
          Aug
           (2)  | 
        
        
        
        
          Sep
           | 
        
        
        
        
          Oct
           (6)  | 
        
        
        
        
          Nov
           (4)  | 
        
        
        
        
          Dec
           | 
        
      
| 2019 | 
          Jan
           (1)  | 
        
        
        
        
          Feb
           (5)  | 
        
        
        
        
          Mar
           (6)  | 
        
        
        
        
          Apr
           (5)  | 
        
        
        
        
          May
           | 
        
        
        
        
          Jun
           (5)  | 
        
        
        
        
          Jul
           (2)  | 
        
        
        
        
          Aug
           (7)  | 
        
        
        
        
          Sep
           (1)  | 
        
        
        
        
          Oct
           (7)  | 
        
        
        
        
          Nov
           | 
        
        
        
        
          Dec
           | 
        
      
| 2020 | 
          Jan
           | 
        
        
        
        
          Feb
           | 
        
        
        
        
          Mar
           | 
        
        
        
        
          Apr
           | 
        
        
        
        
          May
           | 
        
        
        
        
          Jun
           | 
        
        
        
        
          Jul
           | 
        
        
        
        
          Aug
           | 
        
        
        
        
          Sep
           | 
        
        
        
        
          Oct
           (1)  | 
        
        
        
        
          Nov
           (2)  | 
        
        
        
        
          Dec
           | 
        
      
| 2021 | 
          Jan
           | 
        
        
        
        
          Feb
           | 
        
        
        
        
          Mar
           | 
        
        
        
        
          Apr
           | 
        
        
        
        
          May
           | 
        
        
        
        
          Jun
           | 
        
        
        
        
          Jul
           | 
        
        
        
        
          Aug
           (2)  | 
        
        
        
        
          Sep
           (2)  | 
        
        
        
        
          Oct
           (3)  | 
        
        
        
        
          Nov
           | 
        
        
        
        
          Dec
           | 
        
      
| 2022 | 
          Jan
           (5)  | 
        
        
        
        
          Feb
           (1)  | 
        
        
        
        
          Mar
           | 
        
        
        
        
          Apr
           | 
        
        
        
        
          May
           (5)  | 
        
        
        
        
          Jun
           (9)  | 
        
        
        
        
          Jul
           | 
        
        
        
        
          Aug
           | 
        
        
        
        
          Sep
           (2)  | 
        
        
        
        
          Oct
           | 
        
        
        
        
          Nov
           (4)  | 
        
        
        
        
          Dec
           | 
        
      
| 2023 | 
          Jan
           | 
        
        
        
        
          Feb
           | 
        
        
        
        
          Mar
           (1)  | 
        
        
        
        
          Apr
           (4)  | 
        
        
        
        
          May
           | 
        
        
        
        
          Jun
           (5)  | 
        
        
        
        
          Jul
           (1)  | 
        
        
        
        
          Aug
           | 
        
        
        
        
          Sep
           (3)  | 
        
        
        
        
          Oct
           | 
        
        
        
        
          Nov
           | 
        
        
        
        
          Dec
           (3)  | 
        
      
| 2024 | 
          Jan
           (7)  | 
        
        
        
        
          Feb
           (1)  | 
        
        
        
        
          Mar
           | 
        
        
        
        
          Apr
           (17)  | 
        
        
        
        
          May
           | 
        
        
        
        
          Jun
           | 
        
        
        
        
          Jul
           | 
        
        
        
        
          Aug
           | 
        
        
        
        
          Sep
           | 
        
        
        
        
          Oct
           | 
        
        
        
        
          Nov
           | 
        
        
        
        
          Dec
           | 
        
      
| 2025 | 
          Jan
           | 
        
        
        
        
          Feb
           | 
        
        
        
        
          Mar
           (3)  | 
        
        
        
        
          Apr
           | 
        
        
        
        
          May
           | 
        
        
        
        
          Jun
           | 
        
        
        
        
          Jul
           | 
        
        
        
        
          Aug
           | 
        
        
        
        
          Sep
           | 
        
        
        
        
          Oct
           | 
        
        
        
        
          Nov
           | 
        
        
        
        
          Dec
           | 
        
      
| S | M | T | W | T | F | S | 
|---|---|---|---|---|---|---|
| 
          1
           | 
        
        
          2
           | 
        
        
          3
           | 
        
        
          4
           | 
        
        
          5
           | 
        
        
          6
           | 
        
        
          7
           | 
        
      
| 
          8
           | 
        
        
          9
           | 
        
        
          10
           | 
        
        
          11
           | 
        
        
          12
           | 
        
        
          13
           | 
        
        
          14
           | 
        
      
| 
          15
           | 
        
        
          16
           | 
        
        
          17
           | 
        
        
          18
           | 
        
        
          19
           | 
        
        
          20
           | 
        
        
          21
           | 
        
      
| 
          22
           | 
        
        
          23
           | 
        
        
          24
           (2)  | 
        
        
          25
           | 
        
        
          26
           | 
        
        
          27
           | 
        
        
          28
           | 
        
      
| 
          29
           | 
        
        
          30
           | 
        
        
           
           | 
        
        
           
           | 
        
        
           
           | 
        
        
           
           | 
        
        
           
           | 
        
      
| 
     
      
      
      From: Jomi F. H. <jom...@gm...> - 2009-11-24 11:12:08
      
     
   | 
Hi!
Your proposal is nice and useful for some applications. Although I am
not sure, I guess that in this approach, if the same agent is
performing two actions at the same time, there will be a problem since
the same Action object is used for both actions. If your appl does not
have this circumstance: no problem.
Another minor comment: if your concern is performance, have you
compared the two approaches? I don't know what is faster: if the
creation of a new Runnable or the search for the agent Action (the
line getAgIdBasedOnName). However, if your concern is memory, of
course your solution is far better.
Another solution (used in previous versions of Jason) is simply to not
use the schedule. The scheduleAction calls directly the executeAction
and returns. the "problem" of this solutions is that the agent thread
is executing the action (in the centralised env); so the agent
reasoning stops until the action is finished. However, if the actions
are "small" (in terms of execution time), in general, it is not a
problem.
Best,
Jomi
2009/11/24  <fe...@al...>:
> Good days,
> I have been analyzing Jason's code to see if it was possible to optimize
> of some form and have observed that in the class "Environment.java"
> there was created a new object Runnable for every action of each one of
> the agents. I have tried to create an object Runnable assigned to every
> agent and when one wants to execute an action, call to the object that
> has assigned.
> The realized changes are:
>
> Environment.java
> ----------------
> public Action actions[];
>
> public void init(String[] args) {
>        int qtyag = Integer.parseInt(args[0]);
>        actions = new Action[qtyag];
>        for (int i = 0; i<qtyag; i++)
>        {
>                actions[i]= new Action("wanderer"+(i+1), this,
> environmentInfraTier);
>        }
>    }
>
> ..
>
> public void scheduleAction(final String agName, final Structure action,
> final Object infraData) {
>        int id = getAgIdBasedOnName(agName);
>        //logger.severe("id:"+id+",");
>        actions[id].setAction(action);
>
>        actions[id].setInfraData(infraData);
>        executor.execute(actions[id]);
>        /*new Runnable(){
>            public void run() {
>                try {
>                    boolean success = executeAction(agName, action);
>                    environmentInfraTier.actionExecuted(agName, action,
> success, infraData); // send the result of the execution to the agent
>                } catch (Exception ie) {
>                    if (!(ie instanceof InterruptedException)) {
>                        logger.log(Level.WARNING, "act error!",ie);
>                    }
>                }
>            }
>        });*/
>    }
>
> Action.java (new class)
> -----------
> package jason.environment;
>
> import java.util.logging.Logger;
> import java.util.logging.Level;
>
> import jason.asSyntax.Structure;
>
> public class Action implements Runnable{
>
>        private static Logger logger =
> Logger.getLogger(Environment.class.getName());
>
>        private String agName;
>        private Structure action;
>        private Environment environment;
>        private EnvironmentInfraTier environmentInfraTier;
>        private Object infraData;
>
>        public void setAction(Structure action) {
>                this.action = action;
>        }
>
>        public void setInfraData(Object infraData) {
>                this.infraData = infraData;
>        }
>
>        public Action(String name, Environment env, EnvironmentInfraTier
> environmentInfraTier){
>                agName = name;
>                environment = env;
>                this.environmentInfraTier = environmentInfraTier;
>        }
>
>        @Override
>        public void run() {
>                try {
>            boolean success = environment.executeAction(agName, action);
>            environmentInfraTier.actionExecuted(agName, action, success,
> infraData); // send the result of the execution to the agent
>        } catch (Exception ie) {
>            if (!(ie instanceof InterruptedException)) {
>                logger.log(Level.WARNING, "act error!",ie);
>            }
>        }
>
>        }
>
>        public void setEnvironmentInfraTier(EnvironmentInfraTier
> environmentInfraTier) {
>                this.environmentInfraTier = environmentInfraTier;
>        }
>
> }
>
> What do you think of this change?
>
> Regards.
>
>
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
> trial. Simplify your report design, integration and deployment - and focus on
> what you do best, core application coding. Discover what's new with
> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
> _______________________________________________
> Jason-users mailing list
> Jas...@li...
> https://lists.sourceforge.net/lists/listinfo/jason-users
>
 | 
| 
     
      
      
      From: <fe...@al...> - 2009-11-24 10:29:10
      
     
   | 
Good days, 
I have been analyzing Jason's code to see if it was possible to optimize
of some form and have observed that in the class "Environment.java"
there was created a new object Runnable for every action of each one of
the agents. I have tried to create an object Runnable assigned to every
agent and when one wants to execute an action, call to the object that
has assigned.
The realized changes are:
Environment.java
----------------
public Action actions[];
public void init(String[] args) {
    	int qtyag = Integer.parseInt(args[0]);
    	actions = new Action[qtyag];
        for (int i = 0; i<qtyag; i++)
        {
        	actions[i]= new Action("wanderer"+(i+1), this,
environmentInfraTier);
        }
    }
..
public void scheduleAction(final String agName, final Structure action,
final Object infraData) {
        int id = getAgIdBasedOnName(agName);
        //logger.severe("id:"+id+",");
    	actions[id].setAction(action);
    	
        actions[id].setInfraData(infraData);
    	executor.execute(actions[id]);
        /*new Runnable(){
            public void run() {
                try {
                    boolean success = executeAction(agName, action);
                    environmentInfraTier.actionExecuted(agName, action,
success, infraData); // send the result of the execution to the agent
                } catch (Exception ie) {
                    if (!(ie instanceof InterruptedException)) {
                        logger.log(Level.WARNING, "act error!",ie);
                    }
                }
            }
        });*/
    }
Action.java (new class)
-----------
package jason.environment;
import java.util.logging.Logger;
import java.util.logging.Level;
import jason.asSyntax.Structure;
public class Action implements Runnable{
	private static Logger logger =
Logger.getLogger(Environment.class.getName());
	
	private String agName;
	private Structure action;
	private Environment environment;
	private EnvironmentInfraTier environmentInfraTier;
	private Object infraData;
	
	public void setAction(Structure action) {
		this.action = action;
	}
	public void setInfraData(Object infraData) {
		this.infraData = infraData;
	}
	public Action(String name, Environment env, EnvironmentInfraTier
environmentInfraTier){
		agName = name;
		environment = env;
		this.environmentInfraTier = environmentInfraTier;
	}
	
	@Override
	public void run() {
		try {
            boolean success = environment.executeAction(agName, action);
            environmentInfraTier.actionExecuted(agName, action, success,
infraData); // send the result of the execution to the agent
        } catch (Exception ie) {
            if (!(ie instanceof InterruptedException)) {
                logger.log(Level.WARNING, "act error!",ie);
            }
        }
		
	}
	public void setEnvironmentInfraTier(EnvironmentInfraTier
environmentInfraTier) {
		this.environmentInfraTier = environmentInfraTier;
	}
}
What do you think of this change?
Regards.
 |