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

Classes | |
| interface | PreprocessingHeuristic |
| This interface is used to implement the different heuristics for obtaining lower bounds. More... | |
| class | SimpleHeuristic |
| This simple heuristic sets all lower bounds to zero, and should be used when running the original adopt. More... | |
| class | DP0 |
| Implementation of the DP0 heuristic. More... | |
| class | DP1 |
| Implementation of the DP1 heuristic. More... | |
| class | DP2 |
| Implementation of the DP2 heuristic. More... | |
Public Member Functions | |
| Preprocessing (Element e, DCOPProblemInterface< Val, U > problem) | |
| Constructor in stats gatherer mode. | |
| Preprocessing (ArrayList< String > variables, HashMap< String, Val[]> domains, String heuristicsName, U zeroObject) throws Exception | |
| Constructor. | |
| Preprocessing (DCOPProblemInterface< Val, U > problem, String heuristicsName) throws Exception | |
| Constructor. | |
| Preprocessing (DCOPProblemInterface< Val, U > problem, Element parameters) throws Exception | |
| Constructor from XML descriptions. | |
| void | reset () |
| UtilitySolutionSpace< Val, U > | createUtilitySpace (String[] variables, U utility) |
Convenience method to used to create a UtilitySpace<Val, U> and fill it with the value utility. | |
| void | getStatsFromQueue (Queue queue) |
| HashMap< String, UtilitySolutionSpace< Val, U > > | getReportedHeuristics () |
| Returns the reported heuristics. | |
| void | setSilent (boolean silent) |
| Collection< MessageType > | getMsgTypes () |
| void | notifyIn (Message msg) |
| void | setQueue (Queue queue) |
| Public Member Functions inherited from frodo2.communication.IncomingMsgPolicyInterface< T > | |
| default void | notifyIn (Message msg, Object toAgent) |
| Notifies the listener of an incoming message. | |
Public Attributes | |
| HashMap< String, UtilitySolutionSpace< Val, U > > | reportedHeuristics |
| Container for the reported heuristics. | |
Static Public Attributes | |
| static MessageType | START_MSG_TYPE = AgentInterface.START_AGENT |
| The type of the message telling the module to start. | |
| static final MessageType | HEURISTICS_MSG_TYPE = new MessageType ("ADOPT", "Preprocessing", "Heuristics") |
| The type of message containing the heuristics. | |
| static final MessageType | HEURISTICS_STAT_MSG_TYPE = new MessageType ("ADOPT", "Preprocessing", "Heuristics stats") |
| The type of the heuristics stats message. | |
Private Member Functions | |
| void | init () |
| Parses the problem. | |
| void | setHeuristics (String heuristicName) throws ClassNotFoundException, InstantiationException, IllegalAccessException |
| Helper function to set the heuristics used for preprocessing. | |
Private Attributes | |
| boolean | reportStats = true |
| Whether to report stats. | |
| ArrayList< String > | variables = new ArrayList<String> () |
| A list of variables this agent owns. | |
| HashMap< String, Val[]> | domains |
| A list of domains of each of the variables. | |
| PreprocessingHeuristic< Val, U > | heuristic |
| The heuristic that is used to generate the lower bounds. | |
| U | zeroObject |
| used to create the null value | |
| Queue | queue |
| The agent's queue. | |
| DCOPProblemInterface< Val, U > | problem |
| The agent's problem. | |
| Map< String, String > | owners = new HashMap<String, String> () |
| For each known variable, the name of the agent that owns it. | |
| boolean | started = false |
| Whether the algorithm has been started. | |
| <Val> | type used for variable values |
| <U> | type used for utility values |
The preprocessing listener computes heuristics for the lower bounds used by adopt. Currently, it implements the following heuristics:
| frodo2.algorithms.adopt.Preprocessing< Val extends Addable< Val >, U extends Addable< U > >.Preprocessing | ( | Element | e, |
| DCOPProblemInterface< Val, U > | problem ) |
Constructor in stats gatherer mode.
| problem | not used at this time |
| e | not used at this time |
References problem, and reportedHeuristics.
Referenced by frodo2.algorithms.adopt.Preprocessing< Val extends Addable< Val >, U extends Addable< U > >.DP0< Val extends Addable< Val >, U extends Addable< U > >.DP0(), frodo2.algorithms.adopt.Preprocessing< Val extends Addable< Val >, U extends Addable< U > >.DP1< Val extends Addable< Val >, U extends Addable< U > >.DP1(), frodo2.algorithms.adopt.Preprocessing< Val extends Addable< Val >, U extends Addable< U > >.DP2< Val extends Addable< Val >, U extends Addable< U > >.DP2(), frodo2.algorithms.adopt.Preprocessing< Val extends Addable< Val >, U extends Addable< U > >.DP0< Val extends Addable< Val >, U extends Addable< U > >.getVariableInfo(), frodo2.algorithms.adopt.Preprocessing< Val extends Addable< Val >, U extends Addable< U > >.DP1< Val extends Addable< Val >, U extends Addable< U > >.getVariableInfo(), frodo2.algorithms.adopt.Preprocessing< Val extends Addable< Val >, U extends Addable< U > >.DP2< Val extends Addable< Val >, U extends Addable< U > >.getVariableInfo(), frodo2.algorithms.adopt.Preprocessing< Val extends Addable< Val >, U extends Addable< U > >.SimpleHeuristic< Val extends Addable< Val >, U extends Addable< U > >.getVariableInfo(), setHeuristics(), frodo2.algorithms.adopt.Preprocessing< Val extends Addable< Val >, U extends Addable< U > >.SimpleHeuristic< Val extends Addable< Val >, U extends Addable< U > >.SimpleHeuristic(), and frodo2.algorithms.adopt.Preprocessing< Val extends Addable< Val >, U extends Addable< U > >.PreprocessingHeuristic< Val extends Addable< Val >, U extends Addable< U > >.VariableInfo< Val extends Addable< Val >, U extends Addable< U > >.VariableInfo().
| frodo2.algorithms.adopt.Preprocessing< Val extends Addable< Val >, U extends Addable< U > >.Preprocessing | ( | ArrayList< String > | variables, |
| HashMap< String, Val[]> | domains, | ||
| String | heuristicsName, | ||
| U | zeroObject ) throws Exception |
Constructor.
| variables | the variables |
| domains | the domains |
| heuristicsName | name of the heuristics class used |
| zeroObject | the zero utility |
| Exception | if an error occurs |
References domains, setHeuristics(), variables, and zeroObject.

| frodo2.algorithms.adopt.Preprocessing< Val extends Addable< Val >, U extends Addable< U > >.Preprocessing | ( | DCOPProblemInterface< Val, U > | problem, |
| String | heuristicsName ) throws Exception |
Constructor.
| problem | the agent's problem |
| heuristicsName | name of the heuristic class used |
| Exception | if an error occurs |
References problem, and setHeuristics().

| frodo2.algorithms.adopt.Preprocessing< Val extends Addable< Val >, U extends Addable< U > >.Preprocessing | ( | DCOPProblemInterface< Val, U > | problem, |
| Element | parameters ) throws Exception |
Constructor from XML descriptions.
| problem | description of the problem |
| parameters | description of the parameters of Preprocessing |
| Exception | if an error occurs |
References problem, setHeuristics(), and zeroObject.

| UtilitySolutionSpace< Val, U > frodo2.algorithms.adopt.Preprocessing< Val extends Addable< Val >, U extends Addable< U > >.createUtilitySpace | ( | String[] | variables, |
| U | utility ) |
Convenience method to used to create a UtilitySpace<Val, U> and fill it with the value utility.
| variables | the variable for which the space must be created |
| utility | the utility to be used |
var with all utilities set to utility References createUtilitySpace(), domains, and variables.
Referenced by createUtilitySpace(), and frodo2.algorithms.adopt.Preprocessing< Val extends Addable< Val >, U extends Addable< U > >.PreprocessingHeuristic< Val extends Addable< Val >, U extends Addable< U > >.VariableInfo< Val extends Addable< Val >, U extends Addable< U > >.VariableInfo().

| Collection< MessageType > frodo2.algorithms.adopt.Preprocessing< Val extends Addable< Val >, U extends Addable< U > >.getMsgTypes | ( | ) |
| HashMap< String, UtilitySolutionSpace< Val, U > > frodo2.algorithms.adopt.Preprocessing< Val extends Addable< Val >, U extends Addable< U > >.getReportedHeuristics | ( | ) |
Returns the reported heuristics.
Referenced by frodo2.algorithms.adopt.test.ADOPTagentTest< V extends Addable< V >, U extends Addable< U > >.testRandom().
| void frodo2.algorithms.adopt.Preprocessing< Val extends Addable< Val >, U extends Addable< U > >.getStatsFromQueue | ( | Queue | queue | ) |
Implements frodo2.algorithms.StatsReporter.
References HEURISTICS_STAT_MSG_TYPE, and queue.
|
private |
| void frodo2.algorithms.adopt.Preprocessing< Val extends Addable< Val >, U extends Addable< U > >.notifyIn | ( | Message | msg | ) |
Implements frodo2.communication.IncomingMsgPolicyInterface< T >.
References frodo2.algorithms.AgentInterface< V extends Addable< V > >.AGENT_FINISHED, frodo2.communication.MessageType.equals(), HEURISTICS_STAT_MSG_TYPE, init(), notifyIn(), and frodo2.algorithms.varOrdering.dfs.DFSgeneration< V extends Addable< V >, U extends Addable< U > >.OUTPUT_MSG_TYPE.
Referenced by notifyIn().

