|
FRODO Version 2.19.1
An open-source framework for Distributed Constraint Optimization (DCOP)
|
This class implements both the UTIL propagation phase and the VALUE propagation of the ASODPOP algorithm. More...

Classes | |
| class | VariableInfo |
| A convenience class that contains the following information for a variable. More... | |
| interface | determineAssignment |
| In the future we might want to experiment with different ways of determining a variables assignment. More... | |
| class | DetermineAssignmentMax |
| This class should be used when only a single hierarchy is used. More... | |
| class | AssignmentMessage |
| Assignment message used to reported the variables assignment and some statistics about the run. More... | |
Public Member Functions | |
| ASODPOP (Element parameters, DCOPProblemInterface< Val, U > problem) | |
| Constructor for the stats gatherer mode. | |
| ASODPOP (DCOPProblemInterface< Val, U > problem, Element parameters) throws Exception | |
| A constructor that takes in the description of the problem and a set of parameters. | |
| ASODPOP (DCOPProblemInterface< Val, U > problem) throws Exception | |
| A constructor that takes in the description of the problem. | |
| ASODPOP (DCOPProblemInterface< Val, U > problem, String combinationMethodClass) throws Exception | |
| A constructor that takes in the description of the problem. | |
| void | reset () |
| void | getStatsFromQueue (Queue queue) |
| void | setSilent (boolean silent) |
| Integer | getMaxMsgDim () |
| long | getFinalTime () |
| Returns the time at which this module has finished, determined by looking at the timestamp of the stat messages. | |
| HashMap< String, ArrayList< CurrentAssignment< Val > > > | getAssignmentHistories () |
| double | getAverageFillTreePercentage () |
| double | getAverageDummyFillTreePercentage () |
| double | getAverageNumberOfDummies () |
| int | getCumulativeNumberOfSpeculativeUTILmsgs () |
| int | getNumberOfUTILmessages () |
| Collection< MessageType > | getMsgTypes () |
| void | notifyIn (Message msg) |
| void | setQueue (Queue queue) |
| Map< String, Val > | 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 message telling the module to start. | |
| static final MessageType | UTIL_MSG = UTILpropagationFullDomain.UTIL_MSG |
| The type of the UTIL message. | |
| static final MessageType | UTIL_MSG_DOM = UTILpropagationFullDomain.UTIL_MSG_DOM |
| The type of the UTIL message with domain information. | |
| static final MessageType | UTIL_MSG_VARS = UTILpropagationFullDomain.UTIL_MSG_VARS |
| The type of the UTIL message with variable IDs. | |
| static final MessageType | UTIL_MSG_DOM_VARS = UTILpropagationFullDomain.UTIL_MSG_DOM_VARS |
| The type of the UTIL message with variable IDs and domain information. | |
| static final MessageType | ASK_MSG = UTILpropagationFullDomain.ASK_MSG |
| The type of the ASK message. | |
| static final MessageType | DONE_MSG = UTILpropagationFullDomain.DONE_MSG |
| The type of the DONE message. | |
| static final MessageType | UTIL_STATS_MSG_TYPE = new MessageType ("ASO-DPOP", "UTILstatsMessage") |
| The type of messages sent to the statistics monitor. | |
| static final MessageType | CONV_STATS_MSG_TYPE = new MessageType ("ASO-DPOP", "ConvStatsMsg") |
| The type of the message containing the assignment history. | |
| static final MessageType | VALUE_MSG_TYPE_CHILD = new MessageType ("ASO-DPOP", "VALUEtoChild") |
| The type of a value message to a child. | |
| static final MessageType | VALUE_MSG_TYPE_PSEUDO = new MessageType ("ASO-DPOP", "VALUEtoPseudo") |
| The type of a value message to a pseudo child. | |
| static final MessageType | OUTPUT_MSG_TYPE = VALUEpropagation.OUTPUT_MSG_TYPE |
| The type of the output messages containing the optimal assignment to a variable. | |
| static final MessageType | ACK_MSG_TYPE = new MessageType ("ASO-DPOP", "Ack") |
| The type of an acknowledge message. | |
Protected Member Functions | |
| void | sendMessageToVariable (String variable, Message msg) |
| Send a message to a variable. | |
| void | log (String variableID, String message) |
| Log function used to print the variables state during debugging. | |
Protected Attributes | |
| final boolean | convergence |
| Whether the listener should record the assignment history or not. | |
| ArrayList< CurrentAssignment< Val > >[] | assignmentHistory |
| For each variable the assignment history. | |
| HashMap< String, ArrayList< CurrentAssignment< Val > > > | assignmentHistoriesMap |
| For each variable its assignment history. | |
| DCOPProblemInterface< Val, U > | problem |
| The agent's problem. | |
| HashMap< String, Integer > | variablePointer |
| Give the variables index into the arrays. | |
| int[] | variableDomainSize |
| For each variable its domain size is stored. | |
| Val[][] | domains |
| For each variable owned by this agent, its domain. | |
| boolean[] | ready |
| Tells one when a variable is ready to start the algorithm. | |
| Val[] | currentValues |
| For each variable this agent owns, its current value is stored. | |
| boolean | started = false |
| Whether the algorithm has been started. | |
| Queue | queue |
| The message queue. | |
| String | agentID |
| The ID of this agent. | |
| HashMap< String, BufferedWriter > | loggers |
| A list of buffered writers used to log information during debugging. | |
| determineAssignment< Val, U > | combinationMethod |
| The method used to combine VALUE and UTIL information into a speculative variable assignment. | |
| Map< String, String > | owners |
| For each variable the agent that owns it. | |
Static Protected Attributes | |
| static final boolean | LOG = false |
| To log or not to log. | |
Private Member Functions | |
| void | init () |
| Initialize all the variables. | |
| void | setCombinationMethod (String method) throws ClassNotFoundException, NoSuchMethodException, IllegalArgumentException, InstantiationException, IllegalAccessException, InvocationTargetException |
| Set the method that defines how the available information is combined into a single variable assignment. | |
| void | startProcess (String varID) |
| This method starts the optimization process, by first handling the messages that have already been received, and after that by sending ASK messages to start things up. | |
| void | processUTILMessage (VariableInfo variable, Good< Val, U > g, String sender, int[] domInfo, String[] variables, boolean withVars) |
| Process a good that has been received. | |
| void | processASKMessage (VariableInfo variable) |
| Process an ASK message. | |
| void | processVALUEmessageParent (VariableInfo variable, HashMap< String, Val > values, boolean isConfirmed) |
| Process a VALUE message. | |
| void | processVALUEmessagePseudoParent (VariableInfo variable, String sender, Val value) |
| Process a VALUE message. | |
| void | processDONE (VariableInfo variable, String sender) |
| Process a DONE message. | |
| void | sendGood (Good< Val, U > g, VariableInfo variable) |
| Sent a good. | |
| void | sendVALUEChild (VariableInfo varInfo, Val value, HashMap< String, Val > currentContext, boolean isConfirmed, String child) |
| Send a VALUE message to a child. | |
| void | sendVALUEPseudo (String variableID, Val value, String child) |
| Send a VALUE message to a pseudo child. | |
| void | sendASK (String child, VariableInfo var) |
| Sent an ASK message to a child. | |
| void | sendDONE (String parent, String varID) |
| Send a DONE message to ones parent. | |
Private Attributes | |
| boolean | reportStats = true |
| Whether to report stats. | |
| VariableInfo[] | infos |
| A map from variableIDs to the corresponding VariableInfo container. | |
| int | variablesReadyCounter |
| Counter for the number of variables that has terminated. | |
| LinkedList< Message >[] | goodsToProcess |
| For each variable, a list of goods received before it was initialized. | |
| boolean[] | askToProcess |
| For each variable, it records whether an ASK message has been received before initialization. | |
| VALUEmsgChild< Val >[] | lastValueMessage |
| For each variable, it records the last VALUE message received before initialization. | |
| U | infeasibleUtil |
| The minus infinty object. | |
| boolean | agentFinished |
true when the agent has finished, and false otherwise | |
| double | cumulativeFillPercentage |
| The percentage of the problem that has been stored. | |
| double | cumulativeDummyFillPercentage |
| The cumulative dummy fill percentage. | |
| long | cumulativeNumberOfDummies |
| The cumulative number of dummies. | |
| int | cumulativeNumberOfSpeculativeUTILmessages |
| The cumulative number of speculative UTIL messages that have been sent during the run of this algorithm. | |
| int | cumulativeNumberOfUTILMessages |
| total number of UTIl messages that have been sent | |
| int | fillPercentageCounter |
| Represents to what extent the trees owned by this agent are filled. | |
| long | finalTime |
| The time at which all ASODPOP modules have finished. | |
| boolean | maximize |
when true we are maximizing, when false we are minimizing | |
| boolean | collectStats |
true when statistics should be collected in the tree, and false otherwise | |
This class implements both the UTIL propagation phase and the VALUE propagation of the ASODPOP algorithm.
It assumes that information on the separator variable domains is discovered online. To mitigate the termination problems that can result from the that, every domain that is not yet full contains a dummy element
| <Val> | type used for variable values |
| <U> | type used for utility values |
| frodo2.algorithms.asodpop.ASODPOP< Val extends Addable< Val >, U extends Addable< U > >.ASODPOP | ( | Element | parameters, |
| DCOPProblemInterface< Val, U > | problem ) |
Constructor for the stats gatherer mode.
| parameters | the parameters of the module |
| problem | the overall problem |
References assignmentHistoriesMap, and problem.
Referenced by ASODPOP(), frodo2.algorithms.asodpop.ASODPOP< Val extends Addable< Val >, U extends Addable< U > >.DetermineAssignmentMax< Val extends Addable< Val >, U extends Addable< U > >.DetermineAssignmentMax(), frodo2.algorithms.asodpop.ASODPOP< Val extends Addable< Val >, U extends Addable< U > >.DetermineAssignmentMax< Val extends Addable< Val >, U extends Addable< U > >.determineVariableValue(), notifyIn(), processUTILMessage(), processVALUEmessageParent(), and setCombinationMethod().
| frodo2.algorithms.asodpop.ASODPOP< Val extends Addable< Val >, U extends Addable< U > >.ASODPOP | ( | DCOPProblemInterface< Val, U > | problem, |
| Element | parameters ) throws Exception |
A constructor that takes in the description of the problem and a set of parameters.
| problem | The agents problem |
| parameters | parameters: method to use when setting the value of a variable |
| Exception | Exceptions thrown when setting the combination method |
References problem, and setCombinationMethod().

| frodo2.algorithms.asodpop.ASODPOP< Val extends Addable< Val >, U extends Addable< U > >.ASODPOP | ( | DCOPProblemInterface< Val, U > | problem | ) | throws Exception |
A constructor that takes in the description of the problem.
| problem | The agents problem |
| Exception | if an error occurs |
References ASODPOP(), problem, and setCombinationMethod().

| frodo2.algorithms.asodpop.ASODPOP< Val extends Addable< Val >, U extends Addable< U > >.ASODPOP | ( | DCOPProblemInterface< Val, U > | problem, |
| String | combinationMethodClass ) throws Exception |
A constructor that takes in the description of the problem.
| problem | The agents problem |
| combinationMethodClass | The combination method |
| Exception | if an error occurs |
References problem, and setCombinationMethod().

| HashMap< String, ArrayList< CurrentAssignment< Val > > > frodo2.algorithms.asodpop.ASODPOP< Val extends Addable< Val >, U extends Addable< U > >.getAssignmentHistories | ( | ) |
| double frodo2.algorithms.asodpop.ASODPOP< Val extends Addable< Val >, U extends Addable< U > >.getAverageDummyFillTreePercentage | ( | ) |
References cumulativeDummyFillPercentage, and fillPercentageCounter.
| double frodo2.algorithms.asodpop.ASODPOP< Val extends Addable< Val >, U extends Addable< U > >.getAverageFillTreePercentage | ( | ) |
References cumulativeFillPercentage, and fillPercentageCounter.
| double frodo2.algorithms.asodpop.ASODPOP< Val extends Addable< Val >, U extends Addable< U > >.getAverageNumberOfDummies | ( | ) |
References cumulativeNumberOfDummies, and fillPercentageCounter.
| int frodo2.algorithms.asodpop.ASODPOP< Val extends Addable< Val >, U extends Addable< U > >.getCumulativeNumberOfSpeculativeUTILmsgs | ( | ) |
References cumulativeNumberOfSpeculativeUTILmessages.
| Map< String, Val > frodo2.algorithms.asodpop.ASODPOP< Val extends Addable< Val >, U extends Addable< U > >.getCurrentSolution | ( | ) |
Implements frodo2.algorithms.StatsReporterWithConvergence< Val extends Addable< Val > >.
References currentValues, and variablePointer.
| long frodo2.algorithms.asodpop.ASODPOP< Val extends Addable< Val >, U extends Addable< U > >.getFinalTime | ( | ) |
Returns the time at which this module has finished, determined by looking at the timestamp of the stat messages.
References finalTime.
| Integer frodo2.algorithms.asodpop.ASODPOP< Val extends Addable< Val >, U extends Addable< U > >.getMaxMsgDim | ( | ) |
| Collection< MessageType > frodo2.algorithms.asodpop.ASODPOP< Val extends Addable< Val >, U extends Addable< U > >.getMsgTypes | ( | ) |
Implements frodo2.communication.MessageListener< T >.
References ACK_MSG_TYPE, frodo2.algorithms.AgentInterface< V extends Addable< V > >.AGENT_FINISHED, ASK_MSG, DONE_MSG, frodo2.algorithms.varOrdering.dfs.DFSgeneration< V extends Addable< V >, U extends Addable< U > >.OUTPUT_MSG_TYPE, START_MSG_TYPE, UTIL_MSG, UTIL_MSG_DOM, UTIL_MSG_DOM_VARS, UTIL_MSG_VARS, VALUE_MSG_TYPE_CHILD, and VALUE_MSG_TYPE_PSEUDO.
| int frodo2.algorithms.asodpop.ASODPOP< Val extends Addable< Val >, U extends Addable< U > >.getNumberOfUTILmessages | ( | ) |
References cumulativeNumberOfUTILMessages.
| void frodo2.algorithms.asodpop.ASODPOP< Val extends Addable< Val >, U extends Addable< U > >.getStatsFromQueue | ( | Queue | queue | ) |
Implements frodo2.algorithms.StatsReporter.
References CONV_STATS_MSG_TYPE, OUTPUT_MSG_TYPE, and queue.
|
private |
Initialize all the variables.
Do note that the problem is not yet parsed at this moment in time!
References agentID, askToProcess, assignmentHistory, convergence, currentValues, domains, goodsToProcess, infos, init(), lastValueMessage, LOG, loggers, maximize, owners, problem, ready, variableDomainSize, variablePointer, and variablesReadyCounter.
Referenced by init(), and notifyIn().

|
protected |
Log function used to print the variables state during debugging.
| variableID | The ID of the variable that is logging |
| message | The message that must be logged |
Referenced by processASKMessage(), processUTILMessage(), processVALUEmessageParent(), processVALUEmessagePseudoParent(), sendASK(), sendDONE(), sendGood(), sendVALUEChild(), sendVALUEPseudo(), and startProcess().
| void frodo2.algorithms.asodpop.ASODPOP< 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, agentFinished, ASODPOP(), frodo2.communication.MessageType.equals(), goodsToProcess, init(), notifyIn(), and UTIL_MSG.
Referenced by notifyIn().

|
private |
Process an ASK message.
If the tree has no more new information, sent a DONE message. Otherwise respond with a good.
| variable | The variable information of the variable that received this ASK message |
References frodo2.algorithms.asodpop.ASODPOP< Val extends Addable< Val >, U extends Addable< U > >.VariableInfo.children, frodo2.algorithms.asodpop.ASODPOP< Val extends Addable< Val >, U extends Addable< U > >.VariableInfo.done, frodo2.algorithms.asodpop.ASODPOP< Val extends Addable< Val >, U extends Addable< U > >.VariableInfo.getAmax(), frodo2.algorithms.asodpop.ASODPOP< Val extends Addable< Val >, U extends Addable< U > >.VariableInfo.infeasible, frodo2.algorithms.asodpop.ASODPOP< Val extends Addable< Val >, U extends Addable< U > >.VariableInfo.isDone, LOG, log(), frodo2.algorithms.asodpop.ASODPOP< Val extends Addable< Val >, U extends Addable< U > >.VariableInfo.notResponded, frodo2.algorithms.asodpop.ASODPOP< Val extends Addable< Val >, U extends Addable< U > >.VariableInfo.numberOfChildren, frodo2.algorithms.asodpop.ASODPOP< Val extends Addable< Val >, U extends Addable< U > >.VariableInfo.parent, sendASK(), sendDONE(), sendGood(), frodo2.algorithms.asodpop.ASODPOP< Val extends Addable< Val >, U extends Addable< U > >.VariableInfo.terminated, frodo2.algorithms.asodpop.ASODPOP< Val extends Addable< Val >, U extends Addable< U > >.VariableInfo.toString(), frodo2.algorithms.asodpop.ASODPOP< Val extends Addable< Val >, U extends Addable< U > >.VariableInfo.tree, and frodo2.algorithms.asodpop.ASODPOP< Val extends Addable< Val >, U extends Addable< U > >.VariableInfo.variableID.
Referenced by processUTILMessage().

