|
FRODO Version 2.19.1
An open-source framework for Distributed Constraint Optimization (DCOP)
|
E[DPOP]'s UTIL propagation phase. More...

Classes | |
| enum | Method |
| The method to use to choose the optimal value for a variable. More... | |
Public Member Functions | |
| ExpectedUTIL (DCOPProblemInterface< Val, U > problem, Element parameters) | |
| Constructor. | |
| ExpectedUTIL (Element parameters, DCOPProblemInterface< Val, U > problem) | |
| The constructor called in "statistics gatherer" mode. | |
| void | reset () |
| Collection< MessageType > | getMsgTypes () |
| void | getStatsFromQueue (Queue queue) |
| U | getWorstUtil () |
| U | getExpectedUtil () |
| U | getProbOfOptimality () |
| void | notifyIn (Message msg) |
| HashMap< String, Val > | getSolution () |
| Public Member Functions inherited from frodo2.algorithms.dpop.UTILpropagation< Val extends Addable< Val >, U extends Addable< U > > | |
| MessageType | getStartMsgType () |
| MessageType | getDFSMsgType () |
| UTILpropagation () | |
| Default constructor. | |
| UTILpropagation (DCOPProblemInterface< Val, U > problem) | |
| Constructor. | |
| UTILpropagation (DCOPProblemInterface< Val, U > problem, Element parameters) | |
| Constructor from XML descriptions. | |
| UTILpropagation (Element parameters, DCOPProblemInterface< Val, U > problem) | |
| The constructor called in "statistics gatherer" mode. | |
| void | setQueue (Queue queue) |
| void | setSilent (boolean silent) |
| Integer | getMaxMsgDim () |
| U | getOptUtil () |
| long | getFinalTime () |
| Returns the time at which this module has finished, determined by looking at the timestamp of the stat messages. | |
| 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 | RAND_VARS_PROJ_MSG_TYPE = SamplingPhase.RAND_VARS_PROJ_MSG_TYPE |
| The type of the messages containing information about the where random variables should be projected out. | |
| Static Public Attributes inherited from frodo2.algorithms.dpop.UTILpropagation< Val extends Addable< Val >, U extends Addable< U > > | |
| static MessageType | START_MSG_TYPE = AgentInterface.START_AGENT |
| The type of the message telling the module to start. | |
| static MessageType | FINISH_MSG_TYPE = AgentInterface.AGENT_FINISHED |
| The type of the message telling the agent finished. | |
| static MessageType | DFS_MSG_TYPE = DFSgeneration.OUTPUT_MSG_TYPE |
| The type of the messages containing information about the DFS. | |
| static final MessageType | UTIL_MSG_TYPE = new MessageType ("DPOP", "UTILpropagation", "UTIL") |
| The type of the messages containing utilities. | |
| static final MessageType | OUTPUT_MSG_TYPE = new MessageType ("DPOP", "UTILpropagation", "UTILoutput") |
| The type of the messages containing conditional optimal assignments. | |
| static final MessageType | SEPARATOR_MSG_TYPE = new MessageType ("DPOP", "UTILpropagation", "Separator") |
| The type of the messages containing separators. | |
| static final MessageType | OPT_UTIL_MSG_TYPE = new MessageType ("DPOP", "UTILpropagation", "OptUtil") |
| The type of the messages containing optimal utility values sent by roots. | |
| static final MessageType | UTIL_STATS_MSG_TYPE = new MessageType ("DPOP", "UTILpropagation", "UTILstats") |
| The type of messages sent to the statistics monitor. | |
Protected Member Functions | |
| void | parseMethod (Element parameters) |
| Parses the method to use. | |
| ProjOutput< Val, U > | project (UtilitySolutionSpace< Val, U > space, String[] vars) |
| void | sendToParent (String var, String parentVar, String parentAgent, UtilitySolutionSpace< Val, U > space) |
| Before sending the UTIL message, projects out the relevant random variables. | |
| void | sendOutput (UtilitySolutionSpace< Val, U > space, String root) |
| void | sendSeparator (String sender, String senderAgent, String dest, String[] separator) |
| Protected Member Functions inherited from frodo2.algorithms.dpop.UTILpropagation< Val extends Addable< Val >, U extends Addable< U > > | |
| void | init () |
| Parses the problem. | |
| ClusterInfo | newClusterInfo () |
| void | record (String senderVar, UtilitySolutionSpace< Val, U > space, ClusterInfo info) |
| Records the input space until spaces from all children have been received. | |
| void | projectAndSend (ClusterInfo info) |
| Projects out a variable and sends the result to its parent (if any) or to itself (to initiate VALUE propagation). | |
Protected Attributes | |
| HashMap< String, HashSet< String > > | randVarsProj = new HashMap< String, HashSet<String> > () |
| For each variable, the random variables that should be projected out of its UTIL message. | |
| Method | method = Method.EXPECTATION |
| The method to use. | |
| Protected Attributes inherited from frodo2.algorithms.dpop.UTILpropagation< Val extends Addable< Val >, U extends Addable< U > > | |
| boolean | withAnonymVars = false |
| Whether the parser should consider variables with no specified owner. | |
| DCOPProblemInterface< Val, U > | problem |
| The problem. | |
| boolean | started = false |
| Whether the execution of the algorithm has been started. | |
| boolean | maximize = true |
true if we want to maximize utility, false if we want to minimize cost | |
| Queue | queue |
| The queue on which it should call sendMessage(). | |
| Map< String, ClusterInfo > | infos |
| For each variable this agent owns, its relevant information. | |
| String | myID |
| This agent's name. | |
| U | optUtil |
| The optimal utility found to the problem. | |
| boolean | reportStats = true |
| Whether to report stats. | |
Private Member Functions | |
| void | sliceSpaces (ClusterInfo varInfo) |
| Slices the spaces stored for the input variable according to the sampled domains. | |
Private Attributes | |
| HashMap< String, Val > | solution = new HashMap<String, Val> () |
| For each variable, its optimal value. | |
| int | remainingVars |
| The number of variables owned by this agents that still have not sent VALUE messages to all their children. | |
| U | worstUtil |
| The worst-case utility. | |
| U | expectedUtil |
| The expected utility. | |
| U | zero |
| The utility 0. | |
| U | one |
| The utility 1. | |
| boolean | measureProbOfOpt = false |
| Whether to measure the probability of optimality. | |
| U | probOfOptimality |
| The total probability of the scenarios for which the chosen solution is optimal. | |
E[DPOP]'s UTIL propagation phase.
The difference with the normal UTILpropagation phase is that it "projects out" the random variables by computing the expectation over these variables.
| <Val> | the type used for variable values |
| <U> | the type used for utility values |
| frodo2.algorithms.dpop.stochastic.ExpectedUTIL< Val extends Addable< Val >, U extends Addable< U > >.ExpectedUTIL | ( | DCOPProblemInterface< Val, U > | problem, |
| Element | parameters ) |
Constructor.
| problem | the agent's subproblem |
| parameters | the parameters for the module |
References parseMethod(), frodo2.algorithms.dpop.UTILpropagation< Val extends Addable< Val >, U extends Addable< U > >.problem, and frodo2.algorithms.dpop.UTILpropagation< Val extends Addable< Val >, U extends Addable< U > >.withAnonymVars.

