|
FRODO Version 2.19.1
An open-source framework for Distributed Constraint Optimization (DCOP)
|
A file converter from Cordeau's MDVRP format into FRODO XCSP format. More...
Classes | |
| class | Depot |
| A depot. More... | |
| class | Customer |
| A customer. More... | |
Public Member Functions | |
| CordeauToXCSP (String inputFileName) | |
| Constructor. | |
| void | parse (BufferedReader in, Float depotRadius, int maxLoad) throws IOException |
| Parses the input file. | |
| Document | createXCSP (final boolean extensional, final int minSplit, final int randDomSize) |
Static Public Member Functions | |
| static void | main (String[] args) throws IOException |
Private Member Functions | |
| int | writeSum (StringBuilder builder, String prefix, int sum, int nbrVars, final boolean top) |
| Writes the tuples for a sum relation. | |
Static Private Member Functions | |
| static void | printUsage () |
| Prints the format of the input parameters. | |
Private Attributes | |
| ArrayList< Depot > | depots |
| The depots. | |
| int | nbrVehiclesPerDepot |
| The number of vehicles per depot. | |
| Customer[] | customers |
| The customers. | |
| String | inputFileName |
| The name of the input file. | |
A file converter from Cordeau's MDVRP format into FRODO XCSP format.
| frodo2.benchmarks.vehiclerouting.CordeauToXCSP.CordeauToXCSP | ( | String | inputFileName | ) |
Constructor.
| inputFileName | the name of the input file |
References inputFileName.
Referenced by main().
| Document frodo2.benchmarks.vehiclerouting.CordeauToXCSP.createXCSP | ( | final boolean | extensional, |
| final int | minSplit, | ||
| final int | randDomSize ) |
| extensional | whether the output should be purely extensional, or should involve intentional VRP constraints |
| minSplit | the minimum split size (no split if <= 0) |
| randDomSize | the size of random variables' domain |
References customers, frodo2.benchmarks.vehiclerouting.CordeauToXCSP.Customer.demand, frodo2.benchmarks.vehiclerouting.CordeauToXCSP.Customer.depots, depots, frodo2.solutionSpaces.SolutionSpace< V extends Addable< V > >.SparseIterator< V >.getCurrentSolution(), frodo2.benchmarks.vehiclerouting.CordeauToXCSP.Depot.horizon, frodo2.benchmarks.vehiclerouting.CordeauToXCSP.Customer.id, nbrVehiclesPerDepot, frodo2.solutionSpaces.UtilitySolutionSpace< V extends Addable< V >, U extends Addable< U > >.SparseIterator< V, U >.nextUtility(), frodo2.solutionSpaces.AddableReal.PlusInfinity.PLUS_INF, frodo2.benchmarks.vehiclerouting.CordeauToXCSP.Customer.radius, frodo2.solutionSpaces.vehiclerouting.VehicleRoutingSpace< U extends Addable< U > >.sparseIter(), frodo2.solutionSpaces.AddableReal.toString(), writeSum(), frodo2.benchmarks.vehiclerouting.CordeauToXCSP.Customer.x, frodo2.benchmarks.vehiclerouting.CordeauToXCSP.Depot.x, frodo2.benchmarks.vehiclerouting.CordeauToXCSP.Customer.y, and frodo2.benchmarks.vehiclerouting.CordeauToXCSP.Depot.y.
Referenced by main(), and frodo2.solutionSpaces.vehiclerouting.test.VRPtests.setUp().

|
static |
| args | input_Cordeau_file [depot_radius] |
| IOException | if an I/O error occurs |
References CordeauToXCSP(), createXCSP(), parse(), and printUsage().

| void frodo2.benchmarks.vehiclerouting.CordeauToXCSP.parse | ( | BufferedReader | in, |
| Float | depotRadius, | ||
| int | maxLoad ) throws IOException |
Parses the input file.
| in | input file |
| depotRadius | the depot radius |
| maxLoad | the maximum vehicle load |
| IOException | if an I/O exception occurs |
References customers, frodo2.benchmarks.vehiclerouting.CordeauToXCSP.Depot.customers, frodo2.benchmarks.vehiclerouting.CordeauToXCSP.Customer.depots, depots, frodo2.benchmarks.vehiclerouting.CordeauToXCSP.Customer.id, frodo2.benchmarks.vehiclerouting.CordeauToXCSP.Depot.id, frodo2.benchmarks.vehiclerouting.CordeauToXCSP.Depot.maxDist, nbrVehiclesPerDepot, frodo2.benchmarks.vehiclerouting.CordeauToXCSP.Customer.x, frodo2.benchmarks.vehiclerouting.CordeauToXCSP.Depot.x, frodo2.benchmarks.vehiclerouting.CordeauToXCSP.Customer.y, and frodo2.benchmarks.vehiclerouting.CordeauToXCSP.Depot.y.
Referenced by main(), and frodo2.solutionSpaces.vehiclerouting.test.VRPtests.setUp().
|
staticprivate |
Prints the format of the input parameters.
Referenced by main().
|
private |
Writes the tuples for a sum relation.
| builder | the StringBuilder |
| prefix | assignments to the previous variables |
| sum | the sum to be decomposed over the remaining variables |
| nbrVars | the number of remaining variables |
| top | whether this is the top-level call to this recursive method |
References writeSum().
Referenced by createXCSP(), and writeSum().

|
private |
The customers.
Referenced by createXCSP(), and parse().
|
private |
The depots.
Referenced by createXCSP(), and parse().
|
private |
The name of the input file.
Referenced by CordeauToXCSP().
|
private |
The number of vehicles per depot.
Referenced by createXCSP(), and parse().