| void frodo2.algorithms.adopt.Preprocessing< Val extends Addable< Val >, U extends Addable< U > >.reset | ( | ) |
Implements frodo2.algorithms.StatsReporter.
|
private |
Helper function to set the heuristics used for preprocessing.
| heuristicName | the name of the heuristic class |
| ClassNotFoundException | if the heuristic class name is unknown |
| InstantiationException | if the heuristic class does not have an accessible nullary constructor |
| IllegalAccessException | if the heuristic class does not have an accessible nullary constructor |
References Preprocessing(), and setHeuristics().
Referenced by Preprocessing(), Preprocessing(), Preprocessing(), and setHeuristics().

| void frodo2.algorithms.adopt.Preprocessing< Val extends Addable< Val >, U extends Addable< U > >.setQueue | ( | Queue | queue | ) |
Implements frodo2.communication.MessageListener< T >.
References queue.
| void frodo2.algorithms.adopt.Preprocessing< Val extends Addable< Val >, U extends Addable< U > >.setSilent | ( | boolean | silent | ) |
|
private |
A list of domains of each of the variables.
Referenced by createUtilitySpace(), init(), and Preprocessing().
|
private |
The heuristic that is used to generate the lower bounds.
Referenced by getMsgTypes(), and init().
|
static |
The type of message containing the heuristics.
Referenced by frodo2.algorithms.adopt.ADOPT< Val extends Addable< Val >, U extends Addable< U > >.getMsgTypes(), frodo2.algorithms.adopt.test.testPreprocessing.forwardHeuristicsMessage.getMsgTypes(), frodo2.algorithms.adopt.test.testPreprocessing.receiveLowerBounds.getMsgTypes(), frodo2.algorithms.adopt.test.testPreprocessing.forwardHeuristicsMessage.notifyIn(), and frodo2.algorithms.adopt.test.testPreprocessing.receiveLowerBounds.notifyIn().
|
static |
The type of the heuristics stats message.
Referenced by getStatsFromQueue(), and notifyIn().
|
private |
For each known variable, the name of the agent that owns it.
Referenced by init().
|
private |
The agent's problem.
Referenced by init(), Preprocessing(), Preprocessing(), and Preprocessing().
|
private |
The agent's queue.
Referenced by getStatsFromQueue(), and setQueue().
| HashMap<String, UtilitySolutionSpace<Val, U> > frodo2.algorithms.adopt.Preprocessing< Val extends Addable< Val >, U extends Addable< U > >.reportedHeuristics |
Container for the reported heuristics.
Referenced by Preprocessing().
|
private |
Whether to report stats.
|
static |
The type of the message telling the module to start.
Referenced by getMsgTypes().
|
private |
Whether the algorithm has been started.
|
private |
A list of variables this agent owns.
Referenced by createUtilitySpace(), init(), Preprocessing(), frodo2.algorithms.adopt.Preprocessing< Val extends Addable< Val >, U extends Addable< U > >.DP1< Val extends Addable< Val >, U extends Addable< U > >.VariableInfo.setParent(), frodo2.algorithms.adopt.Preprocessing< Val extends Addable< Val >, U extends Addable< U > >.DP2< Val extends Addable< Val >, U extends Addable< U > >.VariableInfo.setParent(), and frodo2.algorithms.adopt.Preprocessing< Val extends Addable< Val >, U extends Addable< U > >.PreprocessingHeuristic< Val extends Addable< Val >, U extends Addable< U > >.VariableInfo< Val extends Addable< Val >, U extends Addable< U > >.VariableInfo().
|
private |
used to create the null value
Referenced by Preprocessing(), Preprocessing(), and frodo2.algorithms.adopt.Preprocessing< Val extends Addable< Val >, U extends Addable< U > >.PreprocessingHeuristic< Val extends Addable< Val >, U extends Addable< U > >.VariableInfo< Val extends Addable< Val >, U extends Addable< U > >.VariableInfo().