MATSIM
Classes | Public Member Functions | Public Attributes | List of all members
org.matsim.visum.VisumNetwork Class Reference

Classes

class  Departure
 
class  EdgeType
 
class  LineRouteItem
 
class  Stop
 
class  StopArea
 
class  StopPoint
 
class  TimeProfile
 
class  TimeProfileItem
 
class  TransitLine
 
class  TransitLineRoute
 
class  VehicleCombination
 
class  VehicleUnit
 

Public Member Functions

void addEdgeType (final EdgeType edgeType)
 
void addStop (final Stop stop)
 
void addStopArea (final StopArea stopAr)
 
void addStopPoint (final StopPoint stopPt)
 
void addline (final TransitLine l1)
 
void addLineRoute (final TransitLineRoute lr1)
 
void addLineRouteItem (final LineRouteItem lri1)
 
void addTimeProfile (final TimeProfile tp1)
 
void addTimeProfileItem (final TimeProfileItem tpi1)
 
void addDeparture (final Departure d)
 
void addVehicleUnit (final VehicleUnit vehUnit)
 
void addVehicleCombination (final VehicleCombination vehComb)
 

Public Attributes

final Map< Id< EdgeType >, EdgeTypeedgeTypes = new HashMap<>()
 
final Map< Id< Stop >, Stopstops = new TreeMap<>()
 
final Map< Id< StopArea >, StopAreastopAreas = new TreeMap<>()
 
final Map< String, StopPointstopPoints = new TreeMap<String, StopPoint>()
 
final Map< Id< TransitLine >, TransitLinelines = new TreeMap<Id<TransitLine>, TransitLine>()
 
final Map< String, TransitLineRoutelineRoutes = new TreeMap<String, TransitLineRoute>()
 
final Map< String, LineRouteItemlineRouteItems = new TreeMap<String, LineRouteItem>()
 
final Map< String, TimeProfiletimeProfiles = new TreeMap<String, TimeProfile>()
 
final Map< String, TimeProfileItemtimeProfileItems = new LinkedHashMap<String, TimeProfileItem>()
 
final Map< String, Departuredepartures = new TreeMap<String, Departure>()
 
final Map< String, DeparturedeparturesByNo = new TreeMap<String, Departure>()
 
final Map< String, VehicleUnitvehicleUnits = new HashMap<String, VehicleUnit>()
 
final Map< String, VehicleCombinationvehicleCombinations = new HashMap<String, VehicleCombination>()
 

Detailed Description

Author
mrieser
mshah

Definition at line 37 of file VisumNetwork.java.

Member Function Documentation

◆ addEdgeType()

void org.matsim.visum.VisumNetwork.addEdgeType ( final EdgeType  edgeType)

Definition at line 53 of file VisumNetwork.java.

References org.matsim.visum.VisumNetwork.EdgeType.id.

Referenced by org.matsim.visum.VisumNetworkReader.readEdgeTypes().

53  {
54  EdgeType oldEdgeType = edgeTypes.put(edgeType.id, edgeType);
55  if (oldEdgeType != null) {
56  throw new IllegalArgumentException("Duplicate edge type.");
57  }
58  }
final Map< Id< EdgeType >, EdgeType > edgeTypes

◆ addStop()

void org.matsim.visum.VisumNetwork.addStop ( final Stop  stop)

Definition at line 60 of file VisumNetwork.java.

References org.matsim.visum.VisumNetwork.Stop.id.

Referenced by org.matsim.visum.VisumNetworkReader.readStops().

60  {
61  Stop oldStop = this.stops.put(stop.id, stop);
62  if (oldStop != null) {
63  // there was already a stop with the same id
64  // re-do the insertion
65  this.stops.put(oldStop.id, oldStop);
66  throw new IllegalArgumentException("There is already a stop with the same Name");
67  }
68 
69  }
final Map< Id< Stop >, Stop > stops

◆ addStopArea()

void org.matsim.visum.VisumNetwork.addStopArea ( final StopArea  stopAr)

Definition at line 71 of file VisumNetwork.java.

References org.matsim.visum.VisumNetwork.StopArea.id.

Referenced by org.matsim.visum.VisumNetworkReader.readStopAreas().

