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 741eefd89c2392b259e078b3c4939396a8ffae95..f7bac424946b960302b7a8bc28ceaeb2093ecd11 100644 --- a/src/main/scala/org/scadcop/solver/decentralized/mgm2/AgentBehaviour.scala +++ b/src/main/scala/org/scadcop/solver/decentralized/mgm2/AgentBehaviour.scala @@ -145,7 +145,7 @@ class AgentBehaviour(variable: Variable, if (debug) println(s"$variable: the value of $peerVariable is $peerValue " + s"(${updatedMind.context.size-1}/${neighbours.size})") val potentialPartner: Variable = updatedMind.choosePartner(neighbours) - updatedMind = updatedMind.setPartner(peerVariable) + updatedMind = updatedMind.setPartner(potentialPartner) if (debug) println(s"$variable> context before computing the joint offer=${updatedMind.currentContext}") val moves: List[BilateralMove] = updatedMind.computeJointOffer(potentialPartner, neighbours, constraints) val offer: Offer = new Offer(variable, moves)