|
private |
Process a DONE message.
| variable | the variable that received the DONE message |
| sender | the sender of the DONE message |
References processDONE().
Referenced by processDONE().

|
private |
Process a good that has been received.
| variable | The variable information |
| g | The good received |
| sender | The sender of the good |
| variables | The variables for which domain size information is being sent |
| domInfo | Info about the domain size of the variables in the agent's separator |
| withVars | true when the util message contained variables |
References frodo2.algorithms.AgentInterface< V extends Addable< V > >.AGENT_FINISHED, ASODPOP(), assignmentHistory, frodo2.algorithms.asodpop.ASODPOP< Val extends Addable< Val >, U extends Addable< U > >.VariableInfo.children, frodo2.algorithms.asodpop.ASODPOP< Val extends Addable< Val >, U extends Addable< U > >.VariableInfo.childrenPointer, convergence, frodo2.algorithms.asodpop.ASODPOP< Val extends Addable< Val >, U extends Addable< U > >.VariableInfo.currentContextMap, currentValues, frodo2.algorithms.asodpop.ASODPOP< Val extends Addable< Val >, U extends Addable< U > >.VariableInfo.done, frodo2.algorithms.asodpop.ASODPOP< Val extends Addable< Val >, U extends Addable< U > >.VariableInfo.getNewVariable(), frodo2.algorithms.odpop.Good< Val extends Addable< Val >, U extends Addable< U > >.getUtility(), infos, frodo2.algorithms.asodpop.Good< Val extends Addable< Val >, U extends Addable< U > >.isConfirmed(), LOG, log(), frodo2.algorithms.asodpop.ASODPOP< Val extends Addable< Val >, U extends Addable< U > >.VariableInfo.notResponded, frodo2.algorithms.asodpop.ASODPOP< Val extends Addable< Val >, U extends Addable< U > >.VariableInfo.numberOfChildren, processASKMessage(), frodo2.algorithms.asodpop.ASODPOP< Val extends Addable< Val >, U extends Addable< U > >.VariableInfo.pseudo_children, queue, reportStats, frodo2.algorithms.asodpop.ASODPOP< Val extends Addable< Val >, U extends Addable< U > >.VariableInfo.root, sendASK(), sendVALUEChild(), sendVALUEPseudo(), frodo2.algorithms.asodpop.ASODPOP< Val extends Addable< Val >, U extends Addable< U > >.VariableInfo.setNewVariable(), frodo2.algorithms.AgentInterface< V extends Addable< V > >.STATS_MONITOR, frodo2.algorithms.asodpop.ASODPOP< Val extends Addable< Val >, U extends Addable< U > >.VariableInfo.terminated, frodo2.algorithms.asodpop.ASODPOP< Val extends Addable< Val >, U extends Addable< U > >.VariableInfo.toString(), frodo2.algorithms.asodpop.Good< Val extends Addable< Val >, U extends Addable< U > >.toString(), frodo2.algorithms.asodpop.ASODPOP< Val extends Addable< Val >, U extends Addable< U > >.VariableInfo.tree, frodo2.algorithms.asodpop.ASODPOP< Val extends Addable< Val >, U extends Addable< U > >.VariableInfo.variableID, variablePointer, and variablesReadyCounter.

