ml4co_kit.generator.routing.vrp.cvrp
Generator for CVRP instances.
Functions
|
Generate the route length limit. |
|
Generate the service time and time window. |
Classes
|
Generator for CVRP instances. |
|
Define the CVRP types as an enumeration. |
- class ml4co_kit.generator.routing.vrp.cvrp.CVRPGenerator(cvrp_open: bool = False, distribution_type: ~ml4co_kit.generator.routing.vrp.cvrp.CVRP_TYPE = CVRP_TYPE.UNIFORM, precision: ~numpy.float32 | ~numpy.float64 = <class 'numpy.float32'>, nodes_num: int = 50, min_demand: int = 1, max_demand: int = 9, min_capacity: int = 40, max_capacity: int = 40, gaussian_mean_x: float = 0.0, gaussian_mean_y: float = 0.0, gaussian_std: float = 1.0)[source]
Bases:
RoutingGeneratorBaseGenerator for CVRP instances.
- class ml4co_kit.generator.routing.vrp.cvrp.CVRP_TYPE(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]
Bases:
str,EnumDefine the CVRP types as an enumeration.
- GAUSSIAN = 'gaussian'
- UNIFORM = 'uniform'
- ml4co_kit.generator.routing.vrp.cvrp.generate_for_l(d0i: ndarray, upper_bound: float = 2.8) float[source]
Generate the route length limit. Reference: https://github.com/ai4co/routefinder
- ml4co_kit.generator.routing.vrp.cvrp.generate_for_tw(d0i: ndarray, max_time: float = 4.6, service_range: tuple = (0.15, 0.18), tw_range: tuple = (0.18, 0.2))[source]
Generate the service time and time window. Reference: https://github.com/ai4co/routefinder Note: We set the speed of each vehicle to 1.0 for simplicity.