我正在努力进入这里的巡回赛,并且已经做了一些计划。不过,我现在所处理的问题,是运输的车辆比车辆所能运载的还要多。
问题:我想运输100个单位到10点。我只有一辆载客量为50的汽车,所以我不能在一次旅行中运输所有的东西。车辆行驶的时间和距离是无限的。
我已查过如何处理这个问题。
我想按照解决方案3那样加以实现)。数量和车辆不应改变。这辆车应该更频繁地行驶。但我不知道第一次旅行需要多长时间。我不能说第二班什么时候开始。
你知道如何最好地解决这个问题吗。
发布于 2022-08-24 11:15:47
使用option#3可以很容易地解决问题:在问题文件中为车辆定义2个时差,添加10个带有24小时pf时间窗口的送货作业。该解决方案将由一辆车提供全部10个工作岗位。
举个例子:
{
"fleet": {
"types": [
{
"id": "vehicle_1",
"profile": "car_1",
"costs": {
"fixed": 12.0,
"distance": 0.003,
"time": 0.008
},
"shifts": [
{
"start": {
"time": "2021-07-17T00:01:00Z",
"location": {
"lat": 52.530971,
"lng": 13.384915
}
},
"end": {
"time": "2021-07-17T12:00:00Z",
"location": {
"lat": 52.530971,
"lng": 13.384915
}
}
},
{
"start": {
"time": "2021-07-17T12:01:00Z",
"location": {
"lat": 52.530971,
"lng": 13.384915
}
},
"end": {
"time": "2021-07-17T23:59:00Z",
"location": {
"lat": 52.530971,
"lng": 13.384915
}
}
}
],
"capacity": [
50
],
"limits": {
"maxDistance": 3000000,
"shiftTime": 86400
},
"amount": 1
}
],
"profiles": [
{
"type": "car",
"name": "car_1"
}
]
},
"plan": {
"jobs": [
{
"id": "job_1",
"tasks": {
"deliveries": [
{
"places": [
{
"times": [
[
"2021-07-17T00:01:00Z",
"2021-07-17T23:59:00Z"
]
],
"location": {
"lat": 52.400971,
"lng": 13.284915
},
"duration": 900
}
],
"demand": [
10
]
}
]
}
},
{
"id": "job_2",
"tasks": {
"deliveries": [
{
"places": [
{
"times": [
[
"2021-07-17T00:01:00Z",
"2021-07-17T23:59:00Z"
]
],
"location": {
"lat": 52.2346971,
"lng": 13.274915
},
"duration": 900
}
],
"demand": [
10
]
}
]
}
},
{
"id": "job_3",
"tasks": {
"deliveries": [
{
"places": [
{
"times": [
[
"2021-07-17T00:01:00Z",
"2021-07-17T23:59:00Z"
]
],
"location": {
"lat": 52.660971,
"lng": 13.314915
},
"duration": 900
}
],
"demand": [
10
]
}
]
}
},
{
"id": "job_4",
"tasks": {
"deliveries": [
{
"places": [
{
"times": [
[
"2021-07-17T00:01:00Z",
"2021-07-17T23:59:00Z"
]
],
"location": {
"lat": 52.244971,
"lng": 13.344915
},
"duration": 900
}
],
"demand": [
10
]
}
]
}
},
{
"id": "job_5",
"tasks": {
"deliveries": [
{
"places": [
{
"times": [
[
"2021-07-17T00:01:00Z",
"2021-07-17T23:59:00Z"
]
],
"location": {
"lat": 52.150971,
"lng": 13.214915
},
"duration": 900
}
],
"demand": [
10
]
}
]
}
},
{
"id": "job_6",
"tasks": {
"deliveries": [
{
"places": [
{
"times": [
[
"2021-07-17T00:01:00Z",
"2021-07-17T23:59:00Z"
]
],
"location": {
"lat": 52.430971,
"lng": 13.3454915
},
"duration": 900
}
],
"demand": [
10
]
}
]
}
},
{
"id": "job_7",
"tasks": {
"deliveries": [
{
"places": [
{
"times": [
[
"2021-07-17T00:01:00Z",
"2021-07-17T23:59:00Z"
]
],
"location": {
"lat": 52.2344971,
"lng": 13.224915
},
"duration": 900
}
],
"demand": [
10
]
}
]
}
}
,
{
"id": "job_8",
"tasks": {
"deliveries": [
{
"places": [
{
"times": [
[
"2021-07-17T00:01:00Z",
"2021-07-17T23:59:00Z"
]
],
"location": {
"lat": 52.330971,
"lng": 13.354915
},
"duration": 900
}
],
"demand": [
10
]
}
]
}
},
{
"id": "job_9",
"tasks": {
"deliveries": [
{
"places": [
{
"times": [
[
"2021-07-17T00:01:00Z",
"2021-07-17T23:59:00Z"
]
],
"location": {
"lat": 52.250971,
"lng": 13.316915
},
"duration": 900
}
],
"demand": [
10
]
}
]
}
},
{
"id": "job_10",
"tasks": {
"deliveries": [
{
"places": [
{
"times": [
[
"2021-07-17T00:01:00Z",
"2021-07-17T23:59:00Z"
]
],
"location": {
"lat": 52.420971,
"lng": 13.344915
},
"duration": 900
}
],
"demand": [
10
]
}
]
}
}
]
}
}
https://stackoverflow.com/questions/73377224
复制相似问题