Assigning Buses to Routes

198 views
Skip to first unread message

gev...@gmail.com

unread,
Sep 9, 2019, 7:51:48 AM9/9/19
to TheTransitClock

Óg Crudden

unread,
Sep 9, 2019, 10:32:32 AM9/9/19
to Gevork Grigorian, TheTransitClock
Hi Gevork,

There is no documentation that I know of.

This post has some detail.


To turn it on you use the configuration parameter transitclock.autoBlockAssigner.autoAssignerEnabled. 

More details and config parameters can be found in the java class. org.transitclock.core.autoAssigner.AutoBlockAssigner.

Cheers,
Sean.



--
www.thetransitclock.org
---
You received this message because you are subscribed to the Google Groups "TheTransitClock" group.
To unsubscribe from this group and stop receiving emails from it, send an email to thetransitclo...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/thetransitclock/87ed8acd-935e-4121-bb8e-e31213e229c0%40googlegroups.com.

gev...@gmail.com

unread,
Sep 9, 2019, 11:05:13 AM9/9/19
to TheTransitClock
When I click, it says that I don't have a permission to access that content 




On Monday, September 9, 2019 at 4:32:32 PM UTC+2, Óg Crudden wrote:
Hi Gevork,

There is no documentation that I know of.

This post has some detail.


To turn it on you use the configuration parameter transitclock.autoBlockAssigner.autoAssignerEnabled. 

More details and config parameters can be found in the java class. org.transitclock.core.autoAssigner.AutoBlockAssigner.

Cheers,
Sean.



On Mon, Sep 9, 2019 at 12:51 PM <gev...@gmail.com> wrote:
I was told that there is an auto-assigner module in TheTransitClock that will attempt to assign vehicles to blocks/routes/trips/bus lines based on GPS alone. 
I love that! Where I can read on the assigning bus to the line manually?
Where can I read about this assignation of bus->lineNumber->route and what happens if two three bus lines are going with the same street but bus has changed the line number and serving now another line but is located on the same street?
Best regards


Gevork

--
www.thetransitclock.org
---
You received this message because you are subscribed to the Google Groups "TheTransitClock" group.
To unsubscribe from this group and stop receiving emails from it, send an email to thetran...@googlegroups.com.

Óg Crudden

unread,
Sep 9, 2019, 4:00:31 PM9/9/19
to Gevork Grigorian, TheTransitClock
Hi Gevork,

I think you may need to ask permission to join the old transitime mailing list. https://groups.google.com/forum/?hl=en#!forum/transitime

Cheers,
Sean.

To unsubscribe from this group and stop receiving emails from it, send an email to thetransitclo...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/thetransitclock/a9f229fa-e89f-42b1-b1eb-b536ca0bd468%40googlegroups.com.

gev...@gmail.com

unread,
Sep 13, 2019, 5:06:42 PM9/13/19
to TheTransitClock
From whom? Can you add me ? 

Óg Crudden

unread,
Sep 14, 2019, 10:54:28 AM9/14/19
to TheTransitClock
Hi Gevork,
I am not able to add anyone to the transitime mailing list. There may be an option on the google list to ask to be allowed join. 
Cheers,
Sean.

Nathan Selikoff

unread,
Sep 17, 2019, 12:07:45 PM9/17/19
to TheTransitClock
Hi Gevork,

We've used the AutoBlockAssigner module with a couple of different fleets. I need to write up a Wiki page for it on TheTransitClock's github, but in the meantime here is some information. I see you've had some success with getting TheTransitClock up and running from your other thread, so hopefully this will be enough to get you started.
  1. Enable the module by setting transitclock.autoBlockAssigner.autoAssignerEnabled to true
  2. Enable and configure an AVL module by adding the module to transitclock.modules.optionalModulesList (e.g. org.transitclock.avl.GtfsRealtimeModule). There are a number of existing AVL modules here: https://github.com/TheTransitClock/transitime/tree/develop/transitclock/src/main/java/org/transitclock/avl 
  3. Alternatively, if you have data that doesn't work out of the box with one of the AVL modules, you can add a new one.
  4. Be prepared to run a lot of tests and tweak a lot of parameters to get good results! Take a look at the descriptions of the config params in AutoBlockAssigner.java, MatchProcessor.java, TemporalMatcher.java, and SpatialMatcher.java. Use the webapp to view the active blocks (Reports > Active Blocks or /web/status/activeBlocks.jsp?a=[agencyid]).
The more information you have available for vehicles, the better. The less information you have, the less likely it is that all vehicles will be successfully matched with blocks. In order of preference:
  1. Real-time trip assignments, with the trip corresponding to the GTFS trip_id
  2. Real-time block assignments, with the block corresponding to the GTFS block_id (requires block_id in trips.txt)
  3. Real-time route assignments, with the route corresponding to the GTFS route_id
  4. Real-time location, speed and heading
  5. Real-time location only
Also note, if your GTFS static data doesn't have block_ids, TheTransitClock will create a single block for each trip.

Cheers,
Nathan

Nathan Selikoff | Co-founder & CTO

Gevork Grigorian

unread,
Sep 17, 2019, 4:54:43 PM9/17/19
to Nathan Selikoff, TheTransitClock
Hi Nathan,
what a surprise that you wrote back :) Couple of days back I have used your GTFS validator, and saw you on the main page of OmniModal.io :) 


I have currently following issues that I scratch my head to solve 


1) TransitClock API is not working   


The problem is in ticket #107 



I hope this will solve soon. 

2) Yes, indeed you are right. I have managed to create a docker installation script of multi agency setup   which was described in the Wiki. 



3)  The problem 



Our initial setup is quite simple .   1 agency with 6 stops on each direction  with 7 buses . But still the problem is that it's 

So the second problem I have is following.  We don't have complicated AVL system. We will install tomorrow GPS trackers on each bus and will connect it to Traccar. 

I want traccar to give positions of the buses each n seconds ( by the way could you suggest the  optimal number of this number? )  to the TransitClock and then the TransitClock would show the  estimation of the arrivals . 

I have already saw that there is a module for that 



But if we look at code, it just takes the positions and makes System.




api.setApiClient(client);
try {
User user=api.sessionPost(email, password);
List<Position> results = api.positionsGet(null, null, null, user.getId());
for(Position result:results)
{
System.out.println(result);
}
} catch (ApiException e) {
e.printStackTrace();
}



Is this a working module at all?????



Sorry but my backrgound is not JAVA and I am a bit confused. What would you suggest to do exactly with the Traccar? 


Best regards
Gevork




--
www.thetransitclock.org
---
You received this message because you are subscribed to a topic in the Google Groups "TheTransitClock" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/thetransitclock/zoMDyEQpyxQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to thetransitclo...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/thetransitclock/e20ecbb4-621a-42d8-86bb-388c9915f3c9%40googlegroups.com.


--
Best Regards
Gevork 

Nathan Selikoff

unread,
Sep 17, 2019, 5:17:25 PM9/17/19
to TheTransitClock
Hi Gevork,

Oh, nice! Pleased to meet you.

You need to look at TraccarAVLModule: 

Another option is using Traccar with Barefoot for better map matching (may or may not be needed depending on the quality of your GPS fixes): 

The poll rate is set by transitclock.avl.feedPollingRateSecs. We recommend updates of at least every 30 seconds; ideally 10 seconds or less.

Regards,
Nathan
To unsubscribe from this group and all its topics, send an email to thetransitclock+unsubscribe@googlegroups.com.


--
Best Regards
Gevork 

Gevork Grigorian

unread,
Sep 17, 2019, 5:40:57 PM9/17/19
to Nathan Selikoff, TheTransitClock
Nathan, thanks . Sorry  as I am not a person with Java background, I need to ask this (please bear a bit with me) . 
So in the  agency.properties file 


which was published here 





# This is a similar configuration used by the Quick Start example (Intercity)
transitclock.core.agencyId=tampa
transitclock.db.dbUserName=DatabaseUsername
transitclock.db.dbPassword=DatabasePassword
transitclock.db.dbName=agency-tampa
transitclock.db.dbHost=0.0.0.0
transitclock.db.dbType=postgresql
transitclock.avl.gtfsRealtimeFeedURI=http://api.tampa.onebusaway.org:8088/vehicle-positions
transitclock.hibernate.connection.url=jdbc:postgresql://0.0.0.0:5432/agency-tampa
transitclock.hibernate.configFile=hibernate.cfg.xml
transitclock.modules.optionalModulesList=org.transitclock.avl.GtfsRealtimeModule
transitclock.web.mapTileUrl=https://tile.openstreetmap.org/{z}/{x}/{y}.png
transitclock.web.mapTileCopyright=OpenStreetMap
transitclock.rmi.secondaryRmiPort=0

transitclock.modules.optionalModulesList=org.transitclock.avl.TraccarAVLModule 


or 

transitclock.modules.optionalModulesList=org.transitclock.avl.TraccarBarefootAVLModule


Right?   


and then how I pass the transitclock.avl.traccar.email?

I put in the same file as next line?

so it will be 

transitclock.modules.optionalModulesList=org.transitclock.avl.GtfsRealtimeModule
transitclock.avl.traccar.email=email
transitclock.avl.traccar.password=password
transitclock.avl.traccar.baseurl = http://traccarhost

right?  


When we speak about polling, I imagine that we have two values 


1) GPS Tracker sending the position to traccar  ( I plan to put it like 4sec) 
2)transitclock requests the traccar on positions (would 10sec be ok? ) 



for the initial pilot project where you have one agency, 1 route 6 stops and 7 buses, do you think a vps with 2 vcpus and 8gb ram is enough? 



Best regards
Gevork 








Hi Gevork,

To unsubscribe from this group and all its topics, send an email to thetransitclo...@googlegroups.com.


--
Best Regards
Gevork 

--
www.thetransitclock.org
---
You received this message because you are subscribed to a topic in the Google Groups "TheTransitClock" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/thetransitclock/zoMDyEQpyxQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to thetransitclo...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/thetransitclock/0c304115-43a5-4e8d-89f2-09c40469723a%40googlegroups.com.


--
Best Regards
Gevork 

Nathan Selikoff

unread,
Sep 17, 2019, 5:54:26 PM9/17/19
to TheTransitClock
Hi Gevork,

In this case, the value is `org.transitclock.custom.traccar.TraccarAVLModule`. The pattern is [package].[class], whose values you'll see towards the top of each file.

And yes, you can put all of your config values in that same .properties file, as you've typed out.

For polling, that's correct, those two values both influence the latency and refresh rate of the data. Those values sound good to start with.

Those server specs are more than enough - we're using a similar VPS for a fleet of ~300 vehicles and 75 routes.

Regards,
Nathan
Hi Gevork,

To unsubscribe from this group and all its topics, send an email to thetransitclock+unsubscribe@googlegroups.com.


--
Best Regards
Gevork 

--
www.thetransitclock.org
---
You received this message because you are subscribed to a topic in the Google Groups "TheTransitClock" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/thetransitclock/zoMDyEQpyxQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to thetransitclock+unsubscribe@googlegroups.com.


--
Best Regards
Gevork 

Gevork Grigorian

unread,
Sep 17, 2019, 6:42:53 PM9/17/19
to Nathan Selikoff, TheTransitClock
Last questions , I promise. 


Most of the "complicated" thing that still my mind could not digest. 
We have a GTFS schedule of buses just out of air, because there is no schedule. Buses start on some point early morning from one side, they drive , turn and drive back , and then again.  Does TransitClock face that? 


Best regards
Gevork
 





Hi Gevork,

To unsubscribe from this group and all its topics, send an email to thetransitclo...@googlegroups.com.


--
Best Regards
Gevork 

--
www.thetransitclock.org
---
You received this message because you are subscribed to a topic in the Google Groups "TheTransitClock" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/thetransitclock/zoMDyEQpyxQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to thetransitclo...@googlegroups.com.


--
Best Regards
Gevork 

--
www.thetransitclock.org
---
You received this message because you are subscribed to a topic in the Google Groups "TheTransitClock" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/thetransitclock/zoMDyEQpyxQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to thetransitclo...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/thetransitclock/44255c55-8c9d-43c4-bbef-c5a6d0aeda9f%40googlegroups.com.


--
Best Regards
Gevork 

Nathan Selikoff

unread,
Sep 17, 2019, 8:29:52 PM9/17/19
to Gevork Grigorian, TheTransitClock
TheTransitClock needs something to measure the real-time data against. That can either be a schedule-based GTFS, or a frequency based GTFS (I.e. frequencies.txt). In either case the drivers will need to be adhering to something - either the schedule itself, or the headways between trips. 

There is different configuration for frequency based prediction which I haven’t gotten deep into yet, so I can’t provide much guidance there. 

You received this message because you are subscribed to the Google Groups "TheTransitClock" group.
To unsubscribe from this group and stop receiving emails from it, send an email to thetransitclo...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/thetransitclock/CA%2BXJW636%2BnXjc-_CU2ZuOH7Gu%2BSHqBxHEEQPLaa28Xb8JLWhfw%40mail.gmail.com.
--

Nathan Selikoff | Co-founder & CTO
Pronouns: He/Him/His
Connecting cities to the future of mobility

Rally 1st Place Social Venture as featured in Forbes
StarterStudio Seed Stage Venture
Crummer Graduate School of Business at Rollins College Venture Competition 2nd Place Finalist 
UCF Center for Entrepreneurial Leadership 1st Place Social Venture & Joust New Venture Finalist 
UCF I-Corps & National Science Foundation Grantee
VentureScaleUp at Catalyst Spaces Alumnus

Gevork Grigorian

unread,
Sep 21, 2019, 4:24:31 AM9/21/19
to Nathan Selikoff, TheTransitClock, Óg Crudden
Hi Nathan, Hi Og,
could you hint what is missing here?


HHH000041: Configured SessionFactory: null
For Hibernate factory project dbName=agency-vabus using url=jdbc:postgresql://127.0.0.1/agency-vabus?connectTimeout=60&socketTimeout=60 username=postgres, and configured password
HHH010002: C3P0 using driver: org.postgresql.Driver at URL: jdbc:postgresql://127.0.0.1/agency-vabus?connectTimeout=60&socketTimeout=60
HHH000046: Connection properties: {user=postgres, password=****}
HHH000006: Autocommit mode: false
HHH000400: Using dialect: org.hibernate.dialect.PostgreSQLDialect
HHH000424: Disabling contextual LOB creation as createClob() method threw error : java.lang.reflect.InvocationTargetException
HHH000399: Using default transaction strategy (direct JDBC transactions)
HHH000397: Using ASTQueryTranslatorFactory
caching blocks....
caching complete
Finished reading configuration data from database . Took 514 msec.
Starting module org.transitclock.core.TimeoutHandlerModule for agencyId=vabus
Starting up optional modules specified via transitclock.modules.optionalModulesList param:
Starting up optional module org.transitclock.avl.TraccarBarefootAVLModule
Could not run module org.transitclock.avl.TraccarBarefootAVLModule
java.lang.ClassNotFoundException: org.transitclock.avl.TraccarBarefootAVLModule
at java.net.URLClassLoader.findClass(URLClassLoader.java:382) ~[na:1.8.0_222]
at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[na:1.8.0_222]
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349) ~[na:1.8.0_222]
at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[na:1.8.0_222]
at java.lang.Class.forName0(Native Method) ~[na:1.8.0_222]
at java.lang.Class.forName(Class.java:264) ~[na:1.8.0_222]
at org.transitclock.modules.Module.start(Module.java:111) [Core.jar:na]
at org.transitclock.modules.Module.start(Module.java:94) [Core.jar:na]
at org.transitclock.applications.Core.main(Core.java:505) [Core.jar:na]



from where should I copy that module? 








--
Best Regards
Gevork 

Gevork Grigorian

unread,
Sep 21, 2019, 5:43:04 AM9/21/19
to Nathan Selikoff, TheTransitClock, Óg Crudden
Ok My Bad. The class name was wrong 



transitclock.autoBlockAssigner.autoAssignerEnabled=true
transitclock.modules.optionalModulesList=org.transitclock.custom.traccar.TraccarAVLModule
transitclock.avl.traccar.email=LOGINEMAIL
transitclock.avl.traccar.password=MYPASSHERE
transitclock.avl.traccar.baseurl=http://TRACCARIP/api/
transitclock.avl.traccar.source=Traccar
transitclock.hibernate.connection.url=jdbc:postgresql://127.0.0.1:5432/agency-vabus


and I am getting 




HHH000046: Connection properties: {user=postgres, password=****}
HHH000006: Autocommit mode: false
HHH000400: Using dialect: org.hibernate.dialect.PostgreSQLDialect
HHH000424: Disabling contextual LOB creation as createClob() method threw error : java.lang.reflect.InvocationTargetException
HHH000399: Using default transaction strategy (direct JDBC transactions)
HHH000397: Using ASTQueryTranslatorFactory
caching blocks....
caching complete
Finished reading configuration data from database . Took 555 msec.

Starting module org.transitclock.core.TimeoutHandlerModule for agencyId=vabus
Starting up optional modules specified via transitclock.modules.optionalModulesList param:
Starting up optional module org.transitclock.custom.traccar.TraccarAVLModule
Could not run module org.transitclock.custom.traccar.TraccarAVLModule
java.lang.reflect.InvocationTargetException: null
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[na:1.8.0_222]
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[na:1.8.0_222]
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[na:1.8.0_222]
at java.lang.reflect.Constructor.newInstance(Constructor.java:423) ~[na:1.8.0_222]
at org.transitclock.modules.Module.start(Module.java:113) [Core.jar:na]

at org.transitclock.modules.Module.start(Module.java:94) [Core.jar:na]
at org.transitclock.applications.Core.main(Core.java:505) [Core.jar:na]
Caused by: io.swagger.client.ApiException: HTTP 404 Not Found - NotFoundException (...)
at io.swagger.client.ApiClient.invokeAPI(ApiClient.java:644) ~[Core.jar:na]
at io.swagger.client.api.DefaultApi.sessionPost(DefaultApi.java:2666) ~[Core.jar:na]
at org.transitclock.custom.traccar.TraccarAVLModule.<init>(TraccarAVLModule.java:73) ~[Core.jar:na]
... 7 common frames omitted
Setting up AbstractServer for RMI using secondary port=0
Setting up AbstractServer for RMI using secondary port=0
Setting up AbstractServer for RMI using secondary port=0
Setting up AbstractServer for RMI using secondary port=0
Setting up AbstractServer for RMI using secondary port=0
Setting up AbstractServer for RMI using secondary port=0
Setting up AbstractServer for RMI using secondary port=0


so it's kind of not able to properly connect to API or ??? 



 
--
Best Regards
Gevork 

Óg Crudden

unread,
Sep 21, 2019, 9:02:37 AM9/21/19
to Gevork Grigorian, Nathan Selikoff, TheTransitClock
Hi Gevork,

These parameters are not set to point to your Traccar server. You are getting a 404 which is a not found exception for the baseurl you configured.

Cheers,
Sean.

transitclock.avl.traccar.email=LOGINEMAIL
transitclock.avl.traccar.password=MYPASSHERE
transitclock.avl.traccar.baseurl=http://TRACCARIP/api/

Gevork Grigorian

unread,
Sep 21, 2019, 9:06:02 AM9/21/19
to Óg Crudden, Nathan Selikoff, TheTransitClock
But with the same Login/Password  and Link combination I am connecting from the Laravel perfectly. 

Do you think it's only a problem with the login/password/url values?
--
Best Regards
Gevork 

Óg Crudden

unread,
Sep 21, 2019, 9:11:20 AM9/21/19
to Gevork Grigorian, Nathan Selikoff, TheTransitClock
Hi Gevork,

"Caused by: io.swagger.client.ApiException: HTTP 404 Not Found - NotFoundException (...)"

This tells me it cannot see the baseurl. 

Cheers,
Sean.




Gevork Grigorian

unread,
Sep 21, 2019, 9:14:53 AM9/21/19
to Óg Crudden, Nathan Selikoff, TheTransitClock
http://tracker.opentransport.am/api/    if its just opened like that , it usually gives also 404. 



What is the right way to setup this baseUrl 



transitclock.avl.traccar.baseurl=http://tracker.opentransport.am 

or 

transitclock.avl.traccar.baseurl=http://tracker.opentransport.am/api 


????


Because the url is there.... maybe variable name is wrong? or the format ...

--
Best Regards
Gevork 

Gevork Grigorian

unread,
Sep 21, 2019, 9:15:56 AM9/21/19
to Óg Crudden, Nathan Selikoff, TheTransitClock
When I set it only the domain without /api 

I get 


Finished reading configuration data from database . Took 523 msec.

Starting up optional modules specified via transitclock.modules.optionalModulesList param:
Starting module org.transitclock.core.TimeoutHandlerModule for agencyId=vabus
Starting up optional module org.transitclock.custom.traccar.TraccarAVLModule
Could not run module org.transitclock.custom.traccar.TraccarAVLModule
java.lang.reflect.InvocationTargetException: null
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[na:1.8.0_222]
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[na:1.8.0_222]
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[na:1.8.0_222]
at java.lang.reflect.Constructor.newInstance(Constructor.java:423) ~[na:1.8.0_222]
at org.transitclock.modules.Module.start(Module.java:113) [Core.jar:na]
at org.transitclock.modules.Module.start(Module.java:94) [Core.jar:na]
at org.transitclock.applications.Core.main(Core.java:505) [Core.jar:na]
Caused by: io.swagger.client.ApiException: error

at io.swagger.client.ApiClient.invokeAPI(ApiClient.java:644) ~[Core.jar:na]
at io.swagger.client.api.DefaultApi.sessionPost(DefaultApi.java:2873) ~[Core.jar:na]

at org.transitclock.custom.traccar.TraccarAVLModule.<init>(TraccarAVLModule.java:73) ~[Core.jar:na]
... 7 common frames omitted
Setting up AbstractServer for RMI using secondary port=0
--
Best Regards
Gevork 

Óg Crudden

unread,
Sep 21, 2019, 9:22:03 AM9/21/19
to Gevork Grigorian, Nathan Selikoff, TheTransitClock

Gevork Grigorian

unread,
Sep 21, 2019, 9:29:19 AM9/21/19
to Óg Crudden, Nathan Selikoff, TheTransitClock
When I have set the api baseurl like this 

transitclock.avl.traccar.baseurl=http://tracker.opentransport.am/api

it went throught. Seems the problem was the ending slash...

But still transitime dont see the vehicles. How I can run GetPositions.java file? 





--
Best Regards
Gevork 

Óg Crudden

unread,
Sep 21, 2019, 9:38:20 AM9/21/19
to Gevork Grigorian, Nathan Selikoff, TheTransitClock
Hi Gevork,

You will need to set parameters for min/max longitude and latitude like this for your country. 


Cheers,
Sean.



Gevork Grigorian

unread,
Sep 21, 2019, 9:40:18 AM9/21/19
to Óg Crudden, Nathan Selikoff, TheTransitClock
Aha! I will now and will report back . 



--
Best Regards
Gevork 

Gevork Grigorian

unread,
Sep 21, 2019, 9:54:15 AM9/21/19
to Óg Crudden, Nathan Selikoff, TheTransitClock
Still no vehicles 







<avl> looks like this 


   <avl>
        <!-- URL for GTFS realtime vechicle location stream. Changed name in versions do use both for the moment. -->
        <gtfsRealtimeFeedURI>GTFSRTVEHICLEPOSITIONS</gtfsRealtimeFeedURI>
                <url>GTFSRTVEHICLEPOSITIONS</url>
                <!--  These are the values used for Irish Rail. -->
         <minLongitude>43.417969</minLongitude>
        <maxLongitude>47.010498</maxLongitude>
        <minLatitude>38.788345</minLatitude>
        <maxLatitude>41.219986</maxLatitude>

        <feedPollingRateSecs>30</feedPollingRateSecs>

    </avl>


should I remove gtfsRealtimeFeedURI ? Or maybe need to setup something else?














--
Best Regards
Gevork 

Óg Crudden

unread,
Sep 21, 2019, 10:02:19 AM9/21/19
to Gevork Grigorian, Nathan Selikoff, TheTransitClock
You will need to look in TheTransitClock log files to see what is happening. In particular, files called core.log and avl.log.

Gevork Grigorian

unread,
Sep 21, 2019, 10:08:17 AM9/21/19
to Óg Crudden, Nathan Selikoff, TheTransitClock

Seems AUTH problem, but why .... ??? 

I am already losing a hope...


Error accessing AVL feed using URL=null.
io.swagger.client.ApiException: Manager access required - SecurityException (PermissionsManager:178 < *:308 < PositionResource:58 < ...)

