Skip to content
Snippets Groups Projects
Commit 530571b3 authored by Alex's avatar Alex
Browse files

potential context fix

parent 37c91f0e
No related branches found
No related tags found
No related merge requests found
......@@ -200,10 +200,6 @@ class AgentBehaviour(variable: Variable,
updatedMind = updatedMind.updateDeltas(variable: Variable, offer.moves.head.payoff)
updatedMind = updatedMind.setCurrBestOffer(Some(offer))
broadcast(InformDelta(updatedMind.deltas(variable)))
// MM: Should be replaced by
// broadcast(InformDelta(offer.moves.head.payoff))
// updatedMind = updatedMind.setCurrBestOffer(Some(offer))
// No ?
unstashAll
goto(Committed) using updatedMind
......
......@@ -108,7 +108,7 @@ class MGM2Mind(val context : Context = new Context(),
val potentialContext: Context = context.fix(variable, myValue).fix(neighbour, neighbourValue)
val potentialCost: Double = potentialContext.cost(constraints)
val gain = currentCost - potentialCost
val move = new BilateralMove(context, gain)
val move = new BilateralMove(potentialContext, gain)
moves ::= move
}
}
......@@ -206,9 +206,6 @@ class MGM2Mind(val context : Context = new Context(),
currBestOffer)
}
/**
* Resets number of offers received
*/
def resetNbOffersReceived(): MGM2Mind =
new MGM2Mind(context,
isCommitted,
......
......@@ -249,7 +249,7 @@ class Supervisor(val pb : DCOP, val algorithm: Algorithm) extends Actor with Sta
object Supervisor {
var counter = 0
val NB_ROUNDS = 10
val NB_ROUNDS = 2
def incrementCounter() : Int = {
counter = counter + 1
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment