-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathoutput.py
72 lines (54 loc) · 1.6 KB
/
output.py
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
"""
Data Model for ActivitySim Outputs
Instructions: customize these example values for your own ActivitySim implementation
"""
from typing import List, Optional
from pydantic import BaseModel
import enums as e
from input import Household as InputHousehold
from input import Person as InputPerson
class Trip(BaseModel):
"""
Relevant variables for ActivitySim `trips` output data file.
Customize as needed for your application.
"""
id: int
purpose: e.Purpose
origin: int
destination: int
depart_from_origin: e.ModelTime
arrive_at_destination: e.ModelTime
mode: e.Mode
class Tour(BaseModel):
"""
Relevant variables for ActivitySim `tours` output data file.
Customize as needed for your application.
"""
id: int
purpose: e.Purpose
origin: int
destination: int
depart_from_origin: e.ModelTime
return_to_origin: e.ModelTime
trips: List[Trip]
mode: e.Mode
class Person(InputPerson):
"""
Relevant variables for ActivitySim `persons` output data file.
Customize as needed for your application.
"""
usual_work_location: Optional[int]
usual_school_location: Optional[int]
individual_tours: Optional[List[Tour]]
class JointTour(Tour):
"""
Relevant variables for ActivitySim `joint_tours` output data file.
Customize as needed for your application.
"""
participants: List[Person]
class Household(InputHousehold):
"""
Relevant variables for ActivitySim `household` output data file.
Customize as needed for your application.
"""
joint_tours: Optional[List[JointTour]] = None