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

restore supervisor (cancel reset status)

parent 285f5c79
No related branches found
No related tags found
No related merge requests found
Showing
with 45 additions and 0 deletions
// Copyright (C) Maxime MORGE, Alex VIGNERON 2020
package org.scadcop.solver.decentralized.mgm2
import org.scadcop.problem._
import org.scadcop.solver.decentralized._
import org.scadcop.solver.decentralized.agent._
import akka.actor.{FSM, Stash}
/**
* Negotiation behaviour for an agent in the MGM2 algorithm
* See Maheswaran R.T., Pearce J.P., Tambe M. (2006)
* A Family of Graphical-Game-Based Algorithms for Distributed Constraint Optimization Problems.
* In: Scerri P., Vincent R., Mailler R. (eds)
* Coordination of Large-Scale Multiagent Systems. Springer, Boston, MA.
* @param variable which should be valuated
* @param neighbours the variables which are linked to the variables
* @param constraints which should be valuated
*/
class SupervisorBehaviour(variable: Variable,
neighbours : Set[Variable],
constraints: Set[Constraint])
extends VariableAgent(variable, neighbours, constraints)
with FSM[MGM2State, MGM2Mind]
with Stash {
debug = true
/**
* Initially the agent has no task in the bundle
*/
startWith(Init, new MGM2Mind())
when(Start){
//when it receives a
case Event(Trigger, mind) => {
stay using mind
}
}
}
doc/fsm/fullFSM.png

102 KiB

doc/fsm/uncommitted.png

167 KiB

doc/related/fsm_mgm_1.png

190 KiB

File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment