|
FRODO Version 2.19.1
An open-source framework for Distributed Constraint Optimization (DCOP)
|
This module is a preprocessing module that normalizes all utilities to between 0 and 1. More...

Public Member Functions | |
| Normalize (DCOPProblemInterface< V, AddableReal > problem, Element parameters) | |
| Constructor. | |
| Normalize (DCOPProblemInterface< V, AddableReal > problem, Element parameters, boolean reportSpaces) | |
| Constructor used for debugging. | |
| void | notifyIn (Message msg) |
| void | setQueue (Queue queue) |
| Collection< MessageType > | getMsgTypes () |
| void | getStatsFromQueue (Queue queue) |
| void | setSilent (boolean silent) |
| void | reset () |
| 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 final MessageType | BOUND_MSG_TYPE = new MessageType ("DUCT", "Normalize", "bounding") |
| Type of the message used for bound detection. | |
| static final MessageType | NORM_MSG_TYPE = new MessageType ("DUCT", "Normalize", "normalizing") |
| Type of the message used for normalization. | |
| static final MessageType | OUT_MSG_TYPE = new MessageType ("DUCT", "Normalize", "output") |
| Type of the output message of this module. | |
| static final MessageType | STATS_MSG_TYPE = new MessageType ("DUCT", "Normalize", "stats") |
| Type of the statistics message. | |
Protected Member Functions | |
| void | normalize (String var, int index, AddableReal divide, ArrayList< UtilitySolutionSpace< V, AddableReal > > spaces) |
| Method to perform the normalization of the spaces owned by a variable. | |
| void | init () |
| Initialization function, called when the first message is received. | |
Protected Attributes | |
| DCOPProblemInterface< V, AddableReal > | problem |
| The local problem. | |
| Map< String, String > | owners |
| Maps variables to the agents that own them. | |
| boolean | started |
true when the init() method has been called, and false otherwise | |
| Queue | queue |
| The queue. | |
| HashMap< String, Integer > | variablePointer |
| Maps variable names to positions in an array. | |
| int[] | numberOfMessagesToReceive |
| For each variable, the number of children + 1 (the DFS message). | |
| int[] | numberOfMessagesReceived |
| For each variable, the number of messages received. | |
| int[] | numberOfSpaces |
| For each variable the number of spaces it owns. | |
| String[] | parents |
| For each variable, the parent. | |
| List< String >[] | children |
| For each variable the children in the DFS tree. | |
| HashMap< String, AddableReal > | lowerBounds |
| For each variable, the lower bound is stored here. | |
| HashMap< String, AddableReal > | upperBounds |
| For each variable, the upper bound is stored here. | |
| HashMap< String, Long > | sizes |
| The domain size of each variable. | |
| HashMap< String, Set< String > > | separators |
| For each variable, its separator. | |
| HashMap< String, ArrayList< UtilitySolutionSpace< V, AddableReal > > > | spaces |
| For each variable, the spaces that it owns. | |
| HashMap< String, ArrayList< AddableReal > > | minLists |
| For each space the minimal value. | |
| final boolean | reportSpaces |
| When true, the spaces are reported, and false otherwise. | |
| AddableReal | infeasibleUtil |
| The value of an infeasibleUtility. | |
| AddableReal | divide |
| The scaling factor. | |
| AddableReal | penalty |
| The penalty used to replace an infeasible value. | |
| boolean | reportStats = true |
| Whether to report stats. | |
This module is a preprocessing module that normalizes all utilities to between 0 and 1.
It first does bound detection via a bottom up inference procedure, after which a top-down normalization is performed
| <V> | type used for domain values |
| frodo2.algorithms.duct.Normalize< V extends Addable< V > >.Normalize | ( | DCOPProblemInterface< V, AddableReal > | problem, |
| Element | parameters ) |
Constructor.
| problem | the local problem of the agent |
| parameters | the parameters of the module |
References frodo2.solutionSpaces.AddableReal.fromString(), penalty, problem, and reportSpaces.

| frodo2.algorithms.duct.Normalize< V extends Addable< V > >.Normalize | ( | DCOPProblemInterface< V, AddableReal > | problem, |
| Element | parameters, | ||
| boolean | reportSpaces ) |
Constructor used for debugging.
| problem | the local problem of the agent |
| parameters | the parameters of the module |
| reportSpaces | true when the spaces should be reported to the statsreporter, and false otherwise |
References problem, and reportSpaces.
| Collection< MessageType > frodo2.algorithms.duct.Normalize< V extends Addable< V > >.getMsgTypes | ( | ) |
Implements frodo2.communication.MessageListener< T >.
References frodo2.algorithms.AgentInterface< V extends Addable< V > >.AGENT_FINISHED, BOUND_MSG_TYPE, NORM_MSG_TYPE, frodo2.algorithms.varOrdering.dfs.DFSgeneration< V extends Addable< V >, U extends Addable< U > >.OUTPUT_MSG_TYPE, and frodo2.algorithms.AgentInterface< V extends Addable< V > >.START_AGENT.
| void frodo2.algorithms.duct.Normalize< V extends Addable< V > >.getStatsFromQueue | ( | Queue | queue | ) |
Implements frodo2.algorithms.StatsReporter.
References queue.
|
protected |
Initialization function, called when the first message is received.
References children, init(), lowerBounds, minLists, numberOfMessagesReceived, numberOfMessagesToReceive, numberOfSpaces, owners, parents, problem, separators, sizes, spaces, started, upperBounds, and variablePointer.
Referenced by init(), and notifyIn().

|
protected |
Method to perform the normalization of the spaces owned by a variable.
| var | the variable who's spaces should be normalized |
| index | the index of the variable |
| divide | the scaling |
| spaces | the spaces owned by var |
References children, divide, frodo2.solutionSpaces.AddableReal.flipSign(), minLists, owners, penalty, queue, and spaces.
Referenced by notifyIn().

| void frodo2.algorithms.duct.Normalize< V extends Addable< V > >.notifyIn | ( | Message | msg | ) |
Implements frodo2.communication.IncomingMsgPolicyInterface< T >.
References frodo2.solutionSpaces.AddableReal.add(), BOUND_MSG_TYPE, children, divide, frodo2.communication.MessageType.equals(), frodo2.solutionSpaces.AddableReal.equals(), frodo2.algorithms.varOrdering.dfs.DFSgeneration< V extends Addable< V >, U extends Addable< U > >.DFSview< V extends Addable< V >, U extends Addable< U > >.getAllPseudoChildren(), frodo2.algorithms.varOrdering.dfs.DFSgeneration< V extends Addable< V >, U extends Addable< U > >.DFSview< V extends Addable< V >, U extends Addable< U > >.getChildren(), frodo2.algorithms.duct.BOUNDmsg.getCounter(), frodo2.algorithms.duct.NORMmsg.getDivide(), frodo2.algorithms.duct.BOUNDmsg.getLowerBound(), frodo2.algorithms.varOrdering.dfs.DFSgeneration< V extends Addable< V >, U extends Addable< U > >.DFSview< V extends Addable< V >, U extends Addable< U > >.getParent(), frodo2.algorithms.varOrdering.dfs.DFSgeneration< V extends Addable< V >, U extends Addable< U > >.DFSview< V extends Addable< V >, U extends Addable< U > >.getPseudoParents(), frodo2.algorithms.duct.BOUNDmsg.getReceiver(), frodo2.algorithms.duct.NORMmsg.getReceiver(), frodo2.algorithms.duct.BOUNDmsg.getSeperator(), frodo2.algorithms.duct.BOUNDmsg.getSize(), frodo2.solutionSpaces.DCOPProblemInterface< V extends Addable< V >, U extends Addable< U > >.getSolutionSpaces(), frodo2.communication.Message.getType(), frodo2.algorithms.duct.BOUNDmsg.getUpperBound(), init(), lowerBounds, frodo2.solutionSpaces.AddableReal.max(), minLists, NORM_MSG_TYPE, normalize(), numberOfMessagesReceived, numberOfMessagesToReceive, numberOfSpaces, frodo2.algorithms.varOrdering.dfs.DFSgeneration< V extends Addable< V >, U extends Addable< U > >.OUTPUT_MSG_TYPE, owners, parents, penalty, problem, queue, separators, sizes, spaces, started, frodo2.algorithms.AgentInterface< V extends Addable< V > >.STATS_MONITOR, STATS_MSG_TYPE, frodo2.solutionSpaces.AddableReal.subtract(), upperBounds, and variablePointer.

| void frodo2.algorithms.duct.Normalize< V extends Addable< V > >.reset | ( | ) |
Implements frodo2.algorithms.StatsReporter.
| void frodo2.algorithms.duct.Normalize< V extends Addable< V > >.setQueue | ( | Queue | queue | ) |
Implements frodo2.communication.MessageListener< T >.
References queue.
| void frodo2.algorithms.duct.Normalize< V extends Addable< V > >.setSilent | ( | boolean | silent | ) |
Implements frodo2.algorithms.StatsReporter.
|
static |
Type of the message used for bound detection.
Referenced by getMsgTypes(), and notifyIn().
|
protected |
For each variable the children in the DFS tree.
Referenced by init(), normalize(), and notifyIn().
|
protected |
The scaling factor.
Referenced by normalize(), and notifyIn().
|
protected |
The value of an infeasibleUtility.
|
protected |
For each variable, the lower bound is stored here.
Referenced by init(), and notifyIn().
|
protected |
For each space the minimal value.
Referenced by init(), normalize(), and notifyIn().
|
static |
Type of the message used for normalization.
Referenced by getMsgTypes(), frodo2.algorithms.duct.NORMmsg.NORMmsg(), and notifyIn().
|
protected |
For each variable, the number of messages received.
Referenced by init(), and notifyIn().
|
protected |
For each variable, the number of children + 1 (the DFS message).
Referenced by init(), and notifyIn().
|
protected |
For each variable the number of spaces it owns.
Referenced by init(), and notifyIn().
|
static |
Type of the output message of this module.
Referenced by frodo2.algorithms.duct.Sampling< V extends Addable< V > >.getMsgTypes(), frodo2.algorithms.duct.tests.NormalizeInfTest.getMsgTypes(), frodo2.algorithms.duct.tests.NormalizeTest.getMsgTypes(), frodo2.algorithms.duct.Sampling< V extends Addable< V > >.notifyIn(), frodo2.algorithms.duct.SamplingChild< V extends Addable< V > >.notifyIn(), frodo2.algorithms.duct.SamplingChildSearch< V extends Addable< V > >.notifyIn(), frodo2.algorithms.duct.SamplingPruning< V extends Addable< V > >.notifyIn(), frodo2.algorithms.duct.SamplingPruningSearch< V extends Addable< V > >.notifyIn(), frodo2.algorithms.duct.tests.NormalizeInfTest.notifyIn(), frodo2.algorithms.duct.tests.NormalizeTest.notifyIn(), and frodo2.algorithms.duct.OUTmsg< V extends Addable< V > >.OUTmsg().
|
protected |
Maps variables to the agents that own them.
Referenced by init(), normalize(), and notifyIn().
|
protected |
For each variable, the parent.
Referenced by init(), and notifyIn().
|
protected |
The penalty used to replace an infeasible value.
Referenced by Normalize(), normalize(), and notifyIn().
|
protected |
The local problem.
Referenced by init(), Normalize(), Normalize(), and notifyIn().
|
protected |
The queue.
Referenced by getStatsFromQueue(), normalize(), notifyIn(), and setQueue().
|
protected |
When true, the spaces are reported, and false otherwise.
Referenced by Normalize(), and Normalize().
|
protected |
Whether to report stats.
|
protected |
For each variable, its separator.
Referenced by init(), and notifyIn().
|
protected |
The domain size of each variable.
Referenced by init(), and notifyIn().
|
protected |
For each variable, the spaces that it owns.
Referenced by init(), normalize(), and notifyIn().
|
protected |
true when the init() method has been called, and false otherwise
Referenced by init(), and notifyIn().
|
static |
Type of the statistics message.
Referenced by notifyIn().
|
protected |
For each variable, the upper bound is stored here.
Referenced by init(), and notifyIn().
|
protected |
Maps variable names to positions in an array.
Referenced by init(), and notifyIn().