Commit 63f03ddc authored by Alan White's avatar Alan White

Fix replan cap being exceeded in continuous mode

parent 476d9562
......@@ -3,7 +3,7 @@
MAS twtest {
//note; other infrastructures not tested or supported
infrastructure: Centralised
environment: truckworld.env.Cargoworld("paperWorld1.properties", "nonDetnonDebilSim.properties", "10", "replan-cont")
environment: truckworld.env.Cargoworld("paperWorld1.properties", "nonDetnonDebilSim.properties", "1", "replan-cont")
//1234567890
/* Agent args;
......
......@@ -2831,7 +2831,7 @@ public abstract class MaintainingAgent extends ContractFormerAgent {
final Literal repLit = (Literal) top.getTrigger().getLiteral().getAnnots(UniversalConstants.ANNOT_REPLANNED)
.get(0);
replanCount = (int) ((NumberTerm) repLit.getTerm(0)).solve();
if (replanCount > MaintainingAgent.REPLAN_CAP) {
if (replanCount > MaintainingAgent.REPLAN_CAP && !isContinual()) {
logger.severe("Replan cap met for trigger parent " + top.getTrigger());
replanOk = false;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment