@@ -101,25 +101,25 @@ private void startEvent(final Attributes atts) {
101
101
102
102
// === material related to wait2link below here ===
103
103
if (LinkLeaveEvent .EVENT_TYPE .equals (eventType )) {
104
- this .events .processEvent (new LinkLeaveEvent (time ,
105
- Id .create (atts .getValue (LinkLeaveEvent .ATTRIBUTE_VEHICLE ), Vehicle .class ),
104
+ this .events .processEvent (new LinkLeaveEvent (time ,
105
+ Id .create (atts .getValue (LinkLeaveEvent .ATTRIBUTE_VEHICLE ), Vehicle .class ),
106
106
Id .create (atts .getValue (LinkLeaveEvent .ATTRIBUTE_LINK ), Link .class )
107
107
// had driver id in previous version
108
108
));
109
109
} else if (LinkEnterEvent .EVENT_TYPE .equals (eventType )) {
110
- this .events .processEvent (new LinkEnterEvent (time ,
111
- Id .create (atts .getValue (LinkEnterEvent .ATTRIBUTE_VEHICLE ), Vehicle .class ),
110
+ this .events .processEvent (new LinkEnterEvent (time ,
111
+ Id .create (atts .getValue (LinkEnterEvent .ATTRIBUTE_VEHICLE ), Vehicle .class ),
112
112
Id .create (atts .getValue (LinkEnterEvent .ATTRIBUTE_LINK ), Link .class )
113
113
// had driver id in previous version
114
114
));
115
115
} else if (VehicleEntersTrafficEvent .EVENT_TYPE .equals (eventType ) ) {
116
116
// (this is the new version, marked by the new events name)
117
117
118
- this .events .processEvent (new VehicleEntersTrafficEvent (time ,
118
+ this .events .processEvent (new VehicleEntersTrafficEvent (time ,
119
119
Id .create (atts .getValue (HasPersonId .ATTRIBUTE_PERSON ), Person .class ),
120
- Id .create (atts .getValue (VehicleEntersTrafficEvent .ATTRIBUTE_LINK ), Link .class ),
120
+ Id .create (atts .getValue (VehicleEntersTrafficEvent .ATTRIBUTE_LINK ), Link .class ),
121
121
Id .create (atts .getValue (VehicleEntersTrafficEvent .ATTRIBUTE_VEHICLE ), Vehicle .class ),
122
- atts .getValue (VehicleEntersTrafficEvent .ATTRIBUTE_NETWORKMODE ),
122
+ atts .getValue (VehicleEntersTrafficEvent .ATTRIBUTE_NETWORKMODE ),
123
123
Double .parseDouble ( atts .getValue ( VehicleEntersTrafficEvent .ATTRIBUTE_POSITION ) )
124
124
));
125
125
} else if ( "wait2link" .equals (eventType ) ) {
@@ -140,19 +140,19 @@ private void startEvent(final Attributes atts) {
140
140
} else {
141
141
position = 1.0 ;
142
142
}
143
- this .events .processEvent (new VehicleEntersTrafficEvent (time ,
143
+ this .events .processEvent (new VehicleEntersTrafficEvent (time ,
144
144
Id .create (atts .getValue (HasPersonId .ATTRIBUTE_PERSON ), Person .class ),
145
- Id .create (atts .getValue (VehicleEntersTrafficEvent .ATTRIBUTE_LINK ), Link .class ),
145
+ Id .create (atts .getValue (VehicleEntersTrafficEvent .ATTRIBUTE_LINK ), Link .class ),
146
146
vehicleId ,
147
- atts .getValue (VehicleEntersTrafficEvent .ATTRIBUTE_NETWORKMODE ),
147
+ atts .getValue (VehicleEntersTrafficEvent .ATTRIBUTE_NETWORKMODE ),
148
148
position
149
149
));
150
150
} else if (VehicleLeavesTrafficEvent .EVENT_TYPE .equals (eventType )) {
151
- this .events .processEvent (new VehicleLeavesTrafficEvent (time ,
152
- Id .create (atts .getValue (VehicleLeavesTrafficEvent .ATTRIBUTE_DRIVER ), Person .class ),
153
- Id .create (atts .getValue (VehicleLeavesTrafficEvent .ATTRIBUTE_LINK ), Link .class ),
154
- atts .getValue (VehicleLeavesTrafficEvent .ATTRIBUTE_VEHICLE ) == null ? null : Id .create (atts .getValue (VehicleLeavesTrafficEvent .ATTRIBUTE_VEHICLE ), Vehicle .class ),
155
- atts .getValue (VehicleLeavesTrafficEvent .ATTRIBUTE_NETWORKMODE ),
151
+ this .events .processEvent (new VehicleLeavesTrafficEvent (time ,
152
+ Id .create (atts .getValue (VehicleLeavesTrafficEvent .ATTRIBUTE_DRIVER ), Person .class ),
153
+ Id .create (atts .getValue (VehicleLeavesTrafficEvent .ATTRIBUTE_LINK ), Link .class ),
154
+ atts .getValue (VehicleLeavesTrafficEvent .ATTRIBUTE_VEHICLE ) == null ? null : Id .create (atts .getValue (VehicleLeavesTrafficEvent .ATTRIBUTE_VEHICLE ), Vehicle .class ),
155
+ atts .getValue (VehicleLeavesTrafficEvent .ATTRIBUTE_NETWORKMODE ),
156
156
Double .parseDouble ( atts .getValue ( VehicleLeavesTrafficEvent .ATTRIBUTE_POSITION ) )
157
157
));
158
158
}
@@ -165,7 +165,7 @@ else if (ActivityEndEvent.EVENT_TYPE.equals(eventType)) {
165
165
coord = new Coord ( xx , yy ) ;
166
166
}
167
167
this .events .processEvent (new ActivityEndEvent (
168
- time ,
168
+ time ,
169
169
Id .create (atts .getValue (HasPersonId .ATTRIBUTE_PERSON ), Person .class ),
170
170
Id .create (atts .getValue (HasLinkId .ATTRIBUTE_LINK ), Link .class ),
171
171
atts .getValue (HasFacilityId .ATTRIBUTE_FACILITY ) == null ? null : Id .create (atts .getValue (HasFacilityId .ATTRIBUTE_FACILITY ),
@@ -208,7 +208,7 @@ else if (ActivityEndEvent.EVENT_TYPE.equals(eventType)) {
208
208
Id <Link > linkId = linkIdString == null ? null : Id .create (linkIdString , Link .class );
209
209
this .events .processEvent (new VehicleAbortsEvent (time , Id .create (atts .getValue (VehicleAbortsEvent .ATTRIBUTE_VEHICLE ), Vehicle .class ), linkId ));
210
210
} else if (PersonMoneyEvent .EVENT_TYPE .equals (eventType ) || "agentMoney" .equals (eventType )) {
211
- this .events .processEvent (new PersonMoneyEvent (time , Id .create (atts .getValue (PersonMoneyEvent .ATTRIBUTE_PERSON ), Person .class ), Double .parseDouble (atts .getValue (PersonMoneyEvent .ATTRIBUTE_AMOUNT )), atts .getValue (PersonMoneyEvent .ATTRIBUTE_PURPOSE ), atts .getValue (PersonMoneyEvent .ATTRIBUTE_TRANSACTION_PARTNER )));
211
+ this .events .processEvent (new PersonMoneyEvent (time , Id .create (atts .getValue (PersonMoneyEvent .ATTRIBUTE_PERSON ), Person .class ), Double .parseDouble (atts .getValue (PersonMoneyEvent .ATTRIBUTE_AMOUNT )), atts .getValue (PersonMoneyEvent .ATTRIBUTE_PURPOSE ), atts .getValue (PersonMoneyEvent .ATTRIBUTE_TRANSACTION_PARTNER ), atts . getValue ( PersonMoneyEvent . ATTRIBUTE_REFERENCE ) ));
212
212
} else if (PersonScoreEvent .EVENT_TYPE .equals (eventType ) || "personScore" .equals (eventType )) {
213
213
this .events .processEvent (new PersonScoreEvent (time , Id .create (atts .getValue (PersonScoreEvent .ATTRIBUTE_PERSON ), Person .class ), Double .parseDouble (atts .getValue (PersonScoreEvent .ATTRIBUTE_AMOUNT )), atts .getValue (PersonScoreEvent .ATTRIBUTE_KIND )));
214
214
} else if (PersonEntersVehicleEvent .EVENT_TYPE .equals (eventType )) {
0 commit comments