|
FRODO Version 2.19.1
An open-source framework for Distributed Constraint Optimization (DCOP)
|
An abstract convenient class for solving DCOP instances. More...

Public Member Functions | |
| AbstractDCOPsolver (String agentDesc, boolean measureTime, boolean useTCP, boolean measureMsgs, Class<? extends XCSPparser< V, U > > parserClass, Class< V > domClass, Class< U > valuationClass) | |
| Constructor. | |
| S | solve (Document problem, int nbrElectionRounds, boolean measureMsgs, Long timeout, boolean cleanAfterwards) |
| S | solve (DCOPProblemInterface< V, U > problem, int nbrElectionRounds, boolean measureMsgs, Long timeout, boolean cleanAfterwards) |
| S | solve (Document problem) |
| S | solve (DCOPProblemInterface< V, U > problem) |
| S | solve (Document problem, Long timeout) |
| S | solve (DCOPProblemInterface< V, U > problem, Long timeout) |
| S | solve (Document problem, boolean cleanAfterwards) |
| S | solve (DCOPProblemInterface< V, U > problem, boolean cleanAfterwards) |
| S | solve (Document problem, int nbrElectionRounds) |
| S | solve (DCOPProblemInterface< V, U > problem, int nbrElectionRounds) |
| S | solve (Document problem, int nbrElectionRounds, boolean measureMsgs) |
| S | solve (DCOPProblemInterface< V, U > problem, int nbrElectionRounds, boolean measureMsgs) |
| S | solve (Document problem, int nbrElectionRounds, boolean measureMsgs, Long timeout) |
| S | solve (DCOPProblemInterface< V, U > problem, int nbrElectionRounds, boolean measureMsgs, Long timeout) |
| S | solve (Document problem, int nbrElectionRounds, Long timeout) |
| S | solve (DCOPProblemInterface< V, U > problem, int nbrElectionRounds, Long timeout) |
| S | solve (Document problem, boolean cleanAfterwards, Long timeout) |
| S | solve (DCOPProblemInterface< V, U > problem, boolean cleanAfterwards, Long timeout) throws OutOfMemoryError |
| Public Member Functions inherited from frodo2.algorithms.AbstractSolver< DCOPProblemInterface< V, U >, V, U, S > | |
| void | setProblem (P problem) |
| Sets the problem. | |
| void | setFactory (AgentFactory< V, U > factory) |
| Sets the agent factory. | |
| void | setDomClass (Class< V > domClass) |
| Sets the class for variable values. | |
| void | setUtilClass (Class< U > utilClass) |
| Sets the class for utility values. | |
| Document | getAgentDesc () |
| abstract List<? extends StatsReporter > | getSolGatherers () |
| abstract S | buildSolution () |
| S | solve (Document problem) |
| Solves the input problem. | |
| String | plotStats (Solution< V, U > sol) |
| Puts the statistics in a format that can easily be processed after the experiments. | |
| String | plotDummyStats (boolean maximize) |
| Used when the solver was not able to solve the problem. | |
Static Public Member Functions | |
| static void | main (String[] args) throws Exception |
| Solves a problem and writes statistics to a file. | |
Protected Member Functions | |
| String | getFileHeader (Document problemFile) |
| Returns the header for the output CSV file. | |
| String | getParamsHeader () |
| String | getParamsToLine () |
| String | getProbStats (Document problemFile, String probFilename) |
| Parses the statistics about the problem instance. | |
| String | getTimeoutLine (String algoName, Document problemFile, String probFilename) |
| Returns a timeout line for the output CSV file. | |
| AbstractDCOPsolver () | |
| Dummy constructor. | |
| AbstractDCOPsolver (String agentDescFile) | |
| Constructor from an agent configuration file. | |
| AbstractDCOPsolver (String agentDescFile, boolean useTCP) | |
| Constructor from an agent configuration file. | |
| AbstractDCOPsolver (String agentDescFile, boolean useTCP, int shift) | |
| Constructor from an agent configuration file. | |
| AbstractDCOPsolver (Document agentDesc) | |
| Constructor. | |
| void | parseParams (String[] params) |
| Parses solver parameters. | |
| AbstractDCOPsolver (Document agentDesc, boolean useTCP) | |
| Constructor. | |
| AbstractDCOPsolver (Document agentDesc, Class< ? extends XCSPparser< V, U > > parserClass) | |
| Constructor. | |
| AbstractDCOPsolver (Document agentDesc, Class< ? extends XCSPparser< V, U > > parserClass, boolean useTCP) | |
| Constructor. | |
| void | setNbrElectionRounds (int nbrElectionRounds) |
| Sets the number of rounds of VariableElection. | |
| void | setProblemRescalerShift (int shift) |
| Sets the shift parameter of the ProblemRescaler module (if used). | |
| void | overrideMsgTypes () |
| Overrides message types if necessary. | |
| Protected Member Functions inherited from frodo2.algorithms.AbstractSolver< DCOPProblemInterface< V, U >, V, U, S > | |
| AbstractSolver () | |
| Dummy constructor. | |
| void | clear () |
| Clears the parser. | |
Additional Inherited Members | |
| Protected Attributes inherited from frodo2.algorithms.AbstractSolver< DCOPProblemInterface< V, U >, V, U, S > | |
| Document | agentDesc |
| Description of the agent to be used. | |
| AgentFactory< V, U > | factory |
| The agent factory. | |
| Class< ? extends XCSPparser< V, U > > | parserClass |
| The class of the parser to be used. | |
| List<? extends StatsReporter > | solGatherers |
| The list of modules that record statistics about problem solving. | |
| P | problem |
| The problem. | |
| final boolean | useTCP |
| Whether to use TCP pipes or shared memory pipes. | |
An abstract convenient class for solving DCOP instances.
| <V> | type used for variable values |
| <U> | type used for utility values |
| <S> | type used for the solution |
|
protected |
Dummy constructor.
Referenced by main().
|
protected |
Constructor from an agent configuration file.
| agentDescFile | the agent configuration file |
|
protected |
Constructor from an agent configuration file.
| agentDescFile | the agent configuration file |
| useTCP | Whether to use TCP pipes or shared memory pipes |
References frodo2.algorithms.AbstractSolver< DCOPProblemInterface< V, U >, V, U, S >.useTCP.
|
protected |
Constructor from an agent configuration file.
| agentDescFile | the agent configuration file |
| useTCP | Whether to use TCP pipes or shared memory pipes |
| shift | The shift parameter for the ProblemRescaler (if used) |
References setProblemRescalerShift(), and frodo2.algorithms.AbstractSolver< DCOPProblemInterface< V, U >, V, U, S >.useTCP.

|
protected |
Constructor.
| agentDesc | a JDOM Document for the agent description |
References frodo2.algorithms.AbstractSolver< DCOPProblemInterface< V, U >, V, U, S >.agentDesc.
| frodo2.algorithms.AbstractDCOPsolver< V extends Addable< V >, U extends Addable< U >, S extends Solution< V, U >.AbstractDCOPsolver | ( | String | agentDesc, |
| boolean | measureTime, | ||
| boolean | useTCP, | ||
| boolean | measureMsgs, | ||
| Class<? extends XCSPparser< V, U > > | parserClass, | ||
| Class< V > | domClass, | ||
| Class< U > | valuationClass ) |
Constructor.
| agentDesc | the path to the agent description file |
| measureTime | whether to measure simulated time |
| useTCP | whether to use TCP pipes instead of shared memory (if true, disables the simulated time metric) |
| measureMsgs | whether to measure messages |
| parserClass | The class of the parser to be used |
| domClass | the class of variable assignments |
| valuationClass | the class of valuations |
References frodo2.algorithms.AbstractSolver< DCOPProblemInterface< V, U >, V, U, S >.agentDesc, frodo2.algorithms.AbstractSolver< DCOPProblemInterface< V, U >, V, U, S >.parserClass, and frodo2.algorithms.AbstractSolver< DCOPProblemInterface< V, U >, V, U, S >.useTCP.
|
protected |
Constructor.
| agentDesc | a JDOM Document for the agent description |
| useTCP | Whether to use TCP pipes or shared memory pipes |
References frodo2.algorithms.AbstractSolver< DCOPProblemInterface< V, U >, V, U, S >.agentDesc, and frodo2.algorithms.AbstractSolver< DCOPProblemInterface< V, U >, V, U, S >.useTCP.
|
protected |
Constructor.
| agentDesc | The agent description |
| parserClass | The class of the parser to be used |
References frodo2.algorithms.AbstractSolver< DCOPProblemInterface< V, U >, V, U, S >.agentDesc, and frodo2.algorithms.AbstractSolver< DCOPProblemInterface< V, U >, V, U, S >.parserClass.
|
protected |
Constructor.
| agentDesc | The agent description |
| parserClass | The class of the parser to be used |
| useTCP | Whether to use TCP pipes or shared memory pipes |
References frodo2.algorithms.AbstractSolver< DCOPProblemInterface< V, U >, V, U, S >.agentDesc, frodo2.algorithms.AbstractSolver< DCOPProblemInterface< V, U >, V, U, S >.parserClass, and frodo2.algorithms.AbstractSolver< DCOPProblemInterface< V, U >, V, U, S >.useTCP.
|
protected |
Returns the header for the output CSV file.
| problemFile | the problem file |
References getParamsHeader().
Referenced by main().

|
protected |
Reimplemented in frodo2.algorithms.localSearch.dsa.DSAsolver< V extends Addable< V >, U extends Addable< U > >, and frodo2.algorithms.localSearch.mgm.MGMsolver< V extends Addable< V >, U extends Addable< U > >.
Referenced by getFileHeader().
|
protected |
Reimplemented in frodo2.algorithms.localSearch.dsa.DSAsolver< V extends Addable< V >, U extends Addable< U > >, and frodo2.algorithms.localSearch.mgm.MGMsolver< V extends Addable< V >, U extends Addable< U > >.
Referenced by main().
|
protected |
Parses the statistics about the problem instance.
| problemFile | the problem instance |
| probFilename | the filename of the problem instance |
Referenced by getTimeoutLine(), and main().
|
protected |
Returns a timeout line for the output CSV file.
| algoName | the name of the algorithm |
| problemFile | the problem instance |
| probFilename | the filename of the problem instance |
References getProbStats().
Referenced by main().

|
static |
Solves a problem and writes statistics to a file.
| args | [algoName, problemFile, outputFile, timeout in seconds, solverClassName, agentConfigFile, agentParam1, agentParam2...] |
| Exception | if an error occurs |
References AbstractDCOPsolver(), getFileHeader(), getParamsToLine(), getProbStats(), getTimeoutLine(), frodo2.algorithms.XCSPparser< V extends Addable< V >, U extends Addable< U > >.parse(), parseParams(), solve(), frodo2.timeout, and frodo2.algorithms.Solution< V, U >.toLineString().

|
protected |
Overrides message types if necessary.
References frodo2.algorithms.AbstractSolver< DCOPProblemInterface< V, U >, V, U, S >.agentDesc, frodo2.communication.MessageType.fromXML(), overrideMsgTypes(), and frodo2.algorithms.SingleQueueAgent< Val extends Addable< Val > >.setMsgType().
Referenced by overrideMsgTypes(), solve(), solve(), solve(), solve(), solve(), solve(), solve(), solve(), solve(), solve(), solve(), solve(), solve(), solve(), solve(), solve(), solve(), solve(), frodo2.algorithms.dpop.param.ParamDPOPsolver< V extends Addable< V >, U extends Addable< U > >.solveParam(), and frodo2.algorithms.dpop.param.ParamDPOPsolver< V extends Addable< V >, U extends Addable< U > >.solveParam().

|
protected |
Parses solver parameters.
| params | the parameters |
Reimplemented in frodo2.algorithms.localSearch.dsa.DSAsolver< V extends Addable< V >, U extends Addable< U > >, and frodo2.algorithms.localSearch.mgm.MGMsolver< V extends Addable< V >, U extends Addable< U > >.
Referenced by main().
|
protected |
Sets the number of rounds of VariableElection.
| nbrElectionRounds | the number of rounds of VariableElection (must be greater than the diameter of the constraint graph) |
Reimplemented in frodo2.algorithms.dpop.privacy.P2_DPOPsolver< V extends Addable< V >, U extends Addable< U > >, and frodo2.algorithms.dpop.privacy.P_DPOPsolver< V extends Addable< V > >.
References frodo2.algorithms.AbstractSolver< DCOPProblemInterface< V, U >, V, U, S >.agentDesc.
|
protected |
Sets the shift parameter of the ProblemRescaler module (if used).
| shift | the shift |
References frodo2.algorithms.AbstractSolver< DCOPProblemInterface< V, U >, V, U, S >.agentDesc.
Referenced by AbstractDCOPsolver(), and frodo2.algorithms.dpop.privacy.P2_DPOPsolver< V extends Addable< V >, U extends Addable< U > >.P2_DPOPsolver().
| S frodo2.algorithms.AbstractDCOPsolver< V extends Addable< V >, U extends Addable< U >, S extends Solution< V, U >.solve | ( | DCOPProblemInterface< V, U > | problem | ) |
References overrideMsgTypes(), and frodo2.algorithms.AbstractSolver< DCOPProblemInterface< V, U >, V, U, S >.problem.

| S frodo2.algorithms.AbstractDCOPsolver< V extends Addable< V >, U extends Addable< U >, S extends Solution< V, U >.solve | ( | DCOPProblemInterface< V, U > | problem, |
| boolean | cleanAfterwards ) |
References overrideMsgTypes(), and frodo2.algorithms.AbstractSolver< DCOPProblemInterface< V, U >, V, U, S >.problem.

| S frodo2.algorithms.AbstractDCOPsolver< V extends Addable< V >, U extends Addable< U >, S extends Solution< V, U >.solve | ( | DCOPProblemInterface< V, U > | problem, |
| boolean | cleanAfterwards, | ||
| Long | timeout ) throws OutOfMemoryError |
References overrideMsgTypes(), frodo2.algorithms.AbstractSolver< DCOPProblemInterface< V, U >, V, U, S >.problem, and frodo2.timeout.

| S frodo2.algorithms.AbstractDCOPsolver< V extends Addable< V >, U extends Addable< U >, S extends Solution< V, U >.solve | ( | DCOPProblemInterface< V, U > | problem, |
| int | nbrElectionRounds ) |
References overrideMsgTypes(), and frodo2.algorithms.AbstractSolver< DCOPProblemInterface< V, U >, V, U, S >.problem.

| S frodo2.algorithms.AbstractDCOPsolver< V extends Addable< V >, U extends Addable< U >, S extends Solution< V, U >.solve | ( | DCOPProblemInterface< V, U > | problem, |
| int | nbrElectionRounds, | ||
| boolean | measureMsgs ) |
References overrideMsgTypes(), and frodo2.algorithms.AbstractSolver< DCOPProblemInterface< V, U >, V, U, S >.problem.

| S frodo2.algorithms.AbstractDCOPsolver< V extends Addable< V >, U extends Addable< U >, S extends Solution< V, U >.solve | ( | DCOPProblemInterface< V, U > | problem, |
| int | nbrElectionRounds, | ||
| boolean | measureMsgs, | ||
| Long | timeout ) |
References overrideMsgTypes(), frodo2.algorithms.AbstractSolver< DCOPProblemInterface< V, U >, V, U, S >.problem, and frodo2.timeout.

