Skip to content

Commit

Permalink
Merge branch 'develop' into tc_issue_98
Browse files Browse the repository at this point in the history
  • Loading branch information
scrudden authored Sep 7, 2018
2 parents 2cfae2a + a72b95d commit a8e7ebe
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
12 changes: 12 additions & 0 deletions transitclock/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -258,18 +258,30 @@
<version>3.0.1</version>
<scope>provided</scope>
</dependency>

<!-- OLS regression algorithm -->
<dependency>
<groupId>com.github.haifengl</groupId>
<artifactId>smile-core</artifactId>
<version>1.5.1</version>
</dependency>

<!-- Logback log appender for AWS CloudWatch -->
<dependency>
<groupId>com.j256.cloudwatchlogbackappender</groupId>
<artifactId>cloudwatchlogbackappender</artifactId>
<version>1.11</version>
</dependency>

<!-- OLS regression algorithm -->
<dependency>
<groupId>com.github.haifengl</groupId>
<artifactId>smile-core</artifactId>
<version>1.5.1</version>
</dependency>



</dependencies>

<build>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ public Headway generate(VehicleState vehicleState) {

if(vehicleState.getMatch().getMatchAtPreviousStop()==null)
return null;

String stopId = vehicleState.getMatch().getMatchAtPreviousStop().getAtStop().getStopId();

long date = vehicleState.getMatch().getAvlTime();
Expand All @@ -46,6 +47,7 @@ public Headway generate(VehicleState vehicleState) {
List<ArrivalDeparture> stopList=StopArrivalDepartureCacheFactory.getInstance().getStopHistory(key);
int lastStopArrivalIndex =-1;
int previousVehicleArrivalIndex = -1;

if(stopList!=null)
{
for(int i=0;i<stopList.size() && previousVehicleArrivalIndex==-1 ;i++)
Expand Down

0 comments on commit a8e7ebe

Please sign in to comment.