Skip to content

Inference Engine Debugging

denishaskin edited this page Jan 15, 2015 · 7 revisions

Setup

The local-ie-testing profile exists on the onebusaway-nyc-vehicle-tracking-webapp for debugging purposes, it allows a local bundle to be loaded and run through a debugger. Note that bundles may require large amounts of RAM to load properly, which may in-turn require a 64-bit O/S to address.

The best examples of debugging exist in the integration tests, and the bundles and traces provided by the integration tests. Complete information on how to create a trace for debugging and testing the Inference Engine can be found on the [Inference Engine Traces](Inference Engine Traces) page.

Configuring Inference Engine

  1. Get a fresh copy of onebusaway-nyc
    user@ubuntu:~src$ git clone git@github:camsys/onebusaway-nyc.git
  2. From Package Explorer, right-click, choose Import -> Maven -> Existing project and choose ~/src/onebusaway-nyc
  3. After the import and initial build complete, right-click on onebusaway-nyc-integration-tests, choose Run As, Run Configuration, double click Maven Build, set base directory to be ~/src/onebusaway-nyc/onebusaway-nyc-integration-tests, and Goals: "pre-integration-test", and select run
  4. The console should indicate bundles are building. This will take some time
  5. Copy the built bundles to the location the vehicle-tracking-webapp expects them:
    sudo mkdir -r /var/lib/obanyc/oba-bundle && sudo chown dev:dev /var/lib/obanyc/oba-bundle && cp -r ~/src/onebusaway-nyc/onebusaway-nyc-integration-tests/target/transit-data-bundle/* /var/lib/obanyc/oba-bundle/
  6. Right-click on onebusaway-nyc-vehicle-tracking-webapp, select Maven, and add the profile "local-ie-testing", click apply
  7. (This assumes tomcat-eclipse integration) Open the properties and then launch configuration of Tomcat. Add the following to the arguments:
    -Dorg.onebusaway.webapp.port=8080 -Dorg.onebusaway.transit_data_federation_webapp.port=8080 -Xmx6096m -XX:MaxPermSize=256m
  8. Right-click on onebusaway-nyc-vehicle-tracking-webapp, select Run-as, Run On Server

The local-ie-testing profile expects the bundle to be at /var/lib/obanyc/oba-vtw-bundle.

Running SIRI Integrations Tests

Skip this section if you are running a typical integration test. SIRI tests introduce a dependency on the NYC webapp.

  1. Edit to onebusaway-nyc-webapp/src/main/resources/org/onebusaway/nyc/webapp/application-context-webapp.xml, changing the create api key value from OBANYC to TEST
    property name="key" value="TEST"
  2. Right-click on onebusaway-nyc-webapp, select Maven, and add the profile "local-ie", click apply.
  3. Right-click on onebusaway-nyc-webapp, select Run-as, Run On Server.

Loading a Trace

  1. Browse to http://localhost:8080/onebusway-nyc-vehicle-tracking-webapp
  2. Click Bundle Status
  3. Select 2012September_Bronx_r10_b03 from the bundle drop down list and click "Change Bundle..."
  4. Browse back to http://localhost:8080/onebusway-nyc-vehicle-tracking-webapp
  5. Select Vehicle Simulator
  6. Select Browse and choose ~/src/onebusaway-nyc/onebusaway-nyc-integration-tests/src/integration-test/resources/traces/324-deadhead-labeled.csv
  7. Click submit
  8. Click map to view the trace. Click refresh if trace is not complete

Map Legend

Symbol Meaning
Green peg In Progress
Red peg Deadhead
Blue peg Layover
Grey with orange dot In service DSC but inference not in progress
## Using Vehicle Simulator 1. Click Back... 1. Click records 1. Select a record, then select a logP link. This contains the internal state for the highest probabililty particle. Most tweaks to the inference engine go off this page versus the values of the competing particles.
Clone this wiki locally