Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
MSCFModel_Rail.h
Go to the documentation of this file.
1/****************************************************************************/
2// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.dev/sumo
3// Copyright (C) 2012-2024 German Aerospace Center (DLR) and others.
4// This program and the accompanying materials are made available under the
5// terms of the Eclipse Public License 2.0 which is available at
6// https://www.eclipse.org/legal/epl-2.0/
7// This Source Code may also be made available under the following Secondary
8// Licenses when the conditions for such availability set forth in the Eclipse
9// Public License 2.0 are satisfied: GNU General Public License, version 2
10// or later which is available at
11// https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html
12// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later
13/****************************************************************************/
18// <description missing>
19/****************************************************************************/
20#pragma once
21#include <config.h>
22
24#include "MSCFModel.h"
25
26
27
28class MSCFModel_Rail : public MSCFModel {
29
30public:
34 MSCFModel_Rail(const MSVehicleType* vtype);
35
36 double followSpeed(const MSVehicle* const veh, double speed, double gap2pred, double predSpeed,
37 double predMaxDecel, const MSVehicle* const pred = 0, const CalcReason usage = CalcReason::CURRENT) const;
38
39 virtual int getModelID() const;
40
41 virtual MSCFModel* duplicate(const MSVehicleType* vtype) const;
42
43
44
45 virtual ~MSCFModel_Rail();
46
47 virtual double maxNextSpeed(double speed, const MSVehicle* const veh) const;
48
49 virtual double minNextSpeed(double speed, const MSVehicle* const veh) const;
50
51 virtual double minNextSpeedEmergency(double speed, const MSVehicle* const veh = 0) const;
52
53 double getSpeedAfterMaxDecel(double v) const;
54
56
57 double finalizeSpeed(MSVehicle* const veh, double vPos) const;
58
59 double freeSpeed(const MSVehicle* const veh, double speed, double seen, double maxSpeed,
60 const bool onInsertion, const CalcReason usage = CalcReason::CURRENT) const;
61
62 bool startupDelayStopped() const {
63 // starup delay in trains is dominated by inertia + brake delay and thus applies to any kind of stopping
64 return true;
65 }
66
67private:
68
69 struct TrainParams {
70 // the vehicle mass in tons
71 double weight; // tons
72 // the mass factor
73 double mf;
74 double length;
75 double decl;
76 double vmax;
77 double recovery;
80 double maxPower; // kN
81 double maxTraction; // kN
82 double resCoef_constant; // kN
83 double resCoef_linear; // kN / (km/h)
84 double resCoef_quadratic; // kN / (km/h)^2
85
86 double getRotWeight() const {
87 return weight * mf;
88 }
89
90 double getResistance(double speed) const;
91 double getTraction(double speed) const;
92 };
93
94 std::vector<double> getValueTable(const MSVehicleType* vtype, SumoXMLAttr attr);
95
96
97public:
98 double stopSpeed(const MSVehicle* const veh, const double speed, double gap, double decel, const CalcReason usage = CalcReason::CURRENT) const;
99
100// class VehicleVariables : public MSCFModel::VehicleVariables {
101//
102// public:
103//
104// const std::string getTrainType() const { return myTrainType; };
105//
106// void setTrainType(std::string trainType) { myTrainType = trainType; }
107//
108// bool isNotYetInitialized() {
109// return notYetInitialized;
110// }
111//
112// void setInitialized() {
113// notYetInitialized = false;
114// }
115//
116// private:
117// std::string myTrainType;
118// bool notYetInitialized = true;
119//
120//
121// };
122
123private:
124
126
127 LinearApproxHelpers::LinearApproxMap initNGT400Traction() const { // early version of NGT 400
129 map[0] = 716.0;
130 map[10] = 700.0;
131 map[20] = 684.0;
132 map[30] = 669.0;
133 map[40] = 653.0;
134 map[50] = 637.0;
135 map[60] = 622.0;
136 map[70] = 606.0;
137 map[80] = 590.0;
138 map[90] = 574.0;
139 map[100] = 559.0;
140 map[110] = 543.0;
141 map[120] = 527.0;
142 map[130] = 507.0;
143 map[140] = 471.0;
144 map[150] = 439.0;
145 map[160] = 412.0;
146 map[170] = 388.0;
147 map[180] = 366.0;
148 map[190] = 347.0;
149 map[200] = 329.0;
150 map[210] = 314.0;
151 map[220] = 299.0;
152 map[230] = 286.0;
153 map[240] = 275.0;
154 map[250] = 264.0;
155 map[260] = 253.0;
156 map[270] = 244.0;
157 map[280] = 235.0;
158 map[290] = 227.0;
159 map[300] = 220.0;
160 map[310] = 213.0;
161 map[320] = 206.0;
162 map[330] = 200.0;
163 map[340] = 194.0;
164 map[350] = 188.0;
165 map[360] = 183.0;
166 map[370] = 178.0;
167 map[380] = 173.0;
168 map[390] = 169.0;
169 map[400] = 165.0;
170 map[410] = 160.6;
171 map[420] = 156.8;
172 map[430] = 153.2;
173 map[440] = 149.7;
174 map[450] = 146.4;
175 map[460] = 143.2;
176 map[470] = 140.1;
177 map[480] = 137.2;
178 LinearApproxHelpers::scalePoints(map, 1 / 3.6, 1);
179 return map;
180 }
181
182 LinearApproxHelpers::LinearApproxMap initNGT400Resistance() const { // early version of NGT 400
184 map[0] = 1.9;
185 map[10] = 2.1;
186 map[20] = 2.4;
187 map[30] = 2.9;
188 map[40] = 3.5;
189 map[50] = 4.2;
190 map[60] = 5.0;
191 map[70] = 6.0;
192 map[80] = 7.0;
193 map[90] = 8.2;
194 map[100] = 9.6;
195 map[110] = 11.0;
196 map[120] = 12.6;
197 map[130] = 14.3;
198 map[140] = 16.1;
199 map[150] = 18.0;
200 map[160] = 20.1;
201 map[170] = 22.3;
202 map[180] = 24.6;
203 map[190] = 27.0;
204 map[200] = 29.5;
205 map[210] = 32.2;
206 map[220] = 35.0;
207 map[230] = 37.9;
208 map[240] = 40.9;
209 map[250] = 44.1;
210 map[260] = 47.4;
211 map[270] = 50.8;
212 map[280] = 54.3;
213 map[290] = 58.0;
214 map[300] = 61.7;
215 map[310] = 65.6;
216 map[320] = 69.7;
217 map[330] = 73.8;
218 map[340] = 78.1;
219 map[350] = 82.4;
220 map[360] = 86.9;
221 map[370] = 91.6;
222 map[380] = 96.3;
223 map[390] = 101.2;
224 map[400] = 106.2;
225 map[410] = 111.3;
226 map[420] = 116.6;
227 map[430] = 121.9;
228 map[440] = 127.4;
229 map[450] = 133.0;
230 map[460] = 138.7;
231 map[470] = 144.6;
232 map[480] = 150.6;
233 LinearApproxHelpers::scalePoints(map, 1 / 3.6, 1);
234 return map;
235 }
236
238 TrainParams params;
239 params.weight = 384;
240 params.mf = 1.04;
241 params.length = 200;
242 params.decl = 0.9;
243 params.vmax = 500 / 3.6;
244 params.recovery = 0.6;
245 params.traction = initNGT400Traction();
247 return params;
248 }
249
252 map[0] = 274.5;
253 map[10] = 274.5;
254 map[20] = 274.5;
255 map[30] = 274.5;
256 map[40] = 274.5;
257 map[50] = 274.5;
258 map[60] = 274.5;
259 map[70] = 274.5;
260 map[80] = 274.5;
261 map[90] = 274.5;
262 map[100] = 274.5;
263 map[110] = 274.5;
264 map[120] = 274.5;
265 map[130] = 274.5;
266 map[140] = 274.5;
267 map[150] = 274.5;
268 map[160] = 274.5;
269 map[170] = 274.5;
270 map[180] = 274.5;
271 map[190] = 274.5;
272 map[200] = 274.5;
273 map[210] = 273;
274 map[220] = 262.3;
275 map[230] = 250;
276 map[240] = 239;
277 map[250] = 229;
278 map[260] = 222;
279 map[270] = 213;
280 map[280] = 205;
281 map[290] = 198;
282 map[300] = 191;
283 map[310] = 186;
284 map[320] = 180;
285 map[330] = 174;
286 map[340] = 169;
287 map[350] = 165;
288 map[360] = 160;
289 map[370] = 155.5;
290 map[380] = 151;
291 map[390] = 148;
292 map[400] = 144;
293 map[410] = 140;
294 map[420] = 136;
295 map[430] = 134;
296 map[440] = 131;
297 map[450] = 128;
298 map[460] = 125;
299 map[470] = 123;
300 LinearApproxHelpers::scalePoints(map, 1 / 3.6, 1);
301 return map;
302 }
303
306 map[0] = 5.71;
307 map[10] = 6.01;
308 map[20] = 6.4;
309 map[30] = 7.0;
310 map[40] = 7.51;
311 map[50] = 8.34;
312 map[60] = 9.2;
313 map[70] = 10.4;
314 map[80] = 11.3;
315 map[90] = 12.58;
316 map[100] = 14.05;
317 map[110] = 15.5;
318 map[120] = 16.9;
319 map[130] = 18.75;
320 map[140] = 20.77;
321 map[150] = 22.9;
322 map[160] = 25.0;
323 map[170] = 26.9;
324 map[180] = 29.38;
325 map[190] = 32.0;
326 map[200] = 34.5;
327 map[210] = 37.0;
328 map[220] = 39.91;
329 map[230] = 43.11;
330 map[240] = 46.4;
331 map[250] = 49.3;
332 map[260] = 52.4;
333 map[270] = 56.09;
334 map[280] = 59.8;
335 map[290] = 63.7;
336 map[300] = 66.8;
337 map[310] = 71.0;
338 map[320] = 75.39;
339 map[330] = 79.9;
340 map[340] = 84.1;
341 map[350] = 87.9;
342 map[360] = 92.7;
343 map[370] = 97.6;
344 map[380] = 102.0;
345 map[390] = 107.0;
346 map[400] = 112.0;
347 map[410] = 117.5;
348 map[420] = 123.0;
349 map[430] = 128.3;
350 map[440] = 133.3;
351 map[450] = 139.2;
352 map[460] = 145.5;
353 map[470] = 150.0;
354 LinearApproxHelpers::scalePoints(map, 1 / 3.6, 1);
355 return map;
356 }
357
359 TrainParams params;
360 params.weight = 384;
361 params.mf = 1.04;
362 params.length = 200;
363 params.decl = 0.9;
364 params.vmax = 430 / 3.6;
365 params.recovery = 0.6;
368 return params;
369 }
370
373 map[0] = 400;
374 map[10] = 394;
375 map[20] = 388;
376 map[30] = 382;
377 map[40] = 377;
378 map[50] = 372;
379 map[60] = 369;
380 map[70] = 366;
381 map[80] = 363;
382 map[90] = 361;
383 map[100] = 349;
384 map[110] = 317;
385 map[120] = 290;
386 map[130] = 268;
387 map[140] = 249;
388 map[150] = 232;
389 map[160] = 217;
390 map[170] = 205;
391 map[180] = 193;
392 map[190] = 183;
393 map[200] = 174;
394 map[210] = 165;
395 map[220] = 158;
396 map[230] = 151;
397 map[240] = 145;
398 map[250] = 139;
399 LinearApproxHelpers::scalePoints(map, 1 / 3.6, 1);
400 return map;
401 }
402
405 map[0] = 10.7;
406 map[10] = 12.3;
407 map[20] = 14.2;
408 map[30] = 16.4;
409 map[40] = 18.7;
410 map[50] = 21.3;
411 map[60] = 24.2;
412 map[70] = 27.3;
413 map[80] = 30.6;
414 map[90] = 34.1;
415 map[100] = 37.9;
416 map[110] = 41.9;
417 map[120] = 46.2;
418 map[130] = 50.6;
419 map[140] = 55.4;
420 map[150] = 60.4;
421 map[160] = 65.6;
422 map[170] = 71.1;
423 map[180] = 76.7;
424 map[190] = 82.6;
425 map[200] = 88.8;
426 map[210] = 95.2;
427 map[220] = 101.8;
428 map[230] = 108.7;
429 map[240] = 115.8;
430 map[250] = 123.1;
431 LinearApproxHelpers::scalePoints(map, 1 / 3.6, 1);
432 return map;
433 }
434
436 TrainParams params;
437 params.weight = 876;
438 params.mf = 1.1;
439 params.length = 358;
440 params.decl = 0.5;
441 params.vmax = 250 / 3.6;
442 params.recovery = 0.1;
443 params.traction = initICE1Traction();
445 return params;
446 }
447
449 TrainParams params;
450 params.weight = 420;
451 params.mf = 1.04;
452 params.length = 200;
453 params.decl = 0.5;
454 params.vmax = 300 / 3.6;
455 params.recovery = 0.6;
456 params.traction = initICE3Traction();
458 return params;
459 }
460
463 map[0] = 300;
464 map[10] = 298;
465 map[20] = 297;
466 map[30] = 295;
467 map[40] = 293;
468 map[50] = 292;
469 map[60] = 290;
470 map[70] = 288;
471 map[80] = 286.5;
472 map[90] = 285;
473 map[100] = 283;
474 map[110] = 262;
475 map[120] = 240;
476 map[130] = 221;
477 map[140] = 206;
478 map[150] = 192;
479 map[160] = 180;
480 map[170] = 169;
481 map[180] = 160;
482 map[190] = 152;
483 map[200] = 144;
484 map[210] = 137;
485 map[220] = 131;
486 map[230] = 125;
487 map[240] = 120;
488 map[250] = 115;
489 map[260] = 111;
490 map[270] = 107;
491 map[280] = 103;
492 map[290] = 99;
493 map[300] = 96;
494 LinearApproxHelpers::scalePoints(map, 1 / 3.6, 1);
495 return map;
496 }
497
500 map[0] = 7.4;
501 map[10] = 7.6;
502 map[20] = 8.0;
503 map[30] = 8.4;
504 map[40] = 9.1;
505 map[50] = 9.8;
506 map[60] = 10.7;
507 map[70] = 11.7;
508 map[80] = 12.8;
509 map[90] = 14.1;
510 map[100] = 15.5;
511 map[110] = 17.1;
512 map[120] = 18.8;
513 map[130] = 20.6;
514 map[140] = 22.6;
515 map[150] = 24.6;
516 map[160] = 26.9;
517 map[170] = 29.2;
518 map[180] = 31.7;
519 map[190] = 34.3;
520 map[200] = 37.1;
521 map[210] = 40.0;
522 map[220] = 43.1;
523 map[230] = 46.2;
524 map[240] = 49.6;
525 map[250] = 53.0;
526 map[260] = 56.6;
527 map[270] = 60.3;
528 map[280] = 64.1;
529 map[290] = 68.1;
530 map[300] = 71.8;
531 LinearApproxHelpers::scalePoints(map, 1 / 3.6, 1);
532 return map;
533 }
534
536 TrainParams params;
537 params.weight = 425.5;
538 params.mf = 1.1;
539 params.length = 207;
540 params.decl = 0.5;
541 params.vmax = 160 / 3.6;
542 params.recovery = 0.1;
545 return params;
546 }
547
550 map[0] = 300;
551 map[10] = 300;
552 map[20] = 300;
553 map[30] = 300;
554 map[40] = 300;
555 map[50] = 300;
556 map[60] = 300;
557 map[70] = 289;
558 map[80] = 253;
559 map[90] = 224;
560 map[100] = 202;
561 map[110] = 183;
562 map[120] = 168;
563 map[130] = 155;
564 map[140] = 144;
565 map[150] = 134;
566 map[160] = 125;
567 LinearApproxHelpers::scalePoints(map, 1 / 3.6, 1);
568 return map;
569 }
570
573 map[0] = 8.5;
574 map[10] = 8.9;
575 map[20] = 9.5;
576 map[30] = 10.4;
577 map[40] = 11.4;
578 map[50] = 12.7;
579 map[60] = 14.1;
580 map[70] = 15.8;
581 map[80] = 17.7;
582 map[90] = 19.8;
583 map[100] = 22.6;
584 map[110] = 24.6;
585 map[120] = 27.3;
586 map[130] = 30.2;
587 map[140] = 33.3;
588 map[150] = 36.6;
589 map[160] = 40.2;
590 LinearApproxHelpers::scalePoints(map, 1 / 3.6, 1);
591 return map;
592 }
593
595 TrainParams params;
596 params.weight = 72.2;
597 params.mf = 1.04;
598 params.length = 46;
599 params.decl = 0.5;
600 params.vmax = 120 / 3.6;
601 params.recovery = 0;
602 params.traction = initRB628Traction();
604 return params;
605 }
606
609 map[0] = 60;
610 map[10] = 53.8;
611 map[20] = 47.6;
612 map[30] = 36.9;
613 map[40] = 28.7;
614 map[50] = 23.5;
615 map[60] = 20.0;
616 map[70] = 17.5;
617 map[80] = 15.2;
618 map[90] = 13.9;
619 map[100] = 12.8;
620 map[110] = 11.7;
621 map[120] = 10.8;
622 LinearApproxHelpers::scalePoints(map, 1 / 3.6, 1);
623 return map;
624 }
625
628 map[0] = 1.29;
629 map[10] = 1.46;
630 map[20] = 1.73;
631 map[30] = 2.08;
632 map[40] = 2.52;
633 map[50] = 3.05;
634 map[60] = 3.66;
635 map[70] = 4.36;
636 map[80] = 5.16;
637 map[90] = 6.03;
638 map[100] = 7.00;
639 map[110] = 8.06;
640 map[120] = 9.2;
641 LinearApproxHelpers::scalePoints(map, 1 / 3.6, 1);
642 return map;
643 }
644
646 TrainParams params;
647 params.weight = 1440;
648 params.mf = 1.06;
649 params.length = 512;
650 params.decl = 0.3;
651 params.vmax = 120 / 3.6;
652 params.recovery = 0.05;
653 params.traction = initFreightTraction();
655 return params;
656 }
657
660 map[0] = 300;
661 map[10] = 296;
662 map[20] = 293;
663 map[30] = 289;
664 map[40] = 286;
665 map[50] = 282;
666 map[60] = 279;
667 map[70] = 275;
668 map[80] = 272;
669 map[90] = 255;
670 map[100] = 230;
671 map[110] = 209;
672 map[120] = 190;//guessed value
673 LinearApproxHelpers::scalePoints(map, 1 / 3.6, 1);
674 return map;
675 }
676
679 map[0] = 1.9;
680 map[10] = 4.3;
681 map[20] = 8.5;
682 map[30] = 14.3;
683 map[40] = 21.7;
684 map[50] = 30.8;
685 map[60] = 41.5;
686 map[70] = 53.8;
687 map[80] = 67.8;
688 map[90] = 83.5;
689 map[100] = 110.7;
690 map[110] = 119.6;
691 map[120] = 140.2;
692 LinearApproxHelpers::scalePoints(map, 1 / 3.6, 1);
693 return map;
694 }
695
698 map[0] = 150;
699 map[10] = 150;
700 map[20] = 150;
701 map[30] = 150;
702 map[40] = 150;
703 map[50] = 150;
704 map[60] = 140;
705 map[70] = 120;
706 map[80] = 105;
707 map[90] = 93;
708 map[100] = 84;
709 map[110] = 75;
710 map[120] = 70;
711 map[130] = 56;
712 map[140] = 52;
713 map[150] = 46;
714 map[160] = 40;
715 LinearApproxHelpers::scalePoints(map, 1 / 3.6, 1);
716 return map;
717 }
718
721 map[0] = 2.6;
722 map[10] = 2.9;
723 map[20] = 3.3;
724 map[30] = 3.7;
725 map[40] = 4.3;
726 map[50] = 4.9;
727 map[60] = 5.7;
728 map[70] = 6.6;
729 map[80] = 7.5;
730 map[90] = 8.6;
731 map[100] = 9.7;
732 map[110] = 11.0;
733 map[120] = 12.3;
734 map[130] = 13.8;
735 map[140] = 15.3;
736 map[150] = 16.9;
737 map[160] = 18.7;
738 LinearApproxHelpers::scalePoints(map, 1 / 3.6, 1);
739 return map;
740 }
741
743 TrainParams params;
744 params.weight = 138;
745 params.mf = 1.04;
746 params.length = 67.5;
747 params.decl = 1.0;
748 params.vmax = 160 / 3.6;
749 params.recovery = 0.6;
750 params.traction = initRB425Traction();
752 return params;
753 }
754
757 map[0] = 106.15;
758 map[10] = 106.15;
759 map[20] = 106.15;
760 map[30] = 106.15;
761 map[40] = 106.15;
762 map[50] = 106.15;
763 map[60] = 103.73;
764 map[70] = 88.70;
765 map[80] = 77.47;
766 map[90] = 68.76;
767 map[100] = 61.82;
768 map[110] = 56.15;
769 map[120] = 51.43;
770 map[130] = 47.44;
771 map[140] = 44.03;
772 map[150] = 41.07;
773 map[160] = 38.49;
774 LinearApproxHelpers::scalePoints(map, 1 / 3.6, 1);
775 return map;
776 }
777
778
781 map[0] = 1.01;
782 map[10] = 1.09;
783 map[20] = 1.27;
784 map[30] = 1.55;
785 map[40] = 1.93;
786 map[50] = 2.41;
787 map[60] = 2.99;
788 map[70] = 3.67;
789 map[80] = 4.46;
790 map[90] = 5.34;
791 map[100] = 6.34;
792 map[110] = 7.44;
793 map[120] = 8.64;
794 map[130] = 9.96;
795 map[140] = 11.38;
796 map[150] = 12.91;
797 map[160] = 14.56;
798 LinearApproxHelpers::scalePoints(map, 1 / 3.6, 1);
799 return map;
800 }
801
803 TrainParams params;
804 params.weight = 105.5;
805 params.mf = 1.05;
806 params.length = 46.56;
807 params.decl = 1.1;
808 params.vmax = 160 / 3.6;
809 params.recovery = 0.3;
812 return params;
813 }
814
817 map[0] = 104.50;
818 map[10] = 104.50;
819 map[20] = 104.50;
820 map[30] = 104.50;
821 map[40] = 104.50;
822 map[50] = 104.50;
823 map[60] = 102.00;
824 map[70] = 87.43;
825 map[80] = 76.50;
826 map[90] = 68.00;
827 map[100] = 61.20;
828 map[110] = 55.64;
829 map[120] = 51.00;
830 map[130] = 47.08;
831 map[140] = 43.71;
832 map[150] = 40.80;
833 map[160] = 38.25;
834 LinearApproxHelpers::scalePoints(map, 1 / 3.6, 1);
835 return map;
836 }
837
838
841 map[0] = 1.01;
842 map[10] = 1.09;
843 map[20] = 1.27;
844 map[30] = 1.55;
845 map[40] = 1.93;
846 map[50] = 2.41;
847 map[60] = 2.99;
848 map[70] = 3.67;
849 map[80] = 4.45;
850 map[90] = 5.34;
851 map[100] = 6.34;
852 map[110] = 7.43;
853 map[120] = 8.64;
854 map[130] = 9.95;
855 map[140] = 11.38;
856 map[150] = 12.91;
857 map[160] = 14.56;
858 LinearApproxHelpers::scalePoints(map, 1 / 3.6, 1);
859 return map;
860 }
861
863 TrainParams params;
864 params.weight = 105.4;
865 params.mf = 1.05;
866 params.length = 46.56;
867 params.decl = 1.1;
868 params.vmax = 160 / 3.6;
869 params.recovery = 0.3;
872 return params;
873 }
874
876 TrainParams params;
877 params.weight = 100;
878 params.mf = 1.05;
879 params.length = 100;
880 params.decl = 1;
881 params.vmax = 200 / 3.6;
882 params.recovery = 0.3;
883 return params;
884 }
885// void initVehicleVariables(const MSVehicle *const pVehicle, MSCFModel_Rail::VehicleVariables *pVariables)const;
886
887};
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
std::map< double, double > LinearApproxMap
static void scalePoints(LinearApproxMap &map, double keyFactor, double valueFactor)
Scale both key and values.
TrainParams initICE3Params() const
TrainParams initNGT400_16Params() const
virtual ~MSCFModel_Rail()
TrainParams initREDosto7Params() const
LinearApproxHelpers::LinearApproxMap initICE3Resistance() const
MSCFModel::VehicleVariables * createVehicleVariables() const
Returns model specific values which are stored inside a vehicle and must be used with casting.
virtual double minNextSpeedEmergency(double speed, const MSVehicle *const veh=0) const
Returns the minimum speed after emergency braking, given the current speed (depends on the numerical ...
TrainParams initCustomParams() const
TrainParams initICE1Params() const
TrainParams initMireoPlusB2TParams() const
LinearApproxHelpers::LinearApproxMap initRB425Resistance() const
double freeSpeed(const MSVehicle *const veh, double speed, double seen, double maxSpeed, const bool onInsertion, const CalcReason usage=CalcReason::CURRENT) const
Computes the vehicle's safe speed without a leader.
TrainParams initRB628Params() const
virtual MSCFModel * duplicate(const MSVehicleType *vtype) const
Duplicates the car-following model.
LinearApproxHelpers::LinearApproxMap initICE1Resistance() const
LinearApproxHelpers::LinearApproxMap initMireoPlusH2TResistance() const
LinearApproxHelpers::LinearApproxMap initFreightTraction() const
virtual int getModelID() const
Returns the model's ID; the XML-Tag number is used.
double getSpeedAfterMaxDecel(double v) const
Returns the velocity after maximum deceleration.
TrainParams myTrainParams
LinearApproxHelpers::LinearApproxMap initMireoPlusB2TTraction() const
LinearApproxHelpers::LinearApproxMap initNGT400Resistance() const
LinearApproxHelpers::LinearApproxMap initREDosto7Traction() const
LinearApproxHelpers::LinearApproxMap initNGT400Traction() const
virtual double minNextSpeed(double speed, const MSVehicle *const veh) const
Returns the minimum speed given the current speed (depends on the numerical update scheme and its ste...
std::vector< double > getValueTable(const MSVehicleType *vtype, SumoXMLAttr attr)
LinearApproxHelpers::LinearApproxMap initMireoPlusB2TResistance() const
LinearApproxHelpers::LinearApproxMap initICE3Traction() const
double followSpeed(const MSVehicle *const veh, double speed, double gap2pred, double predSpeed, double predMaxDecel, const MSVehicle *const pred=0, const CalcReason usage=CalcReason::CURRENT) const
Computes the vehicle's follow speed (no dawdling)
LinearApproxHelpers::LinearApproxMap initRB425Traction() const
TrainParams initRB425Params() const
LinearApproxHelpers::LinearApproxMap initRB628Traction() const
LinearApproxHelpers::LinearApproxMap initNGT400_16Traction() const
TrainParams initFreightParams() const
LinearApproxHelpers::LinearApproxMap initREDosto7Resistance() const
virtual double maxNextSpeed(double speed, const MSVehicle *const veh) const
Returns the maximum speed given the current speed.
TrainParams initNGT400Params() const
LinearApproxHelpers::LinearApproxMap initFreightResistance() const
LinearApproxHelpers::LinearApproxMap initMireoPlusH2TTraction() const
LinearApproxHelpers::LinearApproxMap initICE1Traction() const
LinearApproxHelpers::LinearApproxMap initNGT400_16Resistance() const
TrainParams initMireoPlusH2TParams() const
LinearApproxHelpers::LinearApproxMap initRB628Resistance() const
bool startupDelayStopped() const
whether startupDelay should be applied after stopping
double finalizeSpeed(MSVehicle *const veh, double vPos) const
Applies interaction with stops and lane changing model influences. Called at most once per simulation...
double stopSpeed(const MSVehicle *const veh, const double speed, double gap, double decel, const CalcReason usage=CalcReason::CURRENT) const
Computes the vehicle's safe speed for approaching a non-moving obstacle (no dawdling)
The car-following model abstraction.
Definition MSCFModel.h:55
CalcReason
What the return value of stop/follow/free-Speed is used for.
Definition MSCFModel.h:77
@ CURRENT
the return value is used for calculating the next speed
Definition MSCFModel.h:79
Representation of a vehicle in the micro simulation.
Definition MSVehicle.h:77
The car-following model and parameter.
LinearApproxHelpers::LinearApproxMap traction
LinearApproxHelpers::LinearApproxMap resistance
double getTraction(double speed) const
double getResistance(double speed) const