Skip to content
Snippets Groups Projects
Commit d3c55184 authored by Jean-Christophe Routier's avatar Jean-Christophe Routier
Browse files

stupid print before each round added

parent 44fed18c
No related branches found
No related tags found
No related merge requests found
......@@ -161,6 +161,7 @@ class Supervisor(val pb : DCOP, val algorithm: Algorithm) extends Actor with Sta
//when it receives its own decison that it should continue
case Event(ContinueAlgo, status) => {
println(s" ${Supervisor.counter}/${Supervisor.NB_ROUNDS} ************************************************************************")
val newStatus: SupervisorStatus = status.resetContext()
unstashAll
goto(RunningSupervisorState) using newStatus
......
......@@ -40,7 +40,7 @@ class SupervisorStatus(val readyVariables: Set[Variable] = Set(),
* Returns true if the algorithm ends
* @todo modify it
*/
def isTerminated : Boolean = Supervisor.incrementCounter() == Supervisor.NB_ROUNDS
def isTerminated : Boolean = Supervisor.incrementCounter() > Supervisor.NB_ROUNDS
/*Returns the updated supervisor's status when resetting the context*/
def resetContext(): SupervisorStatus = {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment