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

JUnit tests for the Vehicle Routing Problem benchmarks. More...

Inheritance diagram for frodo2.solutionSpaces.vehiclerouting.test.VRPtests:

Public Member Functions

 VRPtests (String filePath, float radius, int minSplit)
 Constructor.
 VRPtests (String name, String filePath, float radius, int minSplit)
 Constructor.
void test () throws Exception
 Tests various algorithms against each other.
void testBestFirstiterator () throws InstantiationException, IllegalAccessException, NoSuchMethodException, InvocationTargetException
 Test the best first iterator.
void testCompoundBestFirstIterator () throws InstantiationException, IllegalAccessException, NoSuchMethodException, InvocationTargetException
 Test the best first iterator of the compound space.

Static Public Member Functions

static TestSuite suite ()
 Constructs the test suite.

Protected Member Functions

void setUp () throws Exception
void tearDown () throws Exception

Private Attributes

Document problem
 The overall problem.
final String filePath
 Path to the Cordeau problem file.
final float radius
 The visibility radius around any given depot.
final int minSplit
 If positive, allow split deliveries, with a minimum split size of minSplit.

Detailed Description

JUnit tests for the Vehicle Routing Problem benchmarks.

Author
Thomas Leaute
Note
Disable asserts if you don't want to see algorithms disagree or even fail because of floating point errors.
Todo
Refactor this test so that each algorithm gets its own test (otherwise an algorithm that comes after a failing one is not tested)

Constructor & Destructor Documentation

◆ VRPtests() [1/2]

frodo2.solutionSpaces.vehiclerouting.test.VRPtests.VRPtests ( String filePath,
float radius,
int minSplit )

Constructor.

Parameters
filePathpath to the Cordeau problem file
radiusthe visibility radius around any given depot
minSplitIf positive, allow split deliveries, with a minimum split size of minSplit

References filePath, minSplit, and radius.

Referenced by suite().

◆ VRPtests() [2/2]

frodo2.solutionSpaces.vehiclerouting.test.VRPtests.VRPtests ( String name,
String filePath,
float radius,
int minSplit )

Constructor.

Parameters
namethe name of the test to be performed
filePathpath to the Cordeau problem file
radiusthe visibility radius around any given depot
minSplitIf positive, allow split deliveries, with a minimum split size of minSplit

References filePath, minSplit, and radius.

Member Function Documentation

◆ setUp()

void frodo2.solutionSpaces.vehiclerouting.test.VRPtests.setUp ( ) throws Exception
protected
See also
junit.framework.TestCase#setUp()
Todo
Test with uncertainty

References frodo2.benchmarks.vehiclerouting.CordeauToXCSP.createXCSP(), filePath, frodo2.benchmarks.vehiclerouting.CordeauToXCSP.parse(), and radius.

Here is the call graph for this function:

◆ suite()

TestSuite frodo2.solutionSpaces.vehiclerouting.test.VRPtests.suite ( )
static

Constructs the test suite.

Returns
the test suite
Todo
Test with split deliveries
Todo
Test with split deliveries

References radius, suite(), and VRPtests().

Referenced by frodo2.solutionSpaces.tests.AllTestsSpaces.suite(), and suite().

Here is the call graph for this function:

◆ tearDown()

void frodo2.solutionSpaces.vehiclerouting.test.VRPtests.tearDown ( ) throws Exception
protected
See also
junit.framework.TestCase#tearDown()

◆ test()

◆ testBestFirstiterator()

void frodo2.solutionSpaces.vehiclerouting.test.VRPtests.testBestFirstiterator ( ) throws InstantiationException, IllegalAccessException, NoSuchMethodException, InvocationTargetException

Test the best first iterator.

Author
Brammert Ottens, 29 apr 2010
Exceptions
InstantiationExceptionerror thrown when creating a new instance of an object fails
IllegalAccessExceptionerror thrown when creating a new instance of an object fails
NoSuchMethodExceptionerror thrown when creating a new instance of an object fails
InvocationTargetExceptionerror thrown when creating a new instance of an object fails

References frodo2.solutionSpaces.AddableReal.compareTo(), frodo2.solutionSpaces.SolutionSpace< V extends Addable< V > >.SparseIterator< V >.getCurrentSolution(), frodo2.solutionSpaces.AddableReal.getMinInfinity(), frodo2.algorithms.XCSPparser< V extends Addable< V >, U extends Addable< U > >.getSolutionSpaces(), frodo2.solutionSpaces.SolutionSpace< V extends Addable< V > >.Iterator< V >.hasNext(), frodo2.solutionSpaces.BasicUtilitySolutionSpace< V extends Addable< V >, U extends Serializable >.SparseIterator< V, U >.nextUtility(), problem, and frodo2.benchmarks.vehiclerouting.XCSPparserVRP< U extends Addable< U > >.setUtilClass().

Here is the call graph for this function:

◆ testCompoundBestFirstIterator()

void frodo2.solutionSpaces.vehiclerouting.test.VRPtests.testCompoundBestFirstIterator ( ) throws InstantiationException, IllegalAccessException, NoSuchMethodException, InvocationTargetException

Member Data Documentation

◆ filePath

final String frodo2.solutionSpaces.vehiclerouting.test.VRPtests.filePath
private

Path to the Cordeau problem file.

Referenced by setUp(), VRPtests(), and VRPtests().

◆ minSplit

final int frodo2.solutionSpaces.vehiclerouting.test.VRPtests.minSplit
private

If positive, allow split deliveries, with a minimum split size of minSplit.

Referenced by VRPtests(), and VRPtests().

◆ problem

Document frodo2.solutionSpaces.vehiclerouting.test.VRPtests.problem
private

The overall problem.

Referenced by test(), testBestFirstiterator(), and testCompoundBestFirstIterator().

◆ radius

final float frodo2.solutionSpaces.vehiclerouting.test.VRPtests.radius
private

The visibility radius around any given depot.

Referenced by setUp(), suite(), VRPtests(), and VRPtests().


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