FRODO Version 2.19.1
An open-source framework for Distributed Constraint Optimization (DCOP)
Loading...
Searching...
No Matches
frodo2.algorithms.varOrdering.linear.CentralLinearOrdering< V extends Addable< V >, U extends Addable< U > > Class Template Referenceabstract

Creates a linear ordering among variables. More...

Inheritance diagram for frodo2.algorithms.varOrdering.linear.CentralLinearOrdering< V extends Addable< V >, U extends Addable< U > >:

Classes

class  MaxWidthMinDom
 A linear ordering heuristic that chooses first variables with highest numbers of links with previous variables, breaking ties by minimizing domain size. More...

Public Member Functions

 CentralLinearOrdering (Element parameters, DCOPProblemInterface< V, U > problem)
 The constructor called in "statistics gatherer" mode.
 CentralLinearOrdering (DCOPProblemInterface< V, U > problem, Element parameters)
 Constructor.
void reset ()
void setSilent (boolean silent)
void setQueue (Queue queue)
void getStatsFromQueue (Queue queue)
Collection< MessageTypegetMsgTypes ()
void notifyIn (Message msg)
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 message telling the module to start.
static final MessageType REPORT_MSG_TYPE = new MessageType ("VarOrdering", "CentralLinearOrdering", "VarOrderReport")
 The type of messages sent by agents to the dictator with information on their variables.

Protected Member Functions

void init ()
 Parses the problem.
abstract void reportVars ()
 Sends all necessary information about variables to the dictator.
abstract String[] chooseOrder ()

Protected Attributes

Queue queue
 This module's queue.
DCOPProblemInterface< V, U > problem
 The problem.
boolean started = false
 Whether the module has already started the algorithm.
String dictator
 The name of the agent that chooses the variable order.
Map< String, String > owners
 Who owns each agent.
String myID
 This agent's ID.

Private Member Functions

void printOrder (List< String > order)
 Prints the input linear order in DOT format.

Private Attributes

boolean silent = false
 Whether the stats gatherer should display the resulting linear order.
Set< String > allAgents
 The sets of all agents in the problem.
int countdown = 0
 The number of reports we are still waiting for from other agents.

Static Private Attributes

static final MessageType TEMP_OUTPUT_MSG_TYPE = new MessageType ("VarOrdering", "CentralLinearOrdering", "VarOrderNoSpace")
 The type of the message notifying the agent of the chosen ordering, excluding the spaces.

Detailed Description

Creates a linear ordering among variables.

All agents report their variables (along with possible heuristic-related information) to the first agent in lexicographic order, and this agent then centrally chooses a linear order on all variables, and broadcasts the result to all agents.

Parameters
<V>the type used for variable values
<U>the type used for utility values
Warning
Requires that each agent know the identity of all other agents in the problem.
Author
Thomas Leaute

Constructor & Destructor Documentation

◆ CentralLinearOrdering() [1/2]

frodo2.algorithms.varOrdering.linear.CentralLinearOrdering< V extends Addable< V >, U extends Addable< U > >.CentralLinearOrdering ( Element parameters,
DCOPProblemInterface< V, U > problem )

The constructor called in "statistics gatherer" mode.

Parameters
problemthe overall problem
parametersthe description of what statistics should be reported (currently unused)

References problem.

◆ CentralLinearOrdering() [2/2]

frodo2.algorithms.varOrdering.linear.CentralLinearOrdering< V extends Addable< V >, U extends Addable< U > >.CentralLinearOrdering ( DCOPProblemInterface< V, U > problem,
Element parameters )

Constructor.

Parameters
problemthis agent's problem
parametersthe parameters for CentralLinearOrdering

References problem.

Member Function Documentation

◆ chooseOrder()

abstract String[] frodo2.algorithms.varOrdering.linear.CentralLinearOrdering< V extends Addable< V >, U extends Addable< U > >.chooseOrder ( )
abstractprotected
Returns
the chosen order on variables