71  {
72  StopArea oldStopAr = this.stopAreas.put(stopAr.id, stopAr);
73  if (oldStopAr != null) {
74  // there was already a stop point with the same id
75  // re-do the insertion
76  this.stopAreas.put(oldStopAr.id, oldStopAr);
77  throw new IllegalArgumentException("There is already a stop area with the same id.");
78  }
79 
80  }
final Map< Id< StopArea >, StopArea > stopAreas

◆ addStopPoint()

void org.matsim.visum.VisumNetwork.addStopPoint ( final StopPoint  stopPt)

Definition at line 82 of file VisumNetwork.java.

References org.matsim.visum.VisumNetwork.StopPoint.id, and org.matsim.visum.VisumNetwork.StopPoint.stopAreaId.

Referenced by org.matsim.visum.VisumNetworkReader.readStopPoints().

82  {
83  StopPoint oldStopPt = this.stopPoints.put(stopPt.stopAreaId.toString()+stopPt.id.toString(), stopPt);
84  if (oldStopPt != null) {
85  // there was already a stop point with the same id
86  // re-do the insertion
87  this.stopPoints.put(oldStopPt.stopAreaId.toString()+oldStopPt.id.toString(), oldStopPt);
88  throw new IllegalArgumentException("There is already a stop with the same id.");
89  }
90 
91  }
final Map< String, StopPoint > stopPoints

◆ addline()

void org.matsim.visum.VisumNetwork.addline ( final TransitLine  l1)

Definition at line 92 of file VisumNetwork.java.

References org.matsim.visum.VisumNetwork.TransitLine.id.

Referenced by org.matsim.visum.VisumNetworkReader.readLines().

92  {
93  TransitLine oldl = this.lines.put(l1.id, l1);
94  if (oldl != null) {
95  // there was already a line with the same id
96  // re-do the insertion
97  this.lines.put(oldl.id, oldl);
98  throw new IllegalArgumentException("There is already a line with the same id.");
99  }
100 
101  }
final Map< Id< TransitLine >, TransitLine > lines

◆ addLineRoute()

void org.matsim.visum.VisumNetwork.addLineRoute ( final TransitLineRoute  lr1)

Definition at line 102 of file VisumNetwork.java.

References org.matsim.visum.VisumNetwork.TransitLineRoute.DCode, org.matsim.visum.VisumNetwork.TransitLineRoute.id, and org.matsim.visum.VisumNetwork.TransitLineRoute.lineName.

Referenced by org.matsim.visum.VisumNetworkReader.readLineRoutes().

102  {
103  TransitLineRoute oldlr = this.lineRoutes.put(lr1.lineName.toString()+"/"+lr1.id.toString()+"/"+lr1.DCode, lr1);
104  if (oldlr != null) {
105  // there was already a line route with the same id
106  // re-do the insertion
107  this.lineRoutes.put(oldlr.lineName.toString()+"/"+oldlr.id.toString()+"/"+oldlr.DCode, oldlr);
108  throw new IllegalArgumentException("There is already a line route with the same id.");
109  }
110 
111  }
final Map< String, TransitLineRoute > lineRoutes

◆ addLineRouteItem()

void org.matsim.visum.VisumNetwork.addLineRouteItem ( final LineRouteItem  lri1)

Definition at line 112 of file VisumNetwork.java.

References org.matsim.visum.VisumNetwork.LineRouteItem.DCode, org.matsim.visum.VisumNetwork.LineRouteItem.index, org.matsim.visum.VisumNetwork.LineRouteItem.lineName, and org.matsim.visum.VisumNetwork.LineRouteItem.lineRouteName.

Referenced by org.matsim.visum.VisumNetworkReader.readLineRouteItems().

112  {
113  LineRouteItem oldlri = this.lineRouteItems.put(lri1.lineName +"/"+ lri1.lineRouteName +"/"+lri1.index+"/"+lri1.DCode, lri1);
114  if (oldlri != null) {
115  // there was already a Line Route Item with the same id
116  // re-do the insertion
117  this.lineRouteItems.put(oldlri.lineName +"/"+oldlri.lineRouteName+"/"+oldlri.index+"/"+oldlri.DCode, oldlri);
118  throw new IllegalArgumentException("There is already a route item with the same id."+oldlri.lineName +"/"+ oldlri.lineRouteName +"/"+oldlri.index+"/"+ oldlri.DCode);
119  }
120 
121  }
final Map< String, LineRouteItem > lineRouteItems

