|
FRODO Version 2.19.1
An open-source framework for Distributed Constraint Optimization (DCOP)
|
This class is used to generate the 'relation' tags in the XML output file. More...

Public Member Functions | |
| Relation (String name, String arity, String defaultUtility, Map< Double, List< String > > alternativeAssignments) | |
| Constructor. | |
| Relation (String name, String arity, String defaultUtility, Map< Double, List< String > > alternativeAssignments, String semantics) | |
| Constructor. | |
| void | create () |
| This method adds the instance variables as attributes, so they are written to the 'relation' element in the XML output file. | |
Private Member Functions | |
| String | altAssignmentsToString () |
| This method transforms the mapping from utilities to the variable assignments yielding the corresponding utility into a string representation. | |
| String | getNbTuples (Map< Double, List< String > > tuples) |
Private Attributes | |
| String | name |
| Name of the relation. | |
| String | arity |
| Arity of the relation, i.e. | |
| String | nbTuples |
| Number of tuples that do not take the default utility. | |
| String | semantics |
| Semantics of the relation; only 'soft' allowed at the moment. | |
| String | defaultUtility |
| Default utility of the relation. | |
| Map< Double, List< String > > | alternativeAssignments |
| Mapping of utilities to a list of assignments rewarding that utility (for all assignments not yielding the default utility). | |
Static Private Attributes | |
| static final long | serialVersionUID = 9169972812415905559L |
| Classes extending Element should declare a serial Version UID. | |
This class is used to generate the 'relation' tags in the XML output file.
| frodo2.benchmarks.auctions.xcsp.Relation.Relation | ( | String | name, |
| String | arity, | ||
| String | defaultUtility, | ||
| Map< Double, List< String > > | alternativeAssignments ) |
Constructor.
| name | Name of the relation |
| arity | Arity of the relation |
| defaultUtility | Default utility for all assignments that are not explicitly mentioned |
| alternativeAssignments | Mapping from utilities to assignments that do not yield default utility |
References alternativeAssignments, arity, defaultUtility, and name.
| frodo2.benchmarks.auctions.xcsp.Relation.Relation | ( | String | name, |
| String | arity, | ||
| String | defaultUtility, | ||
| Map< Double, List< String > > | alternativeAssignments, | ||
| String | semantics ) |
Constructor.
| name | Name of the relation |
| arity | Arity of the relation |
| defaultUtility | Default utility for all assignments that are not explicitly mentioned |
| alternativeAssignments | Mapping from utilities to assignments that do not yield default utility |
| semantics | "soft", "supports" or "conflicts" |
References alternativeAssignments, arity, defaultUtility, getNbTuples(), name, and semantics.

|
private |
This method transforms the mapping from utilities to the variable assignments yielding the corresponding utility into a string representation.
The syntax is as follows:
utility1: ass_1|ass_2|...|ass_n|utility2: ass_1|ass_2 etc.
References alternativeAssignments.
Referenced by create().
| void frodo2.benchmarks.auctions.xcsp.Relation.create | ( | ) |
This method adds the instance variables as attributes, so they are written to the 'relation' element in the XML output file.
To write the alternative assignments, another method is used
References altAssignmentsToString(), arity, defaultUtility, name, nbTuples, and semantics.

|
private |
| tuples | Mapping from values to assignments |
References nbTuples.
Referenced by Relation().
|
private |
Mapping of utilities to a list of assignments rewarding that utility (for all assignments not yielding the default utility).
Referenced by altAssignmentsToString(), Relation(), and Relation().
|
private |
Arity of the relation, i.e.
number of variables over which the relation spans
Referenced by create(), Relation(), and Relation().
|
private |
Default utility of the relation.
Referenced by create(), Relation(), and Relation().
|
private |
Name of the relation.
Referenced by create(), Relation(), and Relation().
|
private |
Number of tuples that do not take the default utility.
Referenced by create(), and getNbTuples().
|
private |
Semantics of the relation; only 'soft' allowed at the moment.
Referenced by create(), and Relation().
|
staticprivate |
Classes extending Element should declare a serial Version UID.