package de.hems.trafficsim;

/**
 * Model class which keeps the previous simulation data for analysis.
 */
public class VehicleTimeRecord {
    /**
     * the id of the vehicle it belongs to
     */
    protected int id;

    /**
     * the position of the vehicle after the last simulation step
     */
    protected float position;

    /**
     * the velocity of the vehicle during the last simulation step
     */
    protected float velocity;

    /**
     * the maximum velocity of the vehicle
     */
    protected float maxVelocity;

    public float getMaxVelocity() {
        return maxVelocity;
    }

    public float getPosition() {
        return position;
    }

    public float getVelocity() {
        return velocity;
    }

    /**
     * Construct a new VehicleTimeRecord.
     *
     * @param id          the id of the vehicle it belongs to
     * @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(int id, float position, float velocity, float maxVelocity) {
        this.id = id;
        this.position = position;
        this.velocity = velocity;
        this.maxVelocity = maxVelocity;
    }
}
