basics
Class VehicleRoutingProblem

java.lang.Object
  extended by basics.VehicleRoutingProblem

public class VehicleRoutingProblem
extends java.lang.Object

Contains and describes the vehicle routing problem.

A routing problem is defined as jobs, vehicles and costs.

To construct the problem, use VehicleRoutingProblem.Builder (VehicleRoutingProblem.Builder.newInstance()).

By default, fleetSize is INFINITE and fleetComposition is HOMOGENEOUS, transport-costs are calculated as euclidean-distance (CrowFlyCosts), and activity-costs are set to DefaultVehicleRoutingActivityCosts which represent hard time-windows (missed time-windows are penalyzed with Double.MAX_VALUE).

Author:
stefan schroeder

Nested Class Summary
static class VehicleRoutingProblem.Builder
          Builder to build the routing-problem.
static class VehicleRoutingProblem.Constraint
          Overall problem constraints.
static class VehicleRoutingProblem.FleetComposition
          Enum that characterizes fleet-compostion.
static class VehicleRoutingProblem.FleetSize
          Enum that characterizes the fleet-size.
 
Field Summary
static org.apache.log4j.Logger log
           
 
Method Summary
 VehicleRoutingActivityCosts getActivityCosts()
          Returns activityCosts.
 VehicleRoutingProblem.FleetComposition getFleetComposition()
          Returns fleet-composition.
 VehicleRoutingProblem.FleetSize getFleetSize()
          Returns type of fleetSize, either INFINITE or FINITE.
 java.util.Map<java.lang.String,Job> getJobs()
          Returns the unmodifiable job map.
 Neighborhood getNeighborhood()
           
 java.util.Collection<VehicleRoutingProblem.Constraint> getProblemConstraints()
          Returns unmodifiable collection of problem-constraints.
 VehicleRoutingTransportCosts getTransportCosts()
          Returns routing costs.
 java.util.Collection<VehicleType> getTypes()
          Returns the entire, unmodifiable collection of types.
 java.util.Collection<Vehicle> getVehicles()
          Returns the entire, unmodifiable collection of vehicles.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

log

public static org.apache.log4j.Logger log
Method Detail

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getNeighborhood

public Neighborhood getNeighborhood()
Returns:
the neighborhood

getFleetComposition

public VehicleRoutingProblem.FleetComposition getFleetComposition()
Returns fleet-composition.

Returns:
fleetComposition which is either FleetComposition.HETEROGENEOUS or FleetComposition.HOMOGENEOUS

getFleetSize

public VehicleRoutingProblem.FleetSize getFleetSize()
Returns type of fleetSize, either INFINITE or FINITE.

By default, it is INFINITE.

Returns:
either FleetSize.INFINITE or FleetSize.FINITE

getJobs

public java.util.Map<java.lang.String,Job> getJobs()
Returns the unmodifiable job map.

Returns:
unmodifiable jobMap

getProblemConstraints

public java.util.Collection<VehicleRoutingProblem.Constraint> getProblemConstraints()
Returns unmodifiable collection of problem-constraints.

Returns:

getTypes

public java.util.Collection<VehicleType> getTypes()
Returns the entire, unmodifiable collection of types.

Returns:
unmodifiable collection of types
See Also:
VehicleTypeImpl

getVehicles

public java.util.Collection<Vehicle> getVehicles()
Returns the entire, unmodifiable collection of vehicles.

Returns:
unmodifiable collection of vehicles
See Also:
Vehicle

getTransportCosts

public VehicleRoutingTransportCosts getTransportCosts()
Returns routing costs.

Returns:
routingCosts
See Also:
VehicleRoutingTransportCosts

getActivityCosts

public VehicleRoutingActivityCosts getActivityCosts()
Returns activityCosts.