| S frodo2.algorithms.AbstractDCOPsolver< V extends Addable< V >, U extends Addable< U >, S extends Solution< V, U >.solve | ( | DCOPProblemInterface< V, U > | problem, |
| int | nbrElectionRounds, | ||
| boolean | measureMsgs, | ||
| Long | timeout, | ||
| boolean | cleanAfterwards ) |
References frodo2.algorithms.AbstractSolver< DCOPProblemInterface< V, U >, V, U, S >.agentDesc, overrideMsgTypes(), frodo2.algorithms.AbstractSolver< DCOPProblemInterface< V, U >, V, U, S >.problem, setNbrElectionRounds(), solve(), and frodo2.timeout.

| S frodo2.algorithms.AbstractDCOPsolver< V extends Addable< V >, U extends Addable< U >, S extends Solution< V, U >.solve | ( | DCOPProblemInterface< V, U > | problem, |
| int | nbrElectionRounds, | ||
| Long | timeout ) |
References overrideMsgTypes(), frodo2.algorithms.AbstractSolver< DCOPProblemInterface< V, U >, V, U, S >.problem, and frodo2.timeout.

| S frodo2.algorithms.AbstractDCOPsolver< V extends Addable< V >, U extends Addable< U >, S extends Solution< V, U >.solve | ( | DCOPProblemInterface< V, U > | problem, |
| Long | timeout ) |
References overrideMsgTypes(), frodo2.algorithms.AbstractSolver< DCOPProblemInterface< V, U >, V, U, S >.problem, and frodo2.timeout.

| S frodo2.algorithms.AbstractDCOPsolver< V extends Addable< V >, U extends Addable< U >, S extends Solution< V, U >.solve | ( | Document | problem | ) |
References overrideMsgTypes(), and frodo2.algorithms.AbstractSolver< DCOPProblemInterface< V, U >, V, U, S >.problem.

| S frodo2.algorithms.AbstractDCOPsolver< V extends Addable< V >, U extends Addable< U >, S extends Solution< V, U >.solve | ( | Document | problem, |
| boolean | cleanAfterwards ) |
References overrideMsgTypes(), and frodo2.algorithms.AbstractSolver< DCOPProblemInterface< V, U >, V, U, S >.problem.

| S frodo2.algorithms.AbstractDCOPsolver< V extends Addable< V >, U extends Addable< U >, S extends Solution< V, U >.solve | ( | Document | problem, |
| boolean | cleanAfterwards, | ||
| Long | timeout ) |
References overrideMsgTypes(), frodo2.algorithms.AbstractSolver< DCOPProblemInterface< V, U >, V, U, S >.problem, and frodo2.timeout.

| S frodo2.algorithms.AbstractDCOPsolver< V extends Addable< V >, U extends Addable< U >, S extends Solution< V, U >.solve | ( | Document | problem, |
| int | nbrElectionRounds ) |
References overrideMsgTypes(), and frodo2.algorithms.AbstractSolver< DCOPProblemInterface< V, U >, V, U, S >.problem.

| S frodo2.algorithms.AbstractDCOPsolver< V extends Addable< V >, U extends Addable< U >, S extends Solution< V, U >.solve | ( | Document | problem, |
| int | nbrElectionRounds, | ||
| boolean | measureMsgs ) |
References overrideMsgTypes(), and frodo2.algorithms.AbstractSolver< DCOPProblemInterface< V, U >, V, U, S >.problem.

| S frodo2.algorithms.AbstractDCOPsolver< V extends Addable< V >, U extends Addable< U >, S extends Solution< V, U >.solve | ( | Document | problem, |
| int | nbrElectionRounds, | ||
| boolean | measureMsgs, | ||
| Long | timeout ) |
References overrideMsgTypes(), frodo2.algorithms.AbstractSolver< DCOPProblemInterface< V, U >, V, U, S >.problem, and frodo2.timeout.

| S frodo2.algorithms.AbstractDCOPsolver< V extends Addable< V >, U extends Addable< U >, S extends Solution< V, U >.solve | ( | Document | problem, |
| int | nbrElectionRounds, | ||
| boolean | measureMsgs, | ||
| Long | timeout, | ||
| boolean | cleanAfterwards ) |
References frodo2.algorithms.AbstractSolver< DCOPProblemInterface< V, U >, V, U, S >.agentDesc, overrideMsgTypes(), frodo2.algorithms.AbstractSolver< DCOPProblemInterface< V, U >, V, U, S >.problem, setNbrElectionRounds(), solve(), and frodo2.timeout.
Referenced by frodo2.algorithms.afb.test.AFBagentTest< V extends Addable< V >, U extends Addable< U > >.checkOutput(), frodo2.algorithms.dpop.stochastic.test.E_DPOPagentTest< V extends Addable< V > >.checkOutput(), frodo2.algorithms.dpop.test.DPOPagentTest< V extends Addable< V >, U extends Addable< U > >.checkOutput(), frodo2.algorithms.synchbb.test.SynchBBagentTest< V extends Addable< V >, U extends Addable< U > >.checkOutput(), main(), solve(), solve(), frodo2.solutionSpaces.JaCoP.tests.JaCoPproblemTest< V extends Addable< V > >.solve(), frodo2.algorithms.dpop.memory.tests.MB_DPOPagentTest.test(), frodo2.algorithms.dpop.privacy.test.P2_DPOPagentTest< V extends Addable< V >, E extends AddableLimited< AddableInteger, E >.test(), frodo2.algorithms.dpop.privacy.test.P3halves_DPOPagentTest< V extends Addable< V >, E extends AddableLimited< AddableInteger, E >.test(), frodo2.algorithms.maxsum.tests.MaxSumTests< V extends Addable< V >, U extends Addable< U > >.test(), frodo2.algorithms.mpc_discsp.tests.MPC_DisWCSP4tests.test(), frodo2.solutionSpaces.vehiclerouting.test.VRPtests.test(), frodo2.algorithms.dpop.restart.test.TestSDPOP< V extends Addable< V >, U extends Addable< U > >.testGeneric(), frodo2.algorithms.dpop.privacy.test.P_DPOPagentTest< V extends Addable< V > >.testP_DPOPvsDPOP(), frodo2.solutionSpaces.JaCoP.tests.JaCoPtests< V extends Addable< V > >.testProblemFromRepository(), frodo2.algorithms.adopt.test.ADOPTagentTest< V extends Addable< V >, U extends Addable< U > >.testRandom(), frodo2.algorithms.dpop.count.test.TestCountSolutions.testRandom(), frodo2.algorithms.odpop.tests.ODPOPagentTest< V extends Addable< V >, U extends Addable< U > >.testRandom(), frodo2.algorithms.odpop.tests.ODPOPagentTestBinaryDomains< V extends Addable< V >, U extends Addable< U > >.testRandom(), frodo2.algorithms.odpop.tests.ODPOPagentTestFullDomain< V extends Addable< V >, U extends Addable< U > >.testRandom(), frodo2.solutionSpaces.JaCoP.tests.JaCoPtests< V extends Addable< V > >.testRandomExtensionalProblem(), and frodo2.algorithms.dpop.restart.test.TestSDPOP< V extends Addable< V >, U extends Addable< U > >.testReuse().

| S frodo2.algorithms.AbstractDCOPsolver< V extends Addable< V >, U extends Addable< U >, S extends Solution< V, U >.solve | ( | Document | problem, |
| int | nbrElectionRounds, | ||
| Long | timeout ) |
References overrideMsgTypes(), frodo2.algorithms.AbstractSolver< DCOPProblemInterface< V, U >, V, U, S >.problem, and frodo2.timeout.

| S frodo2.algorithms.AbstractDCOPsolver< V extends Addable< V >, U extends Addable< U >, S extends Solution< V, U >.solve | ( | Document | problem, |
| Long | timeout ) |
References overrideMsgTypes(), frodo2.algorithms.AbstractSolver< DCOPProblemInterface< V, U >, V, U, S >.problem, and frodo2.timeout.