◆ addTimeProfile()

void org.matsim.visum.VisumNetwork.addTimeProfile ( final TimeProfile  tp1)

Definition at line 122 of file VisumNetwork.java.

References org.matsim.visum.VisumNetwork.TimeProfile.dirCode, org.matsim.visum.VisumNetwork.TimeProfile.index, org.matsim.visum.VisumNetwork.TimeProfile.lineName, and org.matsim.visum.VisumNetwork.TimeProfile.lineRouteName.

Referenced by org.matsim.visum.VisumNetworkReader.readTimeProfile().

122  {
123  TimeProfile oldtp = this.timeProfiles.put(tp1.lineName.toString()+"/"+tp1.lineRouteName.toString() +"/"+tp1.dirCode+"/"+ tp1.index.toString(), tp1);
124  if (oldtp != null) {
125  // there was already a stop with the same id
126  // re-do the insertion
127  this.timeProfiles.put(oldtp.lineName.toString()+"/"+oldtp.lineRouteName.toString() +"/"+oldtp.dirCode+"/"+ oldtp.index.toString(), oldtp);
128  throw new IllegalArgumentException("There is already a time profile with the same id."+oldtp.lineRouteName.toString() +"/"+ oldtp.index.toString());
129  }
130 
131  }
final Map< String, TimeProfile > timeProfiles

◆ addTimeProfileItem()

void org.matsim.visum.VisumNetwork.addTimeProfileItem ( final TimeProfileItem  tpi1)

Definition at line 132 of file VisumNetwork.java.

References org.matsim.visum.VisumNetwork.TimeProfileItem.dirCode, org.matsim.visum.VisumNetwork.TimeProfileItem.index, org.matsim.visum.VisumNetwork.TimeProfileItem.lineName, org.matsim.visum.VisumNetwork.TimeProfileItem.lineRouteName, and org.matsim.visum.VisumNetwork.TimeProfileItem.timeProfileName.

Referenced by org.matsim.visum.VisumNetworkReader.readTimeProfileItems().

132  {
133  TimeProfileItem oldtpi = this.timeProfileItems.put(tpi1.lineName+"/"+tpi1.lineRouteName+"/"+tpi1.timeProfileName+"/"+tpi1.dirCode+"/"+tpi1.index, tpi1);
134  if (oldtpi != null) {
135  // there was already ane entry with the same id
136  // re-do the insertion
137  this.timeProfileItems.put(oldtpi.lineName+"/"+oldtpi.lineRouteName+"/"+oldtpi.timeProfileName+"/"+oldtpi.dirCode+"/"+oldtpi.index, oldtpi);
138  throw new IllegalArgumentException("There is already a time profile item with the same id.");
139  }
140 
141  }
final Map< String, TimeProfileItem > timeProfileItems

◆ addDeparture()

void org.matsim.visum.VisumNetwork.addDeparture ( final Departure  d)

Definition at line 142 of file VisumNetwork.java.

References org.matsim.visum.VisumNetwork.Departure.index, org.matsim.visum.VisumNetwork.Departure.lineName, and org.matsim.visum.VisumNetwork.Departure.lineRouteName.

Referenced by org.matsim.visum.VisumNetworkReader.readDepartures().

142  {
143  Departure oldD = this.departures.put(d.lineName +"/"+ d.lineRouteName +"/"+ d.index, d);
144  if (oldD != null) {
145  // there was already an entry with the same id
146  // re-do the insertion
147  this.departures.put(oldD.lineName+"/"+ oldD.lineRouteName +"/"+ oldD.index, oldD);
148  throw new IllegalArgumentException("There is already a departure with the same id.");
149  }
150  this.departuresByNo.put(d.index, d);
151  }
final Map< String, Departure > departures
final Map< String, Departure > departuresByNo

◆ addVehicleUnit()

void org.matsim.visum.VisumNetwork.addVehicleUnit ( final VehicleUnit  vehUnit)

