public class DataCollectionLine extends Object
Constructor and Description |
---|
DataCollectionLine(String name,
int id,
Point2D p1,
Point2D p2,
boolean isNoRepeat)
Create a data collection line.
|
Modifier and Type | Method and Description |
---|---|
Set<Integer> |
getAllVIN()
Get the VINs of all vehicles.
|
int |
getId()
Get the ID of the line.
|
String |
getName()
Get the name of the line.
|
Shape |
getShape()
Get the shape of the line.
|
List<Double> |
getTimes(int vin)
Get the time a vehicle passing through the line.
|
boolean |
intersect(VehicleSimView v,
double time,
Point2D p1,
Point2D p2)
Whether the vehicle intersects the line.
|
public DataCollectionLine(String name, int id, Point2D p1, Point2D p2, boolean isNoRepeat)
name
- the name of the data collection lineid
- the ID of the linep1
- the first point of the linep2
- the second point of the lineisNoRepeat
- Whether vehicles should not be counted more than once
when it passes through the line more than once within
the NO_REPEAT_TIME_PERIOD.public Shape getShape()
public boolean intersect(VehicleSimView v, double time, Point2D p1, Point2D p2)
v
- the vehicletime
- the current timep1
- the first point of the vehiclep2
- the second point of the vehiclepublic String getName()
public int getId()
public Set<Integer> getAllVIN()
Copyright © 2013. All rights reserved.