Plans - how to get actions to be executed after the current action?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Plans - how to get actions to be executed after the current action?

Alan Gordon White
Hi

I'm trying to do something and getting somewhat confused; I suspect I  
may be overcomplicating code somewhat.

Basically, I want to be identify the actions to be performed by an  
agent after the current action being performed, based on the current  
plan being executed.  At the moment this is purely for display in a  
ui, but will then be used to assess execution confidence in future  
actions.

So if an agent is performing a movement plan ala;
move(A,B), move(B,C), move(C,D)

I want to be able to fetch the latter two actions during the course of  
executing the first (and then do some stuff using metaknowledge for  
those two, but that's not relevant here - suffice to say, I want to  
know the next steps in a currently executing plan).

But I'm struggling here to determine the appropriate calls to use.  As  
far as I can decipher, I can use  
holder.getTS().getC().getPendingActions() to get the currently  
executing action.  I can then take the Intention id from that  
ActionExec to get the IntendedMeans, which includes the relevant  
PlanBody.  So I think I can get the currently executing plan and  
contents ok.

But how do I determine the current stage of execution - i.e. which  
actions are executed, which are currently being executed (assuming a  
time delay between their beginning execution and eventual result), and  
which will be executed after?

(NB: I hope this question makes sense)

Cheers,
Alan White



--
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.



------------------------------------------------------------------------------
Better than sec? Nothing is better than sec when it comes to
monitoring Big Data applications. Try Boundary one-second
resolution app monitoring today. Free.
http://p.sf.net/sfu/Boundary-dev2dev
_______________________________________________
Jason-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jason-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Plans - how to get actions to be executed after the current action?

Jomi Fred Hubner-4
Hi Alan,

it is vey nice question! You were quite near the answer!

The IntenedMeans is the PlanBody being executed. It is initially a copy from the plan in the .asl code but are changed while the plan is executed: when actions are executed, they are removed from the PlanBody. So the first element in the PlanBody is the action being executed and the remaining elements are the "future" plan.

HTH,

Jomi

On 17/04/2012, at 18:17, Alan Gordon White wrote:

> Hi
>
> I'm trying to do something and getting somewhat confused; I suspect I  
> may be overcomplicating code somewhat.
>
> Basically, I want to be identify the actions to be performed by an  
> agent after the current action being performed, based on the current  
> plan being executed.  At the moment this is purely for display in a  
> ui, but will then be used to assess execution confidence in future  
> actions.
>
> So if an agent is performing a movement plan ala;
> move(A,B), move(B,C), move(C,D)
>
> I want to be able to fetch the latter two actions during the course of  
> executing the first (and then do some stuff using metaknowledge for  
> those two, but that's not relevant here - suffice to say, I want to  
> know the next steps in a currently executing plan).
>
> But I'm struggling here to determine the appropriate calls to use.  As  
> far as I can decipher, I can use  
> holder.getTS().getC().getPendingActions() to get the currently  
> executing action.  I can then take the Intention id from that  
> ActionExec to get the IntendedMeans, which includes the relevant  
> PlanBody.  So I think I can get the currently executing plan and  
> contents ok.
>
> But how do I determine the current stage of execution - i.e. which  
> actions are executed, which are currently being executed (assuming a  
> time delay between their beginning execution and eventual result), and  
> which will be executed after?
>
> (NB: I hope this question makes sense)
>
> Cheers,
> Alan White
>
>
>
> --
> The University of Edinburgh is a charitable body, registered in
> Scotland, with registration number SC005336.
>
>
>
> ------------------------------------------------------------------------------
> Better than sec? Nothing is better than sec when it comes to
> monitoring Big Data applications. Try Boundary one-second
> resolution app monitoring today. Free.
> http://p.sf.net/sfu/Boundary-dev2dev
> _______________________________________________
> Jason-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/jason-users

--
Jomi Fred Hubner
Federal University of Santa Catarina
Department of Automation and Systems Engineering
PO Box 476, Florianópolis, SC
88040-900 Brazil
http://www.das.ufsc.br/~jomi


------------------------------------------------------------------------------
Better than sec? Nothing is better than sec when it comes to
monitoring Big Data applications. Try Boundary one-second
resolution app monitoring today. Free.
http://p.sf.net/sfu/Boundary-dev2dev
_______________________________________________
Jason-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jason-users
Loading...