Definition at line 153 of file VisumNetwork.java.

References org.matsim.visum.VisumNetwork.VehicleUnit.id.

Referenced by org.matsim.visum.VisumNetworkReader.readVehicleUnits().

153  {
154  VehicleUnit oldVU = this.vehicleUnits.put(vehUnit.id, vehUnit);
155  if (oldVU != null) {
156  // there was already an entry with the same id
157  // re-do the insertion
158  this.vehicleUnits.put(oldVU.id, oldVU);
159  throw new IllegalArgumentException("There is already a vehicle unit with the same id.");
160  }
161  }
final Map< String, VehicleUnit > vehicleUnits

◆ addVehicleCombination()

void org.matsim.visum.VisumNetwork.addVehicleCombination ( final VehicleCombination  vehComb)

Definition at line 163 of file VisumNetwork.java.

References org.matsim.visum.VisumNetwork.VehicleCombination.id.

Referenced by org.matsim.visum.VisumNetworkReader.readVehicleCombinations().

163  {
164  VehicleCombination oldVC = this.vehicleCombinations.put(vehComb.id, vehComb);
165  if (oldVC != null) {
166  // there was already an entry with the same id
167  // re-do the insertion
168  this.vehicleCombinations.put(oldVC.id, oldVC);
169  throw new IllegalArgumentException("There is already a vehicle combination with the same id.");
170  }
171  }
final Map< String, VehicleCombination > vehicleCombinations

Member Data Documentation

◆ edgeTypes

final Map<Id<EdgeType>, EdgeType> org.matsim.visum.VisumNetwork.edgeTypes = new HashMap<>()

Definition at line 39 of file VisumNetwork.java.

◆ stops

final Map<Id<Stop>, Stop> org.matsim.visum.VisumNetwork.stops = new TreeMap<>()

Definition at line 40 of file VisumNetwork.java.

◆ stopAreas

final Map<Id<StopArea>, StopArea> org.matsim.visum.VisumNetwork.stopAreas = new TreeMap<>()

Definition at line 41 of file VisumNetwork.java.

◆ stopPoints

final Map<String, StopPoint> org.matsim.visum.VisumNetwork.stopPoints = new TreeMap<String, StopPoint>()

Definition at line 42 of file VisumNetwork.java.

◆ lines

final Map<Id<TransitLine>, TransitLine> org.matsim.visum.VisumNetwork.lines = new TreeMap<Id<TransitLine>, TransitLine>()

Definition at line 43 of file VisumNetwork.java.

◆ lineRoutes

final Map<String, TransitLineRoute> org.matsim.visum.VisumNetwork.lineRoutes = new TreeMap<String, TransitLineRoute>()

Definition at line 44 of file VisumNetwork.java.

◆ lineRouteItems

final Map<String, LineRouteItem> org.matsim.visum.VisumNetwork.lineRouteItems = new TreeMap<String, LineRouteItem>()

Definition at line 45 of file VisumNetwork.java.

◆ timeProfiles

final Map<String, TimeProfile> org.matsim.visum.VisumNetwork.timeProfiles = new TreeMap<String, TimeProfile>()

Definition at line 46 of file VisumNetwork.java.

◆ timeProfileItems

final Map<String, TimeProfileItem> org.matsim.visum.VisumNetwork.timeProfileItems = new LinkedHashMap<String, TimeProfileItem>()

Definition at line 47 of file VisumNetwork.java.

◆ departures

final Map<String, Departure> org.matsim.visum.VisumNetwork.departures = new TreeMap<String, Departure>()

Definition at line 48 of file VisumNetwork.java.

◆ departuresByNo

final Map<String, Departure> org.matsim.visum.VisumNetwork.departuresByNo = new TreeMap<String, Departure>()

◆ vehicleUnits

final Map<String, VehicleUnit> org.matsim.visum.VisumNetwork.vehicleUnits = new HashMap<String, VehicleUnit>()

Definition at line 50 of file VisumNetwork.java.

◆ vehicleCombinations

final Map<String, VehicleCombination> org.matsim.visum.VisumNetwork.vehicleCombinations = new HashMap<String, VehicleCombination>()

The documentation for this class was generated from the following file: