FRODO Version 2.19.1
An open-source framework for Distributed Constraint Optimization (DCOP)
Loading...
Searching...
No Matches
frodo2.algorithms.afb.SolutionMsg< V extends Addable< V >, U extends Addable< U > > Class Template Reference

A message containing the optimal solution found so far. More...

Inheritance diagram for frodo2.algorithms.afb.SolutionMsg< V extends Addable< V >, U extends Addable< U > >:

Public Member Functions

 SolutionMsg ()
 Empty constructor used for externalization.
 SolutionMsg (MessageType type, Comparable<?> componentID, V[][] solution, U cost)
 Constructor.
void writeExternal (ObjectOutput out) throws IOException
void readExternal (ObjectInput in) throws IOException, ClassNotFoundException
Comparable<?> getCompID ()
V[][] getSolution ()
getCost ()
String toString ()
Public Member Functions inherited from frodo2.communication.Message
 Message (MessageType type)
 Constructor.
 Message ()
 Empty constructor.
MessageType getType ()
void fakeSerialize ()
 Pretends to serialize the message.

Protected Attributes

Comparable<?> componentID
 ID of the component in the constraint graph.
V[][] solution
 The chosen assignments to variables.
cost
 The optimal cost.
Protected Attributes inherited from frodo2.communication.Message
MessageType type
 The type of this message.

Detailed Description

A message containing the optimal solution found so far.

Parameters
<V>the type used for variable values
<U>the type used for utility values
Author
Alexandra Olteanu, Thomas Leaute

Constructor & Destructor Documentation

◆ SolutionMsg() [1/2]

frodo2.algorithms.afb.SolutionMsg< V extends Addable< V >, U extends Addable< U > >.SolutionMsg ( )

Empty constructor used for externalization.

◆ SolutionMsg() [2/2]

frodo2.algorithms.afb.SolutionMsg< V extends Addable< V >, U extends Addable< U > >.SolutionMsg ( MessageType type,
Comparable<?> componentID,
V solution[][],
U cost )

Constructor.

Parameters
typethe type of this message
componentIDThe ID of the component in the constraint graph
solutionthe chosen assignments to variables
costthe optimal cost

References componentID, cost, solution, and frodo2.communication.Message.type.

Member Function Documentation

◆ getCompID()

Comparable<?> frodo2.algorithms.afb.SolutionMsg< V extends Addable< V >, U extends Addable< U > >.getCompID ( )
Returns
the ID of the component in the constraint graph

Referenced by frodo2.algorithms.afb.AFB< V extends Addable< V >, U extends Addable< U > >.processLinearOrdering().

◆ getCost()

U frodo2.algorithms.afb.SolutionMsg< V extends Addable< V >, U extends Addable< U > >.getCost ( )
Returns
the optimal cost

Referenced by toString().

◆ getSolution()

V[][] frodo2.algorithms.afb.SolutionMsg< V extends Addable< V >, U extends Addable< U > >.getSolution ( )
Returns
optimal assignments

Referenced by toString().

◆ readExternal()

void frodo2.algorithms.afb.SolutionMsg< V extends Addable< V >, U extends Addable< U > >.readExternal ( ObjectInput in) throws IOException, ClassNotFoundException
See also
java.io.Externalizable#readExternal(java.io.ObjectInput)

Reimplemented from frodo2.communication.Message.

References readExternal().

Referenced by readExternal().

Here is the call graph for this function:

◆ toString()

String frodo2.algorithms.afb.SolutionMsg< V extends Addable< V >, U extends Addable< U > >.toString ( )
See also
Message.toString()

Reimplemented from frodo2.communication.Message.

References getCost(), and getSolution().

Here is the call graph for this function:

◆ writeExternal()

void frodo2.algorithms.afb.SolutionMsg< V extends Addable< V >, U extends Addable< U > >.writeExternal ( ObjectOutput out) throws IOException
See also
java.io.Externalizable#writeExternal(java.io.ObjectOutput)

Reimplemented from frodo2.communication.Message.

Member Data Documentation

◆ componentID

Comparable<?> frodo2.algorithms.afb.SolutionMsg< V extends Addable< V >, U extends Addable< U > >.componentID
protected

ID of the component in the constraint graph.

Referenced by SolutionMsg().

◆ cost

U frodo2.algorithms.afb.SolutionMsg< V extends Addable< V >, U extends Addable< U > >.cost
protected

The optimal cost.

Referenced by SolutionMsg().

◆ solution

V [][] frodo2.algorithms.afb.SolutionMsg< V extends Addable< V >, U extends Addable< U > >.solution
protected

The chosen assignments to variables.

Referenced by SolutionMsg().


The documentation for this class was generated from the following file: