|
FRODO Version 2.19.1
An open-source framework for Distributed Constraint Optimization (DCOP)
|
A MASproblem parser that is able to handle multiple types of agents. More...

Public Member Functions | |
| MASparser (Element root) | |
| Constructor from a JDOM root Element. | |
| MASparser (Element root, boolean countNCCCs) | |
| Constructor from a JDOM root Element. | |
| MASparser (String agentName, String type, Element root, boolean countNCCCs, HashSet< String > spacesToIgnoreNcccs) | |
| Constructor from a JDOM root Element. | |
| MASparser (String agentName, String type, Element root, boolean countNCCCs) | |
| Constructor from a JDOM root Element. | |
| MASparser (Document doc) | |
| Constructor from a JDOM Document. | |
| MASparser (Document doc, Element params) | |
| Constructor. | |
| String | getType () |
| String | getAgent () |
| Set< String > | getAgents () |
| U | getZeroUtility () |
| U | getPlusInfUtility () |
| U | getMinInfUtility () |
| Element | getLocalProblem () |
| MASparser< V, U > | getSubProblem (String agent) |
| boolean | multipleTypes () |
| void | reset (ProblemInterface< V, U > newProblem) |
| void | setDomClass (Class< V > domClass) |
| Class< V > | getDomClass () |
| void | setUtilClass (Class< U > utilClass) |
| Class< U > | getUtilClass () |
| U | utilInstance () |
| void | incrNCCCs (long incr) |
| void | setNCCCs (long ncccs) |
| long | getNCCCs () |
| String | toString () |
| MASparser< V, U > | parse () |
| Public Member Functions inherited from frodo2.solutionSpaces.ProblemInterface< V, U > | |
| void | reset (ProblemInterface< V, U > newProblem) |
| Resets this problem to be the same as the input one. | |
| void | setDomClass (Class< V > domClass) |
| Sets the class to be used for variable values. | |
| Class< V > | getDomClass () |
| void | setUtilClass (Class< U > utilClass) |
| Sets the class to be used for utility values. | |
| Class< U > | getUtilClass () |
| U | getZeroUtility () |
| U | getPlusInfUtility () |
| U | getMinInfUtility () |
| String | getAgent () |
| Set< String > | getAgents () |
| ProblemInterface< V, U > | getSubProblem (String agent) |
| Builds the subproblem description for a given agent by extracting it from the overall problem description. | |
| boolean | multipleTypes () |
| void | incrNCCCs (long incr) |
| Increments the number of constraint checks. | |
| long | getNCCCs () |
| void | setNCCCs (long ncccs) |
| Sets the NCCC count. | |
| Public Member Functions inherited from frodo2.algorithms.ParserInterface< V, U > | |
| ProblemInterface< V, U > | parse () |
Static Public Member Functions | |
| static Document | parse (File file) throws JDOMException, IOException |
| Creates a JDOM Document out of the input XML file. | |
| static Document | parse (String path) throws JDOMException, IOException |
| Creates a JDOM Document out of the input XML file path in XCSP format. | |
| static Document | parse (InputStream stream) throws JDOMException, IOException |
| Creates a JDOM Document out of the input XML stream in XCSP format. | |
Protected Attributes | |
| Element | root |
| the JDOM root element | |
| String | type |
| the type of the agent owning this problem | |
| Class< V > | domClass = (Class<V>) AddableInteger.class |
| The class to be used for variable values. | |
| Class< U > | utilClass = (Class<U>) AddableInteger.class |
| The class to be used for utility values. | |
| final boolean | countNCCCs |
| Whether to count constraint checks. | |
| HashSet< String > | spacesToIgnoreNcccs |
| a set of spaces for which ncccs should be ignored | |
Private Attributes | |
| String | agentName |
| the name of the agent owning the problem, if applicable | |
| long | ncccCount |
| The NCCC count. | |
Static Private Attributes | |
| static final long | serialVersionUID = 5407324017599034300L |
| Used for serialization. | |
A MASproblem parser that is able to handle multiple types of agents.
| <U> | the type used for decision values |
| <V> | the type used for utility values |
| frodo2.algorithms.MASparser< V extends Addable< V >, U extends Addable< U > >.MASparser | ( | Element | root | ) |
Constructor from a JDOM root Element.
| root | the JDOM root Element |
References root.
Referenced by getSubProblem(), and parse().
| frodo2.algorithms.MASparser< V extends Addable< V >, U extends Addable< U > >.MASparser | ( | Element | root, |
| boolean | countNCCCs ) |
Constructor from a JDOM root Element.
| root | the JDOM root Element |
| countNCCCs | true when NCCCs should be counted |
References countNCCCs, and root.
| frodo2.algorithms.MASparser< V extends Addable< V >, U extends Addable< U > >.MASparser | ( | String | agentName, |
| String | type, | ||
| Element | root, | ||
| boolean | countNCCCs, | ||
| HashSet< String > | spacesToIgnoreNcccs ) |
Constructor from a JDOM root Element.
| agentName | the name of the agent owning the input subproblem |
| type | the type of the agent |
| root | the JDOM root Element |
| countNCCCs | true when NCCCs should be counted |
| spacesToIgnoreNcccs | the list of spaces who's NCCCs should not be counted |
References agentName, countNCCCs, root, spacesToIgnoreNcccs, and type.
| frodo2.algorithms.MASparser< V extends Addable< V >, U extends Addable< U > >.MASparser | ( | String | agentName, |
| String | type, | ||
| Element | root, | ||
| boolean | countNCCCs ) |
Constructor from a JDOM root Element.
| agentName | the name of the agent owning the input subproblem |
| type | the type of the agent |
| root | the JDOM root Element |
| countNCCCs | true when NCCCs should be counted |
References agentName, countNCCCs, root, and type.
| frodo2.algorithms.MASparser< V extends Addable< V >, U extends Addable< U > >.MASparser | ( | Document | doc | ) |
Constructor from a JDOM Document.
| doc | the JDOM Document |
| frodo2.algorithms.MASparser< V extends Addable< V >, U extends Addable< U > >.MASparser | ( | Document | doc, |
| Element | params ) |
Constructor.
| doc | the JDOM Document |
| params | the parameters of the parser |
References setUtilClass(), and spacesToIgnoreNcccs.

| String frodo2.algorithms.MASparser< V extends Addable< V >, U extends Addable< U > >.getAgent | ( | ) |
References agentName.
Referenced by frodo2.algorithms.test.MASparserTest.testGetSubProblemString().
| Set< String > frodo2.algorithms.MASparser< V extends Addable< V >, U extends Addable< U > >.getAgents | ( | ) |
References root.
| Class< V > frodo2.algorithms.MASparser< V extends Addable< V >, U extends Addable< U > >.getDomClass | ( | ) |
References domClass.
| Element frodo2.algorithms.MASparser< V extends Addable< V >, U extends Addable< U > >.getLocalProblem | ( | ) |
Implements frodo2.solutionSpaces.MASProblemInterface< V extends Addable< V >, U extends Addable< U > >.
References root.
| U frodo2.algorithms.MASparser< V extends Addable< V >, U extends Addable< U > >.getMinInfUtility | ( | ) |
References utilClass.
| long frodo2.algorithms.MASparser< V extends Addable< V >, U extends Addable< U > >.getNCCCs | ( | ) |
References ncccCount.
| U frodo2.algorithms.MASparser< V extends Addable< V >, U extends Addable< U > >.getPlusInfUtility | ( | ) |
References utilClass.
| MASparser< V, U > frodo2.algorithms.MASparser< V extends Addable< V >, U extends Addable< U > >.getSubProblem | ( | String | agent | ) |
References countNCCCs, MASparser(), root, and spacesToIgnoreNcccs.
Referenced by frodo2.algorithms.test.MASparserTest.testGetSubProblemString().

| String frodo2.algorithms.MASparser< V extends Addable< V >, U extends Addable< U > >.getType | ( | ) |
| Class< U > frodo2.algorithms.MASparser< V extends Addable< V >, U extends Addable< U > >.getUtilClass | ( | ) |
References utilClass.
| U frodo2.algorithms.MASparser< V extends Addable< V >, U extends Addable< U > >.getZeroUtility | ( | ) |
References utilClass.
| void frodo2.algorithms.MASparser< V extends Addable< V >, U extends Addable< U > >.incrNCCCs | ( | long | incr | ) |
References countNCCCs.
| boolean frodo2.algorithms.MASparser< V extends Addable< V >, U extends Addable< U > >.multipleTypes | ( | ) |
| MASparser< V, U > frodo2.algorithms.MASparser< V extends Addable< V >, U extends Addable< U > >.parse | ( | ) |
|
static |
Creates a JDOM Document out of the input XML file.
| file | the XML file |
| JDOMException | if a parsing error occurs while reading the file |
| IOException | if an I/O error occurs while accessing the file |
Referenced by parse(), and frodo2.algorithms.test.MASparserTest.testParseString().
|
static |
Creates a JDOM Document out of the input XML stream in XCSP format.
| stream | the XML stream |
| JDOMException | if a parsing error occurs while reading the file |
| IOException | if an I/O error occurs while accessing the file |
|
static |
Creates a JDOM Document out of the input XML file path in XCSP format.
| path | the XML file path |
| JDOMException | if a parsing error occurs while reading the file |
| IOException | if an I/O error occurs while accessing the file |
References parse().

| void frodo2.algorithms.MASparser< V extends Addable< V >, U extends Addable< U > >.reset | ( | ProblemInterface< V, U > | newProblem | ) |
| void frodo2.algorithms.MASparser< V extends Addable< V >, U extends Addable< U > >.setDomClass | ( | Class< V > | domClass | ) |
References domClass.
| void frodo2.algorithms.MASparser< V extends Addable< V >, U extends Addable< U > >.setNCCCs | ( | long | ncccs | ) |
References countNCCCs.
| void frodo2.algorithms.MASparser< V extends Addable< V >, U extends Addable< U > >.setUtilClass | ( | Class< U > | utilClass | ) |
References utilClass.
Referenced by MASparser().
| String frodo2.algorithms.MASparser< V extends Addable< V >, U extends Addable< U > >.toString | ( | ) |
References agentName, frodo2.algorithms.XCSPparser< V extends Addable< V >, U extends Addable< U > >.toString(), and type.

| U frodo2.algorithms.MASparser< V extends Addable< V >, U extends Addable< U > >.utilInstance | ( | ) |
Implements frodo2.solutionSpaces.MASProblemInterface< V extends Addable< V >, U extends Addable< U > >.
References utilClass.
|
private |
the name of the agent owning the problem, if applicable
Referenced by getAgent(), MASparser(), MASparser(), and toString().
|
protected |
Whether to count constraint checks.
Referenced by getSubProblem(), incrNCCCs(), MASparser(), MASparser(), MASparser(), and setNCCCs().
|
protected |
The class to be used for variable values.
Referenced by getDomClass(), and setDomClass().
|
private |
The NCCC count.
Referenced by getNCCCs().
|
protected |
the JDOM root element
Referenced by getAgents(), getLocalProblem(), getSubProblem(), MASparser(), MASparser(), MASparser(), and MASparser().
|
staticprivate |
Used for serialization.
|
protected |
a set of spaces for which ncccs should be ignored
Referenced by getSubProblem(), MASparser(), and MASparser().
|
protected |
the type of the agent owning this problem
Referenced by getType(), MASparser(), MASparser(), and toString().
|
protected |
The class to be used for utility values.
Referenced by getMinInfUtility(), getPlusInfUtility(), getUtilClass(), getZeroUtility(), setUtilClass(), and utilInstance().