|
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 | setNewValue (V value) |
| AddableConflicts< U > | calculateCurrentUtility () |
| Given the current agent view, the current utility is calculated. | |
| AddableConflicts< U > | calculateCurrentUtility (String variable) |
| Given the current agent view, the current utility is calculated, ignoring constraints that contain the variable. | |
| AddableConflicts< U > | calculateGain (BinaryAssignment< V > assignment, String variable) |
| Calculate the utility gain of the assignment. | |
| AddableConflicts< U > | calculateGain (V ownValue, V neighborValue, String variable) |
| Calculate the utility gain of the assignment. | |
| AddableConflicts< U > | calculateGain (V ownValue, V neighborValue, int neighborIndex, String variable) |
| Calculate the utility gain of the assignment. | |
| OFFER< V, U > | calculateOffer (int neighborIndex) |
| Creates the offer to be made to the chosen neighbor. | |
| boolean | determinePossibleImprovement () |
| Given the current context (agent_view), this method determines the maximal improvement that can be made. | |
| void | reset () |
| Resets the fields. | |
| String | toString () |
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. | |
| boolean | terminated |
true when this variable has terminated | |
| int | number_of_neighbors |
| The number of neighboring variables. | |
| String[] | neighbors |
| List of neighbors. | |
| V[][] | neighborDomains |
| The domains of not this variable and all the neighbors. | |
| AddableConflicts< U > | infeasibleUtility |
| The utility value used for an infeasible utility. | |
| AddableConflicts< U > | zeroConflicts |
| The utility value used to denote zero with no conflicts. | |
| U | zeroUtility |
| The utility value used to denote zero. | |
| int | okMsgsReceived |
| Counts the number of OK messages received. | |
| List< OK< V > > | okMsgsToProcess |
| List of OK messages to process. | |
| V[] | agent_view |
| The current context. | |
| List< OFFER< V, U > > | offerMsgsToProcess |
| List of OFFER messages to process. | |
| int | improveMsgReceived |
| Counts the number of IMPROVE messages received. | |
| List< IMPROVE< U > > | improveMsgsToProcess |
| List of IMPROVE messages to process. | |
| 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 | |
| AddableConflicts< U > | currentUtility |
| The current utiliyt, give the current context. | |
| AddableConflicts< U > | improve |
| The value with which this variable can improve its utility, given the context. | |
| int | termination_counter |
| Used to determine when to terminate. | |
| Message | goMsgToProcess |
| Stores a GO message when the variable is not yet ready to process it. | |
Private Attributes | |
| List< UtilitySolutionSpace< V, U > > | spaces |
| The variable's local problem. | |
| HashMap< String, Integer > | neighborPointer |
| gives the position of a neighboring variable in the array | |
| int | offersReceived |
| Counts the number of OFFER messages received. | |
| BinaryAssignment< V > | bestOffer |
| The neighbor that made the best offer so far. | |
| String | bestOfferer |
| The best offer received in the current round so far. | |
| HashMap< BinaryAssignment< V >, AddableConflicts< U > > | submittedOffers |
| Maps submitted offer to private gain. | |
| boolean | offer |
When true this variable is offering, otherwise it is receiving. | |
| HashSet< String > | offeringVariables |
| The neighboring variables that have submitted an offer. | |
| boolean | committed |
true if at least one offer has been accepted, false otherwise | |
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.mgm2.MGM2< 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 currentValueIndex, improveMsgsToProcess, infeasibleUtility, maximize, offeringVariables, offerMsgsToProcess, frodo2.algorithms.localSearch.mgm.mgm2.MGM2< V extends Addable< V >, U extends Addable< U > >.StateValue.OK, okMsgsToProcess, frodo2.algorithms.localSearch.mgm.mgm2.MGM2< V extends Addable< V >, U extends Addable< U > >.problem, spaces, submittedOffers, variableID, VariableInfo(), and zeroUtility.
Referenced by VariableInfo().