◆ getMsgTypes()

◆ getStatsFromQueue()

◆ init()

◆ notifyIn()

◆ printOrder()

void frodo2.algorithms.varOrdering.linear.CentralLinearOrdering< V extends Addable< V >, U extends Addable< U > >.printOrder ( List< String > order)
private

Prints the input linear order in DOT format.

Parameters
orderthe variable order

References problem.

◆ reportVars()

abstract void frodo2.algorithms.varOrdering.linear.CentralLinearOrdering< V extends Addable< V >, U extends Addable< U > >.reportVars ( )
abstractprotected

Sends all necessary information about variables to the dictator.

Referenced by init().

◆ reset()

◆ setQueue()

◆ setSilent()

void frodo2.algorithms.varOrdering.linear.CentralLinearOrdering< V extends Addable< V >, U extends Addable< U > >.setSilent ( boolean silent)

Member Data Documentation

◆ allAgents

Set<String> frodo2.algorithms.varOrdering.linear.CentralLinearOrdering< V extends Addable< V >, U extends Addable< U > >.allAgents
private

The sets of all agents in the problem.

Referenced by init().

◆ countdown

int frodo2.algorithms.varOrdering.linear.CentralLinearOrdering< V extends Addable< V >, U extends Addable< U > >.countdown = 0
private

The number of reports we are still waiting for from other agents.

◆ dictator

String frodo2.algorithms.varOrdering.linear.CentralLinearOrdering< V extends Addable< V >, U extends Addable< U > >.dictator
protected

The name of the agent that chooses the variable order.

◆ myID

String frodo2.algorithms.varOrdering.linear.CentralLinearOrdering< V extends Addable< V >, U extends Addable< U > >.myID
protected

This agent's ID.

Referenced by init().

◆ owners

Map<String, String> frodo2.algorithms.varOrdering.linear.CentralLinearOrdering< V extends Addable< V >, U extends Addable< U > >.owners
protected

Who owns each agent.

◆ problem

DCOPProblemInterface<V, U> frodo2.algorithms.varOrdering.linear.CentralLinearOrdering< V extends Addable< V >, U extends Addable< U > >.problem
protected

◆ queue

Queue frodo2.algorithms.varOrdering.linear.CentralLinearOrdering< V extends Addable< V >, U extends Addable< U > >.queue
protected

This module's queue.

Referenced by getStatsFromQueue(), and setQueue().

◆ REPORT_MSG_TYPE

final MessageType frodo2.algorithms.varOrdering.linear.CentralLinearOrdering< V extends Addable< V >, U extends Addable< U > >.REPORT_MSG_TYPE = new MessageType ("VarOrdering", "CentralLinearOrdering", "VarOrderReport")
static

The type of messages sent by agents to the dictator with information on their variables.

Referenced by getMsgTypes(), and notifyIn().

◆ silent

boolean frodo2.algorithms.varOrdering.linear.CentralLinearOrdering< V extends Addable< V >, U extends Addable< U > >.silent = false
private

Whether the stats gatherer should display the resulting linear order.

Referenced by setSilent().

◆ START_MSG_TYPE

The type of the message telling the module to start.

Referenced by getMsgTypes().

◆ started

boolean frodo2.algorithms.varOrdering.linear.CentralLinearOrdering< V extends Addable< V >, U extends Addable< U > >.started = false
protected

Whether the module has already started the algorithm.

◆ TEMP_OUTPUT_MSG_TYPE

final MessageType frodo2.algorithms.varOrdering.linear.CentralLinearOrdering< V extends Addable< V >, U extends Addable< U > >.TEMP_OUTPUT_MSG_TYPE = new MessageType ("VarOrdering", "CentralLinearOrdering", "VarOrderNoSpace")
staticprivate

The type of the message notifying the agent of the chosen ordering, excluding the spaces.

Referenced by getMsgTypes().


The documentation for this class was generated from the following file: