-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathNotes.txt
64 lines (46 loc) · 1.49 KB
/
Notes.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
ALNS
Problem
Solution
Vehicle
Route
1. Solution:
1. delivery should satisfy the customer demands
2. pickup should satisfy the customer demands
3. each customer should be visited at least once
2. Vehicle:
1. the tour must be consecutive
3. Route:
1. each tour should start and end in the depot
2. start time and end time for one tour should be within the same shift interval
3. vehicle capacity can never be exceeded
4. delivery and pickup time should be within the customer's open time
customers: 0 - > 1 -> 2 -> 0
schedule: 80 -> 90 -> 100 -> 110
load: 200 -> 10 -> 30 -> 40
class Solution
find_route
cost
class Vehicle
class Route
var customers = [0 , 1, 2, 0]
var schedule = [xx, xx, xx, xx]
var load = [100, 110, 120, 130, 30]
var plan = [[10, 20], [20, 30], [40, 50], [100, 0]]
def cost(self)
def routing_cost(self)
def invalidate_routing_cache(self):
def distance(customers: List[int])
__init__(self, customers, schedule, load, plan):
- can_insert
remove_customer(self, customer: int)
- remove from customers, plan
- update the schedule, load
- can_insert
insert_customer(self, customer: int, at: int, demands)
- add to customers, plan
- update the schedule, load
- can_insert
can_insert(self, customer: int, at: int)
- check the constraint 3.1
- check the constraint 3.2
- check the constraint 3.3