From 55644ab840d38e3afdca1f64d718c429d9008077 Mon Sep 17 00:00:00 2001
From: Alex <alexandravigneron1@gmail.com>
Date: Wed, 8 Jul 2020 11:13:32 +0200
Subject: [PATCH] handling of Reject in ActSolo

---
 .../scadcop/solver/decentralized/mgm2/AgentBehaviour.scala   | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/main/scala/org/scadcop/solver/decentralized/mgm2/AgentBehaviour.scala b/src/main/scala/org/scadcop/solver/decentralized/mgm2/AgentBehaviour.scala
index 92f1b82..c1d9071 100755
--- a/src/main/scala/org/scadcop/solver/decentralized/mgm2/AgentBehaviour.scala
+++ b/src/main/scala/org/scadcop/solver/decentralized/mgm2/AgentBehaviour.scala
@@ -453,6 +453,11 @@ class AgentBehaviour(variable: Variable,
   */
   when(ActSolo){
 
+      // When it receives a reject it does NOTHING
+    case Event(Reject(_), mind) =>
+      if (debug) println(s"$variable in $stateName has received Reject and ignores it")
+      stay using mind
+
     // When it should act because it has the highest delta in the neighbourhood
     case Event(Act(true, Some(move)), mind) =>
     if (debug) println(s"$variable in $stateName has received Act(true)")
-- 
GitLab