|
private |
Process a VALUE message.
| variable | The Variable information |
| values | The values reporeted in the VALUE message |
| isConfirmed | true when the VALUE message is confirmed, i.e. the algorithm is terminating |
References frodo2.algorithms.AgentInterface< V extends Addable< V > >.AGENT_FINISHED, ASODPOP(), assignmentHistory, frodo2.algorithms.asodpop.ASODPOP< Val extends Addable< Val >, U extends Addable< U > >.VariableInfo.children, convergence, frodo2.algorithms.asodpop.ASODPOP< Val extends Addable< Val >, U extends Addable< U > >.VariableInfo.currentContextMap, currentValues, frodo2.algorithms.asodpop.ASODPOP< Val extends Addable< Val >, U extends Addable< U > >.VariableInfo.getRandomValue(), infos, LOG, log(), frodo2.algorithms.asodpop.ASODPOP< Val extends Addable< Val >, U extends Addable< U > >.VariableInfo.numberOfChildren, frodo2.algorithms.asodpop.ASODPOP< Val extends Addable< Val >, U extends Addable< U > >.VariableInfo.parent, frodo2.algorithms.asodpop.ASODPOP< Val extends Addable< Val >, U extends Addable< U > >.VariableInfo.pseudo_children, queue, reportStats, sendVALUEChild(), sendVALUEPseudo(), frodo2.algorithms.asodpop.ASODPOP< Val extends Addable< Val >, U extends Addable< U > >.VariableInfo.setCurrentContext(), frodo2.algorithms.AgentInterface< V extends Addable< V > >.STATS_MONITOR, frodo2.algorithms.asodpop.ASODPOP< Val extends Addable< Val >, U extends Addable< U > >.VariableInfo.toString(), frodo2.algorithms.asodpop.ASODPOP< Val extends Addable< Val >, U extends Addable< U > >.VariableInfo.tree, frodo2.algorithms.asodpop.ASODPOP< Val extends Addable< Val >, U extends Addable< U > >.VariableInfo.variableID, variablePointer, and variablesReadyCounter.

|
private |
Process a VALUE message.
| variable | The Variable information |
| sender | The sender of the VALUE message |
| value | The value of the sending variable |
References assignmentHistory, frodo2.algorithms.asodpop.ASODPOP< Val extends Addable< Val >, U extends Addable< U > >.VariableInfo.children, convergence, frodo2.algorithms.asodpop.ASODPOP< Val extends Addable< Val >, U extends Addable< U > >.VariableInfo.currentContextMap, currentValues, infos, LOG, log(), frodo2.algorithms.asodpop.ASODPOP< Val extends Addable< Val >, U extends Addable< U > >.VariableInfo.numberOfChildren, frodo2.algorithms.asodpop.ASODPOP< Val extends Addable< Val >, U extends Addable< U > >.VariableInfo.parent, frodo2.algorithms.asodpop.ASODPOP< Val extends Addable< Val >, U extends Addable< U > >.VariableInfo.pseudo_children, queue, sendVALUEChild(), sendVALUEPseudo(), frodo2.algorithms.asodpop.ASODPOP< Val extends Addable< Val >, U extends Addable< U > >.VariableInfo.toString(), frodo2.algorithms.asodpop.ASODPOP< Val extends Addable< Val >, U extends Addable< U > >.VariableInfo.tree, frodo2.algorithms.asodpop.ASODPOP< Val extends Addable< Val >, U extends Addable< U > >.VariableInfo.updateCurrentContext(), frodo2.algorithms.asodpop.ASODPOP< Val extends Addable< Val >, U extends Addable< U > >.VariableInfo.variableID, and variablePointer.

| void frodo2.algorithms.asodpop.ASODPOP< Val extends Addable< Val >, U extends Addable< U > >.reset | ( | ) |
Implements frodo2.algorithms.StatsReporter.
References askToProcess, assignmentHistoriesMap, assignmentHistory, domains, goodsToProcess, infos, lastValueMessage, loggers, owners, ready, and variableDomainSize.
|
private |
Sent an ASK message to a child.
| child | The recipient of the ASK message |
| var | The sending variable |
References frodo2.algorithms.asodpop.ASODPOP< Val extends Addable< Val >, U extends Addable< U > >.VariableInfo.getAskMessage(), LOG, log(), sendMessageToVariable(), and frodo2.algorithms.asodpop.ASODPOP< Val extends Addable< Val >, U extends Addable< U > >.VariableInfo.variableID.
Referenced by processASKMessage(), and processUTILMessage().

|
private |
Send a DONE message to ones parent.
| parent | The recepient of the message |
| varID | The sending variable |
References LOG, log(), and sendMessageToVariable().
Referenced by processASKMessage().

|
private |
Sent a good.
If the good has already been sent, wait until a new message can be sent.
| g | The good to be send |
| variable | The variable who is sending the good |
References frodo2.algorithms.asodpop.ASODPOP< Val extends Addable< Val >, U extends Addable< U > >.VariableInfo.acknowledged, frodo2.algorithms.asodpop.Good< Val extends Addable< Val >, U extends Addable< U > >.equals(), frodo2.algorithms.asodpop.ASODPOP< Val extends Addable< Val >, U extends Addable< U > >.VariableInfo.getNewVariable(), frodo2.communication.Message.getType(), frodo2.algorithms.asodpop.ASODPOP< Val extends Addable< Val >, U extends Addable< U > >.VariableInfo.goodsToSend, frodo2.algorithms.asodpop.Good< Val extends Addable< Val >, U extends Addable< U > >.isConfirmed(), frodo2.algorithms.asodpop.ASODPOP< Val extends Addable< Val >, U extends Addable< U > >.VariableInfo.lastSent, LOG, log(), frodo2.algorithms.asodpop.ASODPOP< Val extends Addable< Val >, U extends Addable< U > >.VariableInfo.parent, queue, sendMessageToVariable(), frodo2.algorithms.asodpop.ASODPOP< Val extends Addable< Val >, U extends Addable< U > >.VariableInfo.setNewVariable(), frodo2.algorithms.asodpop.Good< Val extends Addable< Val >, U extends Addable< U > >.toString(), frodo2.algorithms.asodpop.ASODPOP< Val extends Addable< Val >, U extends Addable< U > >.VariableInfo.tree, and frodo2.algorithms.asodpop.ASODPOP< Val extends Addable< Val >, U extends Addable< U > >.VariableInfo.variableID.
Referenced by processASKMessage().

|
protected |
Send a message to a variable.
| variable | The recepient of the message |
| msg | The message to be send |
Referenced by sendASK(), sendDONE(), sendGood(), sendVALUEChild(), and sendVALUEPseudo().
|
private |
Send a VALUE message to a child.
| varInfo | Contains all information ASODPOP has collected on this variable |
| value | The current value of the variable |
| currentContext | The current context of the variable |
| isConfirmed | true when this is a confirmed VALUE message |
| child | The variable that is to receive this message |
References frodo2.algorithms.asodpop.ASODPOP< Val extends Addable< Val >, U extends Addable< U > >.VariableInfo.childrenPointer, LOG, log(), sendMessageToVariable(), frodo2.algorithms.asodpop.ASODPOP< Val extends Addable< Val >, U extends Addable< U > >.VariableInfo.tree, and frodo2.algorithms.asodpop.ASODPOP< Val extends Addable< Val >, U extends Addable< U > >.VariableInfo.variableID.
Referenced by processUTILMessage(), processVALUEmessageParent(), and processVALUEmessagePseudoParent().

|
private |
Send a VALUE message to a pseudo child.
| variableID | The variable ID |
| value | The current value of the variable |
| child | The variable that is to receive this message |
References LOG, log(), and sendMessageToVariable().
Referenced by processUTILMessage(), processVALUEmessageParent(), and processVALUEmessagePseudoParent().

|
private |
Set the method that defines how the available information is combined into a single variable assignment.
| method | The method of combination |
| ClassNotFoundException | if the heuristic is not found |
| NoSuchMethodException | if the heuristic does not have a constructor that takes in an ASODPOPBinaryDomains |
| InvocationTargetException | if the heuristic constructor throws an exception |
| IllegalAccessException | if the heuristic constructor is not accessible |
| InstantiationException | if the heuristic is abstract |
| IllegalArgumentException | should never happen |
References ASODPOP(), and setCombinationMethod().
Referenced by ASODPOP(), ASODPOP(), ASODPOP(), and setCombinationMethod().

| void frodo2.algorithms.asodpop.ASODPOP< Val extends Addable< Val >, U extends Addable< U > >.setQueue | ( | Queue | queue | ) |
Implements frodo2.communication.MessageListener< T >.
References queue.
| void frodo2.algorithms.asodpop.ASODPOP< Val extends Addable< Val >, U extends Addable< U > >.setSilent | ( | boolean | silent | ) |
Implements frodo2.algorithms.StatsReporter.
|
private |
This method starts the optimization process, by first handling the messages that have already been received, and after that by sending ASK messages to start things up.
| varID | The ID of the variable that is ready. |
References frodo2.algorithms.asodpop.ASODPOP< Val extends Addable< Val >, U extends Addable< U > >.VariableInfo.children, convergence, infos, LOG, log(), frodo2.algorithms.asodpop.ASODPOP< Val extends Addable< Val >, U extends Addable< U > >.VariableInfo.parent, startProcess(), variablePointer, and variablesReadyCounter.
Referenced by startProcess().

|
static |
The type of an acknowledge message.
Referenced by frodo2.algorithms.asodpop.ACKmsg.ACKmsg(), frodo2.algorithms.asodpop.ACKmsg.ACKmsg(), and getMsgTypes().
|
private |
true when the agent has finished, and false otherwise
Referenced by notifyIn().
|
protected |
The ID of this agent.
Referenced by init().
|
static |
The type of the ASK message.
Referenced by getMsgTypes().
|
private |
|
protected |
For each variable its assignment history.
Referenced by ASODPOP(), getAssignmentHistories(), and reset().
|
protected |
For each variable the assignment history.
Referenced by init(), processUTILMessage(), processVALUEmessageParent(), processVALUEmessagePseudoParent(), and reset().
|
private |
true when statistics should be collected in the tree, and false otherwise
|
protected |
The method used to combine VALUE and UTIL information into a speculative variable assignment.
|
static |
The type of the message containing the assignment history.
Referenced by getStatsFromQueue().
|
protected |
Whether the listener should record the assignment history or not.
Referenced by init(), processUTILMessage(), processVALUEmessageParent(), processVALUEmessagePseudoParent(), and startProcess().
|
private |
The cumulative dummy fill percentage.
Referenced by getAverageDummyFillTreePercentage().
|
private |
The percentage of the problem that has been stored.
Referenced by getAverageFillTreePercentage().
|
private |
The cumulative number of dummies.
Referenced by getAverageNumberOfDummies().
|
private |
The cumulative number of speculative UTIL messages that have been sent during the run of this algorithm.
Referenced by getCumulativeNumberOfSpeculativeUTILmsgs().
|
private |
total number of UTIl messages that have been sent
Referenced by getNumberOfUTILmessages().
|
protected |
For each variable this agent owns, its current value is stored.
Referenced by getCurrentSolution(), init(), processUTILMessage(), processVALUEmessageParent(), and processVALUEmessagePseudoParent().
|
protected |
|
static |
The type of the DONE message.
Referenced by getMsgTypes().
|
private |
Represents to what extent the trees owned by this agent are filled.
Referenced by getAverageDummyFillTreePercentage(), getAverageFillTreePercentage(), and getAverageNumberOfDummies().
|
private |
The time at which all ASODPOP modules have finished.
Referenced by getFinalTime().
|
private |
For each variable, a list of goods received before it was initialized.
Referenced by init(), notifyIn(), and reset().
|
private |
The minus infinty object.
|
private |
A map from variableIDs to the corresponding VariableInfo container.
Referenced by init(), processUTILMessage(), processVALUEmessageParent(), processVALUEmessagePseudoParent(), reset(), and startProcess().
|
private |
|
staticprotected |
To log or not to log.
Referenced by init(), log(), processASKMessage(), processUTILMessage(), processVALUEmessageParent(), processVALUEmessagePseudoParent(), sendASK(), sendDONE(), sendGood(), sendVALUEChild(), sendVALUEPseudo(), and startProcess().
|
protected |
|
private |
when true we are maximizing, when false we are minimizing
Referenced by init().
|
static |
The type of the output messages containing the optimal assignment to a variable.
Referenced by getStatsFromQueue().
|
protected |
For each variable the agent that owns it.
Referenced by init(), reset(), and sendMessageToVariable().
|
protected |
|
protected |
The message queue.
Referenced by getStatsFromQueue(), processUTILMessage(), processVALUEmessageParent(), processVALUEmessagePseudoParent(), sendGood(), sendMessageToVariable(), and setQueue().
|
protected |
|
private |
Whether to report stats.
Referenced by processUTILMessage(), and processVALUEmessageParent().
|
static |
The type of the message telling the module to start.
Referenced by getMsgTypes().
|
protected |
Whether the algorithm has been started.
|
static |
The type of the UTIL message.
Referenced by getMsgTypes(), notifyIn(), and frodo2.algorithms.asodpop.UTILmsg< Val extends Addable< Val >, U extends Addable< U > >.UTILmsg().
|
static |
The type of the UTIL message with domain information.
Referenced by getMsgTypes(), frodo2.algorithms.asodpop.UTILdomMsg< Val extends Addable< Val >, U extends Addable< U > >.UTILdomMsg(), and frodo2.algorithms.asodpop.UTILdomMsg< Val extends Addable< Val >, U extends Addable< U > >.UTILdomMsg().
|
static |
The type of the UTIL message with variable IDs and domain information.
Referenced by getMsgTypes(), frodo2.algorithms.asodpop.UTILvarsMsgWithDom< Val extends Addable< Val >, U extends Addable< U > >.UTILvarsMsgWithDom(), and frodo2.algorithms.asodpop.UTILvarsMsgWithDom< Val extends Addable< Val >, U extends Addable< U > >.UTILvarsMsgWithDom().
|
static |
The type of the UTIL message with variable IDs.
Referenced by getMsgTypes(), and frodo2.algorithms.asodpop.UTILvarsMsg< Val extends Addable< Val >, U extends Addable< U > >.UTILvarsMsg().
|
static |
The type of messages sent to the statistics monitor.
|
static |
The type of a value message to a child.
Referenced by getMsgTypes(), frodo2.algorithms.asodpop.VALUEmsgChild< Val extends Addable< Val > >.VALUEmsgChild(), and frodo2.algorithms.asodpop.VALUEmsgChild< Val extends Addable< Val > >.VALUEmsgChild().
|
static |
The type of a value message to a pseudo child.
Referenced by getMsgTypes(), frodo2.algorithms.asodpop.VALUEmsgPseudo< Val extends Addable< Val > >.VALUEmsgPseudo(), and frodo2.algorithms.asodpop.VALUEmsgPseudo< Val extends Addable< Val > >.VALUEmsgPseudo().
|
protected |
|
protected |
Give the variables index into the arrays.
Referenced by getCurrentSolution(), init(), processUTILMessage(), processVALUEmessageParent(), processVALUEmessagePseudoParent(), and startProcess().
|
private |
Counter for the number of variables that has terminated.
Referenced by init(), processUTILMessage(), processVALUEmessageParent(), and startProcess().