at io.swagger.client.ApiClient.invokeAPI(ApiClient.java:644) ~[Core.jar:na]
at io.swagger.client.api.DefaultApi.positionsGet(DefaultApi.java:2327) ~[Core.jar:na]
at org.transitclock.custom.traccar.TraccarAVLModule.getAndProcessData(TraccarAVLModule.java:83) ~[Core.jar:na]
at org.transitclock.avl.PollUrlAvlModule.run(PollUrlAvlModule.java:249) ~[Core.jar:na]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [na:1.8.0_222]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [na:1.8.0_222]
at java.lang.Thread.run(Thread.java:748) [na:1.8.0_222]
at org.transitclock.utils.threading.NamedThread.run(NamedThread.java:100) [Core.jar:na]
Error accessing AVL feed using URL=null.
io.swagger.client.ApiException: Manager access required - SecurityException (PermissionsManager:178 < *:308 < PositionResource:58 < ...)

at io.swagger.client.ApiClient.invokeAPI(ApiClient.java:644) ~[Core.jar:na]
at io.swagger.client.api.DefaultApi.positionsGet(DefaultApi.java:2327) ~[Core.jar:na]
at org.transitclock.custom.traccar.TraccarAVLModule.getAndProcessData(TraccarAVLModule.java:83) ~[Core.jar:na]
at org.transitclock.avl.PollUrlAvlModule.run(PollUrlAvlModule.java:249) ~[Core.jar:na]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [na:1.8.0_222]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [na:1.8.0_222]
at java.lang.Thread.run(Thread.java:748) [na:1.8.0_222]
at org.transitclock.utils.threading.NamedThread.run(NamedThread.java:100) [Core.jar:na]
Error accessing AVL feed using URL=null.
io.swagger.client.ApiException: Manager access required - SecurityException (PermissionsManager:178 < *:308 < PositionResource:58 < ...)

at io.swagger.client.ApiClient.invokeAPI(ApiClient.java:644) ~[Core.jar:na]
at io.swagger.client.api.DefaultApi.positionsGet(DefaultApi.java:2327) ~[Core.jar:na]
at org.transitclock.custom.traccar.TraccarAVLModule.getAndProcessData(TraccarAVLModule.java:83) ~[Core.jar:na]
at org.transitclock.avl.PollUrlAvlModule.run(PollUrlAvlModule.java:249) ~[Core.jar:na]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [na:1.8.0_222]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [na:1.8.0_222]
at java.lang.Thread.run(Thread.java:748) [na:1.8.0_222]
at org.transitclock.utils.threading.NamedThread.run(NamedThread.java:100) [Core.jar:na]
--
Best Regards
Gevork 

Gevork Grigorian

unread,
Sep 21, 2019, 10:19:58 AM9/21/19
to Óg Crudden, Nathan Selikoff, TheTransitClock
It seems API has changed 


image.png

And extra header is needed. 


I have downloaded the latest Swagger file and made maven clean and maven install -DskipTests and copied over Jar files but seems it did not work ....



Can It be that I  need to upgrade the io.swagger plugin? 









--
Best Regards
Gevork 

Gevork Grigorian

unread,
Sep 21, 2019, 2:03:53 PM9/21/19
to Óg Crudden, Nathan Selikoff, TheTransitClock
 
No Success ... I have tried 


client.addDefaultHeader("Accept", "application/json");

in 
transitclockTraccarClient/src/main/java/TheTransitClock/transitclockTraccar/GetPositions.java

and it did not  helped.. Traccar seems changes slightly  the API and now i don't know what to do :((((((((








--
Best Regards
Gevork 

Gevork Grigorian

unread,
Sep 21, 2019, 3:15:11 PM9/21/19
to Óg Crudden, Nathan Selikoff, TheTransitClock
Ok I have found the reason!!!!


Apparently  the problem is in user.getId();

it has  to be removed as when in api call ?id=x is added , the API will return 400error

List<Position> results = api.positionsGet(null, null, null, user.getId());

should be 

List<Position> results = api.positionsGet(null, null, null, null);

i will send a pull request 
--
Best Regards
Gevork 

Gevork Grigorian

unread,
Sep 21, 2019, 5:45:14 PM9/21/19
to Óg Crudden, Nathan Selikoff, TheTransitClock

Is that OK that heading is NAN and speed also NAN? 




Thread=avlClient-1 AvlClient processing AVL data AvlReport [vehicleId=16, time=09-22-2019 01:02:50.441 AMT, location=[40.16544, 44.29399], speed=NaN, heading=NaN, source=Traccar, assignmentId=null, assignmentType=UNSET]
Thread=avlClient-1 AvlClient processing AVL data AvlReport [vehicleId=17, time=09-22-2019 01:02:50.583 AMT, location=[40.16384, 44.28872], speed=NaN, heading=NaN, source=Traccar, assignmentId=null, assignmentType=UNSET]
Thread=avlClient-1 AvlClient processing AVL data AvlReport [vehicleId=15, time=09-22-2019 01:02:50.371 AMT, location=[40.16584, 44.32761], speed=NaN, heading=NaN, source=Traccar, assignmentId=null, assignmentType=UNSET]
--
Best Regards
Gevork 

Gevork Grigorian

unread,
Sep 21, 2019, 7:19:31 PM9/21/19
to Óg Crudden, Nathan Selikoff, TheTransitClock
Ok, sorry, I am slowly getting in. Modified the AVL module of Traccar so that it passes the values. 

--
Best Regards
Gevork 

Gevork Grigorian

unread,
Sep 22, 2019, 10:43:55 AM9/22/19
to Óg Crudden, Nathan Selikoff, TheTransitClock
I wish you nice weekend and Sunday, guys. 

I have passed a long path with Transitclock, and hope you can bear with me  a little bit and I will finalize this project .... 

So 

image.png



Now when from traccar I feed right data....  Which you can see down, could you help me to understand better the matching ...?




Now with only the normal  AVL Module of traccar it could match the first bus which started from the first bus , and started to move alongside,  it lost it's route id after second stop (probably because stop was too long?) and when it moved further it did not reassign the route ID to it ....

Could you hint what could be the reason? 



I have tried also to enable Traccar BareFoot AVL  module , but  it seems the format of the data it was sending was not appropriate for BareFoot server , and it was rejecting by saying that "Request" json is missin or something... :(((( 



Could you hint me on the right direction? 








Throwing away AVL report because it is same time or older than the previous AVL report for the vehicle. New AVL report is AvlReport [vehicleId=17, time=09-22-2019 18:38:58.107 AMT, location=[40.16611, 44.31750], speed=8.6m/s, heading=93.0 deg, source=Traccar, assignmentId=null, assignmentType=UNSET]. Previous valid AVL report is AvlReport [vehicleId=17, time=09-22-2019 18:38:58.107 AMT, timeProcessed=09-22-2019 18:38:58.710 AMT, location=[40.16611, 44.31750], speed=8.6m/s, heading=93.0 deg, source=Traccar, assignmentId=null, assignmentType=UNSET]
Thread=avlClient-1 AvlClient processing AVL data AvlReport [vehicleId=15, time=09-22-2019 18:39:00.953 AMT, location=[40.16868, 44.30011], speed=4.5m/s, heading=316.3 deg, source=Traccar, assignmentId=null, assignmentType=UNSET]
Thread=avlClient-1 AvlClient processing AVL data AvlReport [vehicleId=16, time=09-22-2019 18:39:03.635 AMT, location=[40.16576, 44.29947], speed=2.5m/s, heading=68.4 deg, source=Traccar, assignmentId=null, assignmentType=UNSET]
Thread=avlClient-1 AvlClient processing AVL data AvlReport [vehicleId=17, time=09-22-2019 18:39:03.132 AMT, location=[40.16608, 44.31840], speed=8.0m/s, heading=93.1 deg, source=Traccar, assignmentId=null, assignmentType=UNSET]
Thread=avlClient-1 AvlClient processing AVL data AvlReport [vehicleId=15, time=09-22-2019 18:39:05.983 AMT, location=[40.16902, 44.29968], speed=4.8m/s, heading=316.2 deg, source=Traccar, assignmentId=null, assignmentType=UNSET]
Thread=avlClient-1 AvlClient processing AVL data AvlReport [vehicleId=16, time=09-22-2019 18:39:08.668 AMT, location=[40.16588, 44.29989], speed=5.1m/s, heading=68.4 deg, source=Traccar, assignmentId=null, assignmentType=UNSET]
Thread=avlClient-1 AvlClient processing AVL data AvlReport [vehicleId=17, time=09-22-2019 18:39:08.175 AMT, location=[40.16605, 44.31908], speed=7.5m/s, heading=93.3 deg, source=Traccar, assignmentId=null, assignmentType=UNSET]
Throwing away AVL report because it is same time or older than the previous AVL report for the vehicle. New AVL report is AvlReport [vehicleId=15, time=09-22-2019 18:39:05.983 AMT, location=[40.16902, 44.29968], speed=4.8m/s, heading=316.2 deg, source=Traccar, assignmentId=null, assignmentType=UNSET]. Previous valid AVL report is AvlReport [vehicleId=15, time=09-22-2019 18:39:05.983 AMT, timeProcessed=09-22-2019 18:39:06.709 AMT, location=[40.16902, 44.29968], speed=4.8m/s, heading=316.2 deg, source=Traccar, assignmentId=null, assignmentType=UNSET]

--
Best Regards
Gevork 

Gevork Grigorian

unread,
Sep 22, 2019, 10:45:01 AM9/22/19
to Óg Crudden, Nathan Selikoff, TheTransitClock
image.png

Here some example... middle of the route ... :( 
--
Best Regards
Gevork 

Gevork Grigorian

unread,
Sep 22, 2019, 2:37:42 PM9/22/19
to Óg Crudden, Nathan Selikoff, TheTransitClock
Sorry that I am so annoying, but here my settings I come up with reading the code 


transitclock.modules.optionalModulesList=org.transitclock.custom.traccar.TraccarAVLModule
transitclock.autoBlockAssigner.autoAssignerEnabled=true
transitclock.autoBlockAssigner.ignoreAvlAssignments=true
transitclock.autoBlockAssigner.minDistanceFromCurrentReport=1
transitclock.autoBlockAssigner.allowableEarlySeconds=250000
transitclock.autoBlockAssigner.allowableLateSeconds=2500000
transitclock.autoBlockAssigner.minTimeBetweenAutoAssigningSecs=5


What do you think?  Which options else I should consider? 












--
Best Regards
Gevork 

Óg Crudden

unread,
Sep 22, 2019, 2:41:03 PM9/22/19
to Gevork Grigorian, Nathan Selikoff, TheTransitClock
Hi Gevork,

If you look at the log files in the directory that has your core.log file it should give you more information on matching. Also, there is a table in the database called Vehicle Events which will have some useful information.

Cheers,
Sean.

Gevork Grigorian

unread,
Sep 22, 2019, 2:45:39 PM9/22/19
to Óg Crudden, Nathan Selikoff, TheTransitClock
In database I  see there is Vehicle had 3 bad spatial matches in a row and so was made unpredictable. 



Can this be a reason on the former problem? 



How can I  resolve this?



--
Best Regards
Gevork 

Óg Crudden

unread,
Sep 22, 2019, 2:47:53 PM9/22/19
to Gevork Grigorian, Nathan Selikoff, TheTransitClock
I suspect your vehicle is too early of too late compared to your schedule. 

Look in coreConfig.log for some of the possible settings and their meaning.

Gevork Grigorian

unread,
Sep 22, 2019, 2:49:58 PM9/22/19
to Óg Crudden, Nathan Selikoff, TheTransitClock
But I have set maxlate and maxearly to a very big number as you see in my former email. Shouldn't it solve the problem? 

--
Best Regards
Gevork 

Óg Crudden

unread,
Sep 22, 2019, 2:51:35 PM9/22/19
to Gevork Grigorian, Nathan Selikoff, TheTransitClock
You need to look at the config values in coreConfig.log for settings related to auto-assignment.

Gevork Grigorian

unread,
Sep 23, 2019, 9:14:51 AM9/23/19
to Óg Crudden, Nathan Selikoff, TheTransitClock
coreConfig.log  te .java? 

I am still getting very bad predictions :(
Here is my setup 


transitclock.autoBlockAssigner.autoAssignerEnabled=true
transitclock.autoBlockAssigner.ignoreAvlAssignments=true
transitclock.autoBlockAssigner.minDistanceFromCurrentReport=50
transitclock.autoBlockAssigner.allowableEarlySeconds=25000
transitclock.autoBlockAssigner.allowableLateSeconds=25000
transitclock.core.allowableEarlyForLayoverSeconds=25000
transitclock.core.allowableEarlySecondsForInitialMatching=25000
transitclock.core.allowableLateSecondsForInitialMatching=25000
transitclock.core.allowableEarlyTimeForEarlyDepartureSecs=3000
transitclock.core.allowableLateDepartureTimeForLoggingEvent=6000
transitclock.core.beforeStopDistance=50
transitclock.core.afterStopDistance=50
transitclock.holding.usearrivalpredictions
transitclock.autoBlockAssigner.minTimeBetweenAutoAssigningSecs=5
transitclock.gtfs.minDistanceBetweenStopsToDisambiguateHeadsigns=200
transitclock.core.allowableNumberOfBadMatches=700
transitclock.core.terminalDistanceForRouteMatching=100
transitclock.core.maxDistanceForAssignmentGrab=1000
transitclock.core.maxMatchDistanceFromAVLRecord=1000
transitclock.modules.optionalModulesList=org.transitclock.custom.traccar.TraccarAVLModule
transitclock.avl.traccar.email=loginEmail
transitclock.avl.traccar.password=pass
transitclock.avl.traccar.baseurl=http://IP:80/api
transitclock.avl.traccar.source=Traccar
transitclock.avl.minLongitude=0
transitclock.avl.maxLongitude=77.010498
transitclock.avl.minLatitude=0.788345
transitclock.avl.maxLatitude=88.219986
transitclock.avl.feedPollingRateSecs=4
transitclock.avl.barefoot.port=1234
transitclock.avl.barefoot.server=localhost




Should I try to activate BareFoot ?  It was not working properly , seems the format of request need to be revised.  But maybe the problem  are in the settings...


I wonder is there a setting, which allows to make unpredictible car again predictible automatically after xseconds?










--
Best Regards
Gevork 

Gevork Grigorian

unread,
Sep 23, 2019, 1:30:43 PM9/23/19
to Nathan Selikoff, Óg Crudden, TheTransitClock
Ok, Barefoot Send from TraccarBarefoot modul was failing, I have modified it to match the newer format that barefoot required which is 

[{pointDataHere}]


it was sent without [] 






I have activated both modules but vehicles disappeared 


transitclock.modules.optionalModulesList=org.transitclock.custom.traccar.TraccarBarefootAVLModule;org.transitclock.custom.barefoot.BarefootAVLModule


but cars are not appearing :(








Reply all
Reply to author
Forward
0 new messages