|
FRODO Version 2.19.1
An open-source framework for Distributed Constraint Optimization (DCOP)
|
Convenience class that contains all necessary information on a single variable. More...
Public Member Functions | |
| VariableInfo (String variableID, DCOPProblemInterface< V, U > problem, List<? extends UtilitySolutionSpace< V, U > > spaces, boolean maximize) | |
| Constructor. | |
| void | setNeighborValue (String neighbor, V value) |
| Stores the value reported by a neighbor. | |
| void | calculateCurrentUtility () |
| Given the current agent view, calculate the current utility. | |
| void | determinePossibleImprovement () |
| Given the current context (agent_view), this method determines the maximal improvement that can be made. | |
| boolean | processOK (OK< V > msg) |
| Method to process an OK message. | |
| boolean | processStoredIMPROVEMessages () |
| Process already received IMPROVE messages. | |
| boolean | processIMPROVE (IMPROVE< U > msg) |
| Method to process an IMPROVE message. | |
| boolean | processStoredOKMessages () |
| Process already received OK messages. | |
| void | reset () |
| reset the agent view | |
| String | toString () |
Protected Member Functions | |
| AddableConflicts< U > | calculateUtility () |
| Given the current context and variable assignment, this method calculates the utility for the local problem. | |
Protected Attributes | |
| String | variableID |
| The name of the variable. | |
| final boolean | maximize |
true when maximizing, and false when minimizing | |
| StateValue | state |
| The current state of the variable. | |
| V[] | domain |
| The domain of the variable. | |
| List< UtilitySolutionSpace< V, U > > | spaces |
| The variable's local problem. | |
| V | currentValue |
| The variable's current value. | |
| int | currentValueIndex |
| The index of the current value. | |
| int | newValue |
| The possible new value of this variable, given the context. | |
| boolean | can_move |
true when this variable is allowed to change value, and false otherwise | |
| int | counter |
| Counts the number of received messages. | |
| int | number_of_neighbors |
| The number of neighboring variables. | |
| AddableConflicts< U > | currentUtility |
| The current utility, give the current context. | |
| AddableConflicts< U > | improve |
| The value with which this variable can improve its utility, given the context. | |
| AddableConflicts< U > | infeasibleUtility |
| The utility value used for an infeasible utility. | |
| AddableConflicts< U > | zeroConflicts |
| The utility value used to denote zero with zero conflicts. | |
| U | zeroUtility |
| The utility value used to denote zero. | |
| HashMap< String, Integer > | neighborPointer |
| gives the position of a neighboring variable in the array | |
| String[] | neighbors |
| List of neighbors. | |
| V[] | agent_view |
| The current context. | |
| int | termination_counter |
| Used to determine when to terminate. | |
| List< OK< V > > | okMsgsToProcess |
| List of OK messages to process. | |
| List< IMPROVE< U > > | improveMsgsToProcess |
| List of IMPROVE messages to process. | |
| boolean | terminated |
true when this variable has terminated | |
Convenience class that contains all necessary information on a single variable.
| <V> | type used for domain values |
| <U> | type used for utility values |
| frodo2.algorithms.localSearch.mgm.MGM< V extends Addable< V >, U extends Addable< U > >.VariableInfo< V extends Addable< V >, U extends Addable< U > >.VariableInfo | ( | String | variableID, |
| DCOPProblemInterface< V, U > | problem, | ||
| List<? extends UtilitySolutionSpace< V, U > > | spaces, | ||
| boolean | maximize ) |
Constructor.
| variableID | the ID of the variable |
| problem | the local problem definition |
| spaces | list of all spaces owned by the agent |
| maximize | true when the problem is a maximization problem, and false otherwise |
References domain, improveMsgsToProcess, maximize, okMsgsToProcess, frodo2.algorithms.localSearch.mgm.MGM< V extends Addable< V >, U extends Addable< U > >.problem, spaces, variableID, and VariableInfo().
Referenced by VariableInfo().

| void frodo2.algorithms.localSearch.mgm.MGM< V extends Addable< V >, U extends Addable< U > >.VariableInfo< V extends Addable< V >, U extends Addable< U > >.calculateCurrentUtility | ( | ) |
Given the current agent view, calculate the current utility.
References frodo2.solutionSpaces.AddableDelayed< T extends Addable< T > >.addDelayed(), currentUtility, frodo2.solutionSpaces.AddableConflicts< U extends Addable< U > >.getUtility(), frodo2.solutionSpaces.AddableDelayed< T extends Addable< T > >.resolve(), spaces, and zeroUtility.
Referenced by processOK().

|
protected |
Given the current context and variable assignment, this method calculates the utility for the local problem.
References frodo2.solutionSpaces.AddableDelayed< T extends Addable< T > >.addDelayed(), frodo2.solutionSpaces.AddableConflicts< U extends Addable< U > >.getUtility(), frodo2.solutionSpaces.AddableDelayed< T extends Addable< T > >.resolve(), spaces, and zeroUtility.
Referenced by determinePossibleImprovement().

| void frodo2.algorithms.localSearch.mgm.MGM< V extends Addable< V >, U extends Addable< U > >.VariableInfo< V extends Addable< V >, U extends Addable< U > >.determinePossibleImprovement | ( | ) |
Given the current context (agent_view), this method determines the maximal improvement that can be made.
References agent_view, calculateUtility(), can_move, currentUtility, domain, improve, maximize, and zeroConflicts.
Referenced by frodo2.algorithms.localSearch.mgm.MGM< V extends Addable< V >, U extends Addable< U > >.sendIMPROVE().

| boolean frodo2.algorithms.localSearch.mgm.MGM< V extends Addable< V >, U extends Addable< U > >.VariableInfo< V extends Addable< V >, U extends Addable< U > >.processIMPROVE | ( | IMPROVE< U > | msg | ) |
Method to process an IMPROVE message.
| msg | the message to be processed |
true when the message needs to be stored for later processing, and false otherwise References can_move, frodo2.solutionSpaces.AddableConflicts< U extends Addable< U > >.compareTo(), counter, frodo2.algorithms.localSearch.mgm.IMPROVE< U extends Addable< U > >.getImprove(), frodo2.algorithms.localSearch.mgm.IMPROVE< U extends Addable< U > >.getSender(), frodo2.algorithms.localSearch.mgm.MGM< V extends Addable< V >, U extends Addable< U > >.StateValue.IMPROVE, improve, maximize, number_of_neighbors, frodo2.algorithms.localSearch.mgm.MGM< V extends Addable< V >, U extends Addable< U > >.StateValue.OK, state, terminated, and variableID.
Referenced by processStoredIMPROVEMessages().

| boolean frodo2.algorithms.localSearch.mgm.MGM< V extends Addable< V >, U extends Addable< U > >.VariableInfo< V extends Addable< V >, U extends Addable< U > >.processOK | ( | OK< V > | msg | ) |
Method to process an OK message.
| msg | the message to be processed |
true when the message needs to be stored for later processing, and false otherwise References calculateCurrentUtility(), counter, frodo2.algorithms.localSearch.mgm.OK< V extends Addable< V > >.getSender(), frodo2.algorithms.localSearch.mgm.OK< V extends Addable< V > >.getValue(), frodo2.algorithms.localSearch.mgm.MGM< V extends Addable< V >, U extends Addable< U > >.StateValue.IMPROVE, number_of_neighbors, frodo2.algorithms.localSearch.mgm.MGM< V extends Addable< V >, U extends Addable< U > >.StateValue.OK, setNeighborValue(), state, and terminated.
Referenced by processStoredOKMessages().

| boolean frodo2.algorithms.localSearch.mgm.MGM< V extends Addable< V >, U extends Addable< U > >.VariableInfo< V extends Addable< V >, U extends Addable< U > >.processStoredIMPROVEMessages | ( | ) |
Process already received IMPROVE messages.
true when switched to OK state References improveMsgsToProcess, and processIMPROVE().

| boolean frodo2.algorithms.localSearch.mgm.MGM< V extends Addable< V >, U extends Addable< U > >.VariableInfo< V extends Addable< V >, U extends Addable< U > >.processStoredOKMessages | ( | ) |
Process already received OK messages.
true when switched to IMPROVE state References okMsgsToProcess, and processOK().

| void frodo2.algorithms.localSearch.mgm.MGM< V extends Addable< V >, U extends Addable< U > >.VariableInfo< V extends Addable< V >, U extends Addable< U > >.reset | ( | ) |
reset the agent view
References agent_view, and currentValue.
| void frodo2.algorithms.localSearch.mgm.MGM< V extends Addable< V >, U extends Addable< U > >.VariableInfo< V extends Addable< V >, U extends Addable< U > >.setNeighborValue | ( | String | neighbor, |
| V | value ) |
Stores the value reported by a neighbor.
| neighbor | the neighbor that reported the value |
| value | the reported value |
References agent_view, and neighborPointer.
Referenced by processOK().
| String frodo2.algorithms.localSearch.mgm.MGM< V extends Addable< V >, U extends Addable< U > >.VariableInfo< V extends Addable< V >, U extends Addable< U > >.toString | ( | ) |
References agent_view, and neighbors.
|
protected |
The current context.
Referenced by determinePossibleImprovement(), reset(), frodo2.algorithms.localSearch.mgm.MGM< V extends Addable< V >, U extends Addable< U > >.sendOK(), setNeighborValue(), and toString().
|
protected |
true when this variable is allowed to change value, and false otherwise
Referenced by determinePossibleImprovement(), processIMPROVE(), and frodo2.algorithms.localSearch.mgm.MGM< V extends Addable< V >, U extends Addable< U > >.sendOK().
|
protected |
Counts the number of received messages.
Referenced by processIMPROVE(), and processOK().
|
protected |
The current utility, give the current context.
Referenced by calculateCurrentUtility(), and determinePossibleImprovement().
|
protected |
The variable's current value.
Referenced by frodo2.algorithms.localSearch.mgm.MGM< V extends Addable< V >, U extends Addable< U > >.init(), reset(), and frodo2.algorithms.localSearch.mgm.MGM< V extends Addable< V >, U extends Addable< U > >.sendOK().
|
protected |
The index of the current value.
|
protected |
The domain of the variable.
Referenced by determinePossibleImprovement(), frodo2.algorithms.localSearch.mgm.MGM< V extends Addable< V >, U extends Addable< U > >.sendOK(), and VariableInfo().
|
protected |
The value with which this variable can improve its utility, given the context.
Referenced by determinePossibleImprovement(), processIMPROVE(), and frodo2.algorithms.localSearch.mgm.MGM< V extends Addable< V >, U extends Addable< U > >.sendIMPROVE().
|
protected |
List of IMPROVE messages to process.
Referenced by processStoredIMPROVEMessages(), and VariableInfo().
|
protected |
The utility value used for an infeasible utility.
|
protected |
true when maximizing, and false when minimizing
Referenced by determinePossibleImprovement(), processIMPROVE(), and VariableInfo().
|
protected |
gives the position of a neighboring variable in the array
Referenced by setNeighborValue().
|
protected |
List of neighbors.
Referenced by frodo2.algorithms.localSearch.mgm.MGM< V extends Addable< V >, U extends Addable< U > >.init(), frodo2.algorithms.localSearch.mgm.MGM< V extends Addable< V >, U extends Addable< U > >.sendIMPROVE(), frodo2.algorithms.localSearch.mgm.MGM< V extends Addable< V >, U extends Addable< U > >.sendOK(), and toString().
|
protected |
The possible new value of this variable, given the context.
Referenced by frodo2.algorithms.localSearch.mgm.MGM< V extends Addable< V >, U extends Addable< U > >.sendOK().
|
protected |
The number of neighboring variables.
Referenced by processIMPROVE(), and processOK().
|
protected |
List of OK messages to process.
Referenced by processStoredOKMessages(), and VariableInfo().
|
protected |
The variable's local problem.
Referenced by calculateCurrentUtility(), calculateUtility(), and VariableInfo().
|
protected |
The current state of the variable.
Referenced by processIMPROVE(), and processOK().
|
protected |
true when this variable has terminated
Referenced by processIMPROVE(), and processOK().
|
protected |
Used to determine when to terminate.
Referenced by frodo2.algorithms.localSearch.mgm.MGM< V extends Addable< V >, U extends Addable< U > >.sendOK().
|
protected |
The name of the variable.
Referenced by frodo2.algorithms.localSearch.mgm.MGM< V extends Addable< V >, U extends Addable< U > >.init(), processIMPROVE(), frodo2.algorithms.localSearch.mgm.MGM< V extends Addable< V >, U extends Addable< U > >.sendIMPROVE(), frodo2.algorithms.localSearch.mgm.MGM< V extends Addable< V >, U extends Addable< U > >.sendOK(), and VariableInfo().
|
protected |
The utility value used to denote zero with zero conflicts.
Referenced by determinePossibleImprovement().
|
protected |
The utility value used to denote zero.
Referenced by calculateCurrentUtility(), and calculateUtility().