Skip to content

Assertion on 'speed' failed when building emission model #102

Answered by Joaobazzo
nadiaqamilla asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @nadiaqamilla ,
Thanks for bringing this up. I don't have the Transjakarta GTFS to reproduce the results, but it seems a familiar issue. This probably happens because there is an invalid speed being input into the emissions model (which could be NA, Inf, or NaN). One possible workaround is fixing the speed of the shape_id xwq4. In the example below, I changed the speed values to 36 km/h. Let me know if this works for you.

 library(gtfstools)
library(data.table)
library(gtfs2gps)
library(magrittr)
library(gtfs2emis)

# run transport model (for only shape_id "xwq4")
tp_model_fix_speed <- gtfs_data %>% 
  gtfstools::filter_by_shape_id("xwq4") %>% 
  gtfs2gps::gtfs2gps() %>% 
  gtfs2gps::a…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by nadiaqamilla
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants