|
- package de.hems.trafficsim;
-
- /**
- * Model class which keeps the previous simulation data for analysis.
- */
- public class VehicleTimeRecord {
- /**
- * the position of the vehicle after the last simulation step
- */
- final protected float position;
-
- /**
- * the velocity of the vehicle during the last simulation step
- */
- final protected float velocity;
-
- /**
- * the maximum velocity of the vehicle
- */
- final protected float maxVelocity;
-
- public float getMaxVelocity() {
- return maxVelocity;
- }
-
- public float getPosition() {
- return position;
- }
-
- public float getVelocity() {
- return velocity;
- }
-
- /**
- * Construct a new VehicleTimeRecord.
- *
- * @param position the position of the vehicle after the last simulation step
- * @param velocity the velocity of the vehicle during the last simulation step
- * @param maxVelocity the maximum velocity of the vehicle
- */
- public VehicleTimeRecord(float position, float velocity, float maxVelocity) {
- this.position = position;
- this.velocity = velocity;
- this.maxVelocity = maxVelocity;
- }
- }
|