FRODO Version 2.19.1
An open-source framework for Distributed Constraint Optimization (DCOP)
Loading...
Searching...
No Matches
frodo2.benchmarks.vehiclerouting.CordeauToXCSP Class Reference

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< Depotdepots
 The depots.
int nbrVehiclesPerDepot
 The number of vehicles per depot.
Customer[] customers
 The customers.
String inputFileName
 The name of the input file.

Detailed Description

A file converter from Cordeau's MDVRP format into FRODO XCSP format.

See also
"http://neo.lcc.uma.es/radi-aeb/WebVRP/index.html?/Problem_Instances/CordeauFilesDesc.html"
Author
Thomas Leaute
Todo
Add support for Python scripting

Constructor & Destructor Documentation

◆ CordeauToXCSP()

frodo2.benchmarks.vehiclerouting.CordeauToXCSP.CordeauToXCSP ( String inputFileName)

Constructor.

Parameters
inputFileNamethe name of the input file

References inputFileName.

Referenced by main().

Member Function Documentation

◆ createXCSP()

Document frodo2.benchmarks.vehiclerouting.CordeauToXCSP.createXCSP ( final boolean extensional,
final int minSplit,
final int randDomSize )

◆ main()

void frodo2.benchmarks.vehiclerouting.CordeauToXCSP.main ( String[] args) throws IOException
static
Parameters
argsinput_Cordeau_file [depot_radius]
Exceptions
IOExceptionif an I/O error occurs

References CordeauToXCSP(), createXCSP(), parse(), and printUsage().

Here is the call graph for this function:

◆ parse()

◆ printUsage()

void frodo2.benchmarks.vehiclerouting.CordeauToXCSP.printUsage ( )
staticprivate

Prints the format of the input parameters.

Referenced by main().

◆ writeSum()

int frodo2.benchmarks.vehiclerouting.CordeauToXCSP.writeSum ( StringBuilder builder,
String prefix,
int sum,
int nbrVars,
final boolean top )
private

Writes the tuples for a sum relation.

Parameters
builderthe StringBuilder
prefixassignments to the previous variables
sumthe sum to be decomposed over the remaining variables
nbrVarsthe number of remaining variables
topwhether this is the top-level call to this recursive method
Returns
the number of tuples

References writeSum().

Referenced by createXCSP(), and writeSum().

Here is the call graph for this function:

Member Data Documentation

◆ customers

Customer [] frodo2.benchmarks.vehiclerouting.CordeauToXCSP.customers
private

The customers.

Referenced by createXCSP(), and parse().

◆ depots

ArrayList<Depot> frodo2.benchmarks.vehiclerouting.CordeauToXCSP.depots
private

The depots.

Referenced by createXCSP(), and parse().

◆ inputFileName

String frodo2.benchmarks.vehiclerouting.CordeauToXCSP.inputFileName
private

The name of the input file.

Referenced by CordeauToXCSP().

◆ nbrVehiclesPerDepot

int frodo2.benchmarks.vehiclerouting.CordeauToXCSP.nbrVehiclesPerDepot
private

The number of vehicles per depot.

Referenced by createXCSP(), and parse().


The documentation for this class was generated from the following file: