|
FRODO Version 2.19.1
An open-source framework for Distributed Constraint Optimization (DCOP)
|
A graph coloring problem generator. More...
Public Member Functions | |
| GraphColoring (int nbrNodes, double density, final double tightness, final int nbrColors, int nbrStochNodes, boolean nbrLinks) | |
| Constructor. | |
| GraphColoring (Graph graph, final double tightness, final int nbrColors, final int nbrStochNodes) | |
| Constructor. | |
| Document | toXCSP (final boolean publicInteragentConstraints, final boolean soft, final boolean intensional) |
| Generates an XCSP representation of a graph coloring problem. | |
Static Public Member Functions | |
| static void | main (String[] args) throws IOException |
| Generates a random graph coloring problem and writes it to a file. | |
| static Document | generateProblem (boolean soft, int nbrNodes, double density, double tightness, int nbrColors, int nbrStochNodes, boolean intensional) |
| Generates a problem instance. | |
| static Element | createStats (String name, String value) |
| Creates a "stats" element. | |
Public Attributes | |
| final Graph | graph |
| The underlying graph. | |
| final TreeMap< String, ArrayList< Integer > > | unaryCons |
| For each node, its list of forbidden colors. | |
| final int | nbrColors |
| The number of colors. | |
Private Attributes | |
| final HashSet< String > | stochNodes |
| The set of uncontrollable nodes. | |
| final String | instanceName |
| The name of the problem instance. | |
| double | targetDensity = -1 |
| The desired density. | |
| final double | targetTightness |
| The desired tightness of the unary constraints. | |
A graph coloring problem generator.
| frodo2.benchmarks.graphcoloring.GraphColoring.GraphColoring | ( | int | nbrNodes, |
| double | density, | ||
| final double | tightness, | ||
| final int | nbrColors, | ||
| int | nbrStochNodes, | ||
| boolean | nbrLinks ) |
Constructor.
| nbrNodes | total number of nodes |
| density | graph density |
| tightness | the tightness of the unary constraints |
| nbrColors | number of colors |
| nbrStochNodes | number of uncontrollable nodes |
| nbrLinks | if true, the density parameter states that there must be density*nbrNodes links in the graph |
References frodo2.algorithms.RandGraphFactory.getSizedRandGraph(), and nbrColors.
Referenced by generateProblem(), and main().

| frodo2.benchmarks.graphcoloring.GraphColoring.GraphColoring | ( | Graph | graph, |
| final double | tightness, | ||
| final int | nbrColors, | ||
| final int | nbrStochNodes ) |
Constructor.
| graph | the underlying graph |
| tightness | the tightness of the unary constraints |
| nbrColors | number of colors |
| nbrStochNodes | number of uncontrollable nodes |
References graph, nbrColors, and frodo2.algorithms.RandGraphFactory.Graph.nodes.
|
static |
Creates a "stats" element.
| name | the value of the "name" attribute |
| value | the text |
Referenced by toXCSP().
|
static |
Generates a problem instance.
| soft | whether to make it a DisCSP (false) or a Max-DisCSP (true) |
| nbrNodes | total number of nodes |
| density | graph density |
| tightness | the tightness of the unary constraints |
| nbrColors | number of colors |
| nbrStochNodes | number of uncontrollable nodes |
| intensional | whether the output should be intensional |
References GraphColoring(), nbrColors, and toXCSP().

|
static |
Generates a random graph coloring problem and writes it to a file.
| args | [-soft] nbrNodes density nbrColors [stochNodeRatio] |
| IOException | if an error occurs while attempting to write the output file |
References GraphColoring(), nbrColors, and toXCSP().

| Document frodo2.benchmarks.graphcoloring.GraphColoring.toXCSP | ( | final boolean | publicInteragentConstraints, |
| final boolean | soft, | ||
| final boolean | intensional ) |
Generates an XCSP representation of a graph coloring problem.
| publicInteragentConstraints | whether inter-agent constraints should be public |
| soft | whether the output should be a Max-DisCSP |
| intensional | whether the output should be intensional |
References createStats(), frodo2.algorithms.RandGraphFactory.Edge.dest, graph, nbrColors, frodo2.algorithms.RandGraphFactory.Graph.nodes, and frodo2.algorithms.RandGraphFactory.Edge.source.
Referenced by generateProblem(), and main().

| final Graph frodo2.benchmarks.graphcoloring.GraphColoring.graph |
The underlying graph.
Referenced by GraphColoring(), and toXCSP().
|
private |
The name of the problem instance.
| final int frodo2.benchmarks.graphcoloring.GraphColoring.nbrColors |
The number of colors.
Referenced by generateProblem(), GraphColoring(), GraphColoring(), main(), and toXCSP().
|
private |
The set of uncontrollable nodes.
|
private |
The desired density.
|
private |
The desired tightness of the unary constraints.
| final TreeMap< String, ArrayList<Integer> > frodo2.benchmarks.graphcoloring.GraphColoring.unaryCons |
For each node, its list of forbidden colors.