SUMO - Simulation of Urban MObility
MSContainerTerminal.cpp
Go to the documentation of this file.
1 /****************************************************************************/
8 // A collection of stops for container where containers can be transhiped
9 // from one stop to another within the terminal.
10 /****************************************************************************/
11 // SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/
12 // Copyright (C) 2005-2015 DLR (http://www.dlr.de/) and contributors
13 /****************************************************************************/
14 //
15 // This file is part of SUMO.
16 // SUMO is free software: you can redistribute it and/or modify
17 // it under the terms of the GNU General Public License as published by
18 // the Free Software Foundation, either version 3 of the License, or
19 // (at your option) any later version.
20 //
21 /****************************************************************************/
22 
23 
24 // ===========================================================================
25 // included modules
26 // ===========================================================================
27 #ifdef _MSC_VER
28 #include <windows_config.h>
29 #else
30 #include <config.h>
31 #endif
32 
33 //#include <cassert>
34 //#include "MSTrigger.h"
35 #include "MSContainerTerminal.h"
36 //#include <utils/common/SUMOVehicle.h>
37 //#include <microsim/MSVehicleType.h>
38 
39 #ifdef CHECK_MEMORY_LEAKS
40 #include <foreign/nvwa/debug_new.h>
41 #endif // CHECK_MEMORY_LEAKS
42 
43 
44 // ===========================================================================
45 // method definitions
46 // ===========================================================================
48  const std::set<MSContainerStop*> stops)
49  : Named(id), myStops(stops) {}
50 
51 
53 
54 //
55 //const MSLane&
56 //MSContainerTerminal::getLane() const {
57 // return myLane;
58 //}
59 //
60 //
61 //SUMOReal
62 //MSContainerTerminal::getBeginLanePosition() const {
63 // return myBegPos;
64 //}
65 //
66 //
67 //SUMOReal
68 //MSContainerTerminal::getEndLanePosition() const {
69 // return myEndPos;
70 //}
71 //
72 //
73 //void
74 //MSContainerTerminal::enter(SUMOVehicle* what, SUMOReal beg, SUMOReal end) {
75 // myEndPositions[what] = std::pair<SUMOReal, SUMOReal>(beg, end);
76 // computeLastFreePos();
77 //}
78 //
79 //
80 //SUMOReal
81 //MSContainerTerminal::getLastFreePos(const SUMOVehicle& forVehicle) const {
82 // if (myLastFreePos != myEndPos) {
83 // return myLastFreePos - forVehicle.getVehicleType().getMinGap();
84 // }
85 // return myLastFreePos;
86 //}
87 //
88 //
89 //void
90 //MSContainerTerminal::leaveFrom(SUMOVehicle* what) {
91 // assert(myEndPositions.find(what) != myEndPositions.end());
92 // myEndPositions.erase(myEndPositions.find(what));
93 // computeLastFreePos();
94 //}
95 //
96 //
97 //void
98 //MSContainerTerminal::computeLastFreePos() {
99 // myLastFreePos = myEndPos;
100 // std::map<SUMOVehicle*, std::pair<SUMOReal, SUMOReal> >::iterator i;
101 // for (i = myEndPositions.begin(); i != myEndPositions.end(); i++) {
102 // if (myLastFreePos > (*i).second.second) {
103 // myLastFreePos = (*i).second.second;
104 // }
105 // }
106 //}
107 
108 
109 
110 /****************************************************************************/
111 
MSContainerTerminal(const std::string &id, const std::set< MSContainerStop * > stops)
Constructor.
Base class for objects which have an id.
Definition: Named.h:45
virtual ~MSContainerTerminal()
Destructor.