Skip to content
hschneid edited this page Aug 23, 2016 · 9 revisions

XFVRP

What's that?

xfvrp is a free and easy solver for Rich Vehicle Routing Problems like

  • Multi capacities
  • Multi time windows
  • Multi depots
  • Heterogeneous fleet
  • Pick and delivery or backhauls
  • Replenishment sites
  • State of the art optimization heuristics
  • and more.

Additional topics are the useage and maintainability of the API like

  • User shall change only the necessary values. The rest is done by default.
  • The API for the user shall be as tight as possible. xfvrp users only need to know one class.
  • Presetting to nodes or vehicles for considering real world constraints.

How to use?

Here is a very simple example for solving an instance with one depot, two customers with eucledian distances with a construction heuristic.

    XFVRP v = new XFVRP();
    // Set a distance and time metric between nodes
    v.setMetric(new EucledianMetric());
    // Add a depot node (one or more)
    v.addDepot().setExternID("MyDepot").setXlong(0).setYlat(0);
    // Add some customers
    v.addCustomer().setExternID("Customer A").setDemand(5).setXlong(10).setYlat(5);
    v.addCustomer().setExternID("Customer B").setDemand(5).setXlong(-1).setYlat(3);
    // Add a vehicle type
    v.addVehicle().setName("Some vehicle type").setCapacity(new float[]{10});
    // Define the used heuristic
    v.addOptType(XFVRPOptType.CONST);
    // Executes the route planning
    v.executeRoutePlanning();
    // Get the report with the resulting routes
    Report rep = v.getReport();

The important classes to learn are XFVRP and Report. Have a closer look to these.

Clone this wiki locally