| AddableConflicts< U > frodo2.algorithms.localSearch.mgm.mgm2.MGM2< V extends Addable< V >, U extends Addable< U > >.VariableInfo< V extends Addable< V >, U extends Addable< U > >.calculateCurrentUtility | ( | ) |
Given the current agent view, the current utility is calculated.
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 calculateGain(), determinePossibleImprovement(), and frodo2.algorithms.localSearch.mgm.mgm2.MGM2< V extends Addable< V >, U extends Addable< U > >.processOK().

| AddableConflicts< U > frodo2.algorithms.localSearch.mgm.mgm2.MGM2< V extends Addable< V >, U extends Addable< U > >.VariableInfo< V extends Addable< V >, U extends Addable< U > >.calculateCurrentUtility | ( | String | variable | ) |
Given the current agent view, the current utility is calculated, ignoring constraints that contain the variable.
| variable | the variable that needs to be ignored |
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.

| AddableConflicts< U > frodo2.algorithms.localSearch.mgm.mgm2.MGM2< V extends Addable< V >, U extends Addable< U > >.VariableInfo< V extends Addable< V >, U extends Addable< U > >.calculateGain | ( | BinaryAssignment< V > | assignment, |
| String | variable ) |
Calculate the utility gain of the assignment.
| assignment | the assignment |
| variable | the offering variable |
References calculateGain(), frodo2.algorithms.localSearch.mgm.mgm2.BinaryAssignment< Val extends Addable< Val > >.getOwnValue(), and frodo2.algorithms.localSearch.mgm.mgm2.BinaryAssignment< Val extends Addable< Val > >.neighborValue.
Referenced by calculateGain(), calculateGain(), calculateOffer(), and frodo2.algorithms.localSearch.mgm.mgm2.MGM2< V extends Addable< V >, U extends Addable< U > >.storeOffer().

| AddableConflicts< U > frodo2.algorithms.localSearch.mgm.mgm2.MGM2< V extends Addable< V >, U extends Addable< U > >.VariableInfo< V extends Addable< V >, U extends Addable< U > >.calculateGain | ( | V | ownValue, |
| V | neighborValue, | ||
| int | neighborIndex, | ||
| String | variable ) |
Calculate the utility gain of the assignment.
| ownValue | the variables own value in the offer |
| neighborValue | the value of the offering variable |
| neighborIndex | the index of the offering variable |
| variable | the offering variable |
References agent_view, calculateCurrentUtility(), currentUtility, currentValue, infeasibleUtility, and frodo2.solutionSpaces.AddableConflicts< U extends Addable< U > >.subtract().

| AddableConflicts< U > frodo2.algorithms.localSearch.mgm.mgm2.MGM2< V extends Addable< V >, U extends Addable< U > >.VariableInfo< V extends Addable< V >, U extends Addable< U > >.calculateGain | ( | V | ownValue, |
| V | neighborValue, | ||
| String | variable ) |
Calculate the utility gain of the assignment.
| ownValue | the variables own value in the offer |
| neighborValue | the value of the offering variable |
| variable | the offering variable |
References calculateGain().

| OFFER< V, U > frodo2.algorithms.localSearch.mgm.mgm2.MGM2< V extends Addable< V >, U extends Addable< U > >.VariableInfo< V extends Addable< V >, U extends Addable< U > >.calculateOffer | ( | int | neighborIndex | ) |
Creates the offer to be made to the chosen neighbor.
| neighborIndex | the index of the chosen neighbor |
References calculateGain(), frodo2.solutionSpaces.AddableConflicts< U extends Addable< U > >.compareTo(), maximize, neighborDomains, neighbors, offer, submittedOffers, and zeroConflicts.
Referenced by frodo2.algorithms.localSearch.mgm.mgm2.MGM2< V extends Addable< V >, U extends Addable< U > >.processOK().

| boolean frodo2.algorithms.localSearch.mgm.mgm2.MGM2< 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.
true when the maximal improvement is positive, and false otherwise References agent_view, calculateCurrentUtility(), currentUtility, currentValue, improve, maximize, neighborDomains, and zeroConflicts.
Referenced by frodo2.algorithms.localSearch.mgm.mgm2.MGM2< V extends Addable< V >, U extends Addable< U > >.processOFFER().

| void frodo2.algorithms.localSearch.mgm.mgm2.MGM2< V extends Addable< V >, U extends Addable< U > >.VariableInfo< V extends Addable< V >, U extends Addable< U > >.reset | ( | ) |
Resets the fields.
References agent_view, frodo2.algorithms.localSearch.mgm.mgm2.MGM2< V extends Addable< V >, U extends Addable< U > >.StateValue.OK, and state.
Referenced by frodo2.algorithms.localSearch.mgm.mgm2.MGM2< V extends Addable< V >, U extends Addable< U > >.processGO(), and frodo2.algorithms.localSearch.mgm.mgm2.MGM2< V extends Addable< V >, U extends Addable< U > >.processIMPROVE().
| void frodo2.algorithms.localSearch.mgm.mgm2.MGM2< 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 frodo2.algorithms.localSearch.mgm.mgm2.MGM2< V extends Addable< V >, U extends Addable< U > >.processOK().
| void frodo2.algorithms.localSearch.mgm.mgm2.MGM2< V extends Addable< V >, U extends Addable< U > >.VariableInfo< V extends Addable< V >, U extends Addable< U > >.setNewValue | ( | V | value | ) |
| value | the new value for the variable |
References newValue.
Referenced by frodo2.algorithms.localSearch.mgm.mgm2.MGM2< V extends Addable< V >, U extends Addable< U > >.processOFFER().
| String frodo2.algorithms.localSearch.mgm.mgm2.MGM2< 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 calculateGain(), determinePossibleImprovement(), reset(), frodo2.algorithms.localSearch.mgm.mgm2.MGM2< V extends Addable< V >, U extends Addable< U > >.sendOK(), setNeighborValue(), and toString().
|
private |
The neighbor that made the best offer so far.
Referenced by frodo2.algorithms.localSearch.mgm.mgm2.MGM2< V extends Addable< V >, U extends Addable< U > >.processOFFER().
|
private |
The best offer received in the current round so far.
Referenced by frodo2.algorithms.localSearch.mgm.mgm2.MGM2< V extends Addable< V >, U extends Addable< U > >.processIMPROVE(), and frodo2.algorithms.localSearch.mgm.mgm2.MGM2< V extends Addable< V >, U extends Addable< U > >.processOFFER().
|
protected |
true when this variable is allowed to change value, and false otherwise
Referenced by frodo2.algorithms.localSearch.mgm.mgm2.MGM2< V extends Addable< V >, U extends Addable< U > >.processIMPROVE(), and frodo2.algorithms.localSearch.mgm.mgm2.MGM2< V extends Addable< V >, U extends Addable< U > >.sendOK().
|
private |
true if at least one offer has been accepted, false otherwise
Referenced by frodo2.algorithms.localSearch.mgm.mgm2.MGM2< V extends Addable< V >, U extends Addable< U > >.processIMPROVE(), and frodo2.algorithms.localSearch.mgm.mgm2.MGM2< V extends Addable< V >, U extends Addable< U > >.processOFFER().
|
protected |
The current utiliyt, give the current context.
Referenced by calculateGain(), and determinePossibleImprovement().
|
protected |
The variable's current value.
Referenced by calculateGain(), determinePossibleImprovement(), frodo2.algorithms.localSearch.mgm.mgm2.MGM2< V extends Addable< V >, U extends Addable< U > >.init(), and frodo2.algorithms.localSearch.mgm.mgm2.MGM2< V extends Addable< V >, U extends Addable< U > >.sendOK().
|
protected |
The index of the current value.
Referenced by frodo2.algorithms.localSearch.mgm.mgm2.MGM2< V extends Addable< V >, U extends Addable< U > >.sendOK(), and VariableInfo().
|
protected |
Stores a GO message when the variable is not yet ready to process it.
Referenced by frodo2.algorithms.localSearch.mgm.mgm2.MGM2< V extends Addable< V >, U extends Addable< U > >.processIMPROVE().
|
protected |
The value with which this variable can improve its utility, given the context.
Referenced by determinePossibleImprovement(), frodo2.algorithms.localSearch.mgm.mgm2.MGM2< V extends Addable< V >, U extends Addable< U > >.processOFFER(), frodo2.algorithms.localSearch.mgm.mgm2.MGM2< V extends Addable< V >, U extends Addable< U > >.storeIMPROVE(), and frodo2.algorithms.localSearch.mgm.mgm2.MGM2< V extends Addable< V >, U extends Addable< U > >.storeOffer().
|
protected |
Counts the number of IMPROVE messages received.
Referenced by frodo2.algorithms.localSearch.mgm.mgm2.MGM2< V extends Addable< V >, U extends Addable< U > >.processIMPROVE(), and frodo2.algorithms.localSearch.mgm.mgm2.MGM2< V extends Addable< V >, U extends Addable< U > >.storeIMPROVE().
|
protected |
List of IMPROVE messages to process.
Referenced by frodo2.algorithms.localSearch.mgm.mgm2.MGM2< V extends Addable< V >, U extends Addable< U > >.processOFFER(), and VariableInfo().
|
protected |
The utility value used for an infeasible utility.
Referenced by calculateGain(), frodo2.algorithms.localSearch.mgm.mgm2.MGM2< V extends Addable< V >, U extends Addable< U > >.storeOffer(), and VariableInfo().
|
protected |
true when maximizing, and false when minimizing
Referenced by calculateOffer(), determinePossibleImprovement(), and VariableInfo().
|
protected |
The domains of not this variable and all the neighbors.
Referenced by calculateOffer(), determinePossibleImprovement(), and frodo2.algorithms.localSearch.mgm.mgm2.MGM2< V extends Addable< V >, U extends Addable< U > >.sendOK().
|
private |
gives the position of a neighboring variable in the array
Referenced by setNeighborValue().
|
protected |
List of neighbors.
Referenced by calculateOffer(), frodo2.algorithms.localSearch.mgm.mgm2.MGM2< V extends Addable< V >, U extends Addable< U > >.init(), frodo2.algorithms.localSearch.mgm.mgm2.MGM2< V extends Addable< V >, U extends Addable< U > >.processOFFER(), frodo2.algorithms.localSearch.mgm.mgm2.MGM2< V extends Addable< V >, U extends Addable< U > >.processOK(), frodo2.algorithms.localSearch.mgm.mgm2.MGM2< 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.mgm2.MGM2< V extends Addable< V >, U extends Addable< U > >.sendOK(), and setNewValue().
|
protected |
The number of neighboring variables.
Referenced by frodo2.algorithms.localSearch.mgm.mgm2.MGM2< V extends Addable< V >, U extends Addable< U > >.processIMPROVE(), frodo2.algorithms.localSearch.mgm.mgm2.MGM2< V extends Addable< V >, U extends Addable< U > >.processOFFER(), and frodo2.algorithms.localSearch.mgm.mgm2.MGM2< V extends Addable< V >, U extends Addable< U > >.processOK().
|
private |
When true this variable is offering, otherwise it is receiving.
Referenced by calculateOffer(), frodo2.algorithms.localSearch.mgm.mgm2.MGM2< V extends Addable< V >, U extends Addable< U > >.processOK(), and frodo2.algorithms.localSearch.mgm.mgm2.MGM2< V extends Addable< V >, U extends Addable< U > >.storeOffer().
|
private |
The neighboring variables that have submitted an offer.
Referenced by frodo2.algorithms.localSearch.mgm.mgm2.MGM2< V extends Addable< V >, U extends Addable< U > >.processOFFER(), frodo2.algorithms.localSearch.mgm.mgm2.MGM2< V extends Addable< V >, U extends Addable< U > >.storeOffer(), and VariableInfo().
|
protected |
List of OFFER messages to process.
Referenced by frodo2.algorithms.localSearch.mgm.mgm2.MGM2< V extends Addable< V >, U extends Addable< U > >.processOK(), and VariableInfo().
|
private |
Counts the number of OFFER messages received.
Referenced by frodo2.algorithms.localSearch.mgm.mgm2.MGM2< V extends Addable< V >, U extends Addable< U > >.processOFFER(), and frodo2.algorithms.localSearch.mgm.mgm2.MGM2< V extends Addable< V >, U extends Addable< U > >.storeOffer().
|
protected |
Counts the number of OK messages received.
Referenced by frodo2.algorithms.localSearch.mgm.mgm2.MGM2< V extends Addable< V >, U extends Addable< U > >.processOK().
|
protected |
|
private |
The variable's local problem.
Referenced by calculateCurrentUtility(), calculateCurrentUtility(), and VariableInfo().
|
protected |
The current state of the variable.
Referenced by frodo2.algorithms.localSearch.mgm.mgm2.MGM2< V extends Addable< V >, U extends Addable< U > >.processGO(), frodo2.algorithms.localSearch.mgm.mgm2.MGM2< V extends Addable< V >, U extends Addable< U > >.processOK(), and reset().
|
private |
Maps submitted offer to private gain.
Referenced by calculateOffer(), and VariableInfo().
|
protected |
true when this variable has terminated
Referenced by frodo2.algorithms.localSearch.mgm.mgm2.MGM2< V extends Addable< V >, U extends Addable< U > >.processIMPROVE(), frodo2.algorithms.localSearch.mgm.mgm2.MGM2< V extends Addable< V >, U extends Addable< U > >.processOFFER(), frodo2.algorithms.localSearch.mgm.mgm2.MGM2< V extends Addable< V >, U extends Addable< U > >.processOK(), and frodo2.algorithms.localSearch.mgm.mgm2.MGM2< V extends Addable< V >, U extends Addable< U > >.storeIMPROVE().
|
protected |
Used to determine when to terminate.
Referenced by frodo2.algorithms.localSearch.mgm.mgm2.MGM2< V extends Addable< V >, U extends Addable< U > >.sendOK().
|
protected |
The name of the variable.
Referenced by frodo2.algorithms.localSearch.mgm.mgm2.MGM2< V extends Addable< V >, U extends Addable< U > >.init(), frodo2.algorithms.localSearch.mgm.mgm2.MGM2< V extends Addable< V >, U extends Addable< U > >.processOFFER(), frodo2.algorithms.localSearch.mgm.mgm2.MGM2< V extends Addable< V >, U extends Addable< U > >.processOK(), frodo2.algorithms.localSearch.mgm.mgm2.MGM2< V extends Addable< V >, U extends Addable< U > >.sendOK(), frodo2.algorithms.localSearch.mgm.mgm2.MGM2< V extends Addable< V >, U extends Addable< U > >.storeIMPROVE(), frodo2.algorithms.localSearch.mgm.mgm2.MGM2< V extends Addable< V >, U extends Addable< U > >.storeOffer(), and VariableInfo().
|
protected |
The utility value used to denote zero with no conflicts.
Referenced by calculateOffer(), determinePossibleImprovement(), and frodo2.algorithms.localSearch.mgm.mgm2.MGM2< V extends Addable< V >, U extends Addable< U > >.processOFFER().
|
protected |
The utility value used to denote zero.
Referenced by calculateCurrentUtility(), calculateCurrentUtility(), and VariableInfo().