-
Notifications
You must be signed in to change notification settings - Fork 0
/
model.fbs
64 lines (52 loc) · 1.05 KB
/
model.fbs
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
namespace OutbreakSim.Model;
struct Vec2 {
x:float;
y:float;
}
struct Bounds {
min:Vec2;
max:Vec2;
}
table Agents {
age:[uint8] (required);
household_index:[uint32] (required);
workplace_index:[uint32] (required);
}
// TODO Parent Buildings for Lifts, Shared Gyms, etc.
table Households {
pos:[Vec2] (required);
}
table Workplaces {
pos:[Vec2] (required);
}
struct TransitNode {
pos:Vec2;
}
struct TransitEdge {
start_node_index:uint16;
end_node_index:uint16;
weight:uint8;
//transit_type:TransitType;
}
struct TransitRide {
start_time:uint16;
duration_mins:uint16;
}
table TransitEdgeRides {
start_node_index:uint16;
end_node_index:uint16;
rides:[TransitRide] (required);
}
table TransitGraph {
nodes:[TransitNode] (required);
edges:[TransitEdge] (required);
edge_rides:[TransitEdgeRides] (required);
}
table Model {
bounds:Bounds (required);
agents:Agents (required);
households:Households (required);
workplaces:Workplaces (required);
transit_graph:TransitGraph (required);
}
root_type Model;