MATSIM
VehicleTypeImpl.java
Go to the documentation of this file.
1 /* *********************************************************************** *
2  * project: org.matsim.*
3  * *
4  * *********************************************************************** *
5  * *
6  * copyright : (C) 2008 by the members listed in the COPYING, *
7  * LICENSE and WARRANTY file. *
8  * email : info at matsim dot org *
9  * *
10  * *********************************************************************** *
11  * *
12  * This program is free software; you can redistribute it and/or modify *
13  * it under the terms of the GNU General Public License as published by *
14  * the Free Software Foundation; either version 2 of the License, or *
15  * (at your option) any later version. *
16  * See also COPYING, LICENSE and WARRANTY file *
17  * *
18  * *********************************************************************** */
19 
20 package org.matsim.vehicles;
21 
22 import org.matsim.api.core.v01.Id;
23 
27 public class VehicleTypeImpl implements VehicleType {
28 
29  private double width = 1.0;
30  private double maxVelocity = Double.POSITIVE_INFINITY; // default: constrained only by the link speed
31  private double length = 7.5;
32  private double pcuEquivalents = 1.0;
33  private double flowEfficiencyFactor = 1.0;
35  private String description;
37 
41  private double accessTime = 1.0;
42 
46  private double egressTime = 1.0;
47 
48  private Id<VehicleType> id;
49 
51 
52  @Override
53  public String toString() {
54  return "[ID=" + id + " | maxVelocity= " + maxVelocity + "]" ;
55  }
56 
57  public VehicleTypeImpl(Id<VehicleType> typeId) {
58  this.id = typeId;
59  }
60 
61  @Override
62  public void setCapacity(VehicleCapacity capacity) {
63  this.capacity = capacity;
64  }
65 
66  @Override
67  public void setDescription(String desc) {
68  this.description = desc;
69  }
70 
71  @Override
72  public void setEngineInformation(EngineInformation engineInformation) {
73  this.engineInformation = engineInformation;
74  }
75 
76  @Override
77  public void setLength(double length) {
78  this.length = length;
79  }
80 
81  @Override
82  public void setMaximumVelocity(double meterPerSecond) {
83  this.maxVelocity = meterPerSecond;
84  }
85 
86  @Override
87  public void setWidth(double width) {
88  this.width = width;
89  }
90 
91  @Override
92  public double getWidth() {
93  return width;
94  }
95 
96  @Override
97  public double getMaximumVelocity() {
98  return maxVelocity;
99  }
100 
101  @Override
102  public double getLength() {
103  return length;
104  }
105 
106  @Override
108  return engineInformation;
109  }
110 
111  @Override
112  public String getDescription() {
113  return description;
114  }
115 
116  @Override
118  return capacity;
119  }
120 
121  @Override
122  public Id<VehicleType> getId() {
123  return id;
124  }
125 
126  @Override
127  public double getAccessTime() {
128  return this.accessTime;
129  }
130 
131  @Override
132  public double getEgressTime() {
133  return this.egressTime;
134  }
135 
136  @Override
137  public void setAccessTime(double seconds) {
138  this.accessTime = seconds;
139  }
140 
141  @Override
142  public void setEgressTime(double seconds) {
143  this.egressTime = seconds;
144  }
145 
146  @Override
148  return this.doorOperationMode;
149  }
150 
151  @Override
153  this.doorOperationMode = mode;
154  }
155 
156  @Override
157  public double getPcuEquivalents() {
158  return pcuEquivalents;
159  }
160 
161  @Override
162  public void setPcuEquivalents(double pcuEquivalents) {
163  this.pcuEquivalents = pcuEquivalents;
164  }
165 
166  @Override
167  public double getFlowEfficiencyFactor() {
168  return flowEfficiencyFactor;
169  }
170 
171  @Override
172  public void setFlowEfficiencyFactor(double flowEfficiencyFactor) {
173  this.flowEfficiencyFactor = flowEfficiencyFactor;
174  }
175 }
void setFlowEfficiencyFactor(double flowEfficiencyFactor)
void setPcuEquivalents(double pcuEquivalents)
VehicleTypeImpl(Id< VehicleType > typeId)
void setMaximumVelocity(double meterPerSecond)
void setDoorOperationMode(DoorOperationMode mode)
void setEngineInformation(EngineInformation engineInformation)
void setCapacity(VehicleCapacity capacity)