FRODO Version 2.19.1
An open-source framework for Distributed Constraint Optimization (DCOP)
Loading...
Searching...
No Matches
frodo2.controller.userIO.DistributedSolver< V extends Addable< V >, U extends Addable< U >, S extends Solution< V, U > Class Template Reference

An interface to the Controller (and a wrapper thereof) that is based on a solver. More...

Inheritance diagram for frodo2.controller.userIO.DistributedSolver< V extends Addable< V >, U extends Addable< U >, S extends Solution< V, U >:

Classes

class  FakeFactory
 A fake agent factory. More...

Public Member Functions

 DistributedSolver (AbstractSolver< DCOPProblemInterface< V, U >, V, U, S > solver)
 Constructor.
solve (String pathToXCSP)
 Solves the input problem.
void tellUser (String message)
boolean askUserYesNo (String message)
void stopRunning ()
void showUserDaemonList (HashMap< String, AgentAddress > daemons)
void showUserAgentList (HashMap< String, AgentAddress > agents)
Public Member Functions inherited from frodo2.controller.userIO.UserIO
 UserIO (Controller control)
 A basic constructor.
void start ()
Collection< MessageTypegetMsgTypes ()
void setQueue (Queue queue)
void notifyIn (Message msg)
 The user interface responds to message of the type USER_NOTIFICATION_MSG, that contain message to be displayed to the user.
void load (String filename)
 Used to load a new configuration file.
void startExperiment ()
 Used to start the experiments.
void setDebug (boolean b)
 Used to stop the experiments.
void setLogging (boolean b)
 Tell the controller whether we want to log everything or not.
void getDaemonList ()
 Ask the white pages for a list of all daemons that are registered.
void getAgentList ()
 Ask the white pages for a list of all agents that are registered.
void exit ()
 Stop the experiment, clean everything up and exit the program.
Public Member Functions inherited from frodo2.communication.IncomingMsgPolicyInterface< T >
default void notifyIn (Message msg, Object toAgent)
 Notifies the listener of an incoming message.

Private Member Functions

void createTempFiles (String pathToXCSP)
 Creates the temporary agent description and configuration files.

Private Attributes

final Object lock = new Object ()
 A lock used to block until the experiment finishes.
AbstractSolver< DCOPProblemInterface< V, U >, V, U, S > solver
 The underlying solver.
File agentDesc
 The temporary agent file.
File config
 The temporary configuration file.

Additional Inherited Members

Static Public Attributes inherited from frodo2.controller.userIO.UserIO
static final MessageType CONFIGURATION_MSG = MessageType.SYSTEM.newChild("UserIO", "Configure")
 The message type used to convey the configuration file.
static final MessageType USER_NOTIFICATION_MSG = MessageType.SYSTEM.newChild("UserIO", "User-Notification")
 The message type used to send messages to the user.
static final MessageType START_MSG = MessageType.SYSTEM.newChild("UserIO", "StartE")
 The message the user sends to start the experiment.
static final MessageType DEAMON_LIST_REQUEST = MessageType.SYSTEM.newChild("UserIO", "Daemon list requested")
 Message send to request a list of daemons from the white pages.
static final MessageType AGENTS_LIST_REQUEST = MessageType.SYSTEM.newChild("UserIO", "Agent list requested")
 Message send to request a list of agents from the white pages.
Protected Member Functions inherited from frodo2.controller.userIO.UserIO
 UserIO ()
 Default constructor.
Protected Attributes inherited from frodo2.controller.userIO.UserIO
Queue controlQueue
 The queue of the controller.
Controller control
 The controller.

Detailed Description

An interface to the Controller (and a wrapper thereof) that is based on a solver.

Author
Thomas Leaute
Parameters
<V>type used for variable values
<U>type used for utility values
<S>type used for the solution

Constructor & Destructor Documentation

◆ DistributedSolver()

Member Function Documentation

◆ askUserYesNo()

boolean frodo2.controller.userIO.DistributedSolver< V extends Addable< V >, U extends Addable< U >, S extends Solution< V, U >.askUserYesNo ( String message)
See also
UserIO.askUserYesNo(java.lang.String)
Todo
Auto-generated method stub

Reimplemented from frodo2.controller.userIO.UserIO.

◆ createTempFiles()

void frodo2.controller.userIO.DistributedSolver< V extends Addable< V >, U extends Addable< U >, S extends Solution< V, U >.createTempFiles ( String pathToXCSP)
private

Creates the temporary agent description and configuration files.

Parameters
pathToXCSPthe path to the problem file

References frodo2.algorithms.AbstractSolver< P extends ProblemInterface< V, U, V extends Addable< V >, U extends Addable< U >, S extends Solution< V, U >.getAgentDesc().

Referenced by solve().

Here is the call graph for this function:

◆ showUserAgentList()

void frodo2.controller.userIO.DistributedSolver< V extends Addable< V >, U extends Addable< U >, S extends Solution< V, U >.showUserAgentList ( HashMap< String, AgentAddress > agents)
See also
UserIO.showUserAgentList(java.util.HashMap)
Todo
Auto-generated method stub

Reimplemented from frodo2.controller.userIO.UserIO.

◆ showUserDaemonList()

void frodo2.controller.userIO.DistributedSolver< V extends Addable< V >, U extends Addable< U >, S extends Solution< V, U >.showUserDaemonList ( HashMap< String, AgentAddress > daemons)
See also
UserIO.showUserDaemonList(java.util.HashMap)
Todo
Auto-generated method stub

Reimplemented from frodo2.controller.userIO.UserIO.

◆ solve()

◆ stopRunning()

void frodo2.controller.userIO.DistributedSolver< V extends Addable< V >, U extends Addable< U >, S extends Solution< V, U >.stopRunning ( )
See also
UserIO.stopRunning()
Todo
Auto-generated method stub

Reimplemented from frodo2.controller.userIO.UserIO.

◆ tellUser()

void frodo2.controller.userIO.DistributedSolver< V extends Addable< V >, U extends Addable< U >, S extends Solution< V, U >.tellUser ( String message)
See also
UserIO.tellUser(java.lang.String)

Reimplemented from frodo2.controller.userIO.UserIO.

References frodo2.controller.ConfigurationManager.END_TEXT.

Member Data Documentation

◆ agentDesc

File frodo2.controller.userIO.DistributedSolver< V extends Addable< V >, U extends Addable< U >, S extends Solution< V, U >.agentDesc
private

The temporary agent file.

◆ config

File frodo2.controller.userIO.DistributedSolver< V extends Addable< V >, U extends Addable< U >, S extends Solution< V, U >.config
private

The temporary configuration file.

◆ lock

final Object frodo2.controller.userIO.DistributedSolver< V extends Addable< V >, U extends Addable< U >, S extends Solution< V, U >.lock = new Object ()
private

A lock used to block until the experiment finishes.

◆ solver

AbstractSolver<DCOPProblemInterface<V, U>, V, U, S> frodo2.controller.userIO.DistributedSolver< V extends Addable< V >, U extends Addable< U >, S extends Solution< V, U >.solver
private

The underlying solver.

Referenced by DistributedSolver().


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