FRODO Version 2.19.1
An open-source framework for Distributed Constraint Optimization (DCOP)
Loading...
Searching...
No Matches
frodo2.algorithms.mpc_discsp.SolShareMsg Class Reference

A message containing shares of optimal values for some variables. More...

Inheritance diagram for frodo2.algorithms.mpc_discsp.SolShareMsg:

Public Member Functions

 SolShareMsg ()
 Empty constructor used for externalization.
 SolShareMsg (int sender, HashMap< String, BigInteger > shares, boolean step)
 Constructor.
void writeExternal (ObjectOutput out) throws IOException
void readExternal (ObjectInput in) throws IOException, ClassNotFoundException
int getSender ()
HashMap< String, BigInteger > getShares ()
boolean step ()
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.

Static Public Attributes

static final MessageType SOL_SHARE_MSG_TYPE = new MessageType ("MPC", "SolutionShare")
 The type of the messages containing shares of optimal values for some variables.

Private Attributes

int sender
 The ID of the sender agent.
HashMap< String, BigInteger > shares
 For each variable, a share of its optimal value.
boolean step
 The step this message belongs to.

Additional Inherited Members

Protected Attributes inherited from frodo2.communication.Message
MessageType type
 The type of this message.

Detailed Description

A message containing shares of optimal values for some variables.

Author
Thomas Leaute

Constructor & Destructor Documentation

◆ SolShareMsg() [1/2]

frodo2.algorithms.mpc_discsp.SolShareMsg.SolShareMsg ( )

Empty constructor used for externalization.

References SOL_SHARE_MSG_TYPE.

◆ SolShareMsg() [2/2]

frodo2.algorithms.mpc_discsp.SolShareMsg.SolShareMsg ( int sender,
HashMap< String, BigInteger > shares,
boolean step )

Constructor.

Parameters
senderThe ID of the sender agent
sharesFor each variable, a share of its optimal value
stepThe step this message belongs to

References sender, shares, SOL_SHARE_MSG_TYPE, and step.

Member Function Documentation

◆ getSender()

int frodo2.algorithms.mpc_discsp.SolShareMsg.getSender ( )
Returns
The ID of the sender agent

References sender.

Referenced by frodo2.algorithms.mpc_discsp.MPC_DisCSP4< V extends Addable< V > >.notifyIn().

◆ getShares()

HashMap< String, BigInteger > frodo2.algorithms.mpc_discsp.SolShareMsg.getShares ( )
Returns
For each variable, a share of its optimal value

References shares.

Referenced by frodo2.algorithms.mpc_discsp.MPC_DisCSP4< V extends Addable< V > >.notifyIn().

◆ readExternal()

void frodo2.algorithms.mpc_discsp.SolShareMsg.readExternal ( ObjectInput in) throws IOException, ClassNotFoundException
See also
java.io.Externalizable#readExternal(java.io.ObjectInput)

Reimplemented from frodo2.communication.Message.

◆ step()

boolean frodo2.algorithms.mpc_discsp.SolShareMsg.step ( )
Returns
The step this message belongs to

◆ toString()

String frodo2.algorithms.mpc_discsp.SolShareMsg.toString ( )
See also
Message.toString()

Reimplemented from frodo2.communication.Message.

◆ writeExternal()

void frodo2.algorithms.mpc_discsp.SolShareMsg.writeExternal ( ObjectOutput out) throws IOException
See also
java.io.Externalizable#writeExternal(java.io.ObjectOutput)

Reimplemented from frodo2.communication.Message.

Member Data Documentation

◆ sender

int frodo2.algorithms.mpc_discsp.SolShareMsg.sender
private

The ID of the sender agent.

Referenced by getSender(), and SolShareMsg().

◆ shares

HashMap<String, BigInteger> frodo2.algorithms.mpc_discsp.SolShareMsg.shares
private

For each variable, a share of its optimal value.

Referenced by getShares(), and SolShareMsg().

◆ SOL_SHARE_MSG_TYPE

final MessageType frodo2.algorithms.mpc_discsp.SolShareMsg.SOL_SHARE_MSG_TYPE = new MessageType ("MPC", "SolutionShare")
static

◆ step

boolean frodo2.algorithms.mpc_discsp.SolShareMsg.step
private

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