|
FRODO Version 2.19.1
An open-source framework for Distributed Constraint Optimization (DCOP)
|

Classes | |
| enum | StateValue |
| The state of the current variable: More... | |
| class | VariableInfo |
| Convenience class that contains all necessary information on a single variable. More... | |
Public Member Functions | |
| MGM (Element parameters, DCOPProblemInterface< V, U > problem) | |
| Constructor for the stats reporter. | |
| MGM (DCOPProblemInterface< V, U > problem, Element parameters) | |
| Constructor. | |
| void | getStatsFromQueue (Queue queue) |
| void | setSilent (boolean silent) |
| void | reset () |
| void | notifyIn (Message msg) |
| void | setQueue (Queue queue) |
| Collection< MessageType > | getMsgTypes () |
| HashMap< String, ArrayList< frodo2.algorithms.StatsReporterWithConvergence.CurrentAssignment< V > > > | getAssignmentHistories () |
| Map< String, V > | getCurrentSolution () |
| Public Member Functions inherited from frodo2.communication.IncomingMsgPolicyInterface< T > | |
| default void | notifyIn (Message msg, Object toAgent) |
| Notifies the listener of an incoming message. | |
Static Public Attributes | |
| static MessageType | START_MSG_TYPE = AgentInterface.START_AGENT |
| The type of the START message. | |
| static final MessageType | OK_MSG_TYPE = new MessageType ("MGM", "ok") |
| Type used for the OK message. | |
| static final MessageType | IMPROVE_MSG_TYPE = new MessageType ("MGM", "improve") |
| Type used for the IMPROVE message. | |
| static final MessageType | CONV_STATS_MSG_TYPE = new MessageType ("MGM", "ConvStats") |
| The type of the message containing the assignment history. | |
Protected Member Functions | |
| void | init () |
| Called when the first message is received, initializes all the fields and variables that are needed. | |
| void | sendOK (VariableInfo< V, U > varInfo) |
| Sending an OK message to all neighbors. | |
| void | sendIMPROVE (VariableInfo< V, U > varInfo) |
| Send an improve message to all neighbors. | |
| void | log (String variableID, String message) |
| Log function used to print the variables state during debugging. | |
| VariableInfo< V, U > | createVariableInfo (String variableID, DCOPProblemInterface< V, U > problem, List<? extends UtilitySolutionSpace< V, U > > spaces, boolean maximize) |
| method used to create a VariableInfo object | |
Protected Attributes | |
| Queue | queue |
| The queue to which this listener is registered. | |
| final boolean | LOG = false |
When true, every variable writes log information to a log file. | |
| HashMap< String, BufferedWriter > | loggers |
| A list of buffered writers used to log information during debugging. | |
| final boolean | maximize |
true when solving a maximization problem, and false otherwise | |
| Map< String, String > | owners |
| Maps variables to the agent that owns it. | |
| int | max_distance = 100 |
| The maximal number of rounds to be performed. | |
| boolean | started |
true when the START_AGENT message has been received, and false otherwise | |
| HashMap< String, VariableInfo< V, U > > | infos |
| Contains, for each variable, an object containing all information needed by the algorithm. | |
| DCOPProblemInterface< V, U > | problem |
| The local problem definition. | |
| int | variables_finished |
| The number of variables that are finished. | |
| final boolean | convergence |
If true, the assignment history must be stored. | |
| HashMap< String, ArrayList< CurrentAssignment< V > > > | assignmentHistoriesMap |
| For each variable its assignment history. | |
Private Attributes | |
| boolean | terminated |
true when this agent has sent the agent finished message | |
The MGM algorithm.
| <V> | type used for domain values |
| <U> | type used for utility values |
| frodo2.algorithms.localSearch.mgm.MGM< V extends Addable< V >, U extends Addable< U > >.MGM | ( | Element | parameters, |
| DCOPProblemInterface< V, U > | problem ) |
Constructor for the stats reporter.
| parameters | parameters of the stats reporter |
| problem | the problem that is being solved |
References assignmentHistoriesMap, and problem.
| frodo2.algorithms.localSearch.mgm.MGM< V extends Addable< V >, U extends Addable< U > >.MGM | ( | DCOPProblemInterface< V, U > | problem, |
| Element | parameters ) |
Constructor.
| problem | the local problem definition |
| parameters | parameters of the listener |
References problem.
|
protected |
method used to create a VariableInfo object
| variableID | the ID of the variable |
| problem | the local problem definition |
| spaces | list of spaces owned by the agent |
| maximize | true when dealing with a maximization problem, false otherwise |
variableID References maximize, and problem.
Referenced by init().
| HashMap< String, ArrayList< frodo2.algorithms.StatsReporterWithConvergence.CurrentAssignment< V > > > frodo2.algorithms.localSearch.mgm.MGM< V extends Addable< V >, U extends Addable< U > >.getAssignmentHistories | ( | ) |
| Map< String, V > frodo2.algorithms.localSearch.mgm.MGM< V extends Addable< V >, U extends Addable< U > >.getCurrentSolution | ( | ) |
Implements frodo2.algorithms.StatsReporterWithConvergence< Val extends Addable< Val > >.
| Collection< MessageType > frodo2.algorithms.localSearch.mgm.MGM< V extends Addable< V >, U extends Addable< U > >.getMsgTypes | ( | ) |
| void frodo2.algorithms.localSearch.mgm.MGM< V extends Addable< V >, U extends Addable< U > >.getStatsFromQueue | ( | Queue | queue | ) |
Implements frodo2.algorithms.StatsReporter.
References queue.
|
protected |
Called when the first message is received, initializes all the fields and variables that are needed.
References frodo2.algorithms.AgentInterface< V extends Addable< V > >.AGENT_FINISHED, assignmentHistoriesMap, CONV_STATS_MSG_TYPE, convergence, createVariableInfo(), frodo2.algorithms.localSearch.mgm.MGM< V extends Addable< V >, U extends Addable< U > >.VariableInfo< V extends Addable< V >, U extends Addable< U > >.currentValue, infos, maximize, frodo2.algorithms.localSearch.mgm.MGM< V extends Addable< V >, U extends Addable< U > >.VariableInfo< V extends Addable< V >, U extends Addable< U > >.neighbors, frodo2.algorithms.localSearch.mgm.MGM< V extends Addable< V >, U extends Addable< U > >.StateValue.OK, owners, problem, queue, started, frodo2.algorithms.AgentInterface< V extends Addable< V > >.STATS_MONITOR, terminated, frodo2.algorithms.localSearch.mgm.MGM< V extends Addable< V >, U extends Addable< U > >.VariableInfo< V extends Addable< V >, U extends Addable< U > >.variableID, and variables_finished.
Referenced by notifyIn().

|
protected |
| void frodo2.algorithms.localSearch.mgm.MGM< V extends Addable< V >, U extends Addable< U > >.notifyIn | ( | Message | msg | ) |
Implements frodo2.communication.IncomingMsgPolicyInterface< T >.
References CONV_STATS_MSG_TYPE, frodo2.communication.MessageType.equals(), IMPROVE_MSG_TYPE, init(), notifyIn(), and started.
Referenced by notifyIn().

| void frodo2.algorithms.localSearch.mgm.MGM< V extends Addable< V >, U extends Addable< U > >.reset | ( | ) |
Implements frodo2.algorithms.StatsReporter.
References assignmentHistoriesMap.
|
protected |
Send an improve message to all neighbors.
| varInfo | the variable that is sending the messages |
References frodo2.algorithms.localSearch.mgm.MGM< V extends Addable< V >, U extends Addable< U > >.VariableInfo< V extends Addable< V >, U extends Addable< U > >.determinePossibleImprovement(), frodo2.algorithms.localSearch.mgm.MGM< V extends Addable< V >, U extends Addable< U > >.VariableInfo< V extends Addable< V >, U extends Addable< U > >.improve, frodo2.algorithms.localSearch.mgm.MGM< V extends Addable< V >, U extends Addable< U > >.VariableInfo< V extends Addable< V >, U extends Addable< U > >.neighbors, owners, queue, and frodo2.algorithms.localSearch.mgm.MGM< V extends Addable< V >, U extends Addable< U > >.VariableInfo< V extends Addable< V >, U extends Addable< U > >.variableID.

|
protected |
Sending an OK message to all neighbors.
| varInfo | the variable that is sending the messages |
References frodo2.algorithms.AgentInterface< V extends Addable< V > >.AGENT_FINISHED, frodo2.algorithms.localSearch.mgm.MGM< V extends Addable< V >, U extends Addable< U > >.VariableInfo< V extends Addable< V >, U extends Addable< U > >.agent_view, assignmentHistoriesMap, frodo2.algorithms.localSearch.mgm.MGM< V extends Addable< V >, U extends Addable< U > >.VariableInfo< V extends Addable< V >, U extends Addable< U > >.can_move, convergence, frodo2.algorithms.localSearch.mgm.MGM< V extends Addable< V >, U extends Addable< U > >.VariableInfo< V extends Addable< V >, U extends Addable< U > >.currentValue, frodo2.algorithms.localSearch.mgm.MGM< V extends Addable< V >, U extends Addable< U > >.VariableInfo< V extends Addable< V >, U extends Addable< U > >.domain, infos, max_distance, frodo2.algorithms.localSearch.mgm.MGM< V extends Addable< V >, U extends Addable< U > >.VariableInfo< V extends Addable< V >, U extends Addable< U > >.neighbors, frodo2.algorithms.localSearch.mgm.MGM< V extends Addable< V >, U extends Addable< U > >.VariableInfo< V extends Addable< V >, U extends Addable< U > >.newValue, owners, queue, frodo2.algorithms.AgentInterface< V extends Addable< V > >.STATS_MONITOR, frodo2.algorithms.localSearch.mgm.MGM< V extends Addable< V >, U extends Addable< U > >.VariableInfo< V extends Addable< V >, U extends Addable< U > >.termination_counter, frodo2.algorithms.localSearch.mgm.MGM< V extends Addable< V >, U extends Addable< U > >.VariableInfo< V extends Addable< V >, U extends Addable< U > >.variableID, and variables_finished.
| void frodo2.algorithms.localSearch.mgm.MGM< V extends Addable< V >, U extends Addable< U > >.setQueue | ( | Queue | queue | ) |
Implements frodo2.communication.MessageListener< T >.
References queue.
| void frodo2.algorithms.localSearch.mgm.MGM< V extends Addable< V >, U extends Addable< U > >.setSilent | ( | boolean | silent | ) |
Implements frodo2.algorithms.StatsReporter.
|
protected |
For each variable its assignment history.
Referenced by getAssignmentHistories(), init(), MGM(), reset(), and sendOK().
|
static |
The type of the message containing the assignment history.
Referenced by init(), and notifyIn().
|
protected |
|
static |
Type used for the IMPROVE message.
Referenced by getMsgTypes(), frodo2.algorithms.localSearch.mgm.IMPROVE< U extends Addable< U > >.IMPROVE(), frodo2.algorithms.localSearch.mgm.IMPROVE< U extends Addable< U > >.IMPROVE(), frodo2.algorithms.localSearch.mgm.mgm2.IMPROVE< U extends Addable< U > >.IMPROVE(), frodo2.algorithms.localSearch.mgm.mgm2.IMPROVE< U extends Addable< U > >.IMPROVE(), and notifyIn().
|
protected |
|
protected |
When true, every variable writes log information to a log file.
Referenced by log().
|
protected |
A list of buffered writers used to log information during debugging.
Referenced by log().
|
protected |
The maximal number of rounds to be performed.
Referenced by sendOK().
|
protected |
true when solving a maximization problem, and false otherwise
Referenced by createVariableInfo(), and init().
|
static |
Type used for the OK message.
Referenced by getMsgTypes(), frodo2.algorithms.localSearch.mgm.mgm2.MGM2< V extends Addable< V >, U extends Addable< U > >.getMsgTypes(), frodo2.algorithms.localSearch.mgm.OK< V extends Addable< V > >.OK(), and frodo2.algorithms.localSearch.mgm.OK< V extends Addable< V > >.OK().
|
protected |
Maps variables to the agent that owns it.
Referenced by init(), sendIMPROVE(), and sendOK().
|
protected |
The local problem definition.
Referenced by createVariableInfo(), init(), MGM(), MGM(), and frodo2.algorithms.localSearch.mgm.MGM< V extends Addable< V >, U extends Addable< U > >.VariableInfo< V extends Addable< V >, U extends Addable< U > >.VariableInfo().
|
protected |
The queue to which this listener is registered.
Referenced by getStatsFromQueue(), init(), sendIMPROVE(), sendOK(), and setQueue().
|
static |
The type of the START message.
Referenced by getMsgTypes().
|
protected |
true when the START_AGENT message has been received, and false otherwise
Referenced by init(), and notifyIn().
|
private |
true when this agent has sent the agent finished message
Referenced by init().
|
protected |