I'm getting this error, but I can't see the problem:
oct 07, 2020 1:24:48 PM MacBook-Pro-2$local_8f6 jadex.platform.service.cms.ComponentManagementService$CleanupCommand doCleanup
GRAVE: Fatal error, component 'Agent@MacBook-Pro-2$local_8f6' will be removed.
jadex.bdiv3.runtime.impl.GoalFailureException: No more candidates: main.java.goals.Goal_3_#4 main.java.goals.Goal_3@2b3ff7d4
To sum up, I have a Goal which can be achieved via 3, 4 o more Plans.
My BDI Agent has Beliefs which are used to give permission or not to use those Plans.
So, depending on those Beliefs, the Goal will be achieved (or not) even when I can't use one the Plans.
The problem is that if one of the Plans can't be executed because the Belief says so (its value is false), the Goal can't be achieved because I got the error "jadex.bdiv3.runtime.impl.GoalFailureException: No more candidates:" and I can't move on trying the other Plans.
What am I missing? As far as I know, I have more candidates (or Plans), but can't be executed...
Thanks in advance.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
no more candidates means that no plan is available to achieve the goal. You can customise that behavior via various flags such as the exclude behavior. Default is ExcludeMode.WhenTried, ie a plan is exluded after it has been used (regardless of its result). Have a look at the @Goal annotation to change exclude as well as many other parameters of goal achievement via plans.
Best
Lars
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I had already tried those flags, and always got the same output. I attach a small screenshot of my BDIAgent and Goal code. Maybe the problem is in how do I attach the Plans to the Goal (I have different classes for Agent, Plans and Goals, so I can reuse those depending on the situation).
As I said before, the aim is to try 3 Plans to fulfill the Goal, and as soon as one of them passes, I can carry on with other Goals.
So, following your indications, it should be enough using these annotations:
-orsuccess=true:soonlyonesuccessinthePlansisenough.
-excludemode=ExcludeMode.WhenFailed:Iexcludetheplanwhenitfails(Icontrolitviaagent's Beliefs).- retry = true: so once one Plan fails, I keep on with the next one.
In the example attached, the first plan is tried but the precondition avoids it to be executed (it fails), so my intention is to execute Plan_2_2 and Plan_2_3 and try to fulfill. But as I said, I get that error and my program stops...
Hi, I'm using 3.0.117 version of Jadex.
I'm getting this error, but I can't see the problem:
To sum up, I have a Goal which can be achieved via 3, 4 o more Plans.
My BDI Agent has Beliefs which are used to give permission or not to use those Plans.
So, depending on those Beliefs, the Goal will be achieved (or not) even when I can't use one the Plans.
The problem is that if one of the Plans can't be executed because the Belief says so (its value is false), the Goal can't be achieved because I got the error "jadex.bdiv3.runtime.impl.GoalFailureException: No more candidates:" and I can't move on trying the other Plans.
What am I missing? As far as I know, I have more candidates (or Plans), but can't be executed...
Thanks in advance.
Hi,
no more candidates means that no plan is available to achieve the goal. You can customise that behavior via various flags such as the exclude behavior. Default is ExcludeMode.WhenTried, ie a plan is exluded after it has been used (regardless of its result). Have a look at the @Goal annotation to change exclude as well as many other parameters of goal achievement via plans.
Best
Lars
Hi, thanks for the fast response.
I had already tried those flags, and always got the same output. I attach a small screenshot of my BDIAgent and Goal code. Maybe the problem is in how do I attach the Plans to the Goal (I have different classes for Agent, Plans and Goals, so I can reuse those depending on the situation).
As I said before, the aim is to try 3 Plans to fulfill the Goal, and as soon as one of them passes, I can carry on with other Goals.
So, following your indications, it should be enough using these annotations:
In the example attached, the first plan is tried but the precondition avoids it to be executed (it fails), so my intention is to execute Plan_2_2 and Plan_2_3 and try to fulfill. But as I said, I get that error and my program stops...
Maybe there is something I'm not getting.
Thanks in advance.