FRODO Version 2.19.1
An open-source framework for Distributed Constraint Optimization (DCOP)
Loading...
Searching...
No Matches
frodo2.gui.Visualizer Class Referenceabstract

An interface for visualizing agents, variables, constraints, and message exchanges. More...

Inheritance diagram for frodo2.gui.Visualizer:

Classes

enum  MsgVisualization
 Whether and how long to display a message type. More...

Public Member Functions

abstract boolean setCompiled (boolean compiled)
 Configures the compilation mode.
abstract void render (DCOPProblemInterface<?, ?> problem)
 Renders the input problem instance.
final void showOutgoingAgentMessage (Object fromAgent, Message msg, Object toAgent)
 Visualizes an outgoing message.
final void showIncomingAgentMessage (Message msg, Object toAgent)
 Visualizes an incoming message.

Static Public Member Functions

static long getDisplayTime ()
static MsgVisualization getMsgViz (MessageType msgType)
 Looks up the visualization strategy for a given message type.
static void setMsgViz (MessageType msgType, MsgVisualization viz)
 Sets the visualization strategy for a given message type.

Protected Member Functions

 Visualizer ()
 Constructor.
abstract void showOutgoingAgentMessage (Object fromAgent, Message msg, Object toAgent, MsgVisualization viz)
 Visualizes an outgoing message.
abstract void showIncomingAgentMessage (Message msg, Object toAgent, MsgVisualization viz)
 Visualizes an incoming message.
final void wait (MsgVisualization viz)
 Waits until the specified condition.

Static Private Attributes

static VisualizerControls controls
 The GUI to control how much time each message is displayed.
static long displayTime = 25
 How long each message should be displayed, in ms.
static MsgVisualization defaultViz = MsgVisualization.STEPPED
 The default message visualization strategy.
static final ConcurrentHashMap< MessageType, MsgVisualizationmsgViz = new ConcurrentHashMap<MessageType, MsgVisualization> ()
 For each message type, how long to display messages.

Detailed Description

An interface for visualizing agents, variables, constraints, and message exchanges.

Author
Thomas Leaute
Todo

Make it possible to switch between primal constraint graph, bi-partite function graph, and dual decision graph

Make it possible to switch between decomposition, clustering (nodes owned by common agent close together), and compilation

Make it possible to switch between pair-wise graph and hypergraph (= function graph with hidden nodes?)

Make it possible to display messages exchanged between nodes

Render the construction of the variable ordering

Display outbound UTIL message computation progress bars for DPOP

Constructor & Destructor Documentation

◆ Visualizer()

frodo2.gui.Visualizer.Visualizer ( )
protected

Constructor.

References controls.

Referenced by getMsgViz().

Member Function Documentation

◆ getDisplayTime()

long frodo2.gui.Visualizer.getDisplayTime ( )
static
Todo
Make it settable in the GUI in a thread-safe fashion
Returns
how long each message should be displayed, in ms

References displayTime.

Referenced by frodo2.gui.VisualizerControls.MsgTypeSetting.MsgTypeSetting(), and wait().

◆ getMsgViz()

MsgVisualization frodo2.gui.Visualizer.getMsgViz ( MessageType msgType)
static

Looks up the visualization strategy for a given message type.

Parameters
msgTypethe message type
Returns
how long to display each message of the input message type
Todo
Notify the visualizer controls so that it can highlight the current message type

References controls, defaultViz, getMsgViz(), frodo2.communication.MessageType.getParent(), msgViz, frodo2.gui.Visualizer.MsgVisualization.STEPPED, and Visualizer().

Referenced by getMsgViz(), frodo2.gui.VisualizerControls.MsgTypeSetting.MsgTypeSetting(), showIncomingAgentMessage(), and showOutgoingAgentMessage().

Here is the call graph for this function:

◆ render()

abstract void frodo2.gui.Visualizer.render ( DCOPProblemInterface<?, ?> problem)
abstract

Renders the input problem instance.

Parameters
problemthe problem instance

Reimplemented in frodo2.gui.ConsoleVisualizer, and frodo2.gui.jung.JungVisualizer.

Referenced by frodo2.algorithms.test.MessageDebugger.createVisualizer().

◆ setCompiled()

abstract boolean frodo2.gui.Visualizer.setCompiled ( boolean compiled)
abstract

Configures the compilation mode.

Parameters
compiledwhether or not the graph should be compiled
Returns
the previous value of the setting

Reimplemented in frodo2.gui.ConsoleVisualizer, and frodo2.gui.jung.JungVisualizer.

Referenced by frodo2.algorithms.test.MessageDebugger.createVisualizer().

◆ setMsgViz()

void frodo2.gui.Visualizer.setMsgViz ( MessageType msgType,
MsgVisualization viz )
static

Sets the visualization strategy for a given message type.

Parameters
msgTypethe message type
vizhow long to display each message of the input type

References msgViz.

Referenced by frodo2.gui.VisualizerControls.MsgTypeSetting.stateChanged().

◆ showIncomingAgentMessage() [1/2]

final void frodo2.gui.Visualizer.showIncomingAgentMessage ( Message msg,
Object toAgent )

Visualizes an incoming message.

Parameters
msgthe message
toAgentID of the destination agent

References getMsgViz(), frodo2.communication.Message.getType(), frodo2.gui.Visualizer.MsgVisualization.NONE, and showIncomingAgentMessage().

Referenced by frodo2.algorithms.test.MessageDebugger.notifyIn(), and showIncomingAgentMessage().

Here is the call graph for this function:

◆ showIncomingAgentMessage() [2/2]

abstract void frodo2.gui.Visualizer.showIncomingAgentMessage ( Message msg,
Object toAgent,
MsgVisualization viz )
abstractprotected

Visualizes an incoming message.

Parameters
msgthe message
toAgentID of the destination agent
vizthe visualization strategy

Reimplemented in frodo2.gui.ConsoleVisualizer, and frodo2.gui.jung.JungVisualizer.

◆ showOutgoingAgentMessage() [1/2]

final void frodo2.gui.Visualizer.showOutgoingAgentMessage ( Object fromAgent,
Message msg,
Object toAgent )

Visualizes an outgoing message.

Parameters
fromAgentID of the source agent
msgthe message
toAgentID of the destination agent

References getMsgViz(), frodo2.communication.Message.getType(), frodo2.gui.Visualizer.MsgVisualization.NONE, and showOutgoingAgentMessage().

Referenced by frodo2.algorithms.test.MessageDebugger.notifyOut(), and showOutgoingAgentMessage().

Here is the call graph for this function:

◆ showOutgoingAgentMessage() [2/2]

abstract void frodo2.gui.Visualizer.showOutgoingAgentMessage ( Object fromAgent,
Message msg,
Object toAgent,
MsgVisualization viz )
abstractprotected

Visualizes an outgoing message.

Parameters
fromAgentID of the source agent
msgthe message
toAgentID of the destination agent
vizthe visualization strategy

Reimplemented in frodo2.gui.ConsoleVisualizer, and frodo2.gui.jung.JungVisualizer.

◆ wait()

final void frodo2.gui.Visualizer.wait ( MsgVisualization viz)
protected

Waits until the specified condition.

Parameters
vizthe visualization strategy

References controls, and getDisplayTime().

Referenced by frodo2.gui.jung.JungVisualizer.showIncomingAgentMessage(), and frodo2.gui.jung.JungVisualizer.showOutgoingAgentMessage().

Here is the call graph for this function:

Member Data Documentation

◆ controls

VisualizerControls frodo2.gui.Visualizer.controls
staticprivate

The GUI to control how much time each message is displayed.

Referenced by getMsgViz(), Visualizer(), and wait().

◆ defaultViz

MsgVisualization frodo2.gui.Visualizer.defaultViz = MsgVisualization.STEPPED
staticprivate

The default message visualization strategy.

Referenced by getMsgViz().

◆ displayTime

long frodo2.gui.Visualizer.displayTime = 25
staticprivate

How long each message should be displayed, in ms.

Referenced by getDisplayTime().

◆ msgViz

final ConcurrentHashMap<MessageType, MsgVisualization> frodo2.gui.Visualizer.msgViz = new ConcurrentHashMap<MessageType, MsgVisualization> ()
staticprivate

For each message type, how long to display messages.

Referenced by getMsgViz(), and setMsgViz().


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