public class VelocityProfileArray extends java.util.ArrayList<VelocityProfile>
Constructor and Description |
---|
VelocityProfileArray()
constructor.
|
VelocityProfileArray(Train simulatorTrain,
Block currBlock,
double startVelocity,
double finalVelocity)
1) It calculates velocity of the train for every tinyblock in the middle
of the blocks.
|
Modifier and Type | Method and Description |
---|---|
void |
add(int k,
VelocityProfile obj) |
boolean |
add(VelocityProfile velocityProfile)
overriding method for add.
|
void |
addAll(VelocityProfileArray veloProfArray) |
static VelocityProfileArray |
calVelocity(double initVelocity,
double finalVelocity,
double acceleration,
double deceleration,
double maxVelocity,
double startMileP,
double endMileP) |
double |
getEndMilePost(int trainDirection) |
double |
getEndVelocity(Train simulatorTrain) |
double |
getRunTime() |
double |
getStartMilePost(int trainDirection) |
double |
getStartVelocity(Train simulatorTrain) |
TrainKinetics |
getTrainKineticsByTime(double time,
int trainDirection,
Block block) |
void |
print(int trainDirection) |
void |
remove(double startMilePost,
double endMilePost) |
VelocityProfile |
remove(int i)
(non-Javadoc)
|
VelocityProfileArray |
returnInterval(double milepost1,
double milepost2)
VelocityProfileArray: VelocityProfileArray returnInterval(double
startDistance, double endDistance) 1) It runs through the
velocityProfiles in the current velocityProfile and keeps on adding time
for each of the velocityProfile.
|
void |
setRunTime(double runTime) |
void |
sort() |
void |
sort(Train train) |
public VelocityProfileArray()
public VelocityProfileArray(Train simulatorTrain, Block currBlock, double startVelocity, double finalVelocity)
simulatorTrain
- currBlock
- startVelocity
- finalVelocity
- public boolean add(VelocityProfile velocityProfile)
add
in interface java.util.Collection<VelocityProfile>
add
in interface java.util.List<VelocityProfile>
add
in class java.util.ArrayList<VelocityProfile>
obj
- public void add(int k, VelocityProfile obj)
add
in interface java.util.List<VelocityProfile>
add
in class java.util.ArrayList<VelocityProfile>
k
- obj
- public VelocityProfile remove(int i)
remove
in interface java.util.List<VelocityProfile>
remove
in class java.util.ArrayList<VelocityProfile>
ArrayList.remove(int)
public static VelocityProfileArray calVelocity(double initVelocity, double finalVelocity, double acceleration, double deceleration, double maxVelocity, double startMileP, double endMileP)
initVelocity
- finalVelocity
- accel
- deccel
- maxVelocity
- startMileP
- endMileP
- VelocityProfileArray
calculated after feeding all the
parameterspublic VelocityProfileArray returnInterval(double milepost1, double milepost2)
startDistance
- endDistance
- VelocityProfileArray
public void addAll(VelocityProfileArray veloProfArray)
veloProfArray
- public double getEndVelocity(Train simulatorTrain)
simulatorTrain
- public double getStartVelocity(Train simulatorTrain)
simulatorTrain
- public void print(int trainDirection)
public void remove(double startMilePost, double endMilePost)
public double getRunTime()
public void setRunTime(double runTime)
public void sort(Train train)
public void sort()
public double getStartMilePost(int trainDirection)
public double getEndMilePost(int trainDirection)
public TrainKinetics getTrainKineticsByTime(double time, int trainDirection, Block block)