| frodo2.algorithms.dpop.stochastic.ExpectedUTIL< Val extends Addable< Val >, U extends Addable< U > >.ExpectedUTIL | ( | Element | parameters, |
| DCOPProblemInterface< Val, U > | problem ) |
The constructor called in "statistics gatherer" mode.
| problem | the overall problem |
| parameters | the description of what statistics should be reported |
References frodo2.algorithms.dpop.UTILpropagation< Val extends Addable< Val >, U extends Addable< U > >.problem.
| U frodo2.algorithms.dpop.stochastic.ExpectedUTIL< Val extends Addable< Val >, U extends Addable< U > >.getExpectedUtil | ( | ) |
| Collection< MessageType > frodo2.algorithms.dpop.stochastic.ExpectedUTIL< Val extends Addable< Val >, U extends Addable< U > >.getMsgTypes | ( | ) |
Reimplemented from frodo2.algorithms.dpop.UTILpropagation< Val extends Addable< Val >, U extends Addable< U > >.
References RAND_VARS_PROJ_MSG_TYPE.
| U frodo2.algorithms.dpop.stochastic.ExpectedUTIL< Val extends Addable< Val >, U extends Addable< U > >.getProbOfOptimality | ( | ) |
| HashMap< String, Val > frodo2.algorithms.dpop.stochastic.ExpectedUTIL< Val extends Addable< Val >, U extends Addable< U > >.getSolution | ( | ) |
References solution.
Referenced by frodo2.algorithms.dpop.stochastic.E_DPOPsolver< V extends Addable< V >, U extends Addable< U > >.buildSolution().
| void frodo2.algorithms.dpop.stochastic.ExpectedUTIL< Val extends Addable< Val >, U extends Addable< U > >.getStatsFromQueue | ( | Queue | queue | ) |
Reimplemented from frodo2.algorithms.dpop.UTILpropagation< Val extends Addable< Val >, U extends Addable< U > >.
References frodo2.algorithms.SolutionCollector< V extends Addable< V >, U extends Addable< U > >.ASSIGNMENTS_MSG_TYPE, and frodo2.algorithms.dpop.UTILpropagation< Val extends Addable< Val >, U extends Addable< U > >.queue.
| U frodo2.algorithms.dpop.stochastic.ExpectedUTIL< Val extends Addable< Val >, U extends Addable< U > >.getWorstUtil | ( | ) |
References worstUtil.
| void frodo2.algorithms.dpop.stochastic.ExpectedUTIL< Val extends Addable< Val >, U extends Addable< U > >.notifyIn | ( | Message | msg | ) |
Reimplemented from frodo2.algorithms.dpop.UTILpropagation< Val extends Addable< Val >, U extends Addable< U > >.
References frodo2.algorithms.SolutionCollector< V extends Addable< V >, U extends Addable< U > >.ASSIGNMENTS_MSG_TYPE, frodo2.solutionSpaces.UtilitySolutionSpace< V extends Addable< V >, U extends Addable< U > >.blindProjectAll(), frodo2.communication.MessageType.equals(), frodo2.algorithms.dpop.UTILmsg< Val extends Addable< Val >, U extends Addable< U > >.getDestination(), frodo2.algorithms.dpop.stochastic.SamplingPhase< V extends Addable< V >, U extends Addable< U > >.RandVarsProjMsg.getRandVars(), frodo2.communication.Message.getType(), frodo2.algorithms.dpop.UTILpropagation< Val extends Addable< Val >, U extends Addable< U > >.OptUtilMessage< U extends Addable< U > >.getUtility(), frodo2.algorithms.dpop.stochastic.SamplingPhase< V extends Addable< V >, U extends Addable< U > >.RandVarsProjMsg.getVariable(), frodo2.algorithms.dpop.UTILpropagation< Val extends Addable< Val >, U extends Addable< U > >.infos, frodo2.algorithms.dpop.UTILpropagation< Val extends Addable< Val >, U extends Addable< U > >.init(), frodo2.solutionSpaces.UtilitySolutionSpace< V extends Addable< V >, U extends Addable< U > >.iterator(), frodo2.solutionSpaces.UtilitySolutionSpace< V extends Addable< V >, U extends Addable< U > >.join(), frodo2.algorithms.dpop.UTILpropagation< Val extends Addable< Val >, U extends Addable< U > >.maximize, frodo2.solutionSpaces.UtilitySolutionSpace< V extends Addable< V >, U extends Addable< U > >.multiply(), frodo2.algorithms.dpop.UTILpropagation< Val extends Addable< Val >, U extends Addable< U > >.ClusterInfo.nbrChildren, frodo2.algorithms.dpop.UTILpropagation< Val extends Addable< Val >, U extends Addable< U > >.ClusterInfo.nbrUTIL, frodo2.algorithms.dpop.UTILpropagation< Val extends Addable< Val >, U extends Addable< U > >.OPT_UTIL_MSG_TYPE, frodo2.algorithms.dpop.UTILpropagation< Val extends Addable< Val >, U extends Addable< U > >.optUtil, frodo2.algorithms.varOrdering.dfs.DFSgeneration< V extends Addable< V >, U extends Addable< U > >.OUTPUT_MSG_TYPE, frodo2.algorithms.dpop.UTILpropagation< Val extends Addable< Val >, U extends Addable< U > >.problem, frodo2.algorithms.dpop.UTILpropagation< Val extends Addable< Val >, U extends Addable< U > >.projectAndSend(), RAND_VARS_PROJ_MSG_TYPE, frodo2.algorithms.dpop.UTILpropagation< Val extends Addable< Val >, U extends Addable< U > >.reportStats, frodo2.solutionSpaces.UtilitySolutionSpace< V extends Addable< V >, U extends Addable< U > >.slice(), sliceSpaces(), solution, frodo2.solutionSpaces.UtilitySolutionSpace< V extends Addable< V >, U extends Addable< U > >.sparseIter(), frodo2.algorithms.dpop.UTILpropagation< Val extends Addable< Val >, U extends Addable< U > >.started, frodo2.algorithms.dpop.UTILpropagation< Val extends Addable< Val >, U extends Addable< U > >.UTIL_MSG_TYPE, and frodo2.algorithms.dpop.UTILpropagation< Val extends Addable< Val >, U extends Addable< U > >.ClusterInfo.vars.

|
protected |
Parses the method to use.
| parameters | the parameters for the module |
Reimplemented in frodo2.algorithms.dpop.stochastic.robust.WorstCaseUTIL< Val extends Addable< Val >, U extends Addable< U > >.
References frodo2.algorithms.dpop.stochastic.ExpectedUTIL< Val extends Addable< Val >, U extends Addable< U > >.Method.CONSENSUS, frodo2.algorithms.dpop.stochastic.ExpectedUTIL< Val extends Addable< Val >, U extends Addable< U > >.Method.CONSENSUS_ALL_SOLS, frodo2.algorithms.dpop.stochastic.ExpectedUTIL< Val extends Addable< Val >, U extends Addable< U > >.Method.EXPECTATION, and frodo2.algorithms.dpop.stochastic.ExpectedUTIL< Val extends Addable< Val >, U extends Addable< U > >.Method.EXPECTATION_MONOTONE.
Referenced by ExpectedUTIL().
|
protected |
Reimplemented from frodo2.algorithms.dpop.UTILpropagation< Val extends Addable< Val >, U extends Addable< U > >.
Reimplemented in frodo2.algorithms.dpop.stochastic.robust.WorstCaseUTIL< Val extends Addable< Val >, U extends Addable< U > >.
References frodo2.solutionSpaces.UtilitySolutionSpace< V extends Addable< V >, U extends Addable< U > >.ProjOutput< V extends Addable< V >, U extends Addable< U > >.assignments, frodo2.solutionSpaces.UtilitySolutionSpace< V extends Addable< V >, U extends Addable< U > >.compose(), frodo2.algorithms.dpop.stochastic.ExpectedUTIL< Val extends Addable< Val >, U extends Addable< U > >.Method.CONSENSUS, frodo2.solutionSpaces.UtilitySolutionSpace< V extends Addable< V >, U extends Addable< U > >.consensus(), frodo2.algorithms.dpop.stochastic.ExpectedUTIL< Val extends Addable< Val >, U extends Addable< U > >.Method.CONSENSUS_ALL_SOLS, frodo2.solutionSpaces.UtilitySolutionSpace< V extends Addable< V >, U extends Addable< U > >.consensusAllSols(), frodo2.solutionSpaces.UtilitySolutionSpace< V extends Addable< V >, U extends Addable< U > >.consensusAllSolsExpect(), frodo2.solutionSpaces.UtilitySolutionSpace< V extends Addable< V >, U extends Addable< U > >.consensusExpect(), frodo2.algorithms.dpop.stochastic.ExpectedUTIL< Val extends Addable< Val >, U extends Addable< U > >.Method.EXPECTATION, frodo2.solutionSpaces.UtilitySolutionSpace< V extends Addable< V >, U extends Addable< U > >.expectation(), frodo2.algorithms.dpop.stochastic.ExpectedUTIL< Val extends Addable< Val >, U extends Addable< U > >.Method.EXPECTATION_MONOTONE, frodo2.algorithms.dpop.UTILpropagation< Val extends Addable< Val >, U extends Addable< U > >.maximize, frodo2.algorithms.dpop.UTILpropagation< Val extends Addable< Val >, U extends Addable< U > >.problem, frodo2.solutionSpaces.UtilitySolutionSpace< V extends Addable< V >, U extends Addable< U > >.project(), and frodo2.solutionSpaces.UtilitySolutionSpace< V extends Addable< V >, U extends Addable< U > >.projExpectMonotone().

| void frodo2.algorithms.dpop.stochastic.ExpectedUTIL< Val extends Addable< Val >, U extends Addable< U > >.reset | ( | ) |
|
protected |
Reimplemented from frodo2.algorithms.dpop.UTILpropagation< Val extends Addable< Val >, U extends Addable< U > >.
Reimplemented in frodo2.algorithms.dpop.stochastic.robust.WorstCaseUTIL< Val extends Addable< Val >, U extends Addable< U > >.
References frodo2.solutionSpaces.UtilitySolutionSpace< V extends Addable< V >, U extends Addable< U > >.expectation(), and frodo2.algorithms.dpop.UTILpropagation< Val extends Addable< Val >, U extends Addable< U > >.problem.

|
protected |
Reimplemented from frodo2.algorithms.dpop.UTILpropagation< Val extends Addable< Val >, U extends Addable< U > >.
References frodo2.algorithms.dpop.UTILpropagation< Val extends Addable< Val >, U extends Addable< U > >.problem, and frodo2.algorithms.dpop.UTILpropagation< Val extends Addable< Val >, U extends Addable< U > >.queue.
|
protected |
Before sending the UTIL message, projects out the relevant random variables.
Reimplemented from frodo2.algorithms.dpop.UTILpropagation< Val extends Addable< Val >, U extends Addable< U > >.
Reimplemented in frodo2.algorithms.dpop.stochastic.robust.WorstCaseUTIL< Val extends Addable< Val >, U extends Addable< U > >.
References frodo2.solutionSpaces.UtilitySolutionSpace< V extends Addable< V >, U extends Addable< U > >.expectation(), and frodo2.algorithms.dpop.UTILpropagation< Val extends Addable< Val >, U extends Addable< U > >.problem.

|
private |
Slices the spaces stored for the input variable according to the sampled domains.
| varInfo | the var info |
References frodo2.solutionSpaces.UtilitySolutionSpace< V extends Addable< V >, U extends Addable< U > >.iterator(), frodo2.algorithms.dpop.UTILpropagation< Val extends Addable< Val >, U extends Addable< U > >.problem, frodo2.solutionSpaces.UtilitySolutionSpace< V extends Addable< V >, U extends Addable< U > >.slice(), and sliceSpaces().
Referenced by notifyIn(), and sliceSpaces().

|
private |
The expected utility.
|
private |
Whether to measure the probability of optimality.
|
protected |
The method to use.
|
private |
The utility 1.
|
private |
The total probability of the scenarios for which the chosen solution is optimal.
|
static |
The type of the messages containing information about the where random variables should be projected out.
Referenced by getMsgTypes(), and notifyIn().
|
protected |
For each variable, the random variables that should be projected out of its UTIL message.
Referenced by frodo2.algorithms.dpop.stochastic.robust.WorstCaseUTIL< Val extends Addable< Val >, U extends Addable< U > >.project(), and frodo2.algorithms.dpop.stochastic.robust.WorstCaseUTIL< Val extends Addable< Val >, U extends Addable< U > >.sendToParent().
|
private |
The number of variables owned by this agents that still have not sent VALUE messages to all their children.
|
private |
For each variable, its optimal value.
Referenced by getSolution(), and notifyIn().
|
private |
The worst-case utility.
Referenced by getWorstUtil().
|
private |
The utility 0.