matsim-melbourne / demand

MATSim Melbourne demand
MIT License
3 stars 5 forks source link

'filter_' applied to an object of class "NULL" in 5% sample #6

Closed jafshin closed 3 years ago

jafshin commented 4 years ago

I tried building the 5% sample using Dev branch - commit 9fa5cd359e25dfa7f328e28cea9b295f2f60595c - it successfully passes the tests in my local computer, but when building the big population I get this error at the Assigning activities' SA1s and travel modes step and at ~76850th activity:

Error in UseMethod("filter_") : 
  no applicable method for 'filter_' applied to an object of class "NULL"
Calls: runexample ... freduce -> <Anonymous> -> filter -> filter.default -> filter_
In addition: Warning message:
`filter_()` is deprecated as of dplyr 0.7.0.
Please use `filter()` instead.

here is the logfile (logfile.txt) that includes the full error message at the end and here you can find the outputs up to the point of error: https://cloudstor.aarnet.edu.au/plus/s/czQoG7gqnoNpYD4

Also here is my git diff for reference:

diff --git a/R/makeExamplePopulation.R b/R/makeExamplePopulation.R
index 6d80578..0237288 100644
--- a/R/makeExamplePopulation.R
+++ b/R/makeExamplePopulation.R
@@ -42,7 +42,7 @@ makeExamplePopulation<-function(samplePercent, numPlans, do.steps=c(T,T,T,T,T,T,
       source('setup.R', local=TRUE); 
       source('locations.R', local=TRUE);
       demand_setup('../output/1.setup', 
-                   '../data/VISTA_12_18_CSV.zip.dir/T_VISTA1218_V1.csv')
+                   '../data/VISTA_12_18_CSV/T_VISTA1218_V1.csv')
       locations_setup(
         '../output/1.setup', 
         '../data/distanceMatrix.rds', 
@@ -155,7 +155,7 @@ makeExamplePopulation<-function(samplePercent, numPlans, do.steps=c(T,T,T,T,T,T,
 }

 runexample<-function() {
-  samplePercent<- 0.1 # use 0.1% sample of the census-like synthetic population (<5k persons)
+  samplePercent<- 5 # use 0.1% sample of the census-like synthetic population (<5k persons)
   do.steps <- c(T,T,T,T,T,T,T,T) # which algorithm steps to run
   makeExamplePopulation(samplePercent, numPlans, do.steps) 
 }

logfile.txt

dhixsingh commented 4 years ago

@jafshin I have merged in various fixes to the dev branch including the parallel-locate feature which speeds up XY assignment of activity locations. Could you check if this issue still persists?

jafshin commented 3 years ago

@dhixsingh, yes I can confirm this issue is now fixed.