|
FRODO Version 2.19.1
An open-source framework for Distributed Constraint Optimization (DCOP)
|
Max-DisCSP problem generator. More...
Static Public Member Functions | |
| static Document | createSizedRandProblem (int n, int k, double p1, double p2) |
| Method to create a random, sized, uniform domain Max-DisCSP problem with a certain density and tightness. | |
| static Element | createStats (String name, String value) |
| Creates a "stats" element. | |
| static Document | generateProblem (Graph graph, int k, double p1, double p2) |
| Creates a problem description based on the input constraint graph. | |
| static Hypercube< AddableInteger, AddableInteger > | randHypercube (List< String > variables, int k, double p2) |
| Generates a random hypercube. | |
| static void | main (String[] args) |
Max-DisCSP problem generator.
Such CSPs are characterized by the 4-tuple (n,k,p1,p2), where: n is the number of variables, k is the common domain size, p1 is the density, i.e. fraction of the n * (n - 1) /2 possible constraints in the graph, p2 is the tightness, i.e. the fraction of the k*k value pairs in each constraint that are disallowed by the constraint (cost 1). All the other possible value pairs have cost 0.
An agent owns only one variable, and all constraints are binary.
|
static |
Method to create a random, sized, uniform domain Max-DisCSP problem with a certain density and tightness.
| n | The number of variables/agents in the problem |
| k | The number of values in each variable domain |
| p1 | Density |
| p2 | Tightness |
References generateProblem(), and frodo2.algorithms.RandGraphFactory.getSizedRandGraph().
Referenced by main().

|
static |
Creates a "stats" element.
| name | the value of the "name" attribute |
| value | the text |
Referenced by generateProblem().
|
static |
Creates a problem description based on the input constraint graph.
| graph | a constraint graph |
| k | the uniform domain size. Each variable domain will have values {1,2, ... ,k} |
| p1 | the target density of the constraint graph |
| p2 | the target tightness of the constraint graph |
References frodo2.algorithms.RandGraphFactory.Graph.components, frodo2.algorithms.RandGraphFactory.Graph.computeDensity(), frodo2.algorithms.RandGraphFactory.Graph.computeMaxDeg(), createStats(), frodo2.algorithms.RandGraphFactory.Edge.dest, frodo2.algorithms.RandGraphFactory.Graph.edges, frodo2.algorithms.XCSPparser< V extends Addable< V >, U extends Addable< U > >.getConstraint(), frodo2.solutionSpaces.hypercube.Hypercube< V extends Addable< V >, U extends Addable< U > >.iterator(), frodo2.algorithms.RandGraphFactory.Graph.nodes, randHypercube(), and frodo2.algorithms.RandGraphFactory.Edge.source.
Referenced by createSizedRandProblem().

|
static |
| args | Expects: n k p1 p2 |
References createSizedRandProblem().

|
static |
Generates a random hypercube.
All domains are {1, ..., k} and utility values are either 0 or 1 The utility can be 1, with probability p2 0, with probability 1-p2
| variables | list of variables involved |
| k | the size of the uniform domain |
| p2 | tightness of constraint graph |
Referenced by generateProblem().