Skip to content

CorinnaKrebs/SolutionValidator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CI Status

Java CI with Maven CPP CI with MSBuild

License

License: GPL v3

Creators

Corinna Krebs

Introduction

This solution validator checks the feasibility of a given solution with respect to various loading and routing constraints (see Code Documentation or Literature). It handles the combination of two optimization problems — the vehicle routing problem (VRP) combined with the container loading (CLP), also known as the 2L-CVRP, 2L-VRPTW, 3L-CVRP and 3L-VRPTW.

Requirements

The tool is implemented in C++ and in Java. Therefore, it can be used with either of the two languages. Only standard libraries are used.

C++ Version

Java Version

Usage

Code Example

In general, the program consists of two main parts:

  • Provide Data (Instance, ConstraintSet and Solution)
  • Use Check Methods

General hints are given below. For the concrete usage of the methods, please check the documentation of the code.

// Necessary Data
Instance instance           = Read.readInstanceFile("../Input/Instances/Krebs_Ehmke_Koch_2020/001_n020_m200_bt3.txt");
ConstraintSet constraintSet = Read.readConstraintFile("../Input/Constraint_Sets/P1.txt");
Solution solution           = Read.readSolutionFile("../Input/PackPlan/001_n020_m200_bt3_P1_1.txt", instance);

// Check Constraints
boolean feasibleRouting = checkRoutingConstraints(solution, constraintSet, instance);
boolean feasibleLoading = checkLoadingConstraints(solution, constraintSet, instance);

Input Data

Provide necessary data via Instance, ConstraintSet and Solution objects. Exemplary files are available in Input Folder.

Instance

  • Necessary Data: Information about vehicles, customers, items and demands
  • Provide Data:

Constraint Set

  • Necessary Data: Included Loading Constraints and Parameters
  • Provide Data:

Solution

  • Necessary Data: Objective Values, run time, number of iterations, set of routes and packing plans
  • Provide Data:

Check Methods:

  • Necessary Data: Input Data is shown above. Provided as parameters to the methods.
  • Return Value: Feasibility of the solution (feasible: true; infeasible: false).
  • Check all Constraints defined in ConstraintSet: Use checkRoutingConstraints and checkLoadingConstraints
  • Check specific Constraint, see

Literature

Loading Constraints and formulas are described in

  • Advanced Loading Constraints for 3D Vehicle Routing Problems
    by C. Krebs, J. Ehmke, H. Koch

  • Axle Weights in Combined Vehicle Routing and Container Loading Problems
    by C. Krebs, J. Ehmke

  • Vertical Stability Constraints in Combined Vehicle Routing and 3D Container Loading Problem
    by C. Krebs, J. Ehmke