|
FRODO Version 2.19.1
An open-source framework for Distributed Constraint Optimization (DCOP)
|
The version of the SamplingPhase that samples at the lcas. More...

Public Member Functions | |
| AtLCAs () | |
| Nullary constructor. | |
| AtLCAs (Element parameters, DCOPProblemInterface< V, U > problem) | |
| Constructor in statistics gatherer mode. | |
| AtLCAs (DCOPProblemInterface< V, U > problem, Element parameters) | |
| Constructor. | |
| void | notifyIn (Message msg) |
| Public Member Functions inherited from frodo2.algorithms.dpop.stochastic.SamplingPhase< V, U > | |
| void | reset () |
| Collection< MessageType > | getMsgTypes () |
| void | notifyIn (Message msg) |
| void | getStatsFromQueue (Queue queue) |
| void | setSilent (boolean silent) |
| String | dfsToString () |
Protected Member Functions | |
| AtLCAs (Element parameters, DCOPProblemInterface< V, U > problem, boolean parseProj) | |
| Constructor in statistics gatherer mode. | |
| void | init () |
| Map< V, Double > | combineSamples (Map< V, Double > samples1, Map< V, Double > samples2) |
| Merges two sample sets and then reduces the result. | |
| LCAmsg1 | newPhase1msg (String node, NodeInfo nodeInfo) |
| void | proposeSamples (String var, NodeInfo nodeInfo) |
| Sample all random variables linked to the current variable, and add them to the proposed samples for this variable. | |
| void | terminatePhase2 (String node, NodeInfo nodeInfo, Set< String > pendingFlags) |
| void | terminatePhase2 (String node, NodeInfo nodeInfo, Set< String > pendingFlags, HashMap< String, Map< V, Double > > samplesFromParent) |
| Sends messages to children and the output message. | |
| void | sendOutput (String node, NodeInfo nodeInfo) |
| Protected Member Functions inherited from frodo2.algorithms.dpop.stochastic.SamplingPhase< V, U > | |
| SamplingPhase () | |
| Nullary constructor. | |
| void | init () |
| Parses the problem. | |
Protected Attributes | |
| Collection< String > | allRandVars |
| The random variables in the problem. | |
| WhereToProject | whereToProject = WhereToProject.LCAS |
| Where random variables are being projected out. | |
| HashMap< String, HashMap< String, Map< V, Double > > > | samples = new HashMap< String, HashMap< String, Map<V, Double> > > () |
| For each decision variable, for each random variable, a set of proposed sample values. | |
| HashMap< String, Map< V, Double > > | finalSamples = new HashMap< String, Map<V, Double> > () |
| For each random variable, the final set of samples chosen. | |
| Protected Attributes inherited from frodo2.algorithms.dpop.stochastic.SamplingPhase< V, U > | |
| DCOPProblemInterface< V, U > | problem |
| The problem. | |
| boolean | started |
| Whether the execution of the algorithm has started. | |
| int | nbrSamples |
| The number of samples for each random variable. | |
| HashMap< String, UtilitySolutionSpace< V, U > > | probLaws |
| For each random variable, its non-sampled probability law. | |
| boolean | reportStats |
| Whether to report stats. | |
| WhereToProject | proj |
| Where the random variables should be projected out. | |
Private Member Functions | |
| void | chooseSamples (String var, NodeInfo nodeInfo) |
| Combines the proposed samples for each random variable for which the input variable is the lca. | |
| Map< V, Double > | downSample (Map< V, Double > samples) |
| Down-samples the input sample set to make it have the proper size. | |
Additional Inherited Members | |
| Static Public Attributes inherited from frodo2.algorithms.dpop.stochastic.SamplingPhase< V, U > | |
| static MessageType | START_MSG_TYPE |
| The type of the start message. | |
| static final MessageType | RAND_VARS_PROJ_MSG_TYPE |
| The type of the messages telling what random variables should be projected out at given decision variable. | |
The version of the SamplingPhase that samples at the lcas.
| <V> | the type used for variable values |
| <U> | the type used for utility values |
| frodo2.algorithms.dpop.stochastic.SamplingPhase< V extends Addable< V >, U extends Addable< U > >.AtLCAs< V extends Addable< V >, U extends Addable< U > >.AtLCAs | ( | ) |
Nullary constructor.
| frodo2.algorithms.dpop.stochastic.SamplingPhase< V extends Addable< V >, U extends Addable< U > >.AtLCAs< V extends Addable< V >, U extends Addable< U > >.AtLCAs | ( | Element | parameters, |
| DCOPProblemInterface< V, U > | problem ) |
Constructor in statistics gatherer mode.
| problem | the overall problem |
| parameters | the parameters |
References frodo2.algorithms.dpop.stochastic.SamplingPhase< V, U >.problem.
|
protected |
Constructor in statistics gatherer mode.
| problem | the overall problem |
| parameters | the parameters |
| parseProj | whether to parse where random variables should be projected out |
References frodo2.algorithms.dpop.stochastic.SamplingPhase< V, U >.problem, and frodo2.algorithms.dpop.stochastic.SamplingPhase< V extends Addable< V >, U extends Addable< U > >.WhereToProject.ROOTS.
| frodo2.algorithms.dpop.stochastic.SamplingPhase< V extends Addable< V >, U extends Addable< U > >.AtLCAs< V extends Addable< V >, U extends Addable< U > >.AtLCAs | ( | DCOPProblemInterface< V, U > | problem, |
| Element | parameters ) |
Constructor.
| problem | the problem |
| parameters | the parameters |
References frodo2.algorithms.dpop.stochastic.SamplingPhase< V, U >.problem, and frodo2.algorithms.dpop.stochastic.SamplingPhase< V extends Addable< V >, U extends Addable< U > >.WhereToProject.ROOTS.
|
private |
Combines the proposed samples for each random variable for which the input variable is the lca.
| var | the current variable |
| nodeInfo | information about the current variable |
References downSample(), finalSamples, and frodo2.algorithms.dpop.stochastic.LowestCommonAncestors.NodeInfo.lcas.
Referenced by sendOutput(), and terminatePhase2().

|
protected |
Merges two sample sets and then reduces the result.
| samples1 | first sample set |
| samples2 | second sample set |
Referenced by proposeSamples().
|
private |
Down-samples the input sample set to make it have the proper size.
| samples | proposed samples |
References samples.
Referenced by chooseSamples().
|
protected |
References frodo2.algorithms.dpop.stochastic.SamplingPhase< V, U >.problem.
|
protected |
References frodo2.algorithms.dpop.stochastic.LowestCommonAncestors.NodeInfo.allFlags, frodo2.algorithms.dpop.stochastic.LowestCommonAncestors.NodeInfo.parent, and proposeSamples().

| void frodo2.algorithms.dpop.stochastic.SamplingPhase< V extends Addable< V >, U extends Addable< U > >.AtLCAs< V extends Addable< V >, U extends Addable< U > >.notifyIn | ( | Message | msg | ) |
References frodo2.communication.MessageType.equals(), notifyIn(), and frodo2.algorithms.dpop.stochastic.LowestCommonAncestors.PHASE1_MSG_TYPE.
Referenced by notifyIn().

|
protected |
Sample all random variables linked to the current variable, and add them to the proposed samples for this variable.
| var | the current variable |
| nodeInfo | information about the current variable |
References combineSamples(), frodo2.algorithms.dpop.stochastic.LowestCommonAncestors.NodeInfo.myFlags, and frodo2.solutionSpaces.UtilitySolutionSpace< V extends Addable< V >, U extends Addable< U > >.sample().
Referenced by newPhase1msg(), sendOutput(), and terminatePhase2().

|
protected |
References chooseSamples(), finalSamples, frodo2.algorithms.dpop.stochastic.LowestCommonAncestors.NodeInfo.lcas, frodo2.algorithms.dpop.stochastic.SamplingPhase< V extends Addable< V >, U extends Addable< U > >.WhereToProject.LEAVES, frodo2.algorithms.dpop.stochastic.LowestCommonAncestors.NodeInfo.myFlags, frodo2.algorithms.dpop.stochastic.SamplingPhase< V, U >.problem, proposeSamples(), frodo2.algorithms.dpop.stochastic.LowestCommonAncestors.queue, and frodo2.algorithms.AgentInterface< V extends Addable< V > >.STATS_MONITOR.

|
protected |
References terminatePhase2().
Referenced by terminatePhase2(), and terminatePhase2().

|
protected |
Sends messages to children and the output message.
| node | the current node |
| nodeInfo | information about the current node |
| pendingFlags | a set of flags whose lca has not yet been computed |
| samplesFromParent | the samples received from the parent |
References chooseSamples(), finalSamples, frodo2.algorithms.dpop.stochastic.SamplingPhase< V extends Addable< V >, U extends Addable< U > >.WhereToProject.LEAVES, frodo2.algorithms.dpop.stochastic.LowestCommonAncestors.owners, frodo2.algorithms.dpop.stochastic.SamplingPhase< V, U >.problem, proposeSamples(), frodo2.algorithms.dpop.stochastic.LowestCommonAncestors.queue, samples, frodo2.algorithms.AgentInterface< V extends Addable< V > >.STATS_MONITOR, and terminatePhase2().

|
protected |
The random variables in the problem.
|
protected |
For each random variable, the final set of samples chosen.
Referenced by chooseSamples(), sendOutput(), and terminatePhase2().
|
protected |
For each decision variable, for each random variable, a set of proposed sample values.
Referenced by downSample(), and terminatePhase2().
|
protected |
Where random variables are being projected out.