From 5ca4f8f40ea4bca79bf5a704f3d8632bc2c75df3 Mon Sep 17 00:00:00 2001
From: Alex <alexandravigneron1@gmail.com>
Date: Wed, 8 Jul 2020 11:23:26 +0200
Subject: [PATCH] giving nono

---
 .../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 c1d9071..30e0934 100755
--- a/src/main/scala/org/scadcop/solver/decentralized/mgm2/AgentBehaviour.scala
+++ b/src/main/scala/org/scadcop/solver/decentralized/mgm2/AgentBehaviour.scala
@@ -494,6 +494,11 @@ class AgentBehaviour(variable: Variable,
       if (debug) println(s"$variable in $stateName has received Act(false)")
     if (trace) println(s"$variable -> Supervisor : I didn't change = InformValue(${mind.context.getValue(variable).get})")
       supervisor ! InformValue(mind.context.getValue(variable).get)
+      val partner: Variable = mind.partner match {
+         case Some(p) => p
+         case None => throw new RuntimeException(s"Error $variable is committed but lacks a partner in state $stateName")
+       }
+      directory.addressOf(partner) ! GiveNoGo
       unstashAll
       goto(Continue) using mind
 
-- 
GitLab