From 084946beefd616c640430bb9e4e657cda0be4e20 Mon Sep 17 00:00:00 2001 From: Alex <alexandravigneron1@gmail.com> Date: Wed, 8 Jul 2020 11:09:30 +0200 Subject: [PATCH] fixed makeOffer reject problem --- .../solver/decentralized/mgm2/AgentBehaviour.scala | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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 cc0ffcb..92f1b82 100755 --- a/src/main/scala/org/scadcop/solver/decentralized/mgm2/AgentBehaviour.scala +++ b/src/main/scala/org/scadcop/solver/decentralized/mgm2/AgentBehaviour.scala @@ -384,8 +384,9 @@ class AgentBehaviour(variable: Variable, stay using mind // When it receives an offer it does NOTHING - case Event(MakeOffer(_), mind) => + case Event(MakeOffer(someOffer), mind) => if (debug) println(s"$variable in $stateName has received MakeOffer") + sender ! Reject(someOffer) stay using mind //when it receives a neighbour's delta and the neighbourDeltas is partial @@ -422,8 +423,9 @@ class AgentBehaviour(variable: Variable, stay using mind // When it receives an offer it does NOTHING - case Event(MakeOffer(_), mind) => + case Event(MakeOffer(someOffer), mind) => if (debug) println(s"$variable in $stateName has received MakeOffer and ignores it") + sender ! Reject(someOffer) stay using mind // When it receives a neighbour's delta and the neighbourDeltas is partial @@ -505,7 +507,7 @@ class AgentBehaviour(variable: Variable, // When its partner tells it to go case Event(GiveGo(_), mind) => - if (debug) println(s"$variable in $stateName has received GiveGo and stahes it") + if (debug) println(s"$variable in $stateName has received GiveGo and stashes it") stash stay using mind -- GitLab