-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathproblem.proto
73 lines (64 loc) · 2.06 KB
/
problem.proto
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
65
66
67
68
69
70
71
72
syntax = "proto2";
package drones;
message Location {
optional int32 x = 1;
optional int32 y = 2;
}
message Product {
optional int32 m = 1;
}
message Warehouse {
optional Location location = 1;
repeated int32 stock = 2;
}
message Order {
optional Location location = 1;
repeated int32 request = 2;
repeated int32 exact_product_order = 3;
}
message ProblemType {
// Nd = 1: There's only one drone.
optional bool Nd_1 = 1 [default = false];
// All product weights are equal: m[1] = m[2] = ... = m[p] = m and that equals
// drone capacity: M = m. If M != m, but m > M/2, it still falls into this
// category.
optional bool M_m = 2 [default = false];
// Nw = 1: There's only one warehouse.
optional bool Nw_1 = 3 [default = false];
// S0 = inf: All warehouses have infinite stock. We'll use max integer value
// for inf.
optional bool S0_inf = 4 [default = false];
// Np = 1: There's only one product.
optional bool Np_1 = 5 [default = false];
// No = 1: There's only one order.
optional bool No_1 = 6 [default = false];
// IPO = 1: There's only one item per order.
optional bool IPO_1 = 7 [default = false];
}
message Distances {
message DistanceTo {
// Contains one item per location code:
// Warehouse locations [0, Nw - 1] are coded as [0, Nw - 1]
// Order locations [0, No - 1] are coded as [Nw, No + Nw -1]
// Each item represents ceil distance to the location determined by it's
// index from the owner's (see src filed below) location.
repeated int32 dst = 1;
}
// Contains one item per location code.
// Each item repressents distances from the location determined by it's index
// to all locations (including the indexed location).
repeated DistanceTo src = 1;
}
message Problem {
optional int32 T = 1;
optional int32 Np = 2;
optional int32 Nw = 3;
optional int32 No = 4;
optional int32 Nd = 5;
optional int32 M = 6;
repeated Product product = 7;
repeated Warehouse warehouse = 8;
repeated Order order = 9;
optional ProblemType problem_type = 10;
optional Distances